# HG changeset patch # User Torsten # Date 1374781914 -7200 # Node ID ceca3e65a8fe7b859f829d606b0c4a580227fb71 # Parent cb8543396024485d5b9af2a8126360733d0768dd make sure a central menu bar does not show a widgets title but "Octave" * main_window.cc(set_window_layout): show docked widgets, then main window, and finally the floating widgets to make sure the main window ist the first shown window * octave-gui.cc(octave_start_gui): do not show main window here diff -r cb8543396024 -r ceca3e65a8fe libgui/src/main-window.cc --- a/libgui/src/main-window.cc Thu Jul 25 11:32:23 2013 -0700 +++ b/libgui/src/main-window.cc Thu Jul 25 21:51:54 2013 +0200 @@ -542,6 +542,8 @@ void main_window::set_window_layout (QSettings *settings) { + QList float_and_visible; + // Restore the geometry of all dock-widgets foreach (octave_dock_widget *widget, dock_widget_list ()) { @@ -564,12 +566,21 @@ // make widget visible if desired bool visible = settings->value ("DockWidgets/" + name + "Visible", true).toBool (); - widget->setVisible (visible); + if (floating && visible) // floating and visible + float_and_visible.append (widget); // not show before main win + else + widget->setVisible (visible); // not floating -> show } } restoreState (settings->value ("MainWindow/windowState").toByteArray ()); restoreGeometry (settings->value ("MainWindow/geometry").toByteArray ()); + show (); // main window is ready and can be shown (as first window) + + // show floating widgets after main win to ensure "Octave" in central menu + foreach (octave_dock_widget *widget, float_and_visible) + widget->setVisible (true); + } void diff -r cb8543396024 -r ceca3e65a8fe libgui/src/octave-gui.cc --- a/libgui/src/octave-gui.cc Thu Jul 25 11:32:23 2013 -0700 +++ b/libgui/src/octave-gui.cc Thu Jul 25 21:51:54 2013 +0200 @@ -127,9 +127,7 @@ // create main window, read settings, and show window main_window w; - w.read_settings (); // get widget settings after construction - // but before showing - w.show (); + w.read_settings (); // get widget settings and window layout w.focus_command_window (); w.connect_visibility_changed (); // connect signals for changes in // visibility not before w is shown