Re: problems with not waiting for a popup dialog to close...



well the problem I have with that is this dialog box is inside of a
while loop (if you really need to know why you can ask, but I'll save
time by not saying), and I can't just put half the while loop in the
destroy even callback.  Also, the dialog box is used in another place as
well.  I suppose I could have 2 copies of the same dialog box but this
whole thing seems like an unnecessary pain in the butt.  There's no
command to just simply say: "Display this box and wait till it
returns"??  Any other ideas?

On 27 Mar 2001 10:02:53 -0500, Marco Quezada wrote:
place the code below the gtk_show inside a callback and attach a destroy
signal to the popup that will send control to said callback.

For ex:

control_window = create_control_window ();

  gtk_signal_connect(GTK_OBJECT(control_window), "destroy",
                     GTK_SIGNAL_FUNC(destroy), (gpointer)
"destroy_signal");

  gtk_widget_show (control_window);

The callback looks like this:


void
destroy                               (GtkWidget *window, gpointer data)
{
   // Do not destroy if the signal comes from the refresh action.
   if(strcmp((char *)data, "destroy_signal") == 0 &&
      CC_GLBL->REFRESH_NOT_DESTROY == 0)
   {
      gtk_main_quit();
   }
   else
   {
      CC_GLBL->REFRESH_NOT_DESTROY = 0;
   }
}



"Jeff W." wrote:

I made a GnomeDialog object, declared it modal (using Glade).  So Glad
makes a nice pretty function, create_mydialog() that returns a GtkWidget
which is a pointer to my newly created dialog.  Anyways, so I then call
gtk_widget_show() on the above return value to show the dialog window.
Well, that works fine, but the code following the gtk_widget_show(...)
command gets executed immediately, not waiting for the dialog to close
before hand.  How can I make the program wait until the newly popped up
dialog is closed?? Thanks.

--
/---------------------------------\
Jeff W., jeff dark-techno org
ICQ# 17989474

http://dark-techno.org
http://logic-slave.org

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

--
Marco Quezada
Aerospaceo Engineero
NLX Corporation
22626 Sally Ride Dr.
Sterling, VA, 20164
mquezada nlxcorp com
703-234-2100 x1028
http://www.nlxcorp.com






-- 
/---------------------------------\
Jeff W., jeff dark-techno org
ICQ# 17989474

http://dark-techno.org
http://logic-slave.org





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