Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 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 3 years ago.

Download all attachments as: .zip

Change History (9)

Changed 3 years ago by michael2402

comment:1 Changed 3 years ago by michael2402

Description: modified (diff)

comment:2 Changed 3 years ago by stoecker

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 Changed 3 years ago by michael2402

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 Changed 3 years ago by stoecker

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

comment:5 Changed 3 years ago by Don-vip

Milestone: 16.06

comment:6 Changed 3 years ago by Don-vip

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 Changed 3 years ago by Don-vip

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

comment:8 Changed 3 years ago by michael2402

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.