diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-21 13:52:34 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-04-21 13:52:34 +0000 |
| commit | 6963da8960dab2e5e26204512cd4bb8924364821 (patch) | |
| tree | 945b6bb981fb72f7035994f9aa547693cad049c5 /src/ui/widget/toolbox.cpp | |
| parent | Fix typo in previewholder (diff) | |
| download | inkscape-6963da8960dab2e5e26204512cd4bb8924364821.tar.gz inkscape-6963da8960dab2e5e26204512cd4bb8924364821.zip | |
Replace deprecated toolbar orientation API. Unfortunately there is no replacement in Gtkmm 3 so we need to use underlying GTK+ object
(bzr r11275)
Diffstat (limited to 'src/ui/widget/toolbox.cpp')
| -rw-r--r-- | src/ui/widget/toolbox.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/widget/toolbox.cpp b/src/ui/widget/toolbox.cpp index 99891fc44..a11bd2d74 100644 --- a/src/ui/widget/toolbox.cpp +++ b/src/ui/widget/toolbox.cpp @@ -12,6 +12,7 @@ #endif #include <gtkmm/radioaction.h> +#include <gtkmm/orientable.h> #include <gtk/gtk.h> #include "ui/widget/toolbox.h" #include "path-prefix.h" @@ -97,7 +98,9 @@ Toolbox::init_actions() void Toolbox::init_orientation(Gtk::Orientation const &orientation) { - static_cast<Gtk::Toolbar*>(_widget)->set_orientation(orientation); + gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast<Gtk::Toolbar*>(_widget)->gobj()), + GtkOrientation(orientation)); + if (orientation == Gtk::ORIENTATION_VERTICAL) { set_handle_position(Gtk::POS_TOP); } @@ -226,7 +229,8 @@ Toolbox::on_change_orient_horiz() { Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientHoriz")); if (action->get_active()) { - static_cast<Gtk::Toolbar*>(_widget)->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast<Gtk::Toolbar*>(_widget)->gobj()), + GTK_ORIENTATION_HORIZONTAL); } } @@ -235,7 +239,8 @@ Toolbox::on_change_orient_vert() { Glib::RefPtr<Gtk::RadioAction> action = Glib::RefPtr<Gtk::RadioAction>::cast_static(_detach_grp->get_action("OrientVert")); if (action->get_active()) { - static_cast<Gtk::Toolbar*>(_widget)->set_orientation(Gtk::ORIENTATION_VERTICAL); + gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast<Gtk::Toolbar*>(_widget)->gobj()), + GTK_ORIENTATION_VERTICAL); } } |
