gtk_widget_show() outside gtk_main()



I have a button widget in an application that is connected to a callback
function which, among other things, starts a separate process via a
standard fork() + execl() + waitpid() procedure. I want to display a note
via a label notifying the user that files are transferring and to please
wait.

The button is connected to this callback with the gtk_signal_connect()
function. The first part of the function just does some checking and
setup. Right after that I put in my label and issued a
gtk_widget_show(label). Unfortunately it doesn't update the display until
the separate process completes (ie after the waitpid). I also tried
putting the labelling part in a separate function that is called first,
then another function to start the transfer. That also didn't work.

I'm assuming the widget displays are only updated inside gtk_main()? Does
anyone have any suggestions? I also tried gtk_widget_realize(), that
didn't work either, obviously I don't yet understand what that feature is
for.:)

At any rate, gtk rules. I've already used clists, ctrees (wasn't exactly
fun to figure out w/o documentation but I found a few example bits of code
that helped), buttons, labels, pixmaps (including under ctrees),
textfields, text areas, and more. Props to the developers, my apps look
prettier than any other ones in use here.

  .  _  _  _ _ . .   _ _ .  . _  _  _ . .
 :  |-||-||<|_||\|  |_|-||\/||-'|->|_-|_|_  DalTech, Halifax, NS, Canada
  `---------------------------------------- [http://www.biodome.org/~fx] -



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]