diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2013-03-09 17:55:41 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2013-03-09 17:55:41 +0000 |
| commit | 8f80b0f09010f537040e26c17bfad5a5852a875d (patch) | |
| tree | 5143f6d7a3ebae4d7125508e4ce1d7048739fb9c /src | |
| parent | Migrate from Gtk::Color to Gtk::RGBA (diff) | |
| download | inkscape-8f80b0f09010f537040e26c17bfad5a5852a875d.tar.gz inkscape-8f80b0f09010f537040e26c17bfad5a5852a875d.zip | |
Migrate calligraphic-profile-rename.* to Gtk::Grid
(bzr r12187)
Diffstat (limited to 'src')
| -rw-r--r-- | src/ui/dialog/calligraphic-profile-rename.cpp | 35 | ||||
| -rw-r--r-- | src/ui/dialog/calligraphic-profile-rename.h | 22 |
2 files changed, 45 insertions, 12 deletions
diff --git a/src/ui/dialog/calligraphic-profile-rename.cpp b/src/ui/dialog/calligraphic-profile-rename.cpp index da43763c8..9ae22db2d 100644 --- a/src/ui/dialog/calligraphic-profile-rename.cpp +++ b/src/ui/dialog/calligraphic-profile-rename.cpp @@ -13,14 +13,16 @@ * Released under GNU GPL. Read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - #include "calligraphic-profile-rename.h" #include <glibmm/i18n.h> #include <gtkmm/stock.h> +#if WITH_GTKMM_3_0 +# include <gtkmm/grid.h> +#else +# include <gtkmm/table.h> +#endif + #include "desktop.h" namespace Inkscape { @@ -28,29 +30,42 @@ namespace UI { namespace Dialog { CalligraphicProfileRename::CalligraphicProfileRename() : +#if WITH_GTKMM_3_0 + _layout_table(Gtk::manage(new Gtk::Grid())), +#else + _layout_table(Gtk::manage(new Gtk::Table(1, 2))), +#endif _applied(false) { set_title(_("Edit profile")); #if WITH_GTKMM_3_0 Gtk::Box *mainVBox = get_content_area(); + _layout_table->set_column_spacing(4); + _layout_table->set_row_spacing(4); #else Gtk::Box *mainVBox = get_vbox(); + _layout_table->set_spacings(4); #endif - _layout_table.set_spacings(4); - _layout_table.resize (1, 2); - _profile_name_entry.set_activates_default(true); _profile_name_label.set_label(_("Profile name:")); _profile_name_label.set_alignment(1.0, 0.5); - _layout_table.attach(_profile_name_label, +#if WITH_GTKMM_3_0 + _layout_table->attach(_profile_name_label, 0, 0, 1, 1); + + _profile_name_entry.set_hexpand(); + _layout_table->attach(_profile_name_entry, 1, 0, 1, 1); +#else + _layout_table->attach(_profile_name_label, 0, 1, 0, 1, Gtk::FILL, Gtk::FILL); - _layout_table.attach(_profile_name_entry, + _layout_table->attach(_profile_name_entry, 1, 2, 0, 1, Gtk::FILL | Gtk::EXPAND, Gtk::FILL); - mainVBox->pack_start(_layout_table, false, false, 4); +#endif + + mainVBox->pack_start(*_layout_table, false, false, 4); // Buttons _close_button.set_use_stock(true); _close_button.set_label(Gtk::Stock::CANCEL.id); diff --git a/src/ui/dialog/calligraphic-profile-rename.h b/src/ui/dialog/calligraphic-profile-rename.h index 8fe82d7bb..4ef71900b 100644 --- a/src/ui/dialog/calligraphic-profile-rename.h +++ b/src/ui/dialog/calligraphic-profile-rename.h @@ -11,10 +11,22 @@ #ifndef INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H #define INKSCAPE_DIALOG_CALLIGRAPHIC_PROFILE_H +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include <gtkmm/dialog.h> #include <gtkmm/entry.h> #include <gtkmm/label.h> -#include <gtkmm/table.h> + +namespace Gtk { +#if WITH_GTKMM_3_0 +class Grid; +#else +class Table; +#endif +} + class SPDesktop; namespace Inkscape { @@ -47,7 +59,13 @@ protected: Gtk::Label _profile_name_label; Gtk::Entry _profile_name_entry; - Gtk::Table _layout_table; + +#if WITH_GTKMM_3_0 + Gtk::Grid* _layout_table; +#else + Gtk::Table* _layout_table; +#endif + Gtk::Button _close_button; Gtk::Button _delete_button; Gtk::Button _apply_button; |
