summaryrefslogtreecommitdiff
path: root/src/Rootmenu.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Rootmenu.cc')
-rw-r--r--src/Rootmenu.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/Rootmenu.cc b/src/Rootmenu.cc
index ddb29855..84ea402b 100644
--- a/src/Rootmenu.cc
+++ b/src/Rootmenu.cc
@@ -52,9 +52,9 @@
#endif // MAXPATHLEN
-Rootmenu::Rootmenu(BScreen *scrn) : Basemenu(scrn) {
- screen = scrn;
- openbox = screen->getOpenbox();
+Rootmenu::Rootmenu(BScreen &scrn) : Basemenu(scrn), screen(scrn),
+ openbox(*scrn.getOpenbox())
+{
}
@@ -73,9 +73,9 @@ void Rootmenu::itemSelected(int button, int index) {
#ifndef __EMX__
char displaystring[MAXPATHLEN];
sprintf(displaystring, "DISPLAY=%s",
- DisplayString(screen->getBaseDisplay()->getXDisplay()));
+ DisplayString(screen.getBaseDisplay()->getXDisplay()));
sprintf(displaystring + strlen(displaystring) - 1, "%d",
- screen->getScreenNumber());
+ screen.getScreenNumber());
bexec(item->exec(), displaystring);
#else // __EMX__
@@ -85,28 +85,28 @@ void Rootmenu::itemSelected(int button, int index) {
break;
case BScreen::Restart:
- openbox->restart();
+ openbox.restart();
break;
case BScreen::RestartOther:
if (item->exec())
- openbox->restart(item->exec());
+ openbox.restart(item->exec());
break;
case BScreen::Exit:
- openbox->shutdown();
+ openbox.shutdown();
break;
case BScreen::SetStyle:
if (item->exec())
- openbox->saveStyleFilename(item->exec());
+ openbox.saveStyleFilename(item->exec());
case BScreen::Reconfigure:
- openbox->reconfigure();
+ openbox.reconfigure();
return;
}
- if (! (screen->getRootmenu()->isTorn() || isTorn()) &&
+ if (! (screen.getRootmenu()->isTorn() || isTorn()) &&
item->function() != BScreen::Reconfigure &&
item->function() != BScreen::SetStyle)
hide();