summaryrefslogtreecommitdiff
path: root/src/Rootmenu.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-04-14 11:37:22 +0000
committerDana Jansens <danakj@orodu.net>2002-04-14 11:37:22 +0000
commit351f1d03315b84887b7532c35bdd8a49bdce1d43 (patch)
treefe1b7051d28b77d9934ace86881261099ec532f7 /src/Rootmenu.cc
parentd00ef145828941dc15c31bd7c3fc2f69f29c2955 (diff)
Using some references instead of pointers for the menus.
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();