summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-02-09 11:32:53 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-02-09 11:32:53 +0000
commit543c421aede7cf64d9b5096d47c2d257c96e6863 (patch)
tree4d33b448c19a94776e3777ed55cbcfbc86eb4027
parentTranslations. Translation template update. (diff)
downloadinkscape-543c421aede7cf64d9b5096d47c2d257c96e6863.tar.gz
inkscape-543c421aede7cf64d9b5096d47c2d257c96e6863.zip
Backward compat fix for Gtkmm 2.20
Fixed bugs: - https://launchpad.net/bugs/928520 (bzr r10956)
-rw-r--r--configure.ac5
-rw-r--r--src/dialogs/export.cpp14
-rw-r--r--src/extension/param/bool.cpp4
-rw-r--r--src/extension/param/description.cpp8
-rw-r--r--src/extension/param/enum.cpp4
-rw-r--r--src/extension/param/float.cpp4
-rw-r--r--src/extension/param/int.cpp4
-rw-r--r--src/extension/param/radiobutton.cpp4
-rw-r--r--src/extension/param/string.cpp4
9 files changed, 50 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 51759fa49..4dda3f34c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -727,6 +727,11 @@ if test "x$with_gtkmm_2_24" = "xyes"; then
AC_DEFINE(WITH_GTKMM_2_24,1,[Build with Gtkmm 2.24.x])
fi
+PKG_CHECK_MODULES(GTKMM_2_22, gtkmm-2.4 >= 2.22, with_gtkmm_2_22=yes, with_gtkmm_2_22=no)
+if test "x$with_gtkmm_2_22" = "xyes"; then
+ AC_DEFINE(WITH_GTKMM_2_22,1,[Build with Gtkmm 2.22.x])
+fi
+
# Check for GTK+ backend target
AC_MSG_CHECKING([for GTK+ backend target])
gtk_backend_target=`pkg-config --variable=target gtk+-2.0`
diff --git a/src/dialogs/export.cpp b/src/dialogs/export.cpp
index 499c720a9..759745cbf 100644
--- a/src/dialogs/export.cpp
+++ b/src/dialogs/export.cpp
@@ -272,7 +272,11 @@ sp_export_dialog_area_box (GtkWidget * dlg)
{
Gtk::VBox* vb = new Gtk::VBox(false, 3);
+#if WITH_GTKMM_2_22
Gtk::Label* lbl = new Gtk::Label(_("<big><b>Export area</b></big>"), Gtk::ALIGN_START);
+#else
+ Gtk::Label* lbl = new Gtk::Label(_("<big><b>Export area</b></big>"), Gtk::ALIGN_LEFT);
+#endif
lbl->set_use_markup(true);
vb->pack_start(*lbl);
@@ -470,7 +474,11 @@ sp_export_dialog (void)
Gtk::VBox *size_box = new Gtk::VBox(false, 3);
size_box->set_border_width(3);
+#if WITH_GTKMM_2_22
Gtk::Label* lbl = new Gtk::Label(_("<big><b>Bitmap size</b></big>"), Gtk::ALIGN_START);
+#else
+ Gtk::Label* lbl = new Gtk::Label(_("<big><b>Bitmap size</b></big>"), Gtk::ALIGN_LEFT);
+#endif
lbl->set_use_markup(true);
size_box->pack_start(*lbl, false, false, 0);
const int rows = 2;
@@ -519,7 +527,11 @@ sp_export_dialog (void)
file_box->set_border_width(3);
// true = has mnemonic
- Gtk::Label *flabel = new Gtk::Label(_("<big><b>_Filename</b></big>"), Gtk::ALIGN_START, Gtk::ALIGN_CENTER, true);
+#if WITH_GTKMM_2_22
+ Gtk::Label *flabel = new Gtk::Label(_("<big><b>_Filename</b></big>"), Gtk::ALIGN_START, Gtk::ALIGN_CENTER, true);
+#else
+ Gtk::Label *flabel = new Gtk::Label(_("<big><b>_Filename</b></big>"), Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, true);
+#endif
flabel->set_use_markup(true);
file_box->pack_start(*flabel, false, false, 0);
diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp
index dade2c275..bc75e62fc 100644
--- a/src/extension/param/bool.cpp
+++ b/src/extension/param/bool.cpp
@@ -130,7 +130,11 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node,
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+#if WITH_GTKMM_2_22
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+#else
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
+#endif
label->show();
hbox->pack_end(*label, true, true);
diff --git a/src/extension/param/description.cpp b/src/extension/param/description.cpp
index f6bbb5447..bf6ae708a 100644
--- a/src/extension/param/description.cpp
+++ b/src/extension/param/description.cpp
@@ -81,12 +81,20 @@ ParamDescription::get_widget (SPDocument * /*doc*/, Inkscape::XML::Node * /*node
Gtk::Label * label;
int padding = 12 + _indent;
if (_mode == HEADER) {
+#if WITH_GTKMM_2_22
label = Gtk::manage(new Gtk::Label(Glib::ustring("<b>") +newguitext + Glib::ustring("</b>"), Gtk::ALIGN_START));
+#else
+ label = Gtk::manage(new Gtk::Label(Glib::ustring("<b>") +newguitext + Glib::ustring("</b>"), Gtk::ALIGN_LEFT));
+#endif
label->set_padding(0,5);
label->set_use_markup(true);
padding = _indent;
} else {
+#if WITH_GTKMM_2_22
label = Gtk::manage(new Gtk::Label(newguitext, Gtk::ALIGN_START));
+#else
+ label = Gtk::manage(new Gtk::Label(newguitext, Gtk::ALIGN_LEFT));
+#endif
}
label->set_line_wrap();
label->show();
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index e24b244ec..ff77c1603 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -232,7 +232,11 @@ Gtk::Widget *ParamComboBox::get_widget(SPDocument * doc, Inkscape::XML::Node * n
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+#if WITH_GTKMM_2_22
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+#else
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
+#endif
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/float.cpp b/src/extension/param/float.cpp
index b9a723eea..7188025da 100644
--- a/src/extension/param/float.cpp
+++ b/src/extension/param/float.cpp
@@ -175,7 +175,11 @@ Gtk::Widget * ParamFloat::get_widget(SPDocument * doc, Inkscape::XML::Node * nod
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+#if WITH_GTKMM_2_22
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+#else
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
+#endif
label->show();
hbox->pack_start(*label, true, true, _indent);
diff --git a/src/extension/param/int.cpp b/src/extension/param/int.cpp
index 1ef31f348..461943a4c 100644
--- a/src/extension/param/int.cpp
+++ b/src/extension/param/int.cpp
@@ -156,7 +156,11 @@ ParamInt::get_widget (SPDocument * doc, Inkscape::XML::Node * node, sigc::signal
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+#if WITH_GTKMM_2_22
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+#else
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
+#endif
label->show();
hbox->pack_start(*label, true, true, _indent);
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp
index 90b380643..1b52bebe5 100644
--- a/src/extension/param/radiobutton.cpp
+++ b/src/extension/param/radiobutton.cpp
@@ -275,7 +275,11 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0));
+#if WITH_GTKMM_2_22
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START, Gtk::ALIGN_START));
+#else
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT, Gtk::ALIGN_TOP));
+#endif
label->show();
hbox->pack_start(*label, false, false, _indent);
diff --git a/src/extension/param/string.cpp b/src/extension/param/string.cpp
index 23f53cdbe..3f8d176a5 100644
--- a/src/extension/param/string.cpp
+++ b/src/extension/param/string.cpp
@@ -155,7 +155,11 @@ Gtk::Widget * ParamString::get_widget(SPDocument * doc, Inkscape::XML::Node * no
Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4));
+#if WITH_GTKMM_2_22
Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_START));
+#else
+ Gtk::Label * label = Gtk::manage(new Gtk::Label(_(_text), Gtk::ALIGN_LEFT));
+#endif
label->show();
hbox->pack_start(*label, false, false, _indent);