diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-22 01:31:41 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-01-22 01:31:41 +0000 |
| commit | 355d673e61eae70c5e83f6d2e09997047b248ddd (patch) | |
| tree | bb9918e932562e6337da499f0ca82b86b28a0b5a /src/widgets/toolbox.h | |
| parent | Tidy more memory mgmt in toolbars (diff) | |
| download | inkscape-355d673e61eae70c5e83f6d2e09997047b248ddd.tar.gz inkscape-355d673e61eae70c5e83f6d2e09997047b248ddd.zip | |
Tidy up toolbox utilities
Diffstat (limited to 'src/widgets/toolbox.h')
| -rw-r--r-- | src/widgets/toolbox.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h index 6c973ba4a..9a4eef3cd 100644 --- a/src/widgets/toolbox.h +++ b/src/widgets/toolbox.h @@ -68,57 +68,6 @@ public: ToolboxFactory() = delete; }; -/** - * A simple mediator class that keeps UI controls matched to the preference values they set. - */ -class PrefPusher : public Inkscape::Preferences::Observer -{ -public: - /** - * Constructor for a boolean value that syncs to the supplied path. - * Initializes the widget to the current preference stored state and registers callbacks - * for widget changes and preference changes. - * - * @param act the widget to synchronize preference with. - * @param path the path to the preference the widget is synchronized with. - * @param callback function to invoke when changes are pushed. - * @param cbData data to be passed on to the callback function. - */ - PrefPusher( GtkToggleAction *act, - Glib::ustring const & path, - void (*callback)(gpointer) = nullptr, - gpointer cbData = nullptr ); - - /** - * Destructor that unregisters the preference callback. - */ - ~PrefPusher() override; - - /** - * Callback method invoked when the preference setting changes. - */ - void notify(Inkscape::Preferences::Entry const &new_val) override; - - -private: - /** - * Callback hook invoked when the widget changes. - * - * @param act the toggle action widget that was changed. - * @param self the PrefPusher instance the callback was registered to. - */ - static void toggleCB( GtkToggleAction *act, PrefPusher *self ); - - /** - * Method to handle the widget change. - */ - void handleToggled(); - - GtkToggleAction *act; - void (*callback)(gpointer); - gpointer cbData; - bool freeze; -}; } // namespace UI @@ -127,10 +76,6 @@ private: // utility -void delete_prefspusher(GObject * /*obj*/, Inkscape::UI::PrefPusher *watcher ); -void purge_repr_listener( GObject* /*obj*/, GObject* tbl ); -void delete_connection(GObject * /*obj*/, sigc::connection *connection); - EgeAdjustmentAction * create_adjustment_action( gchar const *name, gchar const *label, gchar const *shortLabel, gchar const *tooltip, Glib::ustring const &path, gdouble def, |
