summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-02-07 11:11:57 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-02-07 11:11:57 +0000
commitf97d10f1b5fd32fe58e77d496d60fb82fa1adbf1 (patch)
tree7b0936d5e888b3b196105a86a8d2611dcac04a59 /src
parent(cppcheck and janitorial tasks:) C-style casting to C++-style casting (diff)
downloadinkscape-f97d10f1b5fd32fe58e77d496d60fb82fa1adbf1.tar.gz
inkscape-f97d10f1b5fd32fe58e77d496d60fb82fa1adbf1.zip
Cleaning up my mess... backward compatibility and fix Windows build (hopefully)
Fixed bugs: - https://launchpad.net/bugs/927992 (bzr r10947)
Diffstat (limited to 'src')
-rw-r--r--src/extension/internal/pdf-input-cairo.cpp8
-rw-r--r--src/extension/internal/pdfinput/pdf-input.cpp8
-rw-r--r--src/extension/param/enum.cpp5
-rw-r--r--src/extension/param/radiobutton.cpp4
-rw-r--r--src/ui/dialog/document-properties.cpp8
-rw-r--r--src/ui/dialog/filedialogimpl-win32.cpp1
6 files changed, 34 insertions, 0 deletions
diff --git a/src/extension/internal/pdf-input-cairo.cpp b/src/extension/internal/pdf-input-cairo.cpp
index d2a958cf7..bc76a30b5 100644
--- a/src/extension/internal/pdf-input-cairo.cpp
+++ b/src/extension/internal/pdf-input-cairo.cpp
@@ -87,7 +87,11 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc)
_cropTypeCombo = Gtk::manage(new class Gtk::ComboBoxText());
int num_crop_choices = sizeof(crop_setting_choices) / sizeof(crop_setting_choices[0]);
for ( int i = 0 ; i < num_crop_choices ; i++ ) {
+#if WITH_GTKMM_2_24
_cropTypeCombo->append(_(crop_setting_choices[i]));
+#else
+ _cropTypeCombo->append_text(_(crop_setting_choices[i]));
+#endif
}
_cropTypeCombo->set_active_text(_(crop_setting_choices[0]));
_cropTypeCombo->set_sensitive(false);
@@ -109,7 +113,11 @@ PdfImportCairoDialog::PdfImportCairoDialog(PopplerDocument *doc)
// Text options
_labelText = Gtk::manage(new class Gtk::Label(_("Text handling:")));
_textHandlingCombo = Gtk::manage(new class Gtk::ComboBoxText());
+#if WITH_GTKMM_2_24
_textHandlingCombo->append(_("Import text as text"));
+#else
+ _textHandlingCombo->append_text(_("Import text as text"));
+#endif
_textHandlingCombo->set_active_text(_("Import text as text"));
_localFontsCheck = Gtk::manage(new class Gtk::CheckButton(_("Replace PDF fonts by closest-named installed fonts")));
diff --git a/src/extension/internal/pdfinput/pdf-input.cpp b/src/extension/internal/pdfinput/pdf-input.cpp
index a2ad96c56..ab609186a 100644
--- a/src/extension/internal/pdfinput/pdf-input.cpp
+++ b/src/extension/internal/pdfinput/pdf-input.cpp
@@ -95,7 +95,11 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
_cropTypeCombo = Gtk::manage(new class Gtk::ComboBoxText());
int num_crop_choices = sizeof(crop_setting_choices) / sizeof(crop_setting_choices[0]);
for ( int i = 0 ; i < num_crop_choices ; i++ ) {
+#if WITH_GTKMM_2_24
_cropTypeCombo->append(_(crop_setting_choices[i]));
+#else
+ _cropTypeCombo->append_text(_(crop_setting_choices[i]));
+#endif
}
_cropTypeCombo->set_active_text(_(crop_setting_choices[0]));
_cropTypeCombo->set_sensitive(false);
@@ -117,7 +121,11 @@ PdfImportDialog::PdfImportDialog(PDFDoc *doc, const gchar */*uri*/)
// Text options
_labelText = Gtk::manage(new class Gtk::Label(_("Text handling:")));
_textHandlingCombo = Gtk::manage(new class Gtk::ComboBoxText());
+#if WITH_GTKMM_2_24
_textHandlingCombo->append(_("Import text as text"));
+#else
+ _textHandlingCombo->append_text(_("Import text as text"));
+#endif
_textHandlingCombo->set_active_text(_("Import text as text"));
_localFontsCheck = Gtk::manage(new class Gtk::CheckButton(_("Replace PDF fonts by closest-named installed fonts")));
diff --git a/src/extension/param/enum.cpp b/src/extension/param/enum.cpp
index 3e4462b8a..d58586992 100644
--- a/src/extension/param/enum.cpp
+++ b/src/extension/param/enum.cpp
@@ -242,7 +242,12 @@ Gtk::Widget *ParamComboBox::get_widget(SPDocument * doc, Inkscape::XML::Node * n
for (GSList * list = choices; list != NULL; list = g_slist_next(list)) {
enumentry * entr = reinterpret_cast<enumentry *>(list->data);
Glib::ustring text = entr->guitext;
+#if WITH_GTKMM_2_24
combo->append(text);
+#else
+ combo->append(text);
+#endif
+
if ( _value && !entr->value.compare(_value) ) {
settext = entr->guitext;
}
diff --git a/src/extension/param/radiobutton.cpp b/src/extension/param/radiobutton.cpp
index 7df89de90..d6cac6541 100644
--- a/src/extension/param/radiobutton.cpp
+++ b/src/extension/param/radiobutton.cpp
@@ -296,7 +296,11 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node
switch ( _mode ) {
case MINIMAL:
{
+#if WITH_GTKMM_2_24
cbt->append(*text);
+#else
+ cbt->append_text(*text);
+#endif
if (!entr->value->compare(_value)) {
cbt->set_active_text(*text);
comboSet = true;
diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp
index 605b9c637..7cd00c319 100644
--- a/src/ui/dialog/document-properties.cpp
+++ b/src/ui/dialog/document-properties.cpp
@@ -307,13 +307,21 @@ void DocumentProperties::build_snap()
#if ENABLE_LCMS
/// Populates the available color profiles combo box
void DocumentProperties::populate_available_profiles(){
+#if WITH_GTKMM_2_24
_combo_avail.remove_all(); // Clear any existing items in the combo box
+#else
+ _combo_avail.clear_items(); // Clear any existing items in the combo box
+#endif
// Iterate through the list of profiles and add the name to the combo box.
std::vector<std::pair<Glib::ustring, Glib::ustring> > pairs = ColorProfile::getProfileFilesWithNames();
for ( std::vector<std::pair<Glib::ustring, Glib::ustring> >::const_iterator it = pairs.begin(); it != pairs.end(); ++it ) {
Glib::ustring name = it->second;
+#if WITH_GTKMM_2_24
_combo_avail.append(name);
+#else
+ _combo_avail.append_text(name);
+#endif
}
}
diff --git a/src/ui/dialog/filedialogimpl-win32.cpp b/src/ui/dialog/filedialogimpl-win32.cpp
index 56929912d..01a5c0e75 100644
--- a/src/ui/dialog/filedialogimpl-win32.cpp
+++ b/src/ui/dialog/filedialogimpl-win32.cpp
@@ -47,6 +47,7 @@
#include <zlib.h>
#include <cairomm/win32_surface.h>
#include <cairomm/context.h>
+#include <gdkmm/general.h>
using namespace std;
using namespace Glib;