summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aca6e6f)
raw | patch | inline | side by side (parent: aca6e6f)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 26 Jan 2008 02:06:29 +0000 (02:06 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 26 Jan 2008 02:06:29 +0000 (02:06 +0000) |
index c9aec455e0a423eab306b296d89a9a37f8693ed1..f4f23764a33e0b90c4dd013258de637a62c55cc1 100644 (file)
vbox->pack_start(*_rcb_enabled, true, true);
vbox->pack_start(*_rcb_visible, true, true);
- vbox->pack_start(*newSpecificWidget(), true, true);
+ Gtk::Widget * gridwdg = newSpecificWidget();
+ vbox->pack_start(*gridwdg, true, true);
+
+ std::list<Gtk::Widget*> slaves;
+ slaves.push_back(_rcb_visible);
+ slaves.push_back(gridwdg);
+ _rcb_enabled->setSlaveWidgets(slaves);
// set widget values
_rcb_visible->setActive(visible);
index 4ed23d7b2975464f3be01755e8fc637a1dc1faa4..5ed737cf7614eb737a891e610d7867e633cd4e9e 100644 (file)
//Other options to locate here: e.g. visual snapping indicators on/off
- std::list<Gtk::ToggleButton*> slaves;
+ std::list<Gtk::Widget*> slaves;
slaves.push_back(&_rcbsnop);
slaves.push_back(&_rcbsnon);
- _rcbsnn.setSlaveButton(slaves);
+ _rcbsnn.setSlaveWidgets(slaves);
slaves.clear();
slaves.push_back(&_rcbsnbbp);
slaves.push_back(&_rcbsnbbn);
- _rcbsnbb.setSlaveButton(slaves);
+ _rcbsnbb.setSlaveWidgets(slaves);
slaves.clear();
slaves.push_back(&_rcbsnn);
slaves.push_back(&_rcbsnbb);
- _rcbsg.setSlaveButton(slaves);
+ _rcbsg.setSlaveWidgets(slaves);
Gtk::Label *label_g = manage (new Gtk::Label);
label_g->set_markup (_("<b>Snapping</b>"));
index 629de910f3f5777b13ee00a0a452fd765edfcc93..f8abecdbeb2402c67f43e9ae4721571890555eef 100644 (file)
setProgrammatically = true;
set_active (b);
//The slave button is greyed out if the master button is unchecked
- for (std::list<Gtk::ToggleButton*>::const_iterator i = _slavebuttons.begin(); i != _slavebuttons.end(); i++) {
+ for (std::list<Gtk::Widget*>::const_iterator i = _slavewidgets.begin(); i != _slavewidgets.end(); i++) {
(*i)->set_sensitive(b);
}
setProgrammatically = false;
write_to_xml(get_active() ? "true" : "false");
//The slave button is greyed out if the master button is unchecked
- for (std::list<Gtk::ToggleButton*>::const_iterator i = _slavebuttons.begin(); i != _slavebuttons.end(); i++) {
+ for (std::list<Gtk::Widget*>::const_iterator i = _slavewidgets.begin(); i != _slavewidgets.end(); i++) {
(*i)->set_sensitive(get_active());
}
index e6281e0efd0a47ab16aae1575cb3529269d7a3cf..42bcf62d7eef9eb072673d5e6485411377863731 100644 (file)
void setActive (bool);
- std::list<Gtk::ToggleButton*> _slavebuttons;
+ std::list<Gtk::Widget*> _slavewidgets;
// a slave button is only sensitive when the master button is active
// i.e. a slave button is greyed-out when the master button is not checked
- void setSlaveButton(std::list<Gtk::ToggleButton*> btns) {
- _slavebuttons = btns;
+ void setSlaveWidgets(std::list<Gtk::Widget*> btns) {
+ _slavewidgets = btns;
}
bool setProgrammatically; // true if the value was set by setActive, not changed by the user;