From 4602d87180951a4b7a40283a2fb77f31cad4d789 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 18 Apr 2002 03:00:12 +0000 Subject: [PATCH] now yuo can change styles again! (oops) wasnt saving teh nwe style file to the Resource class when it changed. --- src/Iconmenu.cc | 2 +- src/Iconmenu.h | 2 +- src/Rootmenu.cc | 2 +- src/Screen.cc | 6 +++--- src/openbox.cc | 5 +++-- src/openbox.h | 4 ++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/Iconmenu.cc b/src/Iconmenu.cc index cf29c193..0adc10a7 100644 --- a/src/Iconmenu.cc +++ b/src/Iconmenu.cc @@ -1,4 +1,4 @@ -// Icon.cc for Openbox +// Iconmenu.cc for Openbox // Copyright (c) 2001 Sean 'Shaleh' Perry // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) // diff --git a/src/Iconmenu.h b/src/Iconmenu.h index dcac036c..609f03a3 100644 --- a/src/Iconmenu.h +++ b/src/Iconmenu.h @@ -1,4 +1,4 @@ -// Icon.h for Openbox +// Iconmenu.h for Openbox // Copyright (c) 2001 Sean 'Shaleh' Perry // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) // diff --git a/src/Rootmenu.cc b/src/Rootmenu.cc index 59bfb1cf..2bda2070 100644 --- a/src/Rootmenu.cc +++ b/src/Rootmenu.cc @@ -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(); diff --git a/src/Screen.cc b/src/Screen.cc index 3d193295..313aeb21 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -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, diff --git a/src/openbox.cc b/src/openbox.cc index 25d274f1..dff68102 100644 --- a/src/openbox.cc +++ b/src/openbox.cc @@ -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 it(menuTimestamps); diff --git a/src/openbox.h b/src/openbox.h index 144888bb..eae8bcff 100644 --- a/src/openbox.h +++ b/src/openbox.h @@ -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 *); -- 2.45.2