fix for mute button color/state caused by cut-n-paste coding, plus another access(2) bites the portability dust

git-svn-id: svn://localhost/ardour2/trunk@1532 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2007-02-28 17:14:39 +00:00
parent 2756e72d0d
commit 72f76d4b95
4 changed files with 6 additions and 3 deletions

View file

@ -44,6 +44,7 @@ class StateButton
virtual std::string get_widget_name() const = 0;
virtual void set_widget_name (std::string) = 0;
virtual int get_widget_state() = 0;
};
@ -60,6 +61,7 @@ class StatefulToggleButton : public StateButton, public Gtk::ToggleButton
std::string get_widget_name() const { return get_name(); }
void set_widget_name (std::string name) { set_name (name); get_child()->set_name (name); }
int get_widget_state() { return get_state(); }
};
class StatefulButton : public StateButton, public Gtk::Button
@ -74,6 +76,7 @@ class StatefulButton : public StateButton, public Gtk::Button
std::string get_widget_name() const { return get_name(); }
void set_widget_name (std::string name) { set_name (name); get_child()->set_name (name); }
int get_widget_state() { return get_state(); }
};
};

View file

@ -31,7 +31,7 @@ StateButton::set_visual_state (int n)
string name = get_widget_name ();
name = name.substr (0, name.find_last_of ('-'));
switch (n) {
case 0:
/* relax */