diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Resource.hh | 8 | ||||
-rw-r--r-- | src/IconbarTool.cc | 3 | ||||
-rw-r--r-- | src/IconbarTool.hh | 2 | ||||
-rw-r--r-- | src/Screen.cc | 5 | ||||
-rw-r--r-- | src/Window.cc | 2 |
5 files changed, 12 insertions, 8 deletions
diff --git a/src/FbTk/Resource.hh b/src/FbTk/Resource.hh index 37a7ed3..7a797a1 100644 --- a/src/FbTk/Resource.hh +++ b/src/FbTk/Resource.hh | |||
@@ -224,7 +224,11 @@ public: | |||
224 | setDefaultValue(); | 224 | setDefaultValue(); |
225 | } | 225 | } |
226 | } | 226 | } |
227 | Accessor<T> &operator =(const T& newvalue) { m_value = newvalue; return *this;} | 227 | Accessor<T> &operator =(const T& newvalue) { |
228 | m_value = newvalue; | ||
229 | m_modified_sig.emit(m_value); | ||
230 | return *this; | ||
231 | } | ||
228 | /// specialized, must be implemented | 232 | /// specialized, must be implemented |
229 | /// @return string value of resource | 233 | /// @return string value of resource |
230 | std::string getString() const { return Traits::toString(m_value); } | 234 | std::string getString() const { return Traits::toString(m_value); } |
@@ -243,7 +247,7 @@ public: | |||
243 | 247 | ||
244 | operator T() const { return m_value; } | 248 | operator T() const { return m_value; } |
245 | T& get() { return m_value; } | 249 | T& get() { return m_value; } |
246 | T& operator*() { return m_value; } | 250 | Accessor<T>& operator*() { return *this; } |
247 | const T& operator*() const { return m_value; } | 251 | const T& operator*() const { return m_value; } |
248 | T *operator->() { return &m_value; } | 252 | T *operator->() { return &m_value; } |
249 | const T *operator->() const { return &m_value; } | 253 | const T *operator->() const { return &m_value; } |
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc index 070e45b..73f0003 100644 --- a/src/IconbarTool.cc +++ b/src/IconbarTool.cc | |||
@@ -242,7 +242,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, | |||
242 | screen.name() + ".iconbar.mode"), | 242 | screen.name() + ".iconbar.mode"), |
243 | m_rc_alignment(screen.resourceManager(), FbTk::Container::RELATIVE, | 243 | m_rc_alignment(screen.resourceManager(), FbTk::Container::RELATIVE, |
244 | screen.name() + ".iconbar.alignment"), | 244 | screen.name() + ".iconbar.alignment"), |
245 | m_rc_client_width(screen.resourceManager(), 128, screen.name() + ".iconbar.iconWidth"), | 245 | m_rc_client_width(screen.resourceManager(), 128, screen.name() + ".iconbar.iconWidth", FbTk::RangedIntTraits(10, 400)), |
246 | m_rc_client_padding(screen.resourceManager(), 10, | 246 | m_rc_client_padding(screen.resourceManager(), 10, |
247 | screen.name() + ".iconbar.iconTextPadding"), | 247 | screen.name() + ".iconbar.iconTextPadding"), |
248 | m_rc_use_pixmap(screen.resourceManager(), true, screen.name() + ".iconbar.usePixmap"), | 248 | m_rc_use_pixmap(screen.resourceManager(), true, screen.name() + ".iconbar.usePixmap"), |
@@ -380,7 +380,6 @@ void IconbarTool::update(UpdateReason reason, Focusable *win) { | |||
380 | 380 | ||
381 | m_icon_container.setAlignment(*m_rc_alignment); | 381 | m_icon_container.setAlignment(*m_rc_alignment); |
382 | 382 | ||
383 | *m_rc_client_width = FbTk::Util::clamp(*m_rc_client_width, 10, 400); | ||
384 | m_icon_container.setMaxSizePerClient(*m_rc_client_width); | 383 | m_icon_container.setMaxSizePerClient(*m_rc_client_width); |
385 | 384 | ||
386 | // lock graphic update | 385 | // lock graphic update |
diff --git a/src/IconbarTool.hh b/src/IconbarTool.hh index 754cd50..9091a91 100644 --- a/src/IconbarTool.hh +++ b/src/IconbarTool.hh | |||
@@ -113,7 +113,7 @@ private: | |||
113 | FbTk::StringResource m_rc_mode; | 113 | FbTk::StringResource m_rc_mode; |
114 | /// alignment of buttons | 114 | /// alignment of buttons |
115 | FbTk::Resource<FbTk::Container::Alignment, FbTk::EnumTraits<FbTk::Container::Alignment> > m_rc_alignment; | 115 | FbTk::Resource<FbTk::Container::Alignment, FbTk::EnumTraits<FbTk::Container::Alignment> > m_rc_alignment; |
116 | FbTk::IntResource m_rc_client_width; ///< size of client button in LEFT/RIGHT mode | 116 | FbTk::RangedIntResource m_rc_client_width; ///< size of client button in LEFT/RIGHT mode |
117 | FbTk::UIntResource m_rc_client_padding; ///< padding of the text | 117 | FbTk::UIntResource m_rc_client_padding; ///< padding of the text |
118 | FbTk::BoolResource m_rc_use_pixmap; ///< if iconbar should use win pixmap or not | 118 | FbTk::BoolResource m_rc_use_pixmap; ///< if iconbar should use win pixmap or not |
119 | FbTk::RefCount<FbMenu> m_menu; | 119 | FbTk::RefCount<FbMenu> m_menu; |
diff --git a/src/Screen.cc b/src/Screen.cc index d4a8a0a..622ba55 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -822,7 +822,7 @@ void BScreen::reconfigure() { | |||
822 | 822 | ||
823 | // and update their names | 823 | // and update their names |
824 | for(size_t i = 0; i < std::min(m_workspaces_list.size(), resource.workspace_names->size()); ++i) | 824 | for(size_t i = 0; i < std::min(m_workspaces_list.size(), resource.workspace_names->size()); ++i) |
825 | m_workspaces_list[i]->setName( (*resource.workspace_names)[i] ); | 825 | m_workspaces_list[i]->setName( resource.workspace_names.get()[i] ); |
826 | 826 | ||
827 | // update menu filenames | 827 | // update menu filenames |
828 | m_rootmenu->reloadHelper()->setMainFile(fluxbox->getMenuFilename()); | 828 | m_rootmenu->reloadHelper()->setMainFile(fluxbox->getMenuFilename()); |
@@ -862,7 +862,8 @@ void BScreen::reconfigureTabs() { | |||
862 | void BScreen::updateWorkspaceName(unsigned int w) { | 862 | void BScreen::updateWorkspaceName(unsigned int w) { |
863 | Workspace *space = getWorkspace(w); | 863 | Workspace *space = getWorkspace(w); |
864 | if (space) { | 864 | if (space) { |
865 | (*resource.workspace_names)[w] = space->name(); | 865 | resource.workspace_names.get()[w] = space->name(); |
866 | // XXX use resource.workspace_names.modifiedSig() instead | ||
866 | m_workspacenames_sig.emit(*this); | 867 | m_workspacenames_sig.emit(*this); |
867 | Fluxbox::instance()->save_rc(); | 868 | Fluxbox::instance()->save_rc(); |
868 | } | 869 | } |
diff --git a/src/Window.cc b/src/Window.cc index b1da798..474f839 100644 --- a/src/Window.cc +++ b/src/Window.cc | |||
@@ -3506,7 +3506,7 @@ void FluxboxWindow::updateButtons() { | |||
3506 | need_update = true; | 3506 | need_update = true; |
3507 | else { | 3507 | else { |
3508 | for (size_t j=0; j < new_size && !need_update; j++) { | 3508 | for (size_t j=0; j < new_size && !need_update; j++) { |
3509 | if ((*(*titlebar_side[i]))[j] != m_titlebar_buttons[i][j]) | 3509 | if ((*titlebar_side[i]).get()[j] != m_titlebar_buttons[i][j]) |
3510 | need_update = true; | 3510 | need_update = true; |
3511 | } | 3511 | } |
3512 | } | 3512 | } |