diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2017-12-25 17:16:41 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2017-12-25 17:16:41 +0000 |
| commit | 8e2119c2042debcf51998631e64809e627b148c2 (patch) | |
| tree | c69d09bf78d648b3984cea7aa462dd751235ebfd /src | |
| parent | Name a few more widgets. Minor cleanup. (diff) | |
| download | inkscape-8e2119c2042debcf51998631e64809e627b148c2.tar.gz inkscape-8e2119c2042debcf51998631e64809e627b148c2.zip | |
Use a macro for GtkMM version checks
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/lpe-perspective_path.cpp | 4 | ||||
| -rw-r--r-- | src/sp-namedview.cpp | 6 | ||||
| -rw-r--r-- | src/ui/dialog/aboutbox.cpp | 8 | ||||
| -rw-r--r-- | src/ui/dialog/dialog.cpp | 4 | ||||
| -rw-r--r-- | src/ui/dialog/document-properties.cpp | 6 | ||||
| -rw-r--r-- | src/ui/dialog/layers.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/new-from-template.cpp | 2 | ||||
| -rw-r--r-- | src/ui/dialog/objects.cpp | 2 | ||||
| -rw-r--r-- | src/ui/interface.cpp | 4 | ||||
| -rw-r--r-- | src/ui/widget/preferences-widget.cpp | 4 | ||||
| -rw-r--r-- | src/widgets/sp-attribute-widget.cpp | 4 |
11 files changed, 23 insertions, 23 deletions
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp index 435c91c2d..4ec760e41 100644 --- a/src/live_effects/lpe-perspective_path.cpp +++ b/src/live_effects/lpe-perspective_path.cpp @@ -227,7 +227,7 @@ LPEPerspectivePath::newWidget() } Gtk::HBox * perspectiveId = Gtk::manage(new Gtk::HBox(true,0)); -#if WITH_GTKMM_3_10 +#if GTKMM_CHECK_VERSION(3,10,0) Gtk::Label* labelPerspective = Gtk::manage(new Gtk::Label("Perspective ID:", Gtk::ALIGN_START, Gtk::ALIGN_START)); #else Gtk::Label* labelPerspective = Gtk::manage(new Gtk::Label("Perspective ID:", 0., 0.)); @@ -241,7 +241,7 @@ LPEPerspectivePath::newWidget() vbox->pack_start(*perspectiveId, true, true, 2); Gtk::Button* apply3D = Gtk::manage(new Gtk::Button()); -#if WITH_GTKMM_3_10 +#if GTKMM_CHECK_VERSION(3,10,0) Gtk::Label *apply3DLabel = Gtk::manage(new Gtk::Label(_("Refresh perspective"), Gtk::ALIGN_START, Gtk::ALIGN_CENTER)); #else Gtk::Label *apply3DLabel = Gtk::manage(new Gtk::Label(_("Refresh perspective"), 0.0, 0.5)); diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index ef22eca2d..99cc6fbfc 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -37,7 +37,7 @@ #include "sp-root.h" #include <gtkmm/window.h> -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) # include <gdkmm/monitor.h> #else # include <gdkmm/screen.h> @@ -745,7 +745,7 @@ gdouble const NEWDOC_Y_SCALE = NEWDOC_X_SCALE; Geom::Point calcAnchorPoint(gint const x, gint const y, gint const w, gint const h, gint const minOnscreen) { -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) Gdk::Rectangle screen_geometry; auto const display = Gdk::Display::get_default(); @@ -798,7 +798,7 @@ void sp_namedview_window_from_document(SPDesktop *desktop) // TODO: account for multi-monitor setups (i.e. on which monitor do we want to display Inkscape?) Gdk::Rectangle monitor_geometry; -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) auto const display = Gdk::Display::get_default(); auto const monitor = display->get_primary_monitor(); diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 9b99dde6b..e662362c4 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -108,14 +108,14 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) { Inkscape::version_string); label->set_markup(label_text); -#if WITH_GTKMM_3_10 +#if GTKMM_CHECK_VERSION(3,10,0) label->set_halign(Gtk::ALIGN_END); label->set_valign(Gtk::ALIGN_CENTER); #else label->set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); #endif -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) label->set_margin_start(5); label->set_margin_end(5); #else @@ -132,13 +132,13 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) { link->set_markup(website_link); -#if WITH_GTKMM_3_10 +#if GTKMM_CHECK_VERSION(3,10,0) link->set_halign(Gtk::ALIGN_END); #else link->set_alignment(Gtk::ALIGN_END); #endif -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) label->set_margin_start(5); label->set_margin_end(5); label->set_margin_top(5); diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index fbbb4f869..3d949a8c9 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -20,7 +20,7 @@ #include "dialog-manager.h" #include <gtkmm/dialog.h> -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) # include <gdkmm/monitor.h> #endif @@ -166,7 +166,7 @@ void Dialog::read_geometry() resize(w, h); } -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) auto const display = Gdk::Display::get_default(); auto monitor = display->get_primary_monitor(); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index baf70ea82..3d246f4cb 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -228,7 +228,7 @@ inline void attach_all(Gtk::Grid &table, Gtk::Widget *const arr[], unsigned cons // this sets the padding for subordinate widgets on the "Page" page if( indent && (i==(n-6) || i==(n-4) || i==(n-2)) ) { arr[i+1]->set_hexpand(); -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) arr[i+1]->set_margin_start(20); arr[i+1]->set_margin_end(20); #else @@ -703,7 +703,7 @@ void DocumentProperties::build_cms() _link_btn.set_halign(Gtk::ALIGN_CENTER); _link_btn.set_valign(Gtk::ALIGN_CENTER); -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) _link_btn.set_margin_start(2); _link_btn.set_margin_end(2); #else @@ -809,7 +809,7 @@ void DocumentProperties::build_scripting() _external_add_btn.set_halign(Gtk::ALIGN_CENTER); _external_add_btn.set_valign(Gtk::ALIGN_CENTER); -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) _external_add_btn.set_margin_start(2); _external_add_btn.set_margin_end(2); #else diff --git a/src/ui/dialog/layers.cpp b/src/ui/dialog/layers.cpp index 5bbf4c952..ed2babf80 100644 --- a/src/ui/dialog/layers.cpp +++ b/src/ui/dialog/layers.cpp @@ -151,7 +151,7 @@ Gtk::MenuItem& LayersPanel::_addPopupItem( SPDesktop *desktop, unsigned int code } Gtk::Label *menu_label = Gtk::manage(new Gtk::Label(label, true)); -#if WITH_GTKMM_3_16 +#if GTKMM_CHECK_VERSION(3,16,0) menu_label->set_xalign(0.0); #else menu_label->set_alignment(0.0, 0.5); diff --git a/src/ui/dialog/new-from-template.cpp b/src/ui/dialog/new-from-template.cpp index ab46a55da..7e0c5b526 100644 --- a/src/ui/dialog/new-from-template.cpp +++ b/src/ui/dialog/new-from-template.cpp @@ -32,7 +32,7 @@ NewFromTemplate::NewFromTemplate() _create_template_button.set_halign(Gtk::ALIGN_END); _create_template_button.set_valign(Gtk::ALIGN_END); -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) _create_template_button.set_margin_end(15); #else _create_template_button.set_margin_right(15); diff --git a/src/ui/dialog/objects.cpp b/src/ui/dialog/objects.cpp index 07fdb2bd7..2be1f115f 100644 --- a/src/ui/dialog/objects.cpp +++ b/src/ui/dialog/objects.cpp @@ -282,7 +282,7 @@ Gtk::MenuItem& ObjectsPanel::_addPopupItem( SPDesktop *desktop, unsigned int cod } Gtk::Label *menu_label = Gtk::manage(new Gtk::Label(label, true)); -#if WITH_GTKMM_3_16 +#if GTKMM_CHECK_VERSION(3,16,0) menu_label->set_xalign(0.0); #else menu_label->set_alignment(0.0, 0.5); diff --git a/src/ui/interface.cpp b/src/ui/interface.cpp index 4f1e5cd6f..826737c2c 100644 --- a/src/ui/interface.cpp +++ b/src/ui/interface.cpp @@ -30,7 +30,7 @@ #include "file.h" #include <glibmm/miscutils.h> -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) # include <gdkmm/monitor.h> #endif @@ -175,7 +175,7 @@ sp_create_window(SPViewWidget *vw, bool editable) gint full = prefs->getBool("/desktop/geometry/fullscreen"); gint maxed = prefs->getBool("/desktop/geometry/maximized"); if (pw>0 && ph>0) { -#if WITH_GTKMM_3_22 +#if GTKMM_CHECK_VERSION(3,22,0) auto const display = Gdk::Display::get_default(); auto const monitor = display->get_primary_monitor(); diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index 8b8e663a5..345864a44 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -96,7 +96,7 @@ void DialogPage::add_line(bool indent, label_widget->set_mnemonic_widget(widget); if (indent) { -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) label_widget->set_margin_start(12); #else label_widget->set_margin_left(12); @@ -112,7 +112,7 @@ void DialogPage::add_line(bool indent, if (label == "") { if (indent) { -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) hb->set_margin_start(12); #else hb->set_margin_left(12); diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp index 89ce191ee..6116d3be5 100644 --- a/src/widgets/sp-attribute-widget.cpp +++ b/src/widgets/sp-attribute-widget.cpp @@ -160,7 +160,7 @@ void SPAttributeTable::set_object(SPObject *object, ll->set_halign(Gtk::ALIGN_END); ll->set_valign(Gtk::ALIGN_CENTER); ll->set_vexpand(); -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) ll->set_margin_start(XPAD); ll->set_margin_end(XPAD); #else @@ -177,7 +177,7 @@ void SPAttributeTable::set_object(SPObject *object, ee->set_text (val ? val : (const gchar *) ""); ee->set_hexpand(); ee->set_vexpand(); -#if WITH_GTKMM_3_12 +#if GTKMM_CHECK_VERSION(3,12,0) ee->set_margin_start(XPAD); ee->set_margin_end(XPAD); #else |
