From 7b3b237bee72e6bd585f64198b8652c069372da5 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Fri, 15 Jun 2007 01:05:30 +0300 Subject: [PATCH] Remove timeout if we are updating the message --- src/hildon-wrappers.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/hildon-wrappers.c b/src/hildon-wrappers.c index a645642..eba28fd 100644 --- a/src/hildon-wrappers.c +++ b/src/hildon-wrappers.c @@ -8,6 +8,8 @@ #include #include "ui-common.h" +static _sb_sid=0; + GtkWidget *hildon_file_chooser_dialog_new(GtkWindow * parent, GtkFileChooserAction action) { @@ -36,14 +38,17 @@ static gboolean status_bar_clear(void) { gtk_statusbar_pop(_status_bar, 0); + _sb_sid=0; return FALSE; } void hildon_banner_show_information(GtkWidget *w, void *t, gchar *text) { - gtk_statusbar_pop(_status_bar, 0); - gtk_statusbar_push(_status_bar, 0, text); - g_timeout_add(5000, status_bar_clear, NULL); + gtk_statusbar_pop(GTK_STATUSBAR(_status_bar), 0); + gtk_statusbar_push(GTK_STATUSBAR(_status_bar), 0, text); + if (_sb_sid!=0) + g_source_remove(_sb_sid); + _sb_sid=g_timeout_add(6000, status_bar_clear, NULL); } GtkWidget *hildon_banner_show_progress(GtkWidget * widget, GtkProgressBar * bar, @@ -74,15 +79,7 @@ GtkWidget *hildon_banner_show_animation(GtkWidget * widget, return NULL; } -GdkColor *hildon_color_button_get_color(GtkColorButton * color_button) -{ - GdkColor *gc; - gtk_color_button_get_color(color_button, gc); - return gc; -} - -void gtk_widget_tap_and_hold_setup(GtkWidget * a, GtkWidget * w, void *p, - gint t) +void gtk_widget_tap_and_hold_setup(GtkWidget * a, GtkWidget * w, void *p, gint t) { } -- 2.39.5