summaryrefslogtreecommitdiffstats
path: root/src/widgets/desktop-widget.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2019-05-28 14:08:01 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2019-05-28 14:08:01 +0000
commitc36a1de9d1b762355bbed31ab9b6672dc90aec43 (patch)
tree0e5b3320f9d6999b682bdd330f3a4df8ac627bed /src/widgets/desktop-widget.cpp
parentHackfest2019: Drop unused EgeAdjustmentAction (diff)
downloadinkscape-c36a1de9d1b762355bbed31ab9b6672dc90aec43.tar.gz
inkscape-c36a1de9d1b762355bbed31ab9b6672dc90aec43.zip
Hackfest2019: Get rid of deprecated InkSelectOneAction
Diffstat (limited to 'src/widgets/desktop-widget.cpp')
-rw-r--r--src/widgets/desktop-widget.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp
index c48d6fbd5..2b5abd0b6 100644
--- a/src/widgets/desktop-widget.cpp
+++ b/src/widgets/desktop-widget.cpp
@@ -60,7 +60,6 @@
#include "ui/uxmanager.h"
#include "ui/widget/button.h"
#include "ui/widget/dock.h"
-#include "ui/widget/ink-select-one-action.h"
#include "ui/widget/layer-selector.h"
#include "ui/widget/selected-style.h"
#include "ui/widget/spin-button-tool-item.h"
@@ -1513,6 +1512,22 @@ void SPDesktopWidget::layoutWidgets()
}
}
+Gtk::Toolbar *
+SPDesktopWidget::get_toolbar_by_name(const Glib::ustring& name)
+{
+ // The name is actually attached to the GtkGrid that contains
+ // the toolbar, so we need to get the grid first
+ auto widget = sp_search_by_name_recursive(Glib::wrap(aux_toolbox), name);
+ auto grid = dynamic_cast<Gtk::Grid*>(widget);
+
+ if (!grid) return nullptr;
+
+ auto child = grid->get_child_at(0,0);
+ auto tb = dynamic_cast<Gtk::Toolbar*>(child);
+
+ return tb;
+}
+
void
SPDesktopWidget::setToolboxFocusTo (const gchar* label)
{
@@ -1551,15 +1566,6 @@ SPDesktopWidget::setToolboxAdjustmentValue (gchar const *id, double value)
else g_warning ("Could not find GtkAdjustment for %s\n", id);
}
-void
-SPDesktopWidget::setToolboxSelectOneValue (gchar const *id, int value)
-{
- gpointer hb = sp_search_by_data_recursive(aux_toolbox, (gpointer) id);
- if (static_cast<InkSelectOneAction*>(hb)) {
- static_cast<InkSelectOneAction*>(hb)->set_active( value );
- }
-}
-
bool
SPDesktopWidget::isToolboxButtonActive (const gchar* id)