mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 22:56:32 +01:00
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:
parent
2756e72d0d
commit
72f76d4b95
4 changed files with 6 additions and 3 deletions
|
|
@ -386,7 +386,7 @@ RouteUI::mute_changed(void* src)
|
||||||
void
|
void
|
||||||
RouteUI::update_mute_display ()
|
RouteUI::update_mute_display ()
|
||||||
{
|
{
|
||||||
bool model = _route->record_enabled();
|
bool model = _route->muted();
|
||||||
bool view = mute_button->get_active();
|
bool view = mute_button->get_active();
|
||||||
|
|
||||||
/* first make sure the button's "depressed" visual
|
/* first make sure the button's "depressed" visual
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ Session::import_audiofile (import_status& status)
|
||||||
snprintf (buf, sizeof(buf), "%s/%s.wav", sounds_dir.c_str(), basepath.c_str());
|
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
|
/* if the file already exists, we must come up with
|
||||||
* a new name for it. for now we just keep appending
|
* a new name for it. for now we just keep appending
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class StateButton
|
||||||
|
|
||||||
virtual std::string get_widget_name() const = 0;
|
virtual std::string get_widget_name() const = 0;
|
||||||
virtual void set_widget_name (std::string) = 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(); }
|
std::string get_widget_name() const { return get_name(); }
|
||||||
void set_widget_name (std::string name) { set_name (name); get_child()->set_name (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
|
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(); }
|
std::string get_widget_name() const { return get_name(); }
|
||||||
void set_widget_name (std::string name) { set_name (name); get_child()->set_name (name); }
|
void set_widget_name (std::string name) { set_name (name); get_child()->set_name (name); }
|
||||||
|
int get_widget_state() { return get_state(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ StateButton::set_visual_state (int n)
|
||||||
|
|
||||||
string name = get_widget_name ();
|
string name = get_widget_name ();
|
||||||
name = name.substr (0, name.find_last_of ('-'));
|
name = name.substr (0, name.find_last_of ('-'));
|
||||||
|
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 0:
|
case 0:
|
||||||
/* relax */
|
/* relax */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue