aboutsummaryrefslogtreecommitdiff
path: root/src/IconbarTool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconbarTool.cc')
-rw-r--r--src/IconbarTool.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/IconbarTool.cc b/src/IconbarTool.cc
index ebf67fe..070e45b 100644
--- a/src/IconbarTool.cc
+++ b/src/IconbarTool.cc
@@ -246,12 +246,12 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
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"),
249 m_menu(screen.menuTheme(), screen.imageControl(), 249 m_menu(new FbMenu(screen.menuTheme(), screen.imageControl(),
250 *screen.layerManager().getLayer(ResourceLayer::MENU)), 250 *screen.layerManager().getLayer(ResourceLayer::MENU)) ),
251 m_alpha(255) { 251 m_alpha(255) {
252 252
253 // setup mode menu 253 // setup mode menu
254 setupModeMenu(m_menu, *this); 254 setupModeMenu(*m_menu, *this);
255 _FB_USES_NLS; 255 _FB_USES_NLS;
256 using namespace FbTk; 256 using namespace FbTk;
257 // setup use pixmap item to reconfig iconbar and save resource on click 257 // setup use pixmap item to reconfig iconbar and save resource on click
@@ -261,15 +261,13 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
261 save_and_reconfig->add(reconfig); 261 save_and_reconfig->add(reconfig);
262 save_and_reconfig->add(save); 262 save_and_reconfig->add(save);
263 RefCount<Command<void> > s_and_reconfig(save_and_reconfig); 263 RefCount<Command<void> > s_and_reconfig(save_and_reconfig);
264 m_menu.insert(new FbTk::BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons, 264 m_menu->insert(new FbTk::BoolMenuItem(_FB_XTEXT(Toolbar, ShowIcons,
265 "Show Pictures", "chooses if little icons are shown next to title in the iconbar"), 265 "Show Pictures", "chooses if little icons are shown next to title in the iconbar"),
266 m_rc_use_pixmap, s_and_reconfig)); 266 m_rc_use_pixmap, s_and_reconfig));
267 m_menu.updateMenu(); 267 m_menu->updateMenu();
268 // must be internal menu, otherwise toolbar main menu tries to delete it.
269 m_menu.setInternalMenu();
270 268
271 // add iconbar menu to toolbar menu 269 // add iconbar menu to toolbar menu
272 menu.insert(m_menu.label().logical(), &m_menu); 270 menu.insert(m_menu->label().logical(), FbTk::RefCount<FbTk::Menu>(m_menu));
273 271
274 // setup signals 272 // setup signals
275 m_tracker.join(theme.reconfigSig(), FbTk::MemFun(*this, &IconbarTool::themeReconfigured)); 273 m_tracker.join(theme.reconfigSig(), FbTk::MemFun(*this, &IconbarTool::themeReconfigured));
@@ -313,7 +311,7 @@ void IconbarTool::hide() {
313void IconbarTool::setAlignment(FbTk::Container::Alignment align) { 311void IconbarTool::setAlignment(FbTk::Container::Alignment align) {
314 *m_rc_alignment = align; 312 *m_rc_alignment = align;
315 update(ALIGN, NULL); 313 update(ALIGN, NULL);
316 m_menu.reconfigure(); 314 m_menu->reconfigure();
317} 315}
318 316
319void IconbarTool::setMode(string mode) { 317void IconbarTool::setMode(string mode) {
@@ -353,7 +351,7 @@ void IconbarTool::setMode(string mode) {
353 351
354 renderTheme(); 352 renderTheme();
355 353
356 m_menu.reconfigure(); 354 m_menu->reconfigure();
357} 355}
358 356
359unsigned int IconbarTool::width() const { 357unsigned int IconbarTool::width() const {