[gtk+] range: Do not use idles to trigger actions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] range: Do not use idles to trigger actions
- Date: Wed, 6 Jul 2011 14:50:24 +0000 (UTC)
commit ccbe6c816b76e1c7ac21f769e43a3ac5bcd5dfe8
Author: Benjamin Otte <otte redhat com>
Date: Tue Jul 5 14:34:10 2011 +0200
range: Do not use idles to trigger actions
gtk/a11y/gtkrangeaccessible.c | 31 +------------------------------
gtk/a11y/gtkrangeaccessible.h | 2 --
2 files changed, 1 insertions(+), 32 deletions(-)
---
diff --git a/gtk/a11y/gtkrangeaccessible.c b/gtk/a11y/gtkrangeaccessible.c
index 7e246e3..35231cc 100644
--- a/gtk/a11y/gtkrangeaccessible.c
+++ b/gtk/a11y/gtkrangeaccessible.c
@@ -82,12 +82,6 @@ gtk_range_accessible_finalize (GObject *object)
range);
}
- if (range->action_idle_handler)
- {
- g_source_remove (range->action_idle_handler);
- range->action_idle_handler = 0;
- }
-
G_OBJECT_CLASS (gtk_range_accessible_parent_class)->finalize (object);
}
@@ -235,29 +229,9 @@ atk_value_interface_init (AtkValueIface *iface)
}
static gboolean
-idle_do_action (gpointer data)
-{
- GtkRangeAccessible *range = GTK_RANGE_ACCESSIBLE (data);
- GtkWidget *widget;
-
- range->action_idle_handler = 0;
- widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (range));
- if (widget == NULL)
- return FALSE;
-
- if (!gtk_widget_get_sensitive (widget) || !gtk_widget_get_visible (widget))
- return FALSE;
-
- gtk_widget_activate (widget);
-
- return TRUE;
-}
-
-static gboolean
gtk_range_accessible_do_action (AtkAction *action,
gint i)
{
- GtkRangeAccessible *range = GTK_RANGE_ACCESSIBLE (action);
GtkWidget *widget;
widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (action));
@@ -270,10 +244,7 @@ gtk_range_accessible_do_action (AtkAction *action,
if (i != 0)
return FALSE;
- if (range->action_idle_handler)
- return FALSE;
-
- range->action_idle_handler = gdk_threads_add_idle (idle_do_action, range);
+ gtk_widget_activate (widget);
return TRUE;
}
diff --git a/gtk/a11y/gtkrangeaccessible.h b/gtk/a11y/gtkrangeaccessible.h
index 9ba66a4..d84b8ef 100644
--- a/gtk/a11y/gtkrangeaccessible.h
+++ b/gtk/a11y/gtkrangeaccessible.h
@@ -37,8 +37,6 @@ typedef struct _GtkRangeAccessibleClass GtkRangeAccessibleClass;
struct _GtkRangeAccessible
{
GtkWidgetAccessible parent;
-
- guint action_idle_handler;
};
struct _GtkRangeAccessibleClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]