diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2013-03-13 11:21:19 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2013-03-13 11:21:19 +0000 |
| commit | 14f0801859efb75f61459ab19eb6652afde160a8 (patch) | |
| tree | 64609cfebc35a615e43a3587e41e9ffd43bc78f0 /src/ui/widget | |
| parent | c++ify (diff) | |
| download | inkscape-14f0801859efb75f61459ab19eb6652afde160a8.tar.gz inkscape-14f0801859efb75f61459ab19eb6652afde160a8.zip | |
Migrate remaining dialogs to Gtk::Grid
(bzr r12199)
Diffstat (limited to 'src/ui/widget')
| -rw-r--r-- | src/ui/widget/notebook-page.cpp | 27 | ||||
| -rw-r--r-- | src/ui/widget/notebook-page.h | 26 |
2 files changed, 43 insertions, 10 deletions
diff --git a/src/ui/widget/notebook-page.cpp b/src/ui/widget/notebook-page.cpp index 92bcb6937..6653499b8 100644 --- a/src/ui/widget/notebook-page.cpp +++ b/src/ui/widget/notebook-page.cpp @@ -9,22 +9,35 @@ * Released under GNU GPL. Read the file 'COPYING' for more information */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - #include "notebook-page.h" +#if WITH_GTKMM_3_0 +# include <gtkmm/grid.h> +#else +# include <gtkmm/table.h> +#endif + namespace Inkscape { namespace UI { namespace Widget { NotebookPage::NotebookPage(int n_rows, int n_columns, bool expand, bool fill, guint padding) - :_table(n_rows, n_columns) +#if WITH_GTKMM_3_0 + :_table(Gtk::manage(new Gtk::Grid())) +#else + :_table(Gtk::manage(new Gtk::Table(n_rows, n_columns))) +#endif { set_border_width(2); - _table.set_spacings(2); - pack_start(_table, expand, fill, padding); + +#if WITH_GTKMM_3_0 + _table->set_row_spacing(2); + _table->set_column_spacing(2); +#else + _table->set_spacings(2); +#endif + + pack_start(*_table, expand, fill, padding); } } // namespace Widget diff --git a/src/ui/widget/notebook-page.h b/src/ui/widget/notebook-page.h index 140b7cb33..d8b8fb0c4 100644 --- a/src/ui/widget/notebook-page.h +++ b/src/ui/widget/notebook-page.h @@ -10,8 +10,19 @@ #ifndef INKSCAPE_UI_WIDGET_NOTEBOOK_PAGE_H #define INKSCAPE_UI_WIDGET_NOTEBOOK_PAGE_H +#ifdef HAVE_CONFIG_H +# include <config.h> +#endif + #include <gtkmm/box.h> -#include <gtkmm/table.h> + +namespace Gtk { +#if WITH_GTKMM_3_0 +class Grid; +#else +class Table; +#endif +} namespace Inkscape { namespace UI { @@ -31,10 +42,19 @@ public: */ NotebookPage(int n_rows, int n_columns, bool expand=false, bool fill=false, guint padding=0); - Gtk::Table& table() { return _table; } +#if WITH_GTKMM_3_0 + Gtk::Grid& table() { return *_table; } +#else + Gtk::Table& table() { return *_table; } +#endif protected: - Gtk::Table _table; + +#if WITH_GTKMM_3_0 + Gtk::Grid *_table; +#else + Gtk::Table *_table; +#endif }; } // namespace Widget |
