aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2011-04-21 13:14:44 -0300
committerJorge Arellano Cid <jcid@dillo.org>2011-04-21 13:14:44 -0300
commit5567884e9d110921ec880bfb886acdb3ab7e2a65 (patch)
treed58af7091dd0a2d72818f8e7e76cf3d8d46b116d
parentf65cb8b1c2ec26474f2629de4c2b31de1993ffe8 (diff)
Made on-the-fly control panel work again
-rw-r--r--src/ui.cc28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/ui.cc b/src/ui.cc
index db56ea60..f6ad84cd 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -1017,18 +1017,26 @@ void UI::customize(int flags)
*/
void UI::panel_cb_i()
{
-#if 0
- Fl_Group *NewPanel;
-
- // Create a new Panel
+ // Remove current panel's bars
+ init_sizes();
+ TopGroup->remove(MenuBar);
+ Fl::delete_widget(MenuBar);
+ TopGroup->remove(LocBar);
+ Fl::delete_widget(LocBar);
+ TopGroup->remove(NavBar);
+ Fl::delete_widget(NavBar);
+ MenuBar = LocBar = NavBar = NULL;
+
+ // make a new panel
++PanelSize;
- NewPanel = make_panel(TopGroup->w());
- TopGroup->remove(Panel);
- delete(Panel);
- TopGroup->add(NewPanel);
- Panel = NewPanel;
+ make_panel(TopGroup->w());
customize(0);
-#endif
+
+ // adjust Main's height
+ int main_h = h() - (mh+(LocBar?lh:0)+nh+(FindBarSpace?fh:0)+sh);
+ Main->size(Main->w(), main_h);
+ redraw();
+
Location->take_focus();
}