summaryrefslogtreecommitdiffstats
path: root/src/ui/widget
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-12-16 12:49:16 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-12-16 12:49:16 +0000
commitded9e1f5728b8fd32586e7d28c962526bba23d26 (patch)
tree9d4cb2e25902a7a02fd100b79816198fca90f0f5 /src/ui/widget
parentExtensions: PEP263 (encoding), sync with 0.48.x r9939 (diff)
downloadinkscape-ded9e1f5728b8fd32586e7d28c962526bba23d26.tar.gz
inkscape-ded9e1f5728b8fd32586e7d28c962526bba23d26.zip
GTK+ 3: Use orientable widgets
(bzr r11959)
Diffstat (limited to 'src/ui/widget')
-rw-r--r--src/ui/widget/panel.cpp6
-rw-r--r--src/ui/widget/panel.h12
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ui/widget/panel.cpp b/src/ui/widget/panel.cpp
index dcf5956bf..48749fda2 100644
--- a/src/ui/widget/panel.cpp
+++ b/src/ui/widget/panel.cpp
@@ -591,7 +591,13 @@ void Panel::_addResponseButton(Gtk::Button *button, int response_id, bool pack_s
{
// Create a button box for the response buttons if it's the first button to be added
if (!_action_area) {
+#if WITH_GTKMM_3_0
+ _action_area = new Gtk::ButtonBox();
+ _action_area->set_layout(Gtk::BUTTONBOX_END);
+ _action_area->set_spacing(6);
+#else
_action_area = new Gtk::HButtonBox(Gtk::BUTTONBOX_END, 6);
+#endif
_action_area->set_border_width(4);
pack_end(*_action_area, Gtk::PACK_SHRINK, 0);
}
diff --git a/src/ui/widget/panel.h b/src/ui/widget/panel.h
index b4cc04809..91a2a3c74 100644
--- a/src/ui/widget/panel.h
+++ b/src/ui/widget/panel.h
@@ -27,7 +27,13 @@ class SPDocument;
namespace Gtk {
class CheckMenuItem;
+
+#if WITH_GTKMM_3_0
+ class ButtonBox;
+#else
class HButtonBox;
+#endif
+
class MenuItem;
}
@@ -157,7 +163,13 @@ private:
Gtk::EventBox _menu_popper;
Gtk::Button _close_button;
Gtk::Menu *_menu;
+
+#if WITH_GTKMM_3_0
+ Gtk::ButtonBox *_action_area; //< stores response buttons
+#else
Gtk::HButtonBox *_action_area; //< stores response buttons
+#endif
+
std::vector<Gtk::Widget *> _non_horizontal;
std::vector<Gtk::Widget *> _non_vertical;
PreviewFillable *_fillable;