]> Dogcows Code - chaz/openbox/blobdiff - src/blackbox.cc
Take menu file from rc file if it isn't specified on the command line.
[chaz/openbox] / src / blackbox.cc
index ecf69651665c488ea929eedbc1d4d3211798edb3..82c8b1d11936b65af68a4a3fd68884981ad432c7 100644 (file)
@@ -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;
 
This page took 0.023475 seconds and 4 git commands to generate.