diff options
| author | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-26 15:11:07 +0000 |
|---|---|---|
| committer | Alexander Valavanis <valavanisalex@gmail.com> | 2019-05-26 15:11:07 +0000 |
| commit | 630be8274013c5eef5f19e19a14bc6d759aada5a (patch) | |
| tree | 6774d8db433426ab8361e18638869ad2336bf705 /src/widgets | |
| parent | Rename wrong named function (diff) | |
| download | inkscape-630be8274013c5eef5f19e19a14bc6d759aada5a.tar.gz inkscape-630be8274013c5eef5f19e19a14bc6d759aada5a.zip | |
Rm unused code now Gtk+ >= 3.22 dependency is set
Diffstat (limited to 'src/widgets')
| -rw-r--r-- | src/widgets/desktop-widget.cpp | 30 | ||||
| -rw-r--r-- | src/widgets/ege-adjustment-action.cpp | 5 | ||||
| -rw-r--r-- | src/widgets/gimp/ruler.cpp | 2 | ||||
| -rw-r--r-- | src/widgets/sp-attribute-widget.cpp | 10 | ||||
| -rw-r--r-- | src/widgets/spw-utilities.cpp | 6 | ||||
| -rw-r--r-- | src/widgets/toolbox.cpp | 14 |
6 files changed, 1 insertions, 66 deletions
diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index 32ca1bac2..c48d6fbd5 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -226,14 +226,8 @@ SPDesktopWidget::window_get_pointer() int x, y; auto window = Glib::wrap(GTK_WIDGET(_canvas))->get_window(); auto display = window->get_display(); - -#if GTK_CHECK_VERSION(3,20,0) auto seat = display->get_default_seat(); auto device = seat->get_pointer(); -#else - auto dm = display->get_device_manager(); - auto device = dm->get_client_pointer(); -#endif Gdk::ModifierType m; window->get_device_position(device, x, y, m); @@ -558,11 +552,8 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) dtw->_select_status = Gtk::manage(new Gtk::Label()); dtw->_select_status->set_name("SelectStatus"); dtw->_select_status->set_ellipsize(Pango::ELLIPSIZE_END); -#if GTK_CHECK_VERSION(3,10,0) dtw->_select_status->set_line_wrap(true); dtw->_select_status->set_lines(2); -#endif - dtw->_select_status->set_halign(Gtk::ALIGN_START); dtw->_select_status->set_size_request(1, -1); @@ -990,9 +981,7 @@ SPDesktopWidget::color_profile_event(EgeColorProfTracker */*tracker*/, SPDesktop GdkScreen* screen = gtk_widget_get_screen(GTK_WIDGET(dtw)); GdkWindow *window = gtk_widget_get_window(gtk_widget_get_toplevel(GTK_WIDGET(dtw))); - // In old Gtk+ versions, we can directly find the ID number for a monitor. - // In Gtk+ >= 3.22, however, we need to figure out the ID -# if GTK_CHECK_VERSION(3,22,0) + // Figure out the ID for the monitor auto display = gdk_display_get_default(); auto monitor = gdk_display_get_monitor_at_window(display, window); @@ -1005,9 +994,6 @@ SPDesktopWidget::color_profile_event(EgeColorProfTracker */*tracker*/, SPDesktop auto monitor_at_index = gdk_display_get_monitor(display, i_monitor); if(monitor_at_index == monitor) monitorNum = i_monitor; } -# else // GTK_CHECK_VERSION(3,22,0) - gint monitorNum = gdk_screen_get_monitor_at_window(screen, window); -# endif // GTK_CHECK_VERSION(3,22,0) Glib::ustring id = Inkscape::CMSSystem::getDisplayId( monitorNum ); bool enabled = false; @@ -2297,12 +2283,8 @@ SPDesktopWidget::on_ruler_box_button_release_event(GdkEventButton *event, Gtk::E if (_ruler_clicked && event->button == 1) { sp_event_context_discard_delayed_snap_event(desktop->event_context); -#if GTK_CHECK_VERSION(3,20,0) auto seat = gdk_device_get_seat(event->device); gdk_seat_ungrab(seat); -#else - gdk_device_ungrab(event->device, event->time); -#endif Geom::Point const event_w(sp_canvas_window_to_world(_canvas, event_win)); Geom::Point event_dt(desktop->w2d(event_w)); @@ -2421,7 +2403,6 @@ SPDesktopWidget::on_ruler_box_button_press_event(GdkEventButton *event, Gtk::Eve auto window = widget->get_window()->gobj(); -#if GTK_CHECK_VERSION(3,20,0) auto seat = gdk_device_get_seat(event->device); gdk_seat_grab(seat, window, @@ -2431,15 +2412,6 @@ SPDesktopWidget::on_ruler_box_button_press_event(GdkEventButton *event, Gtk::Eve (GdkEvent*)event, nullptr, nullptr); -#else - gdk_device_grab(event->device, - window, - GDK_OWNERSHIP_NONE, - FALSE, - (GdkEventMask)(GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK ), - NULL, - event->time); -#endif } return false; diff --git a/src/widgets/ege-adjustment-action.cpp b/src/widgets/ege-adjustment-action.cpp index 10535ba44..49280bcd3 100644 --- a/src/widgets/ege-adjustment-action.cpp +++ b/src/widgets/ege-adjustment-action.cpp @@ -808,12 +808,7 @@ static gboolean event_cb( EgeAdjustmentAction* act, GdkEvent* evt ) if ( IS_EGE_ADJUSTMENT_ACTION(act) ) { GtkWidget* menu = create_popup_number_menu(act); gtk_widget_show_all( menu ); -#if GTK_CHECK_VERSION(3,22,0) gtk_menu_popup_at_pointer( GTK_MENU(menu), evt ); -#else - GdkEventButton* btnevt = (GdkEventButton*)evt; - gtk_menu_popup( GTK_MENU(menu), NULL, NULL, NULL, NULL, btnevt->button, btnevt->time ); -#endif } handled = TRUE; } diff --git a/src/widgets/gimp/ruler.cpp b/src/widgets/gimp/ruler.cpp index 48ed4a5dd..285952058 100644 --- a/src/widgets/gimp/ruler.cpp +++ b/src/widgets/gimp/ruler.cpp @@ -160,9 +160,7 @@ sp_ruler_class_init (SPRulerClass *klass) GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); -#if GTK_CHECK_VERSION(3,20,0) gtk_widget_class_set_css_name (widget_class, "ruler-widget"); -#endif object_class->dispose = sp_ruler_dispose; object_class->set_property = sp_ruler_set_property; diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp index 91d363154..8498420ae 100644 --- a/src/widgets/sp-attribute-widget.cpp +++ b/src/widgets/sp-attribute-widget.cpp @@ -165,13 +165,8 @@ void SPAttributeTable::set_object(SPObject *object, ll->set_halign(Gtk::ALIGN_START); ll->set_valign(Gtk::ALIGN_CENTER); ll->set_vexpand(); -#if GTKMM_CHECK_VERSION(3,12,0) ll->set_margin_start(XPAD); ll->set_margin_end(XPAD); -#else - ll->set_margin_left(XPAD); - ll->set_margin_right(XPAD); -#endif ll->set_margin_top(XPAD); ll->set_margin_bottom(XPAD); table->attach(*ll, 0, i, 1, 1); @@ -182,13 +177,8 @@ void SPAttributeTable::set_object(SPObject *object, ee->set_text (val ? val : (const gchar *) ""); ee->set_hexpand(); ee->set_vexpand(); -#if GTKMM_CHECK_VERSION(3,12,0) ee->set_margin_start(XPAD); ee->set_margin_end(XPAD); -#else - ee->set_margin_left(XPAD); - ee->set_margin_right(XPAD); -#endif ee->set_margin_top(XPAD); ee->set_margin_bottom(XPAD); table->attach(*ee, 1, i, 1, 1); diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index aac323cf6..88dc7ff8c 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -40,14 +40,8 @@ Gtk::Label * spw_label(Gtk::Grid *table, const gchar *label_text, int col, int r label_widget->set_halign(Gtk::ALIGN_START); label_widget->set_valign(Gtk::ALIGN_CENTER); - -#if GTK_CHECK_VERSION(3,12,0) label_widget->set_margin_start(4); label_widget->set_margin_end(4); -#else - label_widget->set_margin_left(4); - label_widget->set_margin_right(4); -#endif table->attach(*label_widget, col, row, 1, 1); diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index e3b95fa2b..b3f25c764 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -798,15 +798,8 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop) swatch->setDesktop( desktop ); swatch->setClickVerb( aux_toolboxes[i].swatch_verb_id ); swatch->setWatchedTool( aux_toolboxes[i].swatch_tool, true ); - -#if GTKMM_CHECK_VERSION(3,12,0) swatch->set_margin_start(AUX_BETWEEN_BUTTON_GROUPS); swatch->set_margin_end(AUX_BETWEEN_BUTTON_GROUPS); -#else - swatch->set_margin_left(AUX_BETWEEN_BUTTON_GROUPS); - swatch->set_margin_right(AUX_BETWEEN_BUTTON_GROUPS); -#endif - swatch->set_margin_top(AUX_SPACING); swatch->set_margin_bottom(AUX_SPACING); @@ -878,15 +871,8 @@ void setup_aux_toolbox(GtkWidget *toolbox, SPDesktop *desktop) swatch->setDesktop( desktop ); swatch->setClickVerb( aux_toolboxes[i].swatch_verb_id ); swatch->setWatchedTool( aux_toolboxes[i].swatch_tool, true ); - -#if GTKMM_CHECK_VERSION(3,12,0) swatch->set_margin_start(AUX_BETWEEN_BUTTON_GROUPS); swatch->set_margin_end(AUX_BETWEEN_BUTTON_GROUPS); -#else - swatch->set_margin_left(AUX_BETWEEN_BUTTON_GROUPS); - swatch->set_margin_right(AUX_BETWEEN_BUTTON_GROUPS); -#endif - swatch->set_margin_top(AUX_SPACING); swatch->set_margin_bottom(AUX_SPACING); |
