diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-10 15:03:30 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-09-10 15:03:30 +0000 |
commit | 68e943265edf04e63a8e8b8f62bab20f99d9c637 (patch) | |
tree | ff8941a59662fc0c4622944b65f7b2d5e3bdd0c3 /libs/gtkmm2ext | |
parent | e4372df05b7d74a6b80dbbf4b6c00cc2b31c4723 (diff) |
merge from 2.0-ongoing @ 3581
git-svn-id: svn://localhost/ardour2/branches/3.0@3711 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/SConscript | 4 | ||||
-rw-r--r-- | libs/gtkmm2ext/barcontroller.cc | 2 | ||||
-rw-r--r-- | libs/gtkmm2ext/binding_proxy.cc | 8 | ||||
-rw-r--r-- | libs/gtkmm2ext/fastmeter.cc | 2 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtk_ui.cc | 1 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/barcontroller.h | 4 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/bindable_button.h | 13 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/binding_proxy.h | 9 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/gtk_ui.h | 2 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/hexentry.h | 58 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/pathlist.h | 63 | ||||
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/slider_controller.h | 10 | ||||
-rw-r--r-- | libs/gtkmm2ext/hexentry.cc | 111 | ||||
-rw-r--r-- | libs/gtkmm2ext/pathlist.cc | 124 | ||||
-rw-r--r-- | libs/gtkmm2ext/slider_controller.cc | 6 |
15 files changed, 30 insertions, 387 deletions
diff --git a/libs/gtkmm2ext/SConscript b/libs/gtkmm2ext/SConscript index a0ef88e6d1..3a3bd351d7 100644 --- a/libs/gtkmm2ext/SConscript +++ b/libs/gtkmm2ext/SConscript @@ -6,7 +6,7 @@ import glob Import('env final_prefix install_prefix libraries i18n') -gtkmm2ext = env.Copy() +gtkmm2ext = env.Clone() gtkmm2ext.Merge ([ libraries['sigc2'], libraries['pbd'], @@ -48,9 +48,7 @@ fastmeter.cc focus_entry.cc grouped_buttons.cc gtk_ui.cc -hexentry.cc idle_adjustment.cc -pathlist.cc pixfader.cc pixscroller.cc popup.cc diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc index a3b2a13bf5..90954e57b3 100644 --- a/libs/gtkmm2ext/barcontroller.cc +++ b/libs/gtkmm2ext/barcontroller.cc @@ -36,7 +36,7 @@ using namespace Gtk; using namespace Gtkmm2ext; BarController::BarController (Gtk::Adjustment& adj, - PBD::Controllable& mc, + boost::shared_ptr<PBD::Controllable> mc, sigc::slot<void,char*,unsigned int> lc) : adjustment (adj), diff --git a/libs/gtkmm2ext/binding_proxy.cc b/libs/gtkmm2ext/binding_proxy.cc index 90f95f82ef..6c60deaa8f 100644 --- a/libs/gtkmm2ext/binding_proxy.cc +++ b/libs/gtkmm2ext/binding_proxy.cc @@ -31,7 +31,7 @@ using namespace Gtkmm2ext; using namespace std; using namespace PBD; -BindingProxy::BindingProxy (Controllable& c) +BindingProxy::BindingProxy (boost::shared_ptr<Controllable> c) : prompter (0), controllable (c), bind_button (2), @@ -65,7 +65,7 @@ bool BindingProxy::button_press_handler (GdkEventButton *ev) { if ((ev->state & bind_statemask) && ev->button == bind_button) { - if (Controllable::StartLearning (&controllable)) { + if (Controllable::StartLearning (controllable.get())) { string prompt = _("operate controller now"); if (prompter == 0) { prompter = new PopUp (Gtk::WIN_POS_MOUSE, 30000, false); @@ -73,7 +73,7 @@ BindingProxy::button_press_handler (GdkEventButton *ev) } prompter->set_text (prompt); prompter->touch (); // shows popup - learning_connection = controllable.LearningFinished.connect (mem_fun (*this, &BindingProxy::learning_finished)); + learning_connection = controllable->LearningFinished.connect (mem_fun (*this, &BindingProxy::learning_finished)); } return true; } @@ -95,7 +95,7 @@ bool BindingProxy::prompter_hiding (GdkEventAny *ev) { learning_connection.disconnect (); - Controllable::StopLearning (&controllable); + Controllable::StopLearning (controllable.get()); return false; } diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc index 63c36558f1..bdd8919d36 100644 --- a/libs/gtkmm2ext/fastmeter.cc +++ b/libs/gtkmm2ext/fastmeter.cc @@ -25,7 +25,7 @@ #include <gtkmm2ext/fastmeter.h> #include <gtkmm2ext/utils.h> #include <gtkmm/style.h> -#include <string.h> +#include <cstring> #define UINT_TO_RGB(u,r,g,b) { (*(r)) = ((u)>>16)&0xff; (*(g)) = ((u)>>8)&0xff; (*(b)) = (u)&0xff; } #define UINT_TO_RGBA(u,r,g,b,a) { UINT_TO_RGB(((u)>>8),r,g,b); (*(a)) = (u)&0xff; } diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index f00c6cd1e1..4ca23b0240 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -65,7 +65,6 @@ UI::UI (string namestr, int *argc, char ***argv) : AbstractUI<UIRequest> (namestr, true) { theMain = new Main (argc, argv); - tips = new Tooltips; _active = false; diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h index fe67e9ecec..5e9a6fed90 100644 --- a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h +++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h @@ -34,7 +34,7 @@ class BarController : public Gtk::Frame public: typedef sigc::slot<void,char*,unsigned int> LabelCallback; - BarController (Gtk::Adjustment& adj, PBD::Controllable&, LabelCallback lc = LabelCallback()); + BarController (Gtk::Adjustment& adj, boost::shared_ptr<PBD::Controllable>, LabelCallback lc = LabelCallback()); virtual ~BarController () {} @@ -63,7 +63,7 @@ class BarController : public Gtk::Frame /* export this to allow direct connection to button events */ Gtk::Widget& event_widget() { return darea; } - PBD::Controllable* get_controllable() { return binding_proxy.get_controllable(); } + boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); } protected: Gtk::Adjustment& adjustment; diff --git a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h index 1cde32c5ba..844dc27d08 100644 --- a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h +++ b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h @@ -32,9 +32,9 @@ namespace PBD { class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton { public: - BindableToggleButton (PBD::Controllable& c) : binding_proxy (c) {} + BindableToggleButton (boost::shared_ptr<PBD::Controllable> c) : binding_proxy (c) {} - explicit BindableToggleButton (PBD::Controllable& c, const std::string &label) + explicit BindableToggleButton (boost::shared_ptr<PBD::Controllable> c, const std::string &label) : Gtkmm2ext::StatefulToggleButton (label), binding_proxy (c) {} virtual ~BindableToggleButton() {} @@ -48,7 +48,8 @@ class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton } } - PBD::Controllable* get_controllable() { return binding_proxy.get_controllable(); } + boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); } + private: BindingProxy binding_proxy; }; @@ -56,9 +57,9 @@ class BindableToggleButton : public Gtkmm2ext::StatefulToggleButton class BindableButton : public Gtkmm2ext::StatefulButton { public: - BindableButton (PBD::Controllable& c) : binding_proxy (c) {} + BindableButton (boost::shared_ptr<PBD::Controllable> c) : binding_proxy (c) {} - explicit BindableButton (PBD::Controllable& c, const std::string &label) + explicit BindableButton (boost::shared_ptr<PBD::Controllable> c, const std::string &label) : Gtkmm2ext::StatefulButton (label), binding_proxy (c) {} ~BindableButton() {} @@ -72,7 +73,7 @@ class BindableButton : public Gtkmm2ext::StatefulButton } } - PBD::Controllable* get_controllable() { return binding_proxy.get_controllable(); } + boost::shared_ptr<PBD::Controllable> get_controllable() { return binding_proxy.get_controllable(); } private: BindingProxy binding_proxy; diff --git a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h index dd9b94319d..ecb95bf815 100644 --- a/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h +++ b/libs/gtkmm2ext/gtkmm2ext/binding_proxy.h @@ -24,6 +24,7 @@ #include <string> #include <gtkmm2ext/popup.h> +#include <boost/shared_ptr.hpp> namespace PBD { class Controllable; @@ -32,7 +33,7 @@ namespace PBD { class BindingProxy : public sigc::trackable { public: - BindingProxy (PBD::Controllable&); + BindingProxy (boost::shared_ptr<PBD::Controllable>); virtual ~BindingProxy(); void set_bind_button_state (guint button, guint statemask); @@ -40,11 +41,11 @@ class BindingProxy : public sigc::trackable bool button_press_handler (GdkEventButton *); - PBD::Controllable* get_controllable() { return &controllable; } - protected: + boost::shared_ptr<PBD::Controllable> get_controllable() { return controllable; } + protected: Gtkmm2ext::PopUp* prompter; - PBD::Controllable& controllable; + boost::shared_ptr<PBD::Controllable> controllable; guint bind_button; guint bind_statemask; sigc::connection learning_connection; diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h index 0c2ff0d798..22ac517672 100644 --- a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h +++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h @@ -31,7 +31,6 @@ #include <gtkmm/style.h> #include <gtkmm/textbuffer.h> #include <gtkmm/main.h> -#include <gtkmm/tooltips.h> #include <gdkmm/color.h> #include <pbd/abstract_ui.h> #include <pbd/ringbufferNPT.h> @@ -150,7 +149,6 @@ class UI : public Receiver, public AbstractUI<UIRequest> static pthread_t gui_thread; bool _active; Gtk::Main *theMain; - Gtk::Tooltips *tips; TextViewer *errors; Glib::RefPtr<Gtk::TextBuffer::Tag> error_ptag; Glib::RefPtr<Gtk::TextBuffer::Tag> error_mtag; diff --git a/libs/gtkmm2ext/gtkmm2ext/hexentry.h b/libs/gtkmm2ext/gtkmm2ext/hexentry.h deleted file mode 100644 index 410f54274e..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/hexentry.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (C) 1999 Paul Barton-Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkmm2ext_hexentry_h__ -#define __gtkmm2ext_hexentry_h__ - -#include <gtkmm.h> - -namespace Gtkmm2ext { - -class HexEntry : public Gtk::Entry - -{ - public: - /* Take a byte-level representation of a series of hexadecimal - values and use them to set the displayed text of the entry. - Eg. if hexbuf[0] = 0xff and hexbuf[1] = 0xa1 and buflen = 2, - then the text will be set to "ff a1". - */ - - void set_hex (unsigned char *hexbuf, unsigned int buflen); - - /* puts byte-level representation of current entry text - into hexbuf, and returns number of bytes written there. - - NOTE: this will release the existing memory pointed to - by hexbuf if buflen indicates that it is not long enough - to hold the new representation, and hexbuf is not zero. - - If the returned length is zero, the contents of hexbuf - are undefined. - */ - - unsigned int get_hex (unsigned char *hexbuf, size_t buflen); - - private: - bool on_key_press_event (GdkEventKey *); -}; - -} /* namespace */ - -#endif /* __gtkmm2ext_hexentry_h__ */ diff --git a/libs/gtkmm2ext/gtkmm2ext/pathlist.h b/libs/gtkmm2ext/gtkmm2ext/pathlist.h deleted file mode 100644 index f4a5973d5a..0000000000 --- a/libs/gtkmm2ext/gtkmm2ext/pathlist.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef __gtkmm2ext_pathlist_h__ -#define __gtkmm2ext_pathlist_h__ - -#include <vector> -#include <string> - -#include <gtkmm.h> - -namespace Gtkmm2ext { - -class PathList : public Gtk::VBox -{ - public: - PathList (); - ~PathList () {}; - - std::vector<std::string> get_paths (); - void set_paths (std::vector<std::string> paths); - - sigc::signal<void> PathsUpdated; - - protected: - Gtk::Button add_btn; - Gtk::Button subtract_btn; - - void add_btn_clicked (); - void subtract_btn_clicked (); - - private: - struct PathColumns : public Gtk::TreeModel::ColumnRecord { - PathColumns() { add (paths); } - Gtk::TreeModelColumn<std::string> paths; - }; - PathColumns path_columns; - - Glib::RefPtr<Gtk::ListStore> _store; - Gtk::TreeView _view; - - void selection_changed (); -}; - -} // namespace Gtkmm2ext - -#endif // __gtkmm2ext_pathlist_h__ diff --git a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h index 60c8eef660..46f70dacd8 100644 --- a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h +++ b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h @@ -24,6 +24,8 @@ #include <gtkmm2ext/pixfader.h> #include <gtkmm2ext/binding_proxy.h> +#include <boost/shared_ptr.hpp> + namespace Gtkmm2ext { class Pix; } @@ -39,9 +41,9 @@ class SliderController : public Gtkmm2ext::PixFader public: SliderController (Glib::RefPtr<Gdk::Pixbuf> image, Gtk::Adjustment* adj, int orientation, - PBD::Controllable&, + boost::shared_ptr<PBD::Controllable>, bool with_numeric = true); - + virtual ~SliderController () {} void set_value (float); @@ -64,7 +66,7 @@ class VSliderController : public SliderController public: VSliderController (Glib::RefPtr<Gdk::Pixbuf> image, Gtk::Adjustment *adj, - PBD::Controllable&, + boost::shared_ptr<PBD::Controllable>, bool with_numeric = true); }; @@ -73,7 +75,7 @@ class HSliderController : public SliderController public: HSliderController (Glib::RefPtr<Gdk::Pixbuf> image, Gtk::Adjustment *adj, - PBD::Controllable&, + boost::shared_ptr<PBD::Controllable>, bool with_numeric = true); }; diff --git a/libs/gtkmm2ext/hexentry.cc b/libs/gtkmm2ext/hexentry.cc deleted file mode 100644 index 9862cac435..0000000000 --- a/libs/gtkmm2ext/hexentry.cc +++ /dev/null @@ -1,111 +0,0 @@ -/* - Copyright (C) 2000 Paul Barton-Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ -*/ - -#include <stdio.h> /* for sprintf, sigh ... */ -#include <string> -#include <ctype.h> - -#include <gdk/gdkkeysyms.h> -#include <gtkmm2ext/hexentry.h> - -using namespace std; -using namespace Gtkmm2ext; - -bool -HexEntry::on_key_press_event (GdkEventKey *ev) - -{ - if ((ev->keyval >= GDK_a && ev->keyval <= GDK_f) || - (ev->keyval >= GDK_A && ev->keyval <= GDK_A) || - (ev->keyval >= GDK_0 && ev->keyval <= GDK_9) || - ev->keyval == GDK_space || - ev->keyval == GDK_Tab || - ev->keyval == GDK_Return || - ev->keyval == GDK_BackSpace || - ev->keyval == GDK_Delete) { - return Gtk::Entry::on_key_press_event (ev); - } else { - gdk_beep (); - return FALSE; - } -} - - -void -HexEntry::set_hex (unsigned char *msg, unsigned int len) - -{ - /* create a textual representation of the MIDI message */ - - if (msg && len) { - char *rep; - - rep = new char[(len * 3) + 1]; - for (size_t i = 0; i < len; i++) { - sprintf (&rep[i*3], "%02x ", msg[i]); - } - rep[len * 3] = '\0'; - set_text (rep); - delete [] rep; - } else { - set_text (""); - } -} - -unsigned int -HexEntry::get_hex (unsigned char *hexbuf, size_t buflen) - -{ - int fetched_len; - char buf[3]; - string text = get_text(); - string::size_type length = text.length (); - string::size_type offset; - - fetched_len = 0; - buf[2] = '\0'; - offset = 0; - - while (1) { - offset = text.find_first_of ("abcdef0123456789", offset); - - if (offset == string::npos) { - break; - } - - /* grab two characters, but no more */ - - buf[0] = text[offset]; - - if (offset < length - 1) { - buf[1] = text[offset+1]; - offset += 2; - } else { - buf[1] = '\0'; - offset += 1; - } - - hexbuf[fetched_len++] = (char) strtol (buf, 0, 16); - } - - return fetched_len; -} - - diff --git a/libs/gtkmm2ext/pathlist.cc b/libs/gtkmm2ext/pathlist.cc deleted file mode 100644 index 7b3448ed5f..0000000000 --- a/libs/gtkmm2ext/pathlist.cc +++ /dev/null @@ -1,124 +0,0 @@ -/* - Copyright (C) 2006 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include <gtkmm2ext/pathlist.h> - -#include "i18n.h" - -using namespace std; -using namespace Gtkmm2ext; - -PathList::PathList () - : - add_btn(_("+")), - subtract_btn(_("-")), - path_columns(), - _store(Gtk::ListStore::create(path_columns)), - _view(_store) -{ - _view.append_column(_("Paths"), path_columns.paths); - _view.set_size_request(-1, 100); - _view.set_headers_visible (false); - - Gtk::ScrolledWindow* scroll = manage(new Gtk::ScrolledWindow); - scroll->set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC); - scroll->add(_view); - - add (*scroll); - - Gtk::HBox* btn_box = manage(new Gtk::HBox); - btn_box->add(add_btn); - btn_box->add(subtract_btn); - - add (*btn_box); - - add_btn.signal_clicked().connect (mem_fun(*this, &PathList::add_btn_clicked)); - subtract_btn.signal_clicked().connect (mem_fun(*this, &PathList::subtract_btn_clicked)); - _view.get_selection()->signal_changed().connect (mem_fun(*this, &PathList::selection_changed)); -} - -vector<string> -PathList::get_paths () -{ - vector<string> paths; - - Gtk::TreeModel::Children children(_store->children()); - - for (Gtk::TreeIter iter = children.begin(); iter != children.end(); ++iter) { - Gtk::ListStore::Row row = *iter; - - paths.push_back(row[path_columns.paths]); - } - - return paths; -} - -void -PathList::set_paths (vector<string> paths) -{ - _store->clear(); - - for (vector<string>::iterator i = paths.begin(); i != paths.end(); ++i) { - Gtk::ListStore::iterator iter = _store->append(); - Gtk::ListStore::Row row = *iter; - row[path_columns.paths] = *i; - } -} - -void -PathList::add_btn_clicked () -{ - Gtk::FileChooserDialog path_chooser (_("Path Chooser"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER); - - path_chooser.add_button (Gtk::Stock::ADD, Gtk::RESPONSE_OK); - path_chooser.add_button (Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL); - - int result = path_chooser.run (); - - if (result == Gtk::RESPONSE_OK) { - string pathname = path_chooser.get_filename(); - - if (pathname.length ()) { - Gtk::ListStore::iterator iter = _store->append (); - Gtk::ListStore::Row row = *iter; - row[path_columns.paths] = pathname; - - PathsUpdated (); // EMIT_SIGNAL - } - } -} - -void -PathList::subtract_btn_clicked () -{ - Gtk::ListStore::iterator iter = _view.get_selection()->get_selected(); - _store->erase (iter); - - PathsUpdated (); // EMIT_SIGNAL -} - -void -PathList::selection_changed () -{ - if (_view.get_selection()->count_selected_rows ()) { - subtract_btn.set_sensitive (true); - } else { - subtract_btn.set_sensitive (false); - } -} diff --git a/libs/gtkmm2ext/slider_controller.cc b/libs/gtkmm2ext/slider_controller.cc index 93dfb27ae2..92fd9d078b 100644 --- a/libs/gtkmm2ext/slider_controller.cc +++ b/libs/gtkmm2ext/slider_controller.cc @@ -30,7 +30,7 @@ using namespace PBD; SliderController::SliderController (Glib::RefPtr<Gdk::Pixbuf> image, Gtk::Adjustment *adj, int orientation, - Controllable& c, + boost::shared_ptr<Controllable> c, bool with_numeric) : PixFader (image, *adj, orientation), @@ -60,7 +60,7 @@ SliderController::on_button_press_event (GdkEventButton *ev) VSliderController::VSliderController (Glib::RefPtr<Gdk::Pixbuf> image, Gtk::Adjustment *adj, - Controllable& control, + boost::shared_ptr<Controllable> control, bool with_numeric) : SliderController (image, adj, VERT, control, with_numeric) @@ -76,7 +76,7 @@ VSliderController::VSliderController (Glib::RefPtr<Gdk::Pixbuf> image, HSliderController::HSliderController (Glib::RefPtr<Gdk::Pixbuf> image, Gtk::Adjustment *adj, - Controllable& control, + boost::shared_ptr<Controllable> control, bool with_numeric) : SliderController (image, adj, HORIZ, control, with_numeric) |