summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Moynes <smoynes@nexus.carleton.ca>2002-10-26 17:06:00 +0000
committerScott Moynes <smoynes@nexus.carleton.ca>2002-10-26 17:06:00 +0000
commit87e63d53af67d5ea98f55a27007663d4c9c8fc6c (patch)
treec87cfaf79fea0ba2d99f8ab4893a95aaefc91c68 /src
parent9af642d29918e8b36d7f1fd17e4c771662d4fe97 (diff)
Take menu file from rc file if it isn't specified on the command line.
It doesn't act correctly when using reconfigure, but only because I am unsure what the correct behaviour is.
Diffstat (limited to 'src')
-rw-r--r--src/blackbox.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/blackbox.cc b/src/blackbox.cc
index ecf69651..82c8b1d1 100644
--- a/src/blackbox.cc
+++ b/src/blackbox.cc
@@ -134,8 +134,17 @@ Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc, char *menu)
if (! rc) rc = "~/.openbox/rc";
rc_file = expandTilde(rc);
config.setFile(rc_file);
- if (! menu) menu = "~/.openbox/menu";
- menu_file = expandTilde(menu);
+
+ string rcmenu;
+ if (! menu) {
+ //have to come up with something better than this
+ config.load();
+ if (! config.getValue("session.menuFile", rcmenu))
+ rcmenu = "~/.openbox/menu";
+ } else {
+ rcmenu = menu;
+ }
+ menu_file = expandTilde(rcmenu.c_str());
no_focus = False;