how to use hildon_banner_show_progress()
Hi, I am tring to use progress banner to show a searching progress status. But when the banner automatically disappeared after it launched. Anyone knows how to correctly show progress banner, regards Cheng code snippet static gboolean on_banner_idle(GtkWidget *banner) { gtk_widget_destroy(banner); return FALSE; } static void create_progress_banner(AppUIData *main) { GtkWidget *banner; banner = hildon_banner_show_progress(GTK_WIDGET(main-data-window), NULL, Searching...); hildon_banner_set_fraction(HILDON_BANNER(banner), 0.2); /*TODO, need update func*/ gtk_widget_show(GTK_WIDGET(banner)); g_timeout_add(main-data-mx_value*1000, (gpointer)on_banner_idle, banner); } ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
On Fri, 2009-05-08 at 11:34 +0100, Luo Cheng wrote: code snippet static gboolean on_banner_idle(GtkWidget *banner) { gtk_widget_destroy(banner); return FALSE; } static void create_progress_banner(AppUIData *main) { GtkWidget *banner; banner = hildon_banner_show_progress(GTK_WIDGET(main-data-window), NULL, Searching...); hildon_banner_set_fraction(HILDON_BANNER(banner), 0.2); /*TODO, need update func*/ gtk_widget_show(GTK_WIDGET(banner)); You don't need to call gtk_widget_show() on the banner, hildon_banner_show_progress() will show it for you. In any case, for Fremantle it's discouraged to use progress banners. Prefer hildon_gtk_window_set_progress_indicator() if possible. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
Hi, I tried to remove gtk_widget_show(), but banner still automatically disappeared. Actually I am developing something for maemo 4.0 SDK, so can I still use hildon_gtk_window_set_progress_indicator()? regards Cheng On Fri, May 8, 2009 at 12:09 PM, Claudio Saavedra csaave...@igalia.comwrote: On Fri, 2009-05-08 at 11:34 +0100, Luo Cheng wrote: code snippet static gboolean on_banner_idle(GtkWidget *banner) { gtk_widget_destroy(banner); return FALSE; } static void create_progress_banner(AppUIData *main) { GtkWidget *banner; banner = hildon_banner_show_progress(GTK_WIDGET(main-data-window), NULL, Searching...); hildon_banner_set_fraction(HILDON_BANNER(banner), 0.2); /*TODO, need update func*/ gtk_widget_show(GTK_WIDGET(banner)); You don't need to call gtk_widget_show() on the banner, hildon_banner_show_progress() will show it for you. In any case, for Fremantle it's discouraged to use progress banners. Prefer hildon_gtk_window_set_progress_indicator() if possible. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
On Fri, May 8, 2009 at 1:27 PM, Luo Cheng richard.luoch...@gmail.comwrote: Hi, Actually I found the reason casue progress banner disappeared. I have another functioned called right after create_progress_banner(), if i comment it out, the progress banner shown correctly. So why this happend? I pursume it's the g_timeout_add(), here is more code for the function all create_progress_banner() =code snippet void interface_search_dialog_new(AppUIData *main_view, gint mode) { GtkWidget *dialog /*add some widget to dialog*/ result = gtk_dialog_run(dialog); swtich(result) { } } On Fri, May 8, 2009 at 1:17 PM, Luo Cheng richard.luoch...@gmail.comwrote: Hi, I tried to remove gtk_widget_show(), but banner still automatically disappeared. Actually I am developing something for maemo 4.0 SDK, so can I still use hildon_gtk_window_set_progress_indicator()? regards Cheng On Fri, May 8, 2009 at 12:09 PM, Claudio Saavedra csaave...@igalia.comwrote: On Fri, 2009-05-08 at 11:34 +0100, Luo Cheng wrote: code snippet static gboolean on_banner_idle(GtkWidget *banner) { gtk_widget_destroy(banner); return FALSE; } static void create_progress_banner(AppUIData *main) { GtkWidget *banner; banner = hildon_banner_show_progress(GTK_WIDGET(main-data-window), NULL, Searching...); hildon_banner_set_fraction(HILDON_BANNER(banner), 0.2); /*TODO, need update func*/ gtk_widget_show(GTK_WIDGET(banner)); You don't need to call gtk_widget_show() on the banner, hildon_banner_show_progress() will show it for you. In any case, for Fremantle it's discouraged to use progress banners. Prefer hildon_gtk_window_set_progress_indicator() if possible. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
Hi, Actually I found the reason casue progress banner disappeared. I have another functioned called right after create_progress_banner(), if i comment it out, the progress banner shown correctly. So why this happend? I pursume it's the g_timeout_add(), here is more code for the function all create_progress_banner() =code snippet void interface_search_dialog_new(AppUIData *main_view, gint mode) { GtkWidget *dialog } On Fri, May 8, 2009 at 1:17 PM, Luo Cheng richard.luoch...@gmail.comwrote: Hi, I tried to remove gtk_widget_show(), but banner still automatically disappeared. Actually I am developing something for maemo 4.0 SDK, so can I still use hildon_gtk_window_set_progress_indicator()? regards Cheng On Fri, May 8, 2009 at 12:09 PM, Claudio Saavedra csaave...@igalia.comwrote: On Fri, 2009-05-08 at 11:34 +0100, Luo Cheng wrote: code snippet static gboolean on_banner_idle(GtkWidget *banner) { gtk_widget_destroy(banner); return FALSE; } static void create_progress_banner(AppUIData *main) { GtkWidget *banner; banner = hildon_banner_show_progress(GTK_WIDGET(main-data-window), NULL, Searching...); hildon_banner_set_fraction(HILDON_BANNER(banner), 0.2); /*TODO, need update func*/ gtk_widget_show(GTK_WIDGET(banner)); You don't need to call gtk_widget_show() on the banner, hildon_banner_show_progress() will show it for you. In any case, for Fremantle it's discouraged to use progress banners. Prefer hildon_gtk_window_set_progress_indicator() if possible. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
sorry, send by mistake. here is the full code =code snippet void interface_search_dialog_new(AppUIData *main_view, gint mode) { GtkWidget *dialog /*add some widget to dialog*/ result = gtk_dialog_run(dialog); swtich(result) { } gtk_widget_destroy(dialog); create_progress_bar(main_view); create_result_dialog(main_view); } On Fri, May 8, 2009 at 1:17 PM, Luo Cheng richard.luoch...@gmail.comwrote: Hi, I tried to remove gtk_widget_show(), but banner still automatically disappeared. Actually I am developing something for maemo 4.0 SDK, so can I still use hildon_gtk_window_set_progress_indicator()? regards Cheng On Fri, May 8, 2009 at 12:09 PM, Claudio Saavedra csaave...@igalia.comwrote: On Fri, 2009-05-08 at 11:34 +0100, Luo Cheng wrote: code snippet static gboolean on_banner_idle(GtkWidget *banner) { gtk_widget_destroy(banner); return FALSE; } static void create_progress_banner(AppUIData *main) { GtkWidget *banner; banner = hildon_banner_show_progress(GTK_WIDGET(main-data-window), NULL, Searching...); hildon_banner_set_fraction(HILDON_BANNER(banner), 0.2); /*TODO, need update func*/ gtk_widget_show(GTK_WIDGET(banner)); You don't need to call gtk_widget_show() on the banner, hildon_banner_show_progress() will show it for you. In any case, for Fremantle it's discouraged to use progress banners. Prefer hildon_gtk_window_set_progress_indicator() if possible. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
On Fri, 2009-05-08 at 13:31 +0100, Luo Cheng wrote: sorry, send by mistake. here is the full code Banners are temporary windows, meaning they will be closed when other non temporary windows are shown. The dialog you are creating is not temporary, therefore, your banner is closed. Hence, don't show a banner before opening a new window. I tried to remove gtk_widget_show(), but banner still automatically disappeared. Actually I am developing something for maemo 4.0 SDK, so can I still use hildon_gtk_window_set_progress_indicator()? No, that API is new in hildon 2.2. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
On Fri, May 08, 2009 at 04:27:27PM +0300, Claudio Saavedra wrote: Banners are temporary windows, meaning they will be closed when other non temporary windows are shown. Note that this is not true anymore in Maemo 2.2: https://git.maemo.org/projects/hildon/gitweb?p=hildon;a=commitdiff;h=558f9bc4 Berto ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: how to use hildon_banner_show_progress()
On Fri, 2009-05-08 at 15:37 +0200, Alberto Garcia wrote: On Fri, May 08, 2009 at 04:27:27PM +0300, Claudio Saavedra wrote: Banners are temporary windows, meaning they will be closed when other non temporary windows are shown. Note that this is not true anymore in Maemo 2.2: Heh, well. Maemo 5.0 you mean ;). But yes, this was fixed in the current development version; I was just pointing out the behavior for Diablo and before. Claudio ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers