Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » GTK+
  • » gtk_widget_show - acts slowly [RSS Feed]

#1 Nov. 21, 2005 17:49:34

Simon J.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

gtk_widget_show - acts slowly


In part of a programme I have a call to a function
which calls

gtk_widget_show(entry)

where entry is a pointer to an instance of GTK_ENTRY.

The actual entry box appears on the screen several
seconds after the fundction has returned, indeed
after several other components have been rendered.

Any ideas why?



___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre.http://uk.security.yahoo.com_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#2 Nov. 21, 2005 17:57:58

Tristan V.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

gtk_widget_show - acts slowly


Simon Jerram wrote:In part of a programme I have a call to a functionwhich callsgtk_widget_show(entry)

where entry is a pointer to an instance of GTK_ENTRY.

The actual entry box appears on the screen several
seconds after the fundction has returned, indeed
after several other components have been rendered.gtk_widget_show() will set the visible flag on the widget
and return, somewhere in gtk_main() there will eventually
be configure/expose events sent to the widget in question
and when they are handled, the widgets will show on screen.

If you are experiencing lengthly latencies and unresponsiveness
(you said a few seconds) this is probably because of some
lengthly excersize you are doing in your code, make sure
that your code segments are short and sweet and always
return to the event loop and then you shouldn't experience
these latencies.

If you need to do lengthly things and show hour-glasses and
progress bars, then you should either split up your operations
into short itterations and return to the event loop regularly
or optionally use worker threads.

Cheers,
-Tristan

_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

  • Root
  • » GTK+
  • » gtk_widget_show - acts slowly [RSS Feed]

Board footer

Moderator control

Enjoy the 23rd of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support