diff options
author | fluxgen <fluxgen> | 2003-02-23 00:56:09 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-02-23 00:56:09 (GMT) |
commit | 955e3865b66c46d3f0308d5ce809dab169d90613 (patch) | |
tree | 92eb51bcf49d51bc31f5edf0437d768abe90e268 /src | |
parent | 50d8c9a8a166b15734c72d292938e540b44e037e (diff) | |
download | fluxbox-955e3865b66c46d3f0308d5ce809dab169d90613.zip fluxbox-955e3865b66c46d3f0308d5ce809dab169d90613.tar.bz2 |
added toolbar placement resource
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.cc | 13 | ||||
-rw-r--r-- | src/Screen.hh | 7 |
2 files changed, 13 insertions, 7 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index b9a3b21..ddce242 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.cc,v 1.114 2003/02/22 16:09:44 rathnor Exp $ | 25 | // $Id: Screen.cc,v 1.115 2003/02/23 00:56:09 fluxgen Exp $ |
26 | 26 | ||
27 | 27 | ||
28 | #include "Screen.hh" | 28 | #include "Screen.hh" |
@@ -373,7 +373,8 @@ BScreen::ScreenResource::ScreenResource(ResourceManager &rm, | |||
373 | toolbar_layernum(rm, Fluxbox::instance()->getDesktopLayer(), scrname+".toolbar.layer", altscrname+".Toolbar.Layer"), | 373 | toolbar_layernum(rm, Fluxbox::instance()->getDesktopLayer(), scrname+".toolbar.layer", altscrname+".Toolbar.Layer"), |
374 | tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"), | 374 | tab_placement(rm, Tab::PTOP, scrname+".tab.placement", altscrname+".Tab.Placement"), |
375 | tab_alignment(rm, Tab::ALEFT, scrname+".tab.alignment", altscrname+".Tab.Alignment"), | 375 | tab_alignment(rm, Tab::ALEFT, scrname+".tab.alignment", altscrname+".Tab.Alignment"), |
376 | toolbar_on_head(rm, 0, scrname+".toolbar.onhead", altscrname+".Toolbar.onHead") | 376 | toolbar_on_head(rm, 0, scrname+".toolbar.onhead", altscrname+".Toolbar.onHead"), |
377 | toolbar_placement(rm, Toolbar::BOTTOMCENTER, scrname+".toolbar.placement", altscrname+".Toolbar.Placement") | ||
377 | { | 378 | { |
378 | 379 | ||
379 | }; | 380 | }; |
@@ -524,6 +525,7 @@ BScreen::BScreen(ResourceManager &rm, | |||
524 | #endif // SLIT | 525 | #endif // SLIT |
525 | 526 | ||
526 | m_toolbar.reset(new Toolbar(*this, *layerManager().getLayer(getToolbarLayerNum()))); | 527 | m_toolbar.reset(new Toolbar(*this, *layerManager().getLayer(getToolbarLayerNum()))); |
528 | m_toolbar->setPlacement(*resource.toolbar_placement); | ||
527 | // setup toolbar width menu item | 529 | // setup toolbar width menu item |
528 | FbTk::MenuItem *toolbar_menuitem = new IntResMenuItem("Toolbar width percent", | 530 | FbTk::MenuItem *toolbar_menuitem = new IntResMenuItem("Toolbar width percent", |
529 | resource.toolbar_width_percent, | 531 | resource.toolbar_width_percent, |
@@ -542,7 +544,7 @@ BScreen::BScreen(ResourceManager &rm, | |||
542 | 544 | ||
543 | toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource); | 545 | toolbar_menuitem->setCommand(reconfig_toolbar_and_save_resource); |
544 | 546 | ||
545 | m_toolbar->menu().insert(toolbar_menuitem); | 547 | m_toolbar->menu().insert(toolbar_menuitem, 0); |
546 | 548 | ||
547 | setupWorkspacemenu(*this, *workspacemenu); | 549 | setupWorkspacemenu(*this, *workspacemenu); |
548 | 550 | ||
@@ -758,8 +760,11 @@ void BScreen::reconfigure() { | |||
758 | m_toolbar->theme().font().setAntialias(*resource.antialias); | 760 | m_toolbar->theme().font().setAntialias(*resource.antialias); |
759 | 761 | ||
760 | #ifdef SLIT | 762 | #ifdef SLIT |
761 | if (m_slit.get()) | 763 | if (m_slit.get()) { |
764 | m_slit->setPlacement(static_cast<Slit::Placement>(getSlitPlacement())); | ||
765 | m_slit->setDirection(static_cast<Slit::Direction>(getSlitDirection())); | ||
762 | m_slit->reconfigure(); | 766 | m_slit->reconfigure(); |
767 | } | ||
763 | #endif // SLIT | 768 | #endif // SLIT |
764 | 769 | ||
765 | //reconfigure workspaces | 770 | //reconfigure workspaces |
diff --git a/src/Screen.hh b/src/Screen.hh index 9488f3c..03a96b7 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Screen.hh,v 1.71 2003/02/22 16:09:44 rathnor Exp $ | 25 | // $Id: Screen.hh,v 1.72 2003/02/23 00:55:07 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -79,6 +79,7 @@ public: | |||
79 | ~BScreen(); | 79 | ~BScreen(); |
80 | 80 | ||
81 | inline bool doToolbarAutoHide() const { return *resource.toolbar_auto_hide; } | 81 | inline bool doToolbarAutoHide() const { return *resource.toolbar_auto_hide; } |
82 | inline Toolbar::Placement toolbarPlacement() const { return *resource.toolbar_placement; } | ||
82 | inline bool isSloppyFocus() const { return (*resource.focus_model == Fluxbox::SLOPPYFOCUS); } | 83 | inline bool isSloppyFocus() const { return (*resource.focus_model == Fluxbox::SLOPPYFOCUS); } |
83 | inline bool isSemiSloppyFocus() const { return (*resource.focus_model == Fluxbox::SEMISLOPPYFOCUS); } | 84 | inline bool isSemiSloppyFocus() const { return (*resource.focus_model == Fluxbox::SEMISLOPPYFOCUS); } |
84 | inline bool isRootColormapInstalled() const { return root_colormap_installed; } | 85 | inline bool isRootColormapInstalled() const { return root_colormap_installed; } |
@@ -196,7 +197,7 @@ public: | |||
196 | inline void saveWorkspaces(int w) { *resource.workspaces = w; } | 197 | inline void saveWorkspaces(int w) { *resource.workspaces = w; } |
197 | inline void saveToolbarAutoHide(bool r) { *resource.toolbar_auto_hide = r; } | 198 | inline void saveToolbarAutoHide(bool r) { *resource.toolbar_auto_hide = r; } |
198 | inline void saveToolbarWidthPercent(int w) { *resource.toolbar_width_percent = w; } | 199 | inline void saveToolbarWidthPercent(int w) { *resource.toolbar_width_percent = w; } |
199 | 200 | inline void saveToolbarPlacement(Toolbar::Placement place) { *resource.toolbar_placement = place; } | |
200 | inline void saveToolbarOnHead(int head) { *resource.toolbar_on_head = head; } | 201 | inline void saveToolbarOnHead(int head) { *resource.toolbar_on_head = head; } |
201 | 202 | ||
202 | 203 | ||
@@ -394,7 +395,7 @@ private: | |||
394 | Resource<Tab::Placement> tab_placement; | 395 | Resource<Tab::Placement> tab_placement; |
395 | Resource<Tab::Alignment> tab_alignment; | 396 | Resource<Tab::Alignment> tab_alignment; |
396 | Resource<int> toolbar_on_head; | 397 | Resource<int> toolbar_on_head; |
397 | 398 | Resource<Toolbar::Placement> toolbar_placement; | |
398 | bool slit_auto_hide; | 399 | bool slit_auto_hide; |
399 | int slit_placement, slit_direction; | 400 | int slit_placement, slit_direction; |
400 | 401 | ||