the screen, toolbar and slit rc values are reloaded in BScreen::reconfigure() before the menus.
the toolbar and slit rc values are explicitly loaded in their constructors, as is BScreen's.
"Hide toolbar"), 6);
update();
+ setValues();
+}
+
+void Configmenu::setValues() {
setItemSelected(2, screen.getImageControl()->doDither());
setItemSelected(3, screen.opaqueMove());
setItemSelected(4, screen.fullMax());
setItemSelected(7, screen.hideToolbar());
}
-Configmenu::~Configmenu(void) {
+Configmenu::~Configmenu() {
delete focusmenu;
delete placementmenu;
}
} // switch
}
-void Configmenu::reconfigure(void) {
+void Configmenu::reconfigure() {
+ setValues();
focusmenu->reconfigure();
placementmenu->reconfigure();
"Auto Raise"), 3);
update();
+ setValues();
+}
+
+void Configmenu::Focusmenu::setValues() {
setItemSelected(0, !configmenu->screen.sloppyFocus());
setItemSelected(1, configmenu->screen.sloppyFocus());
setItemEnabled(2, configmenu->screen.sloppyFocus());
setItemSelected(2, configmenu->screen.autoRaise());
}
+void Configmenu::Focusmenu::reconfigure() {
+ setValues();
+ Basemenu::reconfigure();
+}
+
void Configmenu::Focusmenu::itemSelected(int button, int index) {
if (button != 1)
return;
"Bottom to Top"), BScreen::BottomTop);
update();
+ setValues();
+}
+
+void Configmenu::Placementmenu::setValues() {
switch (configmenu->screen.placementPolicy()) {
case BScreen::RowSmartPlacement:
setItemSelected(0, True);
setItemSelected(7, !tb);
}
+void Configmenu::Placementmenu::reconfigure() {
+ setValues();
+ Basemenu::reconfigure();
+}
+
void Configmenu::Placementmenu::itemSelected(int button, int index) {
if (button != 1)
return;
protected:
virtual void itemSelected(int, int);
+ virtual void setValues();
public:
Focusmenu(Configmenu *);
+ void reconfigure();
};
class Placementmenu : public Basemenu {
protected:
virtual void itemSelected(int, int);
+ virtual void setValues();
+
public:
Placementmenu(Configmenu *);
+ void reconfigure();
};
BScreen &screen;
protected:
virtual void itemSelected(int, int);
+ virtual void setValues();
+
public:
Configmenu(BScreen &);
- virtual ~Configmenu(void);
+ virtual ~Configmenu();
- inline Basemenu *getFocusmenu(void) { return focusmenu; }
- inline Basemenu *getPlacementmenu(void) { return placementmenu; }
+ inline Basemenu *getFocusmenu() { return focusmenu; }
+ inline Basemenu *getPlacementmenu() { return placementmenu; }
- void reconfigure(void);
+ void reconfigure();
};
#endif // __Configmenu_hh
openbox.getSessionCursor());
workspaceNames = new LinkedList<char>;
-
- load(); // load config options from Resources
-
workspacesList = new LinkedList<Workspace>;
rootmenuList = new LinkedList<Rootmenu>;
netizenList = new LinkedList<Netizen>;
image_control->setDither(resource.image_dither);
+ load(); // load config options from Resources
LoadStyle();
XGCValues gcv;
#ifdef HAVE_STRFTIME
// it deletes the current value before setting the new one, so we have to
// duplicate the current value.
- setStrftimeFormat(bstrdup(resource.strftime_format));
+ std::string s = resource.strftime_format;
+ setStrftimeFormat(s.c_str());
#else // !HAVE_STRFTIME
setDateFormat(resource.date_format);
setClock24Hour(resource.clock24hour);
void BScreen::reconfigure(void) {
load();
+ toolbar->load();
+#ifdef SLIT
+ slit->load();
+#endif // SLIT
LoadStyle();
XGCValues gcv;
m_direction = Vertical;
m_ontop = false;
m_hidden = m_autohide = false;
+ load();
display = screen.getBaseDisplay().getXDisplay();
frame.window = frame.pixmap = None;
}
void Slit::reconfigure(void) {
- load();
-
frame.area.setSize(0, 0);
LinkedListIterator<SlitClient> it(clientList);
SlitClient *client;
update();
- if (slit.onTop()) setItemSelected(2, True);
- if (slit.autoHide()) setItemSelected(3, True);
+ setValues();
+}
+
+void Slitmenu::setValues() {
+ setItemSelected(2, slit.onTop());
+ setItemSelected(3, slit.autoHide());
}
void Slitmenu::reconfigure(void) {
+ setValues();
directionmenu->reconfigure();
placementmenu->reconfigure();
update();
- if (sm.slit.direction() == Slit::Horizontal)
+ setValues();
+}
+
+
+void Slitmenu::Directionmenu::setValues() {
+ if (slitmenu.slit.direction() == Slit::Horizontal)
setItemSelected(0, True);
else
setItemSelected(1, True);
}
+void Slitmenu::Directionmenu::reconfigure() {
+ setValues();
+}
+
void Slitmenu::Directionmenu::itemSelected(int button, int index) {
if (button != 1)
protected:
virtual void itemSelected(int, int);
+ virtual void setValues();
public:
Directionmenu(Slitmenu &);
+ void reconfigure();
};
class Placementmenu : public Basemenu {
protected:
virtual void itemSelected(int, int);
virtual void internal_hide();
-
+ virtual void setValues();
public:
Slitmenu(Slit &);
m_placement = BottomCenter;
m_ontop = false;
m_hidden = m_autohide = false;
+ load();
// get the clock updating every minute
clock_timer = new BTimer(openbox, *this);
"Edit current workspace name"), 3);
update();
+
+ setValues();
+}
- if (toolbar.onTop()) setItemSelected(1, True);
- if (toolbar.autoHide()) setItemSelected(2, True);
+void Toolbarmenu::setValues() {
+ setItemSelected(1, toolbar.onTop());
+ setItemSelected(2, toolbar.autoHide());
}
void Toolbarmenu::reconfigure() {
+ setValues();
placementmenu->reconfigure();
Basemenu::reconfigure();
update();
}
-
void Toolbarmenu::Placementmenu::itemSelected(int button, int index) {
if (button != 1)
return;
protected:
virtual void itemSelected(int, int);
virtual void internal_hide();
+ virtual void setValues();
public:
Toolbarmenu(Toolbar &);
grab();
load();
- save();
for (int i = 0, n = menuTimestamps->count(); i < n; i++) {
MenuTimestamp *ts = menuTimestamps->remove(0);