diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-12-16 12:49:16 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-12-16 12:49:16 +0000 |
| commit | ded9e1f5728b8fd32586e7d28c962526bba23d26 (patch) | |
| tree | 9d4cb2e25902a7a02fd100b79816198fca90f0f5 /src | |
| parent | Extensions: PEP263 (encoding), sync with 0.48.x r9939 (diff) | |
| download | inkscape-ded9e1f5728b8fd32586e7d28c962526bba23d26.tar.gz inkscape-ded9e1f5728b8fd32586e7d28c962526bba23d26.zip | |
GTK+ 3: Use orientable widgets
(bzr r11959)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/prefdialog.cpp | 5 | ||||
| -rw-r--r-- | src/ui/dialog/icon-preview.h | 5 | ||||
| -rw-r--r-- | src/ui/dialog/inkscape-preferences.cpp | 5 | ||||
| -rw-r--r-- | src/ui/dialog/spellcheck.h | 10 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.cpp | 10 | ||||
| -rw-r--r-- | src/ui/dialog/text-edit.h | 12 | ||||
| -rw-r--r-- | src/ui/widget/panel.cpp | 6 | ||||
| -rw-r--r-- | src/ui/widget/panel.h | 12 |
8 files changed, 65 insertions, 0 deletions
diff --git a/src/extension/prefdialog.cpp b/src/extension/prefdialog.cpp index 2d2604c7f..649dc398a 100644 --- a/src/extension/prefdialog.cpp +++ b/src/extension/prefdialog.cpp @@ -88,7 +88,12 @@ PrefDialog::PrefDialog (Glib::ustring name, gchar const * help, Gtk::Widget * co _param_preview = Parameter::make(doc->root(), _effect); } +#if WITH_GTKMM_3_0 + Gtk::Separator * sep = Gtk::manage(new Gtk::Separator()); +#else Gtk::HSeparator * sep = Gtk::manage(new Gtk::HSeparator()); +#endif + sep->show(); this->get_vbox()->pack_start(*sep, true, true, 4); diff --git a/src/ui/dialog/icon-preview.h b/src/ui/dialog/icon-preview.h index 42f9176b0..8a6e19a25 100644 --- a/src/ui/dialog/icon-preview.h +++ b/src/ui/dialog/icon-preview.h @@ -66,7 +66,12 @@ private: gdouble minDelay; Gtk::VBox iconBox; + +#if WITH_GTKMM_3_0 + Gtk::Paned splitter; +#else Gtk::HPaned splitter; +#endif Glib::ustring targetId; int hot; diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index cc145c16b..20e5d3ca6 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -1461,7 +1461,12 @@ void InkscapePreferences::initKeyboardShortcuts(Gtk::TreeModel::iterator iter_ui _page_keyshortcuts.attach(*scroller, 0, 2, row, row+1, Gtk::EXPAND | Gtk::FILL, Gtk::EXPAND | Gtk::FILL); row++; +#if WITH_GTKMM_3_0 + Gtk::ButtonBox *box_buttons = manage(new Gtk::ButtonBox); +#else Gtk::HButtonBox *box_buttons = manage (new Gtk::HButtonBox); +#endif + box_buttons->set_layout(Gtk::BUTTONBOX_END); box_buttons->set_spacing(4); _page_keyshortcuts.attach(*box_buttons, 0, 3, row, row+1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK); diff --git a/src/ui/dialog/spellcheck.h b/src/ui/dialog/spellcheck.h index 8eb240097..ab75809f3 100644 --- a/src/ui/dialog/spellcheck.h +++ b/src/ui/dialog/spellcheck.h @@ -240,10 +240,20 @@ private: GtkWidget * dictionary_combo; Gtk::HBox dictionary_hbox; +#if WITH_GTKMM_3_0 + Gtk::Separator action_sep; +#else Gtk::HSeparator action_sep; +#endif + Gtk::Button stop_button; Gtk::Button start_button; + +#if WITH_GTKMM_3_0 + Gtk::ButtonBox actionbutton_hbox; +#else Gtk::HButtonBox actionbutton_hbox; +#endif SPDesktop * desktop; DesktopTracker deskTrack; diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index 6696db083..97cd28cdd 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -95,11 +95,21 @@ TextEdit::TextEdit() styleButton(&align_center, _("Align center"), GTK_STOCK_JUSTIFY_CENTER, &align_left); styleButton(&align_right, _("Align right"), GTK_STOCK_JUSTIFY_RIGHT, &align_left); styleButton(&align_justify, _("Justify (only flowed text)"), GTK_STOCK_JUSTIFY_FILL, &align_left); + +#if WITH_GTKMM_3_0 + align_sep.set_orientation(Gtk::ORIENTATION_VERTICAL); +#endif + layout_hbox.pack_start(align_sep, false, false, 10); /* Direction buttons */ styleButton(&text_horizontal, _("Horizontal text"), INKSCAPE_ICON("format-text-direction-horizontal"), NULL); styleButton(&text_vertical, _("Vertical text"), INKSCAPE_ICON("format-text-direction-vertical"), &text_horizontal); + +#if WITH_GTKMM_3_0 + text_sep.set_orientation(Gtk::ORIENTATION_VERTICAL); +#endif + layout_hbox.pack_start(text_sep, false, false, 10); /* Line Spacing */ diff --git a/src/ui/dialog/text-edit.h b/src/ui/dialog/text-edit.h index 9fd9baa30..bca6cee90 100644 --- a/src/ui/dialog/text-edit.h +++ b/src/ui/dialog/text-edit.h @@ -172,10 +172,22 @@ private: Gtk::RadioButton align_center; Gtk::RadioButton align_right; Gtk::RadioButton align_justify; + +#if WITH_GTKMM_3_0 + Gtk::Separator align_sep; +#else Gtk::VSeparator align_sep; +#endif + Gtk::RadioButton text_vertical; Gtk::RadioButton text_horizontal; + +#if WITH_GTKMM_3_0 + Gtk::Separator text_sep; +#else Gtk::VSeparator text_sep; +#endif + GtkWidget *spacing_combo; Gtk::Label preview_label; 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; |
