diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2012-07-05 21:39:08 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2012-07-05 21:39:08 +0000 |
| commit | 9abd33133650d77714fccf09d0c9ff27c9b75a78 (patch) | |
| tree | e450b556c03d2335a40b85c5945f7ab5b0c8b5e2 | |
| parent | Patch for bug #728081 (Keyboard shortcut - Lock current layer). (diff) | |
| download | inkscape-9abd33133650d77714fccf09d0c9ff27c9b75a78.tar.gz inkscape-9abd33133650d77714fccf09d0c9ff27c9b75a78.zip | |
Drop GTK+ 2.20 support.
Fixed bugs:
- https://launchpad.net/bugs/1020494
(bzr r11529)
70 files changed, 7 insertions, 608 deletions
diff --git a/configure.ac b/configure.ac index 6172929d4..238f3d7e6 100644 --- a/configure.ac +++ b/configure.ac @@ -766,7 +766,7 @@ else AC_DEFINE(WITH_GTKSPELL, 1, [enable gtk spelling widget]) fi - PKG_CHECK_MODULES(INKSCAPE, glib-2.0 >= 2.24 gtk+-2.0 >= 2.20 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo >= 1.10 cairomm-1.0 >= 1.9.8 sigc++-2.0 >= $min_sigc_version $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl glibmm-2.4 giomm-2.4 gdkmm-2.4 gtkmm-2.4 >= 2.10.0) + PKG_CHECK_MODULES(INKSCAPE, glib-2.0 >= 2.24 gtk+-2.0 >= 2.22 libxml-2.0 >= 2.6.11 libxslt >= 1.0.15 cairo >= 1.10 cairomm-1.0 >= 1.9.8 sigc++-2.0 >= $min_sigc_version $ink_spell_pkg gthread-2.0 >= 2.0 libpng >= 1.2 gsl glibmm-2.4 giomm-2.4 gdkmm-2.4 gtkmm-2.4 >= 2.22) # Disable deprecated symbols to make GTK+ 3 migration easier. # This should also be applied to GTK+ 3 builds too, @@ -794,11 +794,6 @@ dnl need to perform these checks dnl ourselves. dnl *********************************** -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 or higher]) -fi - PKG_CHECK_MODULES(GTKMM_2_24, gtkmm-2.4 >= 2.24, with_gtkmm_2_24=yes, with_gtkmm_2_24=no) if test "x$with_gtkmm_2_24" = "xyes"; then AC_DEFINE(WITH_GTKMM_2_24,1,[Build with Gtkmm 2.24.x or higher]) diff --git a/src/Makefile_insert b/src/Makefile_insert index 1ee721abe..36e05270a 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -22,7 +22,6 @@ ink_common_sources += \ color-profile-cms-fns.h \ color-rgba.h \ common-context.cpp common-context.h \ - compat-key-syms.h \ composite-undo-stack-observer.cpp \ composite-undo-stack-observer.h \ conditions.cpp conditions.h \ diff --git a/src/arc-context.cpp b/src/arc-context.cpp index dfd2ca9d9..c9bad6b4a 100644 --- a/src/arc-context.cpp +++ b/src/arc-context.cpp @@ -47,11 +47,6 @@ #include "arc-context.h" #include "display/sp-canvas-item.h" -// Define new form of key macros if we're using an old GTK+ version -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_arc_context_class_init(SPArcContextClass *klass); diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index 72bcc5d8f..405cfd11b 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -51,10 +51,6 @@ #include "shape-editor.h" #include "verbs.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_box3d_context_class_init(Box3DContextClass *klass); diff --git a/src/compat-key-syms.h b/src/compat-key-syms.h deleted file mode 100644 index 5a4b470ba..000000000 --- a/src/compat-key-syms.h +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Compatible key defines for earlier GTK+. - * - * - * Authors: - * Jon A. Cruz <jon@joncruz.org> - * - * Copyright (C) 20012 Authors - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ -#ifndef COMPAT_KEY_SYMS_H_SEEN -#define COMPAT_KEY_SYMS_H_SEEN - -#if !GTK_CHECK_VERSION(2,22,0) - -#define GDK_KEY_Up 0xff52 -#define GDK_KEY_KP_Up 0xff97 -#define GDK_KEY_Page_Up 0xff55 -#define GDK_KEY_KP_Page_Up 0xff9a -#define GDK_KEY_Down 0xff54 -#define GDK_KEY_KP_Down 0xff99 -#define GDK_KEY_Page_Down 0xff56 -#define GDK_KEY_KP_Page_Down 0xff9b -#define GDK_KEY_Left 0xff51 -#define GDK_KEY_KP_Left 0xff96 -#define GDK_KEY_Right 0xff53 -#define GDK_KEY_KP_Right 0xff98 -#define GDK_KEY_Home 0xff50 -#define GDK_KEY_KP_Home 0xff95 -#define GDK_KEY_End 0xff57 -#define GDK_KEY_KP_End 0xff9c -#define GDK_KEY_a 0x061 -#define GDK_KEY_A 0x041 -#define GDK_KEY_b 0x062 -#define GDK_KEY_B 0x042 -#define GDK_KEY_c 0x063 -#define GDK_KEY_C 0x043 -#define GDK_KEY_d 0x064 -#define GDK_KEY_D 0x044 -#define GDK_KEY_g 0x067 -#define GDK_KEY_G 0x047 -#define GDK_KEY_h 0x068 -#define GDK_KEY_H 0x048 -#define GDK_KEY_i 0x069 -#define GDK_KEY_I 0x049 -#define GDK_KEY_j 0x06a -#define GDK_KEY_J 0x04a -#define GDK_KEY_k 0x06b -#define GDK_KEY_K 0x04b -#define GDK_KEY_l 0x06c -#define GDK_KEY_L 0x04c -#define GDK_KEY_M 0x04d -#define GDK_KEY_m 0x06d - -#define GDK_KEY_P 0x050 -#define GDK_KEY_p 0x070 -#define GDK_KEY_q 0x071 -#define GDK_KEY_Q 0x051 -#define GDK_KEY_r 0x072 -#define GDK_KEY_R 0x052 -#define GDK_KEY_s 0x073 -#define GDK_KEY_S 0x053 -#define GDK_KEY_u 0x075 -#define GDK_KEY_U 0x055 -#define GDK_KEY_v 0x076 -#define GDK_KEY_V 0x056 -#define GDK_KEY_w 0x077 -#define GDK_KEY_W 0x057 -#define GDK_KEY_x 0x078 -#define GDK_KEY_X 0x058 -#define GDK_KEY_y 0x079 -#define GDK_KEY_Y 0x059 -#define GDK_KEY_z 0x07a -#define GDK_KEY_Z 0x05a -#define GDK_KEY_Escape 0xff1b -#define GDK_KEY_Control_L 0xffe3 -#define GDK_KEY_Control_R 0xffe4 -#define GDK_KEY_Alt_L 0xffe9 -#define GDK_KEY_Alt_R 0xffea -#define GDK_KEY_Shift_L 0xffe1 -#define GDK_KEY_Shift_R 0xffe2 -#define GDK_KEY_Meta_L 0xffe7 -#define GDK_KEY_Meta_R 0xffe8 -#define GDK_KEY_KP_Add 0xffab -#define GDK_KEY_KP_Subtract 0xffad -#define GDK_KEY_KP_0 0xffb0 -#define GDK_KEY_KP_1 0xffb1 -#define GDK_KEY_KP_2 0xffb2 -#define GDK_KEY_KP_3 0xffb3 -#define GDK_KEY_KP_4 0xffb4 -#define GDK_KEY_KP_5 0xffb5 -#define GDK_KEY_KP_6 0xffb6 -#define GDK_KEY_KP_7 0xffb7 -#define GDK_KEY_KP_8 0xffb8 -#define GDK_KEY_KP_9 0xffb9 -#define GDK_KEY_F1 0xffbe -#define GDK_KEY_F2 0xffbf -#define GDK_KEY_F3 0xffc0 -#define GDK_KEY_F4 0xffc1 -#define GDK_KEY_F5 0xffc2 -#define GDK_KEY_F6 0xffc3 -#define GDK_KEY_F7 0xffc4 -#define GDK_KEY_F8 0xffc5 -#define GDK_KEY_F9 0xffc6 -#define GDK_KEY_F10 0xffc7 -#define GDK_KEY_F11 0xffc8 -#define GDK_KEY_Insert 0xff63 -#define GDK_KEY_KP_Insert 0xff9e -#define GDK_KEY_Delete 0xffff -#define GDK_KEY_KP_Delete 0xff9f -#define GDK_KEY_BackSpace 0xff08 -#define GDK_KEY_Return 0xff0d -#define GDK_KEY_KP_Enter 0xff8d -#define GDK_KEY_space 0x020 -#define GDK_KEY_KP_Space 0xff80 -#define GDK_KEY_Tab 0xff09 -#define GDK_KEY_ISO_Left_Tab 0xfe20 -#define GDK_KEY_bracketleft 0x05b -#define GDK_KEY_bracketright 0x05d -#define GDK_KEY_parenright 0x029 -#define GDK_KEY_parenleft 0x028 -#define GDK_KEY_braceleft 0x07b -#define GDK_KEY_braceright 0x07d -#define GDK_KEY_less 0x03c -#define GDK_KEY_greater 0x03e -#define GDK_KEY_comma 0x02c -#define GDK_KEY_period 0x02e -#define GDK_KEY_0 0x030 -#define GDK_KEY_1 0x031 -#define GDK_KEY_2 0x032 -#define GDK_KEY_3 0x033 -#define GDK_KEY_4 0x034 -#define GDK_KEY_5 0x035 -#define GDK_KEY_6 0x036 -#define GDK_KEY_7 0x037 -#define GDK_KEY_8 0x038 -#define GDK_KEY_9 0x039 - -#define GDK_KEY_VoidSymbol 0xffffff - -#endif // !GTK_CHECK_VERSION(2,22,0) - -#endif // COMPAT_KEY_SYMS_H_SEEN diff --git a/src/connector-context.cpp b/src/connector-context.cpp index daea4a0ac..5f87ab712 100644 --- a/src/connector-context.cpp +++ b/src/connector-context.cpp @@ -194,10 +194,6 @@ using Inkscape::DocumentUndo; -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_connector_context_class_init(SPConnectorContextClass *klass); static void sp_connector_context_init(SPConnectorContext *conn_context); static void sp_connector_context_dispose(GObject *object); diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index 668dfd395..6b47bdad6 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -47,10 +47,6 @@ #include "widgets/desktop-widget.h" #include "xml/repr.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void snoop_extended(GdkEvent* event, SPDesktop *desktop); @@ -601,13 +597,9 @@ static void init_extended() if ( devices ) { for ( GList* curr = devices; curr; curr = g_list_next(curr) ) { GdkDevice* dev = reinterpret_cast<GdkDevice*>(curr->data); -#if GTK_CHECK_VERSION(2, 22, 0) gchar const *devName = gdk_device_get_name(dev); GdkInputSource devSrc = gdk_device_get_source(dev); -#else - gchar const *devName = dev->name; - GdkInputSource devSrc = dev->source; -#endif + if ( devName && (avoidName != devName) && (devSrc != GDK_SOURCE_MOUSE) ) { @@ -649,13 +641,8 @@ void snoop_extended(GdkEvent* event, SPDesktop *desktop) { GdkEventMotion* event2 = reinterpret_cast<GdkEventMotion*>(event); if ( event2->device ) { -#if GTK_CHECK_VERSION(2, 22, 0) source = gdk_device_get_source(event2->device); name = gdk_device_get_name(event2->device); -#else - source = event2->device->source; - name = event2->device->name; -#endif } } break; @@ -667,13 +654,8 @@ void snoop_extended(GdkEvent* event, SPDesktop *desktop) { GdkEventButton* event2 = reinterpret_cast<GdkEventButton*>(event); if ( event2->device ) { -#if GTK_CHECK_VERSION(2, 22, 0) source = gdk_device_get_source(event2->device); name = gdk_device_get_name(event2->device); -#else - source = event2->device->source; - name = event2->device->name; -#endif } } break; @@ -682,13 +664,8 @@ void snoop_extended(GdkEvent* event, SPDesktop *desktop) { GdkEventScroll* event2 = reinterpret_cast<GdkEventScroll*>(event); if ( event2->device ) { -#if GTK_CHECK_VERSION(2, 22, 0) source = gdk_device_get_source(event2->device); name = gdk_device_get_name(event2->device); -#else - source = event2->device->source; - name = event2->device->name; -#endif } } break; @@ -698,13 +675,8 @@ void snoop_extended(GdkEvent* event, SPDesktop *desktop) { GdkEventProximity* event2 = reinterpret_cast<GdkEventProximity*>(event); if ( event2->device ) { -#if GTK_CHECK_VERSION(2, 22, 0) source = gdk_device_get_source(event2->device); name = gdk_device_get_name(event2->device); -#else - source = event2->device->source; - name = event2->device->source; -#endif } } break; diff --git a/src/device-manager.cpp b/src/device-manager.cpp index 458954580..fedcb232b 100644 --- a/src/device-manager.cpp +++ b/src/device-manager.cpp @@ -41,17 +41,10 @@ static bool isValidDevice(GdkDevice *device) bool valid = true; for (size_t i = 0; (i < G_N_ELEMENTS(fakeout)) && valid; i++) { // Ideally, we should probably check all fields of the GdkDevice -#if GTK_CHECK_VERSION (2, 22, 0) gboolean name_matches = (g_strcmp0 (gdk_device_get_name (device), fakeout[i].name) == 0); gboolean source_matches = (gdk_device_get_source (device) == fakeout[i].source); gboolean mode_matches = (gdk_device_get_mode (device) == fakeout[i].mode); gboolean num_axes_matches = (gdk_device_get_n_axes (device) == fakeout[i].num_axes); -#else - gboolean name_matches = (g_strcmp0 (device->name, fakeout[i].name) == 0); - gboolean source_matches = (device->source == fakeout[i].source); - gboolean mode_matches = (device->mode == fakeout[i].mode); - gboolean num_axes_matches = (device->num_axes == fakeout[i].num_axes); -#endif #if GTK_CHECK_VERSION (2, 24, 0) gboolean num_keys_matches = (gdk_device_get_n_keys (device) == fakeout[i].num_keys); @@ -178,16 +171,9 @@ public: virtual Glib::ustring getId() const {return id;} virtual Glib::ustring getName() const {return name;} virtual Gdk::InputSource getSource() const {return source;} - -#if GTK_CHECK_VERSION (2, 22, 0) virtual Gdk::InputMode getMode() const {return static_cast<Gdk::InputMode>(gdk_device_get_mode (device));} virtual gint getNumAxes() const {return gdk_device_get_n_axes (device);} virtual bool hasCursor() const {return gdk_device_get_has_cursor (device);} -#else - virtual Gdk::InputMode getMode() const {return static_cast<Gdk::InputMode>(device->mode);} - virtual gint getNumAxes() const {return device->num_axes;} - virtual bool hasCursor() const {return device->has_cursor;} -#endif virtual gint getNumKeys() const { // Backward-compatibility: The GSEAL-compliant @@ -246,13 +232,8 @@ InputDeviceImpl::InputDeviceImpl(GdkDevice* device, std::set<Glib::ustring> &kno : InputDevice(), device(device), id(), -#if GTK_CHECK_VERSION (2, 22, 0) name(gdk_device_get_name (device) ? gdk_device_get_name (device) : ""), source(static_cast<Gdk::InputSource>(gdk_device_get_source (device))), -#else - name(device->name ? device->name : ""), - source(static_cast<Gdk::InputSource>(device->source)), -#endif link(), liveAxes(0), liveButtons(0) @@ -444,11 +425,7 @@ void DeviceManagerImpl::saveConfig() tmp += ";"; } GdkDevice *device = (*it)->getDevice(); -#if GTK_CHECK_VERSION (2, 22, 0) tmp += getAxisToString()[static_cast<Gdk::AxisUse>(gdk_device_get_axis_use (device, i))]; -#else - tmp += getAxisToString()[static_cast<Gdk::AxisUse>(device->axes[i].use)]; -#endif } prefs->setString( path + "/axes", tmp ); @@ -458,14 +435,10 @@ void DeviceManagerImpl::saveConfig() tmp += ";"; } GdkDevice *device = (*it)->getDevice(); -#if GTK_CHECK_VERSION (2, 22, 0) guint keyval; GdkModifierType modifiers; gdk_device_get_key (device, i, &keyval, &modifiers); tmp += gtk_accelerator_name(keyval, modifiers); -#else - tmp += gtk_accelerator_name(device->keys[i].keyval, device->keys[i].modifiers); -#endif } prefs->setString( path + "/keys", tmp ); } @@ -504,11 +477,7 @@ void DeviceManagerImpl::setAxisUse( Glib::ustring const & id, guint index, Gdk:: if (static_cast<gint>(index) <= (*it)->getNumAxes()) { GdkDevice *device = (*it)->getDevice(); -#if GTK_CHECK_VERSION (2, 22, 0) if (gdk_device_get_axis_use (device, index) != static_cast<GdkAxisUse>(use)) { -#else - if (device->axes[index].use != static_cast<GdkAxisUse>(use)) { -#endif gdk_device_set_axis_use(device, index, static_cast<GdkAxisUse>(use)); signalDeviceChangedPriv.emit(*it); } @@ -757,30 +726,18 @@ static void createFakeList() { GList* devList = gdk_devices_list(); #endif -#if GTK_CHECK_VERSION (2, 22, 0) while ( devList && devList->data && (gdk_device_get_source ((GdkDevice*)devList->data) != GDK_SOURCE_MOUSE)) { -#else - while ( devList && devList->data && (((GdkDevice*)devList->data)->source != GDK_SOURCE_MOUSE)) { -#endif devList = g_list_next(devList); } if ( devList && devList->data ) { //fakeout[4] = *((GdkDevice*)devList->data); // We should probably copy the axes and keys too GdkDevice *device = (GdkDevice*)devList->data; -#if GTK_CHECK_VERSION (2, 22, 0) fakeout[4].name = g_strdup(gdk_device_get_name (device)); fakeout[4].source = gdk_device_get_source (device); fakeout[4].mode = gdk_device_get_mode (device); fakeout[4].has_cursor = gdk_device_get_has_cursor (device); fakeout[4].num_axes = gdk_device_get_n_axes (device); -#else - fakeout[4].name = g_strdup(device->name); - fakeout[4].source = device->source; - fakeout[4].mode = device->mode; - fakeout[4].has_cursor = device->has_cursor; - fakeout[4].num_axes = device->num_axes; -#endif #if GTK_CHECK_VERSION (2, 24, 0) fakeout[4].num_keys = gdk_device_get_n_keys (device); #else diff --git a/src/dialogs/dialog-events.cpp b/src/dialogs/dialog-events.cpp index fe897974c..49fcfd3a4 100644 --- a/src/dialogs/dialog-events.cpp +++ b/src/dialogs/dialog-events.cpp @@ -27,10 +27,6 @@ #include "dialog-events.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - /** * Remove focus from window to whoever it is transient for. diff --git a/src/draw-context.cpp b/src/draw-context.cpp index fb7a60703..2e490d184 100644 --- a/src/draw-context.cpp +++ b/src/draw-context.cpp @@ -47,10 +47,6 @@ #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_draw_context_class_init(SPDrawContextClass *klass); diff --git a/src/dropper-context.cpp b/src/dropper-context.cpp index 312a96171..b38443692 100644 --- a/src/dropper-context.cpp +++ b/src/dropper-context.cpp @@ -44,10 +44,6 @@ #include "message-context.h" #include "verbs.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_dropper_context_class_init(SPDropperContextClass *klass); diff --git a/src/dyna-draw-context.cpp b/src/dyna-draw-context.cpp index ddd37af91..be767a3f3 100644 --- a/src/dyna-draw-context.cpp +++ b/src/dyna-draw-context.cpp @@ -81,10 +81,6 @@ using Inkscape::DocumentUndo; #define DYNA_MIN_WIDTH 1.0e-6 -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_dyna_draw_context_class_init(SPDynaDrawContextClass *klass); static void sp_dyna_draw_context_init(SPDynaDrawContext *ddc); static void sp_dyna_draw_context_dispose(GObject *object); diff --git a/src/ege-adjustment-action.cpp b/src/ege-adjustment-action.cpp index 858b129b8..8ee240b30 100644 --- a/src/ege-adjustment-action.cpp +++ b/src/ege-adjustment-action.cpp @@ -48,10 +48,6 @@ #include "icon-size.h" #include "ege-adjustment-action.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void ege_adjustment_action_class_init( EgeAdjustmentActionClass* klass ); static void ege_adjustment_action_init( EgeAdjustmentAction* action ); diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp index b88329028..0442d768c 100644 --- a/src/eraser-context.cpp +++ b/src/eraser-context.cpp @@ -83,10 +83,6 @@ using Inkscape::DocumentUndo; #define DRAG_DEFAULT 1.0 #define DRAG_MAX 1.0 -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_eraser_context_class_init(SPEraserContextClass *klass); static void sp_eraser_context_init(SPEraserContext *erc); diff --git a/src/event-context.cpp b/src/event-context.cpp index a1f1d2b97..e83f6a209 100644 --- a/src/event-context.cpp +++ b/src/event-context.cpp @@ -54,10 +54,6 @@ #include "sp-guide.h" #include "color.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_event_context_class_init(SPEventContextClass *klass); static void sp_event_context_init(SPEventContext *event_context); static void sp_event_context_dispose(GObject *object); diff --git a/src/extension/param/bool.cpp b/src/extension/param/bool.cpp index abef8d8f3..de9b1c586 100644 --- a/src/extension/param/bool.cpp +++ b/src/extension/param/bool.cpp @@ -137,11 +137,7 @@ Gtk::Widget *ParamBool::get_widget(SPDocument * doc, Inkscape::XML::Node * node, Gtk::HBox * hbox = Gtk::manage(new Gtk::HBox(false, 4)); #endif -#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 efdf03721..ae2d88ab3 100644 --- a/src/extension/param/description.cpp +++ b/src/extension/param/description.cpp @@ -77,20 +77,12 @@ 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 74ae995fb..b1968a4d6 100644 --- a/src/extension/param/enum.cpp +++ b/src/extension/param/enum.cpp @@ -232,12 +232,7 @@ 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 2f1c77d4e..b9ffe68d2 100644 --- a/src/extension/param/float.cpp +++ b/src/extension/param/float.cpp @@ -175,12 +175,7 @@ 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 fe29f1230..7cb930f50 100644 --- a/src/extension/param/int.cpp +++ b/src/extension/param/int.cpp @@ -156,12 +156,7 @@ 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 d71d60ebd..5b5e179d2 100644 --- a/src/extension/param/radiobutton.cpp +++ b/src/extension/param/radiobutton.cpp @@ -284,11 +284,7 @@ Gtk::Widget * ParamRadioButton::get_widget(SPDocument * doc, Inkscape::XML::Node Gtk::VBox * vbox = Gtk::manage(new Gtk::VBox(false, 0)); #endif -#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 cf2b0f5d5..2020fb24d 100644 --- a/src/extension/param/string.cpp +++ b/src/extension/param/string.cpp @@ -165,12 +165,7 @@ 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); diff --git a/src/flood-context.cpp b/src/flood-context.cpp index f09dec7f4..f7c4ca365 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -69,10 +69,6 @@ #include "pixmaps/cursor-paintbucket.xpm" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; using Inkscape::Display::ExtractARGB32; diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp index 1689e5353..7f7f1ac40 100644 --- a/src/gradient-context.cpp +++ b/src/gradient-context.cpp @@ -48,10 +48,6 @@ #include "document-undo.h" #include "verbs.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_gradient_context_class_init(SPGradientContextClass *klass); diff --git a/src/inkview.cpp b/src/inkview.cpp index 1ddd36965..3831cab95 100644 --- a/src/inkview.cpp +++ b/src/inkview.cpp @@ -70,10 +70,6 @@ Inkscape::Application *inkscape; #define bind_textdomain_codeset(p,c) #endif -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - extern char *optarg; extern int optind, opterr; diff --git a/src/interface.cpp b/src/interface.cpp index f6b0ebede..c97d84082 100644 --- a/src/interface.cpp +++ b/src/interface.cpp @@ -83,10 +83,6 @@ #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; /* Drag and Drop */ @@ -1124,11 +1120,7 @@ sp_ui_drag_data_received(GtkWidget *widget, //} if (!consumed && item) { -#if GTK_CHECK_VERSION (2, 22, 0) bool fillnotstroke = (gdk_drag_context_get_actions (drag_context) != GDK_ACTION_MOVE); -#else - bool fillnotstroke = (drag_context->action != GDK_ACTION_MOVE); -#endif if (fillnotstroke && (SP_IS_SHAPE(item) || SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item))) { Path *livarot_path = Path_for_item(item, true, true); @@ -1231,11 +1223,7 @@ sp_ui_drag_data_received(GtkWidget *widget, } if (!consumed && item) { -#if GTK_CHECK_VERSION (2, 22, 0) bool fillnotstroke = (gdk_drag_context_get_actions (drag_context) != GDK_ACTION_MOVE); -#else - bool fillnotstroke = (drag_context->action != GDK_ACTION_MOVE); -#endif if (fillnotstroke && (SP_IS_SHAPE(item) || SP_IS_TEXT(item) || SP_IS_FLOWTEXT(item))) { Path *livarot_path = Path_for_item(item, true, true); diff --git a/src/knot.cpp b/src/knot.cpp index 7a20f0c28..ad8bca2b9 100644 --- a/src/knot.cpp +++ b/src/knot.cpp @@ -36,10 +36,6 @@ using Inkscape::DocumentUndo; GDK_POINTER_MOTION_HINT_MASK | \ GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK) -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static bool nograb = false; static bool grabbed = FALSE; diff --git a/src/libgdl/gdl-dock-item-grip.c b/src/libgdl/gdl-dock-item-grip.c index bc9178505..2c3ec061e 100644 --- a/src/libgdl/gdl-dock-item-grip.c +++ b/src/libgdl/gdl-dock-item-grip.c @@ -275,10 +275,6 @@ gdl_dock_item_grip_close_clicked (GtkWidget *widget, gdl_dock_item_hide_item (grip->item); } -#if !GTK_CHECK_VERSION (2, 22, 0) -# define gtk_button_get_event_window(button) button->event_window -#endif // Gtk+ >= 2.22 - static void gdl_dock_item_grip_fix_iconify_button (GdlDockItemGrip *grip) { diff --git a/src/libgdl/gdl-dock-item.c b/src/libgdl/gdl-dock-item.c index 20f1d8a85..afcd4dfcb 100644 --- a/src/libgdl/gdl-dock-item.c +++ b/src/libgdl/gdl-dock-item.c @@ -200,17 +200,6 @@ struct _GdlDockItemPrivate { G_DEFINE_TYPE (GdlDockItem, gdl_dock_item, GDL_TYPE_DOCK_OBJECT); -/* Inkscape-specific: Define new key macros if they are unavailable */ -#if !GTK_CHECK_VERSION (2, 22, 0) -#define GDK_KEY_Tab 0xff09 -#define GDK_KEY_KP_Tab 0xff89 -#define GDK_KEY_Left 0xff51 -#define GDK_KEY_KP_Left 0xff96 -#define GDK_KEY_Up 0xff52 -#define GDK_KEY_Right 0xff53 -#define GDK_KEY_Down 0xff54 -#endif - static void add_tab_bindings (GtkBindingSet *binding_set, GdkModifierType modifiers, diff --git a/src/main.cpp b/src/main.cpp index ee18c8822..74083e776 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -117,10 +117,6 @@ #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - #include "path-chemistry.h" #include "sp-text.h" #include "sp-flowtext.h" diff --git a/src/measure-context.cpp b/src/measure-context.cpp index a3ff816c3..cc6a9b04e 100644 --- a/src/measure-context.cpp +++ b/src/measure-context.cpp @@ -44,11 +44,6 @@ #include "enums.h" #include "ui/control-manager.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - - using Inkscape::ControlManager; using Inkscape::CTLINE_SECONDARY; diff --git a/src/mesh-context.cpp b/src/mesh-context.cpp index f5ffebe7b..8fd016702 100644 --- a/src/mesh-context.cpp +++ b/src/mesh-context.cpp @@ -51,10 +51,6 @@ #include "sp-mesh-gradient.h" #include "display/sp-ctrlcurve.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_mesh_context_class_init(SPMeshContextClass *klass); diff --git a/src/pen-context.cpp b/src/pen-context.cpp index a8aedb649..6bf6531be 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -45,10 +45,6 @@ #include "tools-switch.h" #include "ui/control-manager.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::ControlManager; diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp index 866231e96..d5b61e1f0 100644 --- a/src/pencil-context.cpp +++ b/src/pencil-context.cpp @@ -45,10 +45,6 @@ #include "display/curve.h" #include "livarot/Path.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_pencil_context_class_init(SPPencilContextClass *klass); static void sp_pencil_context_init(SPPencilContext *pc); diff --git a/src/rect-context.cpp b/src/rect-context.cpp index 537ab5c19..43194a1ae 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -45,10 +45,6 @@ #include "verbs.h" #include "display/sp-canvas-item.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; //static const double goldenratio = 1.61803398874989484820; // golden ratio diff --git a/src/select-context.cpp b/src/select-context.cpp index 06662d1e7..974a587ea 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -49,10 +49,6 @@ #include "display/sp-canvas-item.h" #include "display/drawing-item.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 88a4a536d..15cea9198 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -49,10 +49,6 @@ #include "display/snap-indicator.h" #include "ui/control-manager.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::ControlManager; using Inkscape::DocumentUndo; diff --git a/src/shortcuts.cpp b/src/shortcuts.cpp index 07685e0e9..796962b11 100644 --- a/src/shortcuts.cpp +++ b/src/shortcuts.cpp @@ -37,10 +37,6 @@ #include "xml/node-iterators.h" #include "xml/repr.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using namespace Inkscape; static void sp_shortcut_set(unsigned int const shortcut, Inkscape::Verb *const verb, bool const is_primary); diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index 4e3829c4d..0c25c9d47 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -44,10 +44,6 @@ #include "verbs.h" #include "display/sp-canvas-item.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_spiral_context_class_init(SPSpiralContextClass * klass); diff --git a/src/spray-context.cpp b/src/spray-context.cpp index 7ac04db58..dc0ffdf0f 100644 --- a/src/spray-context.cpp +++ b/src/spray-context.cpp @@ -72,10 +72,6 @@ #include <gdk/gdkkeysyms.h> #include <glibmm/i18n.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; using namespace std; diff --git a/src/star-context.cpp b/src/star-context.cpp index 9570ad008..a3bceb163 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -48,10 +48,6 @@ #include "star-context.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; static void sp_star_context_class_init (SPStarContextClass * klass); diff --git a/src/text-context.cpp b/src/text-context.cpp index e8d03eb71..d4b53f6a4 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -54,10 +54,6 @@ #include "xml/repr.h" #include <gtk/gtk.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::ControlManager; using Inkscape::DocumentUndo; diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp index c06e0280a..09ba2bd88 100644 --- a/src/tweak-context.cpp +++ b/src/tweak-context.cpp @@ -81,10 +81,6 @@ using Inkscape::DocumentUndo; #define DYNA_MIN_WIDTH 1.0e-6 -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_tweak_context_class_init(SPTweakContextClass *klass); static void sp_tweak_context_init(SPTweakContext *ddc); static void sp_tweak_context_dispose(GObject *object); diff --git a/src/ui/dialog/aboutbox.cpp b/src/ui/dialog/aboutbox.cpp index 885846685..5a99ce4bc 100644 --- a/src/ui/dialog/aboutbox.cpp +++ b/src/ui/dialog/aboutbox.cpp @@ -108,11 +108,7 @@ AboutBox::AboutBox() : Gtk::Dialog(_("About Inkscape")) { g_strdup_printf("<small>Inkscape %s</small>", Inkscape::version_string); label->set_markup(label_text); -#if WITH_GTKMM_2_22 label->set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); -#else - label->set_alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER); -#endif label->set_padding(5,0); g_free(label_text); label->set_selectable(true); diff --git a/src/ui/dialog/color-item.cpp b/src/ui/dialog/color-item.cpp index 8d8a8fabd..b0da4aecc 100644 --- a/src/ui/dialog/color-item.cpp +++ b/src/ui/dialog/color-item.cpp @@ -551,11 +551,7 @@ Gtk::Widget* ColorItem::getPreview(PreviewStyle style, ViewType view, ::PreviewS Gtk::Widget* widget = 0; if ( style == PREVIEW_STYLE_BLURB) { Gtk::Label *lbl = new Gtk::Label(def.descr); -#if WITH_GTKMM_2_22 lbl->set_alignment(Gtk::ALIGN_START, Gtk::ALIGN_CENTER); -#else - lbl->set_alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER); -#endif widget = lbl; } else { // Glib::ustring blank(" "); diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index afb242199..f5f712103 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -34,10 +34,6 @@ #include <gtk/gtk.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - #define MIN_ONSCREEN_DISTANCE 50 diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index f1c01954e..0768ec3d9 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -132,18 +132,10 @@ DocumentProperties::DocumentProperties() _rcb_perp(_("Snap perpendicularly"), _("When snapping to paths or guides, then also try snapping perpendicularly"), "inkscape:snap-perpendicular", _wr), _rcb_tang(_("Snap tangentially"), _("When snapping to paths or guides, then also try snapping tangentially"), "inkscape:snap-tangential", _wr), //--------------------------------------------------------------- -#if WITH_GTKMM_2_22 _grids_label_crea("", Gtk::ALIGN_START), -#else - _grids_label_crea("", Gtk::ALIGN_LEFT), -#endif _grids_button_new(C_("Grid", "_New"), _("Create new grid.")), _grids_button_remove(C_("Grid", "_Remove"), _("Remove selected grid.")), -#if WITH_GTKMM_2_22 _grids_label_def("", Gtk::ALIGN_START) -#else - _grids_label_def("", Gtk::ALIGN_LEFT) -#endif { _getContents()->set_spacing (4); _getContents()->pack_start(_notebook, true, true); @@ -533,18 +525,9 @@ void DocumentProperties::removeSelectedProfile(){ void DocumentProperties::build_cms() { _page_cms.show(); - -#if WITH_GTKMM_2_22 Gtk::Label *label_link= manage (new Gtk::Label("", Gtk::ALIGN_START)); -#else - Gtk::Label *label_link= manage (new Gtk::Label("", Gtk::ALIGN_LEFT)); -#endif label_link->set_markup (_("<b>Linked Color Profiles:</b>")); -#if WITH_GTKMM_2_22 Gtk::Label *label_avail = manage (new Gtk::Label("", Gtk::ALIGN_START)); -#else - Gtk::Label *label_avail = manage (new Gtk::Label("", Gtk::ALIGN_LEFT)); -#endif label_avail->set_markup (_("<b>Available Color Profiles:</b>")); _link_btn.set_label(_("Link Profile")); @@ -611,12 +594,7 @@ void DocumentProperties::build_scripting() //# External scripts tab _page_external_scripts.show(); - -#if WITH_GTKMM_2_22 Gtk::Label *label_external= manage (new Gtk::Label("", Gtk::ALIGN_START)); -#else - Gtk::Label *label_external= manage (new Gtk::Label("", Gtk::ALIGN_LEFT)); -#endif label_external->set_markup (_("<b>External script files:</b>")); _add_btn.set_label(_("Add")); @@ -649,12 +627,7 @@ void DocumentProperties::build_scripting() //# Embedded scripts tab _page_embedded_scripts.show(); - -#if WITH_GTKMM_2_22 Gtk::Label *label_embedded= manage (new Gtk::Label("", Gtk::ALIGN_START)); -#else - Gtk::Label *label_embedded= manage (new Gtk::Label("", Gtk::ALIGN_LEFT)); -#endif label_embedded->set_markup (_("<b>Embedded script files:</b>")); _new_btn.set_label(_("New")); @@ -684,11 +657,7 @@ void DocumentProperties::build_scripting() // TODO restore? _EmbeddedScriptsList.set_fixed_height_mode(true); //# Set up the Embedded Scripts content box -#if WITH_GTKMM_2_22 Gtk::Label *label_embedded_content= manage (new Gtk::Label("", Gtk::ALIGN_START)); -#else - Gtk::Label *label_embedded_content= manage (new Gtk::Label("", Gtk::ALIGN_LEFT)); -#endif label_embedded_content->set_markup (_("<b>Content:</b>")); label_embedded_content->set_alignment(0.0); diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index 2862c5010..14854afe5 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -163,12 +163,7 @@ Export::Export (void) : /* Export area frame */ { - - #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); area_box.pack_start(*lbl); @@ -233,12 +228,7 @@ Export::Export (void) : /* Bitmap size frame */ { size_box.set_border_width(3); - -#if WITH_GTKMM_2_22 bm_label = new Gtk::Label(_("<big><b>Bitmap size</b></big>"), Gtk::ALIGN_START); -#else - bm_label = new Gtk::Label(_("<big><b>Bitmap size</b></big>"), Gtk::ALIGN_LEFT); -#endif bm_label->set_use_markup(true); size_box.pack_start(*bm_label, false, false, 0); Gtk::Table *t = new Gtk::Table(2, 5, false); @@ -275,12 +265,7 @@ Export::Export (void) : /* File entry */ { file_box.set_border_width(3); - -#if WITH_GTKMM_2_22 flabel = new Gtk::Label(_("<big><b>_Filename</b></big>"), Gtk::ALIGN_START, Gtk::ALIGN_CENTER, true); -#else - 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/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index 321835569..acdbfba70 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -486,11 +486,7 @@ public: _matrix(SP_ATTR_VALUES, _("This matrix determines a linear transform on color space. Each line affects one of the color components. Each column determines how much of each color component from the input is passed to the output. The last column does not depend on input colors, so can be used to adjust a constant component value.")), _saturation(0, 0, 1, 0.1, 0.01, 2, SP_ATTR_VALUES), _angle(0, 0, 360, 0.1, 0.01, 1, SP_ATTR_VALUES), -#if WITH_GTKMM_2_22 _label(_("None"), Gtk::ALIGN_START), -#else - _label(_("None"), Gtk::ALIGN_LEFT), -#endif _use_stored(false), _saturation_store(0), _angle_store(0) @@ -930,11 +926,7 @@ private: if(label != "") { //lbl = Gtk::manage(new Gtk::Label(label + (label == "" ? "" : ":"), Gtk::ALIGN_LEFT)); colon now in label (LP #358921) -#if WITH_GTKMM_2_22 - lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START)); -#else - lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_LEFT)); -#endif + lbl = Gtk::manage(new Gtk::Label(label, Gtk::ALIGN_START)); hb->pack_start(*lbl, false, false); _size_group->add_widget(*lbl); lbl->show(); @@ -962,11 +954,7 @@ public: : AttrWidget(SP_ATTR_INVALID), _dialog(d), _settings(d, _box, sigc::mem_fun(_dialog, &FilterEffectsDialog::set_child_attr_direct), LIGHT_ENDSOURCE), -#if WITH_GTKMM_2_22 _light_label(_("Light Source:"), Gtk::ALIGN_START), -#else - _light_label(_("Light Source:"), Gtk::ALIGN_LEFT), -#endif _light_source(LightSourceConverter), _locked(false) { @@ -2241,13 +2229,8 @@ FilterEffectsDialog::FilterEffectsDialog() : UI::Widget::Panel("", "/dialogs/filtereffects", SP_VERB_DIALOG_FILTER_EFFECTS), _add_primitive_type(FPConverter), _add_primitive(_("Add Effect:")), -#if WITH_GTKMM_2_22 - _empty_settings(_("No effect selected"), Gtk::ALIGN_START), - _no_filter_selected(_("No filter selected"), Gtk::ALIGN_START), -#else - _empty_settings(_("No effect selected"), Gtk::ALIGN_LEFT), - _no_filter_selected(_("No filter selected"), Gtk::ALIGN_LEFT), -#endif + _empty_settings(_("No effect selected"), Gtk::ALIGN_START), + _no_filter_selected(_("No filter selected"), Gtk::ALIGN_START), _settings_initialized(false), _locked(false), _attr_lock(false), diff --git a/src/ui/dialog/glyphs.cpp b/src/ui/dialog/glyphs.cpp index e220fe92c..1eed8d804 100644 --- a/src/ui/dialog/glyphs.cpp +++ b/src/ui/dialog/glyphs.cpp @@ -374,12 +374,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) : scriptCombo->set_active_text(getScriptToName()[G_UNICODE_SCRIPT_INVALID_CODE]); sigc::connection conn = scriptCombo->signal_changed().connect(sigc::mem_fun(*this, &GlyphsPanel::rebuild)); instanceConns.push_back(conn); - -#if WITH_GTKMM_2_22 Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_START, Gtk::ALIGN_START, 0.0, 0.0); -#else - Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_TOP, 0.0, 0.0); -#endif align->add(*Gtk::manage(scriptCombo)); table->attach( *Gtk::manage(align), 1, 2, row, row + 1, @@ -408,12 +403,7 @@ GlyphsPanel::GlyphsPanel(gchar const *prefsPath) : rangeCombo->set_active_text(getRanges()[1].second); sigc::connection conn = rangeCombo->signal_changed().connect(sigc::mem_fun(*this, &GlyphsPanel::rebuild)); instanceConns.push_back(conn); - -#if WITH_GTKMM_2_22 Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_START, Gtk::ALIGN_START, 0.0, 0.0); -#else - Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_TOP, 0.0, 0.0); -#endif align->add(*Gtk::manage(rangeCombo)); table->attach( *Gtk::manage(align), 1, 2, row, row + 1, diff --git a/src/ui/dialog/input.cpp b/src/ui/dialog/input.cpp index a35690f59..b3c1bddfd 100644 --- a/src/ui/dialog/input.cpp +++ b/src/ui/dialog/input.cpp @@ -964,11 +964,7 @@ InputDialogImpl::ConfPanel::ConfPanel() : pack_start(useExt, Gtk::PACK_SHRINK); save.signal_clicked().connect(sigc::mem_fun(*this, &InputDialogImpl::ConfPanel::saveSettings)); -#if WITH_GTKMM_2_22 Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_END, Gtk::ALIGN_START, 0, 0); -#else - Gtk::Alignment *align = new Gtk::Alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_TOP, 0, 0); -#endif align->add(save); pack_start(*Gtk::manage(align), Gtk::PACK_SHRINK); } @@ -1454,11 +1450,7 @@ void InputDialogImpl::updateTestAxes( Glib::ustring const& key, GdkDevice* dev ) void InputDialogImpl::mapAxesValues( Glib::ustring const& key, gdouble const * axes, GdkDevice* dev ) { -#if GTK_CHECK_VERSION(2,22,0) guint numAxes = gdk_device_get_n_axes(dev); -#else - guint numAxes = dev->num_axes; -#endif static gdouble epsilon = 0.0001; if ( (numAxes > 0) && axes) { @@ -1511,13 +1503,8 @@ Glib::ustring InputDialogImpl::getKeyFor( GdkDevice* device ) { Glib::ustring key; -#if GTK_CHECK_VERSION(2,22,0) GdkInputSource source = gdk_device_get_source(device); const gchar *name = gdk_device_get_name(device); -#else - GdkInputSource source = device->source; - const gchar *name = device->name; -#endif switch ( source ) { case GDK_SOURCE_MOUSE: @@ -1568,13 +1555,8 @@ bool InputDialogImpl::eventSnoop(GdkEvent* event) GdkEventButton* btnEvt = reinterpret_cast<GdkEventButton*>(event); if ( btnEvt->device ) { key = getKeyFor(btnEvt->device); -#if GTK_CHECK_VERSION(2,22,0) source = gdk_device_get_source(btnEvt->device); devName = gdk_device_get_name(btnEvt->device); -#else - source = btnEvt->device->source; - devName = btnEvt->device->name; -#endif mapAxesValues(key, btnEvt->axes, btnEvt->device); if ( buttonMap[key].find(btnEvt->button) == buttonMap[key].end() ) { @@ -1602,13 +1584,8 @@ bool InputDialogImpl::eventSnoop(GdkEvent* event) GdkEventMotion* btnMtn = reinterpret_cast<GdkEventMotion*>(event); if ( btnMtn->device ) { key = getKeyFor(btnMtn->device); -#if GTK_CHECK_VERSION(2,22,0) source = gdk_device_get_source(btnMtn->device); devName = gdk_device_get_name(btnMtn->device); -#else - source = btnMtn->device->source; - devName = btnMtn->device->name; -#endif mapAxesValues(key, btnMtn->axes, btnMtn->device); } gchar* name = gtk_accelerator_name(0, static_cast<GdkModifierType>(btnMtn->state)); diff --git a/src/ui/dialog/xml-tree.cpp b/src/ui/dialog/xml-tree.cpp index a54e04407..accf03586 100644 --- a/src/ui/dialog/xml-tree.cpp +++ b/src/ui/dialog/xml-tree.cpp @@ -48,10 +48,6 @@ #include "widgets/sp-xmlview-content.h" #include "widgets/sp-xmlview-tree.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { namespace Dialog { diff --git a/src/ui/tool/control-point-selection.cpp b/src/ui/tool/control-point-selection.cpp index 58db09b56..1c42c5d90 100644 --- a/src/ui/tool/control-point-selection.cpp +++ b/src/ui/tool/control-point-selection.cpp @@ -21,10 +21,6 @@ #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { diff --git a/src/ui/tool/control-point.cpp b/src/ui/tool/control-point.cpp index e1ee71d53..fbc9858cc 100644 --- a/src/ui/tool/control-point.cpp +++ b/src/ui/tool/control-point.cpp @@ -24,10 +24,6 @@ #include "ui/tool/event-utils.h" #include "ui/tool/transform-handle-set.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { diff --git a/src/ui/tool/event-utils.cpp b/src/ui/tool/event-utils.cpp index 6b067a3ce..c3b69d79d 100644 --- a/src/ui/tool/event-utils.cpp +++ b/src/ui/tool/event-utils.cpp @@ -14,10 +14,6 @@ #include "display/sp-canvas.h" #include "ui/tool/event-utils.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { @@ -80,11 +76,7 @@ unsigned combine_motion_events(SPCanvas *canvas, GdkEventMotion &event, gint mas event.x_root = next.x_root; event.y_root = next.y_root; if (event.axes && next.axes) { -#if GTK_CHECK_VERSION(2,22,0) memcpy(event.axes, next.axes, gdk_device_get_n_axes(event.device)); -#else - memcpy(event.axes, next.axes, event.device->num_axes); -#endif } } diff --git a/src/ui/tool/modifier-tracker.cpp b/src/ui/tool/modifier-tracker.cpp index 601c8334f..cc4e4d0b2 100644 --- a/src/ui/tool/modifier-tracker.cpp +++ b/src/ui/tool/modifier-tracker.cpp @@ -14,10 +14,6 @@ #include "ui/tool/modifier-tracker.h" #include <gtk/gtk.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { diff --git a/src/ui/tool/multi-path-manipulator.cpp b/src/ui/tool/multi-path-manipulator.cpp index 8f3f03aae..eca90f40f 100644 --- a/src/ui/tool/multi-path-manipulator.cpp +++ b/src/ui/tool/multi-path-manipulator.cpp @@ -31,10 +31,6 @@ #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - #ifdef USE_GNU_HASHES namespace __gnu_cxx { template<> diff --git a/src/ui/tool/node-tool.cpp b/src/ui/tool/node-tool.cpp index 8dfee6e65..71c0d3b26 100644 --- a/src/ui/tool/node-tool.cpp +++ b/src/ui/tool/node-tool.cpp @@ -44,10 +44,6 @@ #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - /** @struct InkNodeTool * * Node tool event context. diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 136309a8e..bda410856 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -31,10 +31,6 @@ #include "ui/tool/path-manipulator.h" #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace { Inkscape::ControlType nodeTypeToCtrlType(Inkscape::UI::NodeType type) diff --git a/src/ui/tool/selector.cpp b/src/ui/tool/selector.cpp index 4a414e4ea..2b3ba837c 100644 --- a/src/ui/tool/selector.cpp +++ b/src/ui/tool/selector.cpp @@ -20,10 +20,6 @@ #include <gdk/gdkkeysyms.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { diff --git a/src/ui/widget/filter-effect-chooser.cpp b/src/ui/widget/filter-effect-chooser.cpp index 81fe78f2e..8d6bcf60f 100644 --- a/src/ui/widget/filter-effect-chooser.cpp +++ b/src/ui/widget/filter-effect-chooser.cpp @@ -38,11 +38,7 @@ SimpleFilterModifier::SimpleFilterModifier(int flags) } if (flags & BLUR) { add(_hb_blur); - #if WITH_GTKMM_2_22 - _lb_blur.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); - #else - _lb_blur.set_alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER); - #endif + _lb_blur.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); _hb_blur.pack_start(_lb_blur, false, false, 0); _hb_blur.pack_start(_blur, true, true, 0); _hb_blur.pack_start(_lb_blur_unit, false, false, 3); diff --git a/src/ui/widget/object-composite-settings.cpp b/src/ui/widget/object-composite-settings.cpp index 9e4e32229..09fe53b31 100644 --- a/src/ui/widget/object-composite-settings.cpp +++ b/src/ui/widget/object-composite-settings.cpp @@ -86,12 +86,7 @@ ObjectCompositeSettings::ObjectCompositeSettings(unsigned int verb_code, char co // Opacity pack_start(_opacity_vbox, false, false, 2); -#if WITH_GTKMM_2_22 _opacity_label.set_alignment(Gtk::ALIGN_END, Gtk::ALIGN_CENTER); -#else - _opacity_label.set_alignment(Gtk::ALIGN_RIGHT, Gtk::ALIGN_CENTER); -#endif - _opacity_hbox.pack_start(_opacity_label, false, false, 3); //_opacity_vbox.pack_start(_opacity_label_box, false, false, 0); _opacity_vbox.pack_start(_opacity_hbox, false, false, 0); diff --git a/src/ui/widget/preferences-widget.cpp b/src/ui/widget/preferences-widget.cpp index a7b51d535..8ce7c63db 100644 --- a/src/ui/widget/preferences-widget.cpp +++ b/src/ui/widget/preferences-widget.cpp @@ -73,11 +73,7 @@ void DialogPage::add_line(bool indent, Glib::ustring const &label, Gtk::Widget & if (label != "") { Gtk::Label* label_widget; -#if WITH_GTKMM_2_22 label_widget = Gtk::manage(new Gtk::Label(label , Gtk::ALIGN_START , Gtk::ALIGN_CENTER, true)); -#else - label_widget = Gtk::manage(new Gtk::Label(label , Gtk::ALIGN_LEFT , Gtk::ALIGN_CENTER, true)); -#endif label_widget->set_mnemonic_widget(widget); if (indent) { @@ -107,11 +103,7 @@ void DialogPage::add_line(bool indent, Glib::ustring const &label, Gtk::Widget & if (suffix != "") { -#if WITH_GTKMM_2_22 Gtk::Label* suffix_widget = Gtk::manage(new Gtk::Label(suffix , Gtk::ALIGN_START , Gtk::ALIGN_CENTER, true)); -#else - Gtk::Label* suffix_widget = Gtk::manage(new Gtk::Label(suffix , Gtk::ALIGN_LEFT , Gtk::ALIGN_CENTER, true)); -#endif if (expand_widget) this->attach(*suffix_widget, 2, 3, row, row + 1, Gtk::FILL, Gtk::AttachOptions(), 0, 0); else @@ -130,13 +122,9 @@ void DialogPage::add_group_header(Glib::ustring name) int row = this->property_n_rows(); if (name != "") { -#if WITH_GTKMM_2_22 Gtk::Label* label_widget = Gtk::manage(new Gtk::Label(Glib::ustring(/*"<span size='large'>*/"<b>") + name + Glib::ustring("</b>"/*</span>"*/) , Gtk::ALIGN_START , Gtk::ALIGN_CENTER, true)); -#else - Gtk::Label* label_widget = Gtk::manage(new Gtk::Label(Glib::ustring(/*"<span size='large'>*/"<b>") + name + - Glib::ustring("</b>"/*</span>"*/) , Gtk::ALIGN_LEFT , Gtk::ALIGN_CENTER, true)); -#endif + label_widget->set_use_markup(true); this->attach(*label_widget , 0, 4, row, row + 1, Gtk::FILL, Gtk::AttachOptions(), 0, 0); if (row != 1) diff --git a/src/ui/widget/spinbutton.cpp b/src/ui/widget/spinbutton.cpp index 7d6479923..c107979a8 100644 --- a/src/ui/widget/spinbutton.cpp +++ b/src/ui/widget/spinbutton.cpp @@ -17,10 +17,6 @@ #include "util/expression-evaluator.h" #include "event-context.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - namespace Inkscape { namespace UI { namespace Widget { diff --git a/src/verbs.cpp b/src/verbs.cpp index 76d5f2d42..9de7d6dbf 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -84,10 +84,6 @@ #include <gtk/gtk.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - using Inkscape::DocumentUndo; //#ifdef WITH_INKBOARD diff --git a/src/widgets/button.cpp b/src/widgets/button.cpp index 42dac2ef3..4b152f914 100644 --- a/src/widgets/button.cpp +++ b/src/widgets/button.cpp @@ -25,10 +25,6 @@ #include "button.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_button_class_init (SPButtonClass *klass); static void sp_button_init (SPButton *button); static void sp_button_dispose(GObject *object); diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 5bc367fe5..50c87a9a8 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -973,15 +973,10 @@ SPDesktopWidget::shutdown() "If you close without saving, your changes will be discarded."), doc->getName()); // fix for bug lp:168809 -#if GTK_CHECK_VERSION(2,22,0) GtkWidget *ma = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog)); GList *ma_labels = gtk_container_get_children(GTK_CONTAINER(ma)); GtkWidget *label = GTK_WIDGET(g_list_first(ma_labels)->data); gtk_widget_set_can_focus(label, FALSE); -#elif !defined(GSEAL_ENABLE) - GtkWidget *label = GTK_WIDGET(GTK_MESSAGE_DIALOG(dialog)->label); - gtk_widget_set_can_focus(label, FALSE); -#endif GtkWidget *close_button; close_button = gtk_button_new_with_mnemonic(_("Close _without saving")); @@ -1037,15 +1032,10 @@ SPDesktopWidget::shutdown() "Do you want to save this file as Inkscape SVG?"), doc->getName() ? doc->getName() : "Unnamed"); // fix for bug lp:168809 -#if GTK_CHECK_VERSION(2,22,0) GtkWidget *ma = gtk_message_dialog_get_message_area(GTK_MESSAGE_DIALOG(dialog)); GList *ma_labels = gtk_container_get_children(GTK_CONTAINER(ma)); GtkWidget *label = GTK_WIDGET(g_list_first(ma_labels)->data); gtk_widget_set_can_focus(label, FALSE); -#elif !defined(GSEAL_ENABLE) - GtkWidget *label = GTK_WIDGET(GTK_MESSAGE_DIALOG(dialog)->label); - gtk_widget_set_can_focus(label, FALSE); -#endif GtkWidget *close_button; close_button = gtk_button_new_with_mnemonic(_("Close _without saving")); diff --git a/src/widgets/spinbutton-events.cpp b/src/widgets/spinbutton-events.cpp index 6949017a4..19e350c4b 100644 --- a/src/widgets/spinbutton-events.cpp +++ b/src/widgets/spinbutton-events.cpp @@ -21,10 +21,6 @@ #include "sp-widget.h" #include "widget-sizes.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - gboolean spinbutton_focus_in (GtkWidget *w, GdkEventKey */*event*/, gpointer /*data*/) { diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index f8aed71a8..db06b5d47 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -93,10 +93,6 @@ #include "toolbox.h" #include <gtk/gtk.h> -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - //#define DEBUG_TEXT using Inkscape::UnitTracker; diff --git a/src/zoom-context.cpp b/src/zoom-context.cpp index 21b27df4f..90a091440 100644 --- a/src/zoom-context.cpp +++ b/src/zoom-context.cpp @@ -25,10 +25,6 @@ #include "zoom-context.h" -#if !GTK_CHECK_VERSION(2,22,0) -#include "compat-key-syms.h" -#endif - static void sp_zoom_context_class_init(SPZoomContextClass *klass); static void sp_zoom_context_init(SPZoomContext *zoom_context); static void sp_zoom_context_setup(SPEventContext *ec); |
