diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 5 | ||||
-rw-r--r-- | src/idocalendarmenuitem.c | 4 | ||||
-rw-r--r-- | src/idoentrymenuitem.c | 4 | ||||
-rw-r--r-- | src/idomessagedialog.c | 16 | ||||
-rw-r--r-- | src/idorange.c | 33 | ||||
-rw-r--r-- | src/idoscalemenuitem.c | 32 |
6 files changed, 0 insertions, 94 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 79e3e04..017874f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,10 +1,5 @@ -if USE_GTK3 VER=3 lib_LTLIBRARIES = libido3-0.1.la -else -VER= -lib_LTLIBRARIES = libido-0.1.la -endif ido_built_public_sources = \ idotypebuiltins.h diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c index da7c436..f5bd60f 100644 --- a/src/idocalendarmenuitem.c +++ b/src/idocalendarmenuitem.c @@ -132,11 +132,7 @@ ido_calendar_menu_item_init (IdoCalendarMenuItem *item) G_CALLBACK (calendar_move_focus_cb), item); -#ifdef USE_GTK3 priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -#else - priv->box = gtk_hbox_new (FALSE, 0); -#endif gtk_box_pack_start (GTK_BOX (priv->box), priv->calendar, FALSE, FALSE, 0); diff --git a/src/idoentrymenuitem.c b/src/idoentrymenuitem.c index 088c559..17e8314 100644 --- a/src/idoentrymenuitem.c +++ b/src/idoentrymenuitem.c @@ -119,11 +119,7 @@ ido_entry_menu_item_init (IdoEntryMenuItem *item) G_CALLBACK (entry_move_focus_cb), item); -#ifdef USE_GTK3 priv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -#else - priv->box = gtk_hbox_new (FALSE, 0); -#endif gtk_box_pack_start (GTK_BOX (priv->box), priv->entry, FALSE, FALSE, 0); diff --git a/src/idomessagedialog.c b/src/idomessagedialog.c index d4a3e2f..d3f73aa 100644 --- a/src/idomessagedialog.c +++ b/src/idomessagedialog.c @@ -167,22 +167,14 @@ ido_message_dialog_focus_in_event (GtkWidget *widget, IdoTimeline *timeline; IdoMessageDialogMorphContext *context; -#ifdef USE_GTK3 gtk_widget_get_preferred_size (GTK_WIDGET (dialog), NULL, &start); -#else - gtk_widget_get_requisition (GTK_WIDGET (dialog), &start); -#endif priv->expanded = TRUE; gtk_widget_show (priv->action_area); gtk_widget_show (priv->secondary_label); -#ifdef USE_GTK3 gtk_widget_get_preferred_size (GTK_WIDGET (dialog), NULL, &end); -#else - gtk_widget_get_requisition (GTK_WIDGET (dialog), &end); -#endif gtk_widget_hide (priv->action_area); gtk_widget_hide (priv->secondary_label); @@ -379,11 +371,7 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary) for (list = children; list != NULL; list = list->next) { -#ifdef USE_GTK3 if (G_TYPE_FROM_INSTANCE (list->data) == GTK_TYPE_BOX && gtk_orientable_get_orientation (list->data) == GTK_ORIENTATION_HORIZONTAL) -#else - if (G_TYPE_FROM_INSTANCE (list->data) == GTK_TYPE_HBOX) -#endif { GList *hchildren; GList *hlist; @@ -393,11 +381,7 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary) for (hlist = hchildren; hlist != NULL; hlist = hlist->next) { -#ifdef USE_GTK3 if (G_TYPE_FROM_INSTANCE (hlist->data) == GTK_TYPE_BOX && gtk_orientable_get_orientation (hlist->data) == GTK_ORIENTATION_VERTICAL) -#else - if (G_TYPE_FROM_INSTANCE (hlist->data) == GTK_TYPE_VBOX) -#endif { GList *vlist; GtkWidget *vbox = GTK_WIDGET (hlist->data); diff --git a/src/idorange.c b/src/idorange.c index 7d7ee85..4f165bb 100644 --- a/src/idorange.c +++ b/src/idorange.c @@ -41,10 +41,6 @@ static void ido_range_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); -#ifdef USE_GTK3 -static void ido_range_grab_notify (GtkWidget *widget, - gboolean was_grabbed); -#endif #define IDO_RANGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IDO_TYPE_RANGE, IdoRangePrivate)) @@ -65,10 +61,6 @@ ido_range_class_init (IdoRangeClass *class) gobject_class->set_property = ido_range_set_property; gobject_class->get_property = ido_range_get_property; -#ifdef USE_GTK3 - widget_class->grab_notify = ido_range_grab_notify; -#endif - g_object_class_install_property (gobject_class, PROP_STYLE, g_param_spec_enum ("range-style", @@ -139,21 +131,6 @@ ido_range_set_property (GObject *object, } } -#ifdef USE_GTK3 -static void -ido_range_grab_notify (GtkWidget *widget, gboolean was_grabbed) -{ - /* - * FIXME: workaround for lp bug #865122. - * Without this handler, GtkRange will call remove_grab which results - * in an infinite loop of grab_notifies. - * - * The widget will still work properly, because grab-broken-event will get - * properly fired and internal state of GtkRange will be properly updated. - */ -} -#endif - static void ido_range_constructed (GObject *object) { @@ -176,16 +153,6 @@ ido_range_constructed (GObject *object) "knob-width", &width, "knob-height", &height, NULL); - -#ifndef USE_GTK3 - g_snprintf (buf, sizeof (buf), - "style \"ido-range\" {\n" - " GtkRange::slider-width = %d\n" - " GtkScale::slider-length = %d\n" - "} widget \"*.idorange-%p\" style \"ido-range\"\n", - width, height, range); - gtk_rc_parse_string (buf); -#endif } gtk_range_set_slider_size_fixed (GTK_RANGE (range), TRUE); diff --git a/src/idoscalemenuitem.c b/src/idoscalemenuitem.c index 4b60b8b..b3c80f6 100644 --- a/src/idoscalemenuitem.c +++ b/src/idoscalemenuitem.c @@ -144,27 +144,15 @@ ido_scale_menu_item_size_allocate (GtkWidget *widget, switch (priv->style) { case IDO_SCALE_MENU_ITEM_STYLE_IMAGE: -#ifdef USE_GTK3 gtk_widget_get_preferred_size (priv->primary_image, &primary_req, NULL); gtk_widget_get_preferred_size (priv->secondary_image, &secondary_req, NULL); -#else - gtk_widget_get_child_requisition (priv->primary_image, &primary_req); - gtk_widget_get_child_requisition (priv->secondary_image, &secondary_req); -#endif - primary_padding = gtk_widget_get_visible (priv->primary_image) ? primary_req.width : 0; secondary_padding = gtk_widget_get_visible (priv->secondary_image) ? secondary_req.width : 0; break; case IDO_SCALE_MENU_ITEM_STYLE_LABEL: -#ifdef USE_GTK3 gtk_widget_get_preferred_size (priv->primary_label, &primary_req, NULL); gtk_widget_get_preferred_size (priv->secondary_label, &secondary_req, NULL); -#else - gtk_widget_get_child_requisition (priv->primary_label, &primary_req); - gtk_widget_get_child_requisition (priv->secondary_label, &secondary_req); -#endif - primary_padding = gtk_widget_get_visible (priv->primary_label) ? primary_req.width : 0; secondary_padding = gtk_widget_get_visible (priv->secondary_label) ? secondary_req.width : 0; break; @@ -256,11 +244,7 @@ ido_scale_menu_item_constructed (GObject *object) G_CALLBACK (on_scale_button_press_or_release_event), NULL); -#ifdef USE_GTK3 hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); -#else - hbox = gtk_hbox_new (FALSE, 0); -#endif priv->primary_image = gtk_image_new (); g_signal_connect (priv->primary_image, "notify", @@ -505,10 +489,6 @@ ido_scale_menu_item_button_press_event (GtkWidget *menuitem, IdoScaleMenuItemPrivate *priv = GET_PRIVATE (menuitem); gdouble x; -#ifndef USE_GTK3 - GtkWidget *scale = priv->scale; -#endif - // can we block emissions of "grab-notify" on parent?? translate_event_coordinates (menuitem, event->x, &x); @@ -517,28 +497,16 @@ ido_scale_menu_item_button_press_event (GtkWidget *menuitem, translate_event_coordinates (menuitem, event->x_root, &x); event->x_root = x; -#ifndef USE_GTK3 - ubuntu_gtk_widget_set_has_grab (scale, TRUE); -#endif - gtk_widget_event (priv->scale, ((GdkEvent *)(void*)(event))); -#ifndef USE_GTK3 - ubuntu_gtk_widget_set_has_grab (scale, FALSE); -#endif - if (!priv->grabbed) { priv->grabbed = TRUE; g_signal_emit (menuitem, signals[SLIDER_GRABBED], 0); } -#ifdef USE_GTK3 return FALSE; -#else - return TRUE; -#endif } static gboolean |