summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2017-12-25 17:16:41 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2017-12-25 17:16:41 +0000
commit8e2119c2042debcf51998631e64809e627b148c2 (patch)
treec69d09bf78d648b3984cea7aa462dd751235ebfd /src/ui/dialog
parentName a few more widgets. Minor cleanup. (diff)
downloadinkscape-8e2119c2042debcf51998631e64809e627b148c2.tar.gz
inkscape-8e2119c2042debcf51998631e64809e627b148c2.zip
Use a macro for GtkMM version checks
Diffstat (limited to 'src/ui/dialog')
-rw-r--r--src/ui/dialog/aboutbox.cpp8
-rw-r--r--src/ui/dialog/dialog.cpp4
-rw-r--r--src/ui/dialog/document-properties.cpp6
-rw-r--r--src/ui/dialog/layers.cpp2
-rw-r--r--src/ui/dialog/new-from-template.cpp2
-rw-r--r--src/ui/dialog/objects.cpp2
6 files changed, 12 insertions, 12 deletions
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);