diff options
author | jcid <devnull@localhost> | 2007-11-05 13:49:20 +0100 |
---|---|---|
committer | jcid <devnull@localhost> | 2007-11-05 13:49:20 +0100 |
commit | 080db1da41cc8d22ed8f1467c477c8df2d6cae14 (patch) | |
tree | 078393bb3b791e0e0ec6d4cdf663f4c68657de29 /src | |
parent | f1c811338fc81b4c2fc79a6037d8b4774ef923f7 (diff) |
- Enabled hiding widgets of the control panel from dillorc2.
Diffstat (limited to 'src')
-rw-r--r-- | src/ui.cc | 41 | ||||
-rw-r--r-- | src/ui.hh | 1 |
2 files changed, 36 insertions, 6 deletions
@@ -440,8 +440,8 @@ PackedGroup *UI::make_location() */ PackedGroup *UI::make_progress_bars(int wide, int thin_up) { - PackedGroup *pg = new PackedGroup(0,0,0,0); - pg->begin(); + ProgBox = new PackedGroup(0,0,0,0); + ProgBox->begin(); // Images IProg = new InvisibleBox(0,0,pr_w,0, wide ? "Images\n0 of 0" : "0 of 0"); @@ -453,10 +453,10 @@ PackedGroup *UI::make_progress_bars(int wide, int thin_up) PProg->box(thin_up ? THIN_UP_BOX : EMBOSSED_BOX); PProg->labelcolor(GRAY10); - pg->type(PackedGroup::ALL_CHILDREN_VERTICAL); - pg->end(); + ProgBox->type(PackedGroup::ALL_CHILDREN_VERTICAL); + ProgBox->end(); - return pg; + return ProgBox; } /* @@ -674,6 +674,8 @@ UI::UI(int win_w, int win_h, const char* label) : add_event_handler(global_event_handler); + customize(0); + //show(); } @@ -805,7 +807,32 @@ void UI::set_bug_prog(int n_bug) */ void UI::customize(int flags) { - Save->hide(); + // flags argument not currently used + + if ( !prefs.show_menubar ) + MSG("show_menubar preference ignored\n"); + if ( !prefs.show_back ) + Back->hide(); + if ( !prefs.show_forw ) + Forw->hide(); + if ( !prefs.show_home ) + Home->hide(); + if ( !prefs.show_reload ) + Reload->hide(); + if ( !prefs.show_save ) + Save->hide(); + if ( !prefs.show_stop ) + Stop->hide(); + if ( !prefs.show_bookmarks ) + Bookmarks->hide(); + if ( !prefs.show_clear_url ) + Clear->hide(); + if ( !prefs.show_url ) + Location->hide(); + if ( !prefs.show_search ) + Search->hide(); + if ( !prefs.show_progress_box ) + ProgBox->hide(); } /* @@ -821,6 +848,8 @@ void UI::panel_cb_i() TopGroup->replace(*Panel, *NewPanel); delete(Panel); Panel = NewPanel; + customize(0); + // Scale the viewport int p_h = Panel->h(); Main->resize(0, p_h, TopGroup->w(), TopGroup->h() - p_h - Status->h()); @@ -36,6 +36,7 @@ class UI : public fltk::Window { Button *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks, *Clear, *Search, *FullScreen, *ImageLoad, *BugMeter; Input *Location; + PackedGroup *ProgBox; Widget *PProg, *IProg; Image *ImgLeftIns, *ImgLeftSens, *ImgRightIns, *ImgRightSens, *ImgStopIns, *ImgStopSens, *ImgFullScreenOn, *ImgFullScreenOff, |