aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.cc
diff options
context:
space:
mode:
authorsimonb <simonb>2006-03-22 13:06:00 (GMT)
committersimonb <simonb>2006-03-22 13:06:00 (GMT)
commit5e22dcd9ff8cb8a173992bf57b592a7f8cfd66f5 (patch)
treeb57412ffe8799f4a59db1f43e58fcfbc6ab5b841 /src/Screen.cc
parentfe4a7db228d69bc9a66ed948f218ef489b2cedaf (diff)
downloadfluxbox-5e22dcd9ff8cb8a173992bf57b592a7f8cfd66f5.zip
fluxbox-5e22dcd9ff8cb8a173992bf57b592a7f8cfd66f5.tar.bz2
more external tab work, tidying and tab width config option
Diffstat (limited to 'src/Screen.cc')
-rw-r--r--src/Screen.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 851e407..a69e7fe 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -270,6 +270,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
270 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"), 270 menu_alpha(rm, 255, scrname+".menu.alpha", altscrname+".Menu.Alpha"),
271 menu_delay(rm, 0, scrname + ".menuDelay", altscrname+".MenuDelay"), 271 menu_delay(rm, 0, scrname + ".menuDelay", altscrname+".MenuDelay"),
272 menu_delay_close(rm, 0, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"), 272 menu_delay_close(rm, 0, scrname + ".menuDelayClose", altscrname+".MenuDelayClose"),
273 tab_width(rm, 64, scrname + ".tab.width", altscrname+".Tab.Width"),
273 menu_mode(rm, FbTk::MenuTheme::DELAY_OPEN, scrname+".menuMode", altscrname+".MenuMode"), 274 menu_mode(rm, FbTk::MenuTheme::DELAY_OPEN, scrname+".menuMode", altscrname+".MenuMode"),
274 275
275 gc_line_width(rm, 1, scrname+".overlay.lineWidth", altscrname+".Overlay.LineWidth"), 276 gc_line_width(rm, 1, scrname+".overlay.lineWidth", altscrname+".Overlay.LineWidth"),
@@ -287,7 +288,7 @@ BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm,
287 altscrname+".overlay.CapStyle"), 288 altscrname+".overlay.CapStyle"),
288 scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"), 289 scroll_action(rm, "", scrname+".windowScrollAction", altscrname+".WindowScrollAction"),
289 scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse"), 290 scroll_reverse(rm, false, scrname+".windowScrollReverse", altscrname+".WindowScrollReverse"),
290 default_internal_tabs(rm, false /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") { 291 default_internal_tabs(rm, true /* TODO: autoconf option? */ , scrname+".tabs.intitlebar", altscrname+".Tabs.InTitlebar") {
291 292
292 293
293} 294}
@@ -900,7 +901,7 @@ void BScreen::reconfigureTabs() {
900 Workspace::Windows::iterator win_it = (*w_it)->windowList().begin(); 901 Workspace::Windows::iterator win_it = (*w_it)->windowList().begin();
901 const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end(); 902 const Workspace::Windows::iterator win_it_end = (*w_it)->windowList().end();
902 for (; win_it != win_it_end; ++win_it) { 903 for (; win_it != win_it_end; ++win_it) {
903 (*win_it)->frame().setTabPlacement(*resource.tab_placement); 904 (*win_it)->frame().updateTabProperties();
904 if (*resource.default_internal_tabs) 905 if (*resource.default_internal_tabs)
905 (*win_it)->frame().setTabMode(FbWinFrame::INTERNAL); 906 (*win_it)->frame().setTabMode(FbWinFrame::INTERNAL);
906 else 907 else
@@ -1642,11 +1643,21 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) {
1642 "Tabs in Titlebar", "Tabs in Titlebar", 1643 "Tabs in Titlebar", "Tabs in Titlebar",
1643 *resource.default_internal_tabs, save_and_reconftabs); 1644 *resource.default_internal_tabs, save_and_reconftabs);
1644 1645
1646 FbTk::MenuItem *tab_width_item =
1647 new IntResMenuItem(_FBTEXT(Configmenu, ExternalTabWidth,
1648 "External Tab Width",
1649 "Width of external-style tabs"),
1650 resource.tab_width, 10, 3000, /* silly number */
1651 *tab_menu);
1652 tab_width_item->setCommand(save_and_reconftabs);
1653 tab_menu->insert(tab_width_item);
1654
1655
1645 typedef pair<const char*, FbWinFrame::TabPlacement> PlacementP; 1656 typedef pair<const char*, FbWinFrame::TabPlacement> PlacementP;
1646 typedef list<PlacementP> Placements; 1657 typedef list<PlacementP> Placements;
1647 Placements place_menu; 1658 Placements place_menu;
1648 1659
1649 // menu is 3 wide, 5 down 1660 // menu is 2 wide, 2 down
1650 place_menu.push_back(PlacementP(_FBTEXT(Align, TopLeft, "Top Left", "Top Left"), FbWinFrame::TOPLEFT)); 1661 place_menu.push_back(PlacementP(_FBTEXT(Align, TopLeft, "Top Left", "Top Left"), FbWinFrame::TOPLEFT));
1651 place_menu.push_back(PlacementP(_FBTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), FbWinFrame::BOTTOMLEFT)); 1662 place_menu.push_back(PlacementP(_FBTEXT(Align, BottomLeft, "Bottom Left", "Bottom Left"), FbWinFrame::BOTTOMLEFT));
1652 place_menu.push_back(PlacementP(_FBTEXT(Align, TopRight, "Top Right", "Top Right"), FbWinFrame::TOPRIGHT)); 1663 place_menu.push_back(PlacementP(_FBTEXT(Align, TopRight, "Top Right", "Top Right"), FbWinFrame::TOPRIGHT));