Re: Statusbar not showing proper message
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-list gnome org
- Subject: Re: Statusbar not showing proper message
- Date: Fri, 23 Feb 2007 11:01:13 +0100
On Fri, Feb 23, 2007 at 04:42:33AM -0500, ashok kalculate com wrote:
>
> void
> on_button1_clicked (GtkButton *button,
> gpointer user_data)
> {
> GtkWidget *stat;
> guint cont;
From here...
> stat=lookup_widget(window1,"statusbar1");
>
> cont=gtk_statusbar_get_context_id(stat,"context");
> gtk_statusbar_push(stat,cont,"statusbar one");
> system("find /home/ashok -name abc -type f");
>
> cont=gtk_statusbar_get_context_id(stat,"context");
> gtk_statusbar_push(stat,cont,"statusbar two");
> system("find /home/ashok -name abc -type f");
...to here
The Gtk+ main loop has no chance to run.
> }
>
> But when i run this program it shows only "statusbar two" string, means it
> shows only last entry.
Therefore the labels have no chance to be redrawn, and if
the program execution took any nonnegligible time you
probably noticed the GUI was completely non-responsive.
You can use for instance g_spawn_async...() + some
non-blocking form of communication (non-blocking waitpid,
GIOChannels), whatever suits you, but in any case you have
to run the command asynchronously and return control to the
Gtk+ main loop to get a responsive GUI. This was discussed
many times here, search the archives.
Yeti
--
Whatever.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]