diff options
-rw-r--r-- | src/FbWinFrame.cc | 4 | ||||
-rw-r--r-- | src/Screen.cc | 9 | ||||
-rw-r--r-- | src/Screen.hh | 2 | ||||
-rw-r--r-- | src/Window.cc | 2 |
4 files changed, 6 insertions, 11 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 6aa65b0..a76df66 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -316,8 +316,8 @@ void FbWinFrame::alignTabs() { | |||
316 | FbTk::Orientation orig_orient = m_tab_container.orientation(); | 316 | FbTk::Orientation orig_orient = m_tab_container.orientation(); |
317 | unsigned int orig_tabwidth = m_tab_container.maxWidthPerClient(); | 317 | unsigned int orig_tabwidth = m_tab_container.maxWidthPerClient(); |
318 | 318 | ||
319 | if (orig_tabwidth != m_screen.getTabWidth()) | 319 | if (orig_tabwidth != *m_screen.getTabWidthResource()) |
320 | m_tab_container.setMaxSizePerClient(m_screen.getTabWidth()); | 320 | m_tab_container.setMaxSizePerClient(*m_screen.getTabWidthResource()); |
321 | 321 | ||
322 | int tabx = 0, taby = 0; | 322 | int tabx = 0, taby = 0; |
323 | switch (*m_screen.getTabPlacementResource()) { | 323 | switch (*m_screen.getTabPlacementResource()) { |
diff --git a/src/Screen.cc b/src/Screen.cc index 7b57535..a04918f 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -1492,21 +1492,14 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1492 | menu.removeAll(); | 1492 | menu.removeAll(); |
1493 | 1493 | ||
1494 | FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand(); | 1494 | FbTk::MacroCommand *s_a_reconf_macro = new FbTk::MacroCommand(); |
1495 | FbTk::MacroCommand *s_a_reconftabs_macro = new FbTk::MacroCommand(); | ||
1496 | FbTk::RefCount<FbTk::Command<void> > saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( | 1495 | FbTk::RefCount<FbTk::Command<void> > saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( |
1497 | *Fluxbox::instance(), | 1496 | *Fluxbox::instance(), |
1498 | &Fluxbox::save_rc)); | 1497 | &Fluxbox::save_rc)); |
1499 | FbTk::RefCount<FbTk::Command<void> > reconf_cmd(FbTk::CommandParser<void>::instance().parse("reconfigure")); | 1498 | FbTk::RefCount<FbTk::Command<void> > reconf_cmd(FbTk::CommandParser<void>::instance().parse("reconfigure")); |
1500 | 1499 | ||
1501 | FbTk::RefCount<FbTk::Command<void> > reconftabs_cmd(new FbTk::SimpleCommand<BScreen>( | ||
1502 | *this, | ||
1503 | &BScreen::reconfigureTabs)); | ||
1504 | s_a_reconf_macro->add(saverc_cmd); | 1500 | s_a_reconf_macro->add(saverc_cmd); |
1505 | s_a_reconf_macro->add(reconf_cmd); | 1501 | s_a_reconf_macro->add(reconf_cmd); |
1506 | s_a_reconftabs_macro->add(saverc_cmd); | ||
1507 | s_a_reconftabs_macro->add(reconftabs_cmd); | ||
1508 | FbTk::RefCount<FbTk::Command<void> > save_and_reconfigure(s_a_reconf_macro); | 1502 | FbTk::RefCount<FbTk::Command<void> > save_and_reconfigure(s_a_reconf_macro); |
1509 | FbTk::RefCount<FbTk::Command<void> > save_and_reconftabs(s_a_reconftabs_macro); | ||
1510 | // create focus menu | 1503 | // create focus menu |
1511 | // we don't set this to internal menu so will | 1504 | // we don't set this to internal menu so will |
1512 | // be deleted toghether with the parent | 1505 | // be deleted toghether with the parent |
@@ -1618,7 +1611,7 @@ void BScreen::setupConfigmenu(FbTk::Menu &menu) { | |||
1618 | "Width of external-style tabs"), | 1611 | "Width of external-style tabs"), |
1619 | resource.tab_width, 10, 3000, /* silly number */ | 1612 | resource.tab_width, 10, 3000, /* silly number */ |
1620 | *tab_menu); | 1613 | *tab_menu); |
1621 | tab_width_item->setCommand(save_and_reconftabs); | 1614 | tab_width_item->setCommand(saverc_cmd); |
1622 | tab_menu->insert(tab_width_item); | 1615 | tab_menu->insert(tab_width_item); |
1623 | 1616 | ||
1624 | // menu is 3 wide, 5 down | 1617 | // menu is 3 wide, 5 down |
diff --git a/src/Screen.hh b/src/Screen.hh index 8d50fbc..b6ca75d 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -133,7 +133,7 @@ public: | |||
133 | FbTk::BoolResource &getTabsUsePixmapResource() { return resource.tabs_use_pixmap; } | 133 | FbTk::BoolResource &getTabsUsePixmapResource() { return resource.tabs_use_pixmap; } |
134 | const bool getMaxOverTabs() const { return *resource.max_over_tabs; } | 134 | const bool getMaxOverTabs() const { return *resource.max_over_tabs; } |
135 | 135 | ||
136 | unsigned int getTabWidth() const { return *resource.tab_width; } | 136 | FbTk::IntResource &getTabWidthResource() { return resource.tab_width; } |
137 | /// @return the slit, @see Slit | 137 | /// @return the slit, @see Slit |
138 | Slit *slit() { return m_slit.get(); } | 138 | Slit *slit() { return m_slit.get(); } |
139 | /// @return the slit, @see Slit | 139 | /// @return the slit, @see Slit |
diff --git a/src/Window.cc b/src/Window.cc index 669e40d..87d7ac3 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -433,6 +433,8 @@ void FluxboxWindow::init() { | |||
433 | FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::applyDecorations)); | 433 | FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::applyDecorations)); |
434 | join(screen().getTabPlacementResource().modifiedSig(), | 434 | join(screen().getTabPlacementResource().modifiedSig(), |
435 | FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::applyDecorations)); | 435 | FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::applyDecorations)); |
436 | join(screen().getTabWidthResource().modifiedSig(), | ||
437 | FbTk::MemFunIgnoreArgs(*this, &FluxboxWindow::applyDecorations)); | ||
436 | 438 | ||
437 | /**************************************************/ | 439 | /**************************************************/ |
438 | /* Read state above here, apply state below here. */ | 440 | /* Read state above here, apply state below here. */ |