aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index d940b1d..128b71e 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -225,6 +225,8 @@ private:
225 225
226} // end anonymous namespace 226} // end anonymous namespace
227 227
228std::string IconbarTool::s_iconifiedDecoration[2];
229
228IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme, 230IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
229 FbTk::ThemeProxy<IconbarTheme> &focused_theme, 231 FbTk::ThemeProxy<IconbarTheme> &focused_theme,
230 FbTk::ThemeProxy<IconbarTheme> &unfocused_theme, 232 FbTk::ThemeProxy<IconbarTheme> &unfocused_theme,
@@ -252,6 +254,8 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
252 *screen.layerManager().getLayer(ResourceLayer::MENU)), 254 *screen.layerManager().getLayer(ResourceLayer::MENU)),
253 m_alpha(255) { 255 m_alpha(255) {
254 256
257 updateIconifiedPattern();
258
255 // setup mode menu 259 // setup mode menu
256 setupModeMenu(m_menu, *this); 260 setupModeMenu(m_menu, *this);
257 _FB_USES_NLS; 261 _FB_USES_NLS;
@@ -279,6 +283,8 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
279 FbTk::MemFun(*this, &IconbarTool::themeReconfigured)); 283 FbTk::MemFun(*this, &IconbarTool::themeReconfigured));
280 m_tracker.join(unfocused_theme.reconfigSig(), 284 m_tracker.join(unfocused_theme.reconfigSig(),
281 FbTk::MemFun(*this, &IconbarTool::themeReconfigured)); 285 FbTk::MemFun(*this, &IconbarTool::themeReconfigured));
286 m_tracker.join(screen.reconfigureSig(),
287 FbTk::MemFunIgnoreArgs(*this, &IconbarTool::updateIconifiedPattern));
282 themeReconfigured(); 288 themeReconfigured();
283} 289}
284 290
@@ -439,6 +445,19 @@ void IconbarTool::update(UpdateReason reason, Focusable *win) {
439 renderTheme(); 445 renderTheme();
440} 446}
441 447
448void IconbarTool::updateIconifiedPattern() {
449 FbTk::Resource<std::string> p(m_screen.resourceManager(), "( %t )",
450 m_screen.name() + ".iconbar.iconifiedPattern",
451 m_screen.altName() + ".Iconbar.IconifiedPattern");
452 size_t tidx = p->find("%t");
453 s_iconifiedDecoration[0].clear();
454 s_iconifiedDecoration[1].clear();
455 if (tidx != std::string::npos) {
456 s_iconifiedDecoration[0] = p->substr(0, tidx);
457 s_iconifiedDecoration[1] = p->substr(tidx+2);
458 }
459}
460
442void IconbarTool::insertWindow(Focusable &win, int pos) { 461void IconbarTool::insertWindow(Focusable &win, int pos) {
443 IconButton *button = 0; 462 IconButton *button = 0;
444 463