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.
This commit is contained in:
parent
9af642d299
commit
87e63d53af
1 changed files with 11 additions and 2 deletions
|
@ -134,8 +134,17 @@ Blackbox::Blackbox(char **m_argv, char *dpy_name, char *rc, char *menu)
|
||||||
if (! rc) rc = "~/.openbox/rc";
|
if (! rc) rc = "~/.openbox/rc";
|
||||||
rc_file = expandTilde(rc);
|
rc_file = expandTilde(rc);
|
||||||
config.setFile(rc_file);
|
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;
|
no_focus = False;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue