Modify

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#12927 closed enhancement (fixed)

[Patch] Move title management and main frame layout to new class.

Reported by: michael2402 Owned by: team
Priority: normal Milestone: 16.06
Component: Core Version:
Keywords: gsoc-core Cc: Don-vip, bastiK, stoecker

Description (last modified by michael2402)

Work for #12925

Create a new MainFrame class to:

  • Move the refreshTitle() out of MapView
  • Move the window icon code there
  • Move maximized check there
  • Add a new reference to the main window to MainApplication
  • Restructure some hooks to resolve dependencies during startup.
  • Main() does not do the work in the constructor any more and uses initialize():

To be done later:

  • Clean up Icon code
  • Re-enable the test that checks if the window size parameter works (does not work now since we cannot construct the frame in headless mode)

Attachments (1)

patch-main-add-main-frame.patch (29.0 KB ) - added by michael2402 8 years ago.

Download all attachments as: .zip

Change History (9)

by michael2402, 8 years ago

comment:1 by michael2402, 8 years ago

Description: modified (diff)

comment:2 by stoecker, 8 years ago

Hmm, are the two classes Main/MainApplication still necessary? I think that was mainly made due to the applet functionality, which has been dropped inbetween. Maybe that can be unified as well if you already start working at it?

comment:3 by michael2402, 8 years ago

Currently, they are a bit mixed up and unstructured. I would suggest to keep them:

  • Leave all public stuff in Main (global fields, ...)
  • Move the startup code and other lifecycle things to MainApplication.

MainApplication might not even need to extend Main any more - but at the moment, the whole code has complicated dependencies and the order in which components are initialized (often in constructor / static blocks) is enforced by the order in which classes are loaded.

comment:4 by stoecker, 8 years ago

Vincent, bastiK: If ok (I think so), please apply. I can't today.

comment:5 by Don-vip, 8 years ago

Milestone: 16.06

comment:6 by Don-vip, 8 years ago

Resolution: fixed
Status: newclosed

In 10340/josm:

fix #12927 - Move title management and main frame layout to new class (patch by michael2402) - gsoc-core

comment:7 by Don-vip, 8 years ago

looks ok I just fixed a typo (initalize => initialize)

comment:8 by michael2402, 8 years ago

Thanks for the typo - didn't see that.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.