aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2012-05-07 17:18:10 -0700
committerCharles Kerr <charles.kerr@canonical.com>2012-05-07 17:18:10 -0700
commit84a63033c820bf890e0bcecd2f07cc325c44e9e9 (patch)
tree64bc31aaac19f8c5785b851f3b07541d91d36a8c /src
parent78c634c4ff2d9f64712f4a667facc66dc48a9762 (diff)
downloadayatana-ido-84a63033c820bf890e0bcecd2f07cc325c44e9e9.tar.gz
ayatana-ido-84a63033c820bf890e0bcecd2f07cc325c44e9e9.tar.bz2
ayatana-ido-84a63033c820bf890e0bcecd2f07cc325c44e9e9.zip
require gtk3
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am5
-rw-r--r--src/idocalendarmenuitem.c4
-rw-r--r--src/idoentrymenuitem.c4
-rw-r--r--src/idomessagedialog.c16
-rw-r--r--src/idorange.c10
-rw-r--r--src/idoscalemenuitem.c32
6 files changed, 0 insertions, 71 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b849bf5..4e9b77f 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 b9c9cab..4f165bb 100644
--- a/src/idorange.c
+++ b/src/idorange.c
@@ -153,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