13
0

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

@ -386,7 +386,7 @@ RouteUI::mute_changed(void* src)
void
RouteUI::update_mute_display ()
{
bool model = _route->record_enabled();
bool model = _route->muted();
bool view = mute_button->get_active();
/* first make sure the button's "depressed" visual

View File

@ -167,7 +167,7 @@ Session::import_audiofile (import_status& status)
snprintf (buf, sizeof(buf), "%s/%s.wav", sounds_dir.c_str(), basepath.c_str());
}
if (::access (buf, F_OK) == 0) {
if (Glib::file_test (buf, Glib::FILE_TEST_EXISTS)) {
/* if the file already exists, we must come up with
* a new name for it. for now we just keep appending

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 */