From 6963da8960dab2e5e26204512cd4bb8924364821 Mon Sep 17 00:00:00 2001 From: Alex Valavanis Date: Sat, 21 Apr 2012 14:52:34 +0100 Subject: Replace deprecated toolbar orientation API. Unfortunately there is no replacement in Gtkmm 3 so we need to use underlying GTK+ object (bzr r11275) --- src/ui/widget/toolbox.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/ui/widget/toolbox.cpp') 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 +#include #include #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(_widget)->set_orientation(orientation); + gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast(_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 action = Glib::RefPtr::cast_static(_detach_grp->get_action("OrientHoriz")); if (action->get_active()) { - static_cast(_widget)->set_orientation(Gtk::ORIENTATION_HORIZONTAL); + gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast(_widget)->gobj()), + GTK_ORIENTATION_HORIZONTAL); } } @@ -235,7 +239,8 @@ Toolbox::on_change_orient_vert() { Glib::RefPtr action = Glib::RefPtr::cast_static(_detach_grp->get_action("OrientVert")); if (action->get_active()) { - static_cast(_widget)->set_orientation(Gtk::ORIENTATION_VERTICAL); + gtk_orientable_set_orientation(GTK_ORIENTABLE(static_cast(_widget)->gobj()), + GTK_ORIENTATION_VERTICAL); } } -- cgit v1.2.3