now yuo can change styles again! (oops) wasnt saving teh nwe style file to the Resource class when it changed.
This commit is contained in:
parent
e148f58d0e
commit
4602d87180
6 changed files with 11 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
// Icon.cc for Openbox
|
||||
// Iconmenu.cc for Openbox
|
||||
// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org>
|
||||
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
|
||||
//
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Icon.h for Openbox
|
||||
// Iconmenu.h for Openbox
|
||||
// Copyright (c) 2001 Sean 'Shaleh' Perry <shaleh@debian.org>
|
||||
// Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)
|
||||
//
|
||||
|
|
|
@ -102,7 +102,7 @@ void Rootmenu::itemSelected(int button, int index) {
|
|||
|
||||
case BScreen::SetStyle:
|
||||
if (item->exec())
|
||||
openbox.saveStyleFilename(item->exec());
|
||||
openbox.setStyleFilename(item->exec());
|
||||
|
||||
case BScreen::Reconfigure:
|
||||
openbox.reconfigure();
|
||||
|
|
|
@ -2160,7 +2160,7 @@ void BScreen::InitMenu(void) {
|
|||
rootmenu->insert(i18n->getMessage(ScreenSet, ScreenExit, "Exit"),
|
||||
BScreen::Exit);
|
||||
} else {
|
||||
openbox.saveMenuFilename(openbox.getMenuFilename());
|
||||
openbox.setMenuFilename(openbox.getMenuFilename());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2361,7 +2361,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
|
|||
|
||||
if (! feof(submenufile)) {
|
||||
if (! parseMenuFile(submenufile, menu))
|
||||
openbox.saveMenuFilename(newfile);
|
||||
openbox.setMenuFilename(newfile);
|
||||
|
||||
fclose(submenufile);
|
||||
}
|
||||
|
@ -2520,7 +2520,7 @@ Bool BScreen::parseMenuFile(FILE *file, Rootmenu *menu) {
|
|||
rootmenuList->insert(stylesmenu);
|
||||
}
|
||||
|
||||
openbox.saveMenuFilename(stylesdir);
|
||||
openbox.setMenuFilename(stylesdir);
|
||||
} else {
|
||||
fprintf(stderr, i18n->getMessage(ScreenSet,
|
||||
ScreenSTYLESDIRErrorNotDir,
|
||||
|
|
|
@ -1137,15 +1137,16 @@ void Openbox::real_rereadMenu() {
|
|||
}
|
||||
|
||||
|
||||
void Openbox::saveStyleFilename(const char *filename) {
|
||||
void Openbox::setStyleFilename(const char *filename) {
|
||||
if (resource.style_file)
|
||||
delete [] resource.style_file;
|
||||
|
||||
resource.style_file = bstrdup(filename);
|
||||
config.setValue("session.styleFile", resource.style_file);
|
||||
}
|
||||
|
||||
|
||||
void Openbox::saveMenuFilename(const char *filename) {
|
||||
void Openbox::setMenuFilename(const char *filename) {
|
||||
Bool found = False;
|
||||
|
||||
LinkedListIterator<MenuTimestamp> it(menuTimestamps);
|
||||
|
|
|
@ -178,8 +178,8 @@ public:
|
|||
|
||||
void setFocusedWindow(OpenboxWindow *w);
|
||||
void shutdown();
|
||||
void saveStyleFilename(const char *);
|
||||
void saveMenuFilename(const char *);
|
||||
void setStyleFilename(const char *);
|
||||
void setMenuFilename(const char *);
|
||||
void saveMenuSearch(Window, Basemenu *);
|
||||
void saveWindowSearch(Window, OpenboxWindow *);
|
||||
void saveToolbarSearch(Window, Toolbar *);
|
||||
|
|
Loading…
Reference in a new issue