all repos — fluxbox @ 6fce27ea136416be45d2b9d1eeed6d6f8585d601

custom fork of the fluxbox windowmanager

added reconfig signal
fluxgen fluxgen
commit

6fce27ea136416be45d2b9d1eeed6d6f8585d601

parent

1e097242f948c424585fc087900c8657695ca1fa

2 files changed, 15 insertions(+), 49 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.198 2003/06/30 18:04:48 fluxgen Exp $ +// $Id: Screen.cc,v 1.199 2003/07/01 12:39:09 fluxgen Exp $ #include "Screen.hh"

@@ -227,34 +227,6 @@

}; -template <> -void FbTk::ThemeItem<std::string>::load() { } - -template <> -void FbTk::ThemeItem<std::string>::setDefaultValue() { - *(*this) = ""; -} - -template <> -void FbTk::ThemeItem<std::string>::setFromString(const char *str) { - *(*this) = (str ? str : ""); -} - -template <> -void FbTk::ThemeItem<int>::load() { } - -template <> -void FbTk::ThemeItem<int>::setDefaultValue() { - *(*this) = 0; -} - -template <> -void FbTk::ThemeItem<int>::setFromString(const char *str) { - if (str == 0) - return; - sscanf(str, "%d", &m_value); -} - BScreen::ScreenResource::ScreenResource(FbTk::ResourceManager &rm, const std::string &scrname, const std::string &altscrname):

@@ -287,6 +259,7 @@ m_clientlist_sig(*this), // client signal

m_workspacecount_sig(*this), // workspace count signal m_workspacenames_sig(*this), // workspace names signal m_currentworkspace_sig(*this), // current workspace signal + m_reconfigure_sig(*this), // reconfigure signal m_layermanager(num_layers), cycling_focus(false), cycling_last(0),

@@ -386,7 +359,6 @@ geom_pixmap = 0;

renderGeomWindow(); - // setup workspaces and workspace menu workspacemenu.reset(createMenuFromScreen(*this));

@@ -426,12 +398,9 @@ setupConfigmenu(*m_configmenu.get());

m_configmenu->setInternalMenu(); workspacemenu->setItemSelected(2, true); - - - initMenu(); // create and initiate rootmenu - - //update menus - m_rootmenu->update(); + // create and initiate rootmenu + rereadMenu(); + m_configmenu->update(); #ifdef SLIT

@@ -663,8 +632,7 @@ menu = menu->find(r)->submenu();

} } - initMenu(); - m_rootmenu->reconfigure(); + rereadMenu(); if (restore_menus) { // restore submenus, no timestamp changed

@@ -700,13 +668,13 @@ m_icon_list.end(),

mem_fun(&FluxboxWindow::reconfigure)); imageControl().timeout(); - + // notify objects that the screen is reconfigured + m_reconfigure_sig.notify(); } void BScreen::rereadMenu() { initMenu(); - m_rootmenu->reconfigure(); }

@@ -717,7 +685,6 @@ }

void BScreen::updateWorkspaceNamesAtom() { m_workspacenames_sig.notify(); - } void BScreen::addIcon(FluxboxWindow *w) {

@@ -731,7 +698,6 @@ void BScreen::removeIcon(FluxboxWindow *w) {

if (! w) return; - Icons::iterator erase_it = remove_if(m_icon_list.begin(), m_icon_list.end(), bind2nd(equal_to<FluxboxWindow *>(), w));

@@ -915,10 +881,6 @@ if (changeWS) {

changeWorkspaceID(id); win->setInputFocus(); } -#ifdef DEBUG - cerr<<__FILE__<<": Sending to id = "<<id<<endl; - cerr<<__FILE__<<": win->workspaceId="<<win->workspaceNumber()<<endl; -#endif //DEBUG }

@@ -990,6 +952,7 @@ Fluxbox::instance()->getFocusedWindow()->clientWindow() : None);

for (; it != it_end; ++it) { (*it)->sendWindowFocus(f); } + }
M src/Screen.hhsrc/Screen.hh

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.112 2003/06/25 05:46:21 fluxgen Exp $ +// $Id: Screen.hh,v 1.113 2003/07/01 12:39:09 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH

@@ -147,6 +147,8 @@ /// workspace names signal

FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; } /// current workspace signal FbTk::Subject &currentWorkspaceSig() { return m_currentworkspace_sig; } + /// reconfigure signal + FbTk::Subject &reconfigureSig() { return m_reconfigure_sig; } //@} /// @return the resource value of number of workspace

@@ -203,7 +205,7 @@ const std::string &name() const { return m_name; }

const std::string &altName() const { return m_altname; } int addWorkspace(); int removeLastWorkspace(); - //scroll workspaces + // scroll workspaces void nextWorkspace() { nextWorkspace(1); } void prevWorkspace() { prevWorkspace(1); } void nextWorkspace(int delta);

@@ -340,7 +342,8 @@ ScreenSubject

m_clientlist_sig, ///< client signal m_workspacecount_sig, ///< workspace count signal m_workspacenames_sig, ///< workspace names signal - m_currentworkspace_sig; ///< current workspace signal + m_currentworkspace_sig, ///< current workspace signal + m_reconfigure_sig; ///< reconfigure signal FbTk::MultLayers m_layermanager;