GtkDialog issues



Hi everybody.
I want to use a GtkDialog to show a message in my application when the user
clicks a particular button; I tried to implement this dialog in the program,
but it appears only when the action is finished, and not when it begins.
I insert here a snippet of the source code:

/* dialog created in the main function */

   appdata->dialog = gtk_dialog_new_with_buttons(NULL,
                  GTK_WINDOW(appdata->window),
                  GTK_DIALOG_NO_SEPARATOR && GTK_DIALOG_DESTROY_WITH_PARENT,
                  NULL);
   appdata->dialogLabel = gtk_label_new("");
   gtk_box_pack_start(GTK_BOX(GTK_DIALOG(appdata->dialog)->vbox),
appdata->dialogLabel, TRUE, TRUE, 0);


/* dialog showed in the open_camera function (associated to the button) */

   gtk_label_set_text(GTK_LABEL(appdata->dialogLabel), "Opening camera...");
   gtk_widget_show_all(appdata->dialog);
   start_pipeline(appdata);
   add_camera_tab(appdata);
   gtk_widget_hide_all(appdata->dialog);

I want the dialog to be showed before the start_pipeline() is called, but it
appears for a samll time only after the add_camera_tab() is finished, then it
is hidden.
I don't know how to accomplish my task (I'm really really new to the dialog
widget :-) ).
Thanks in advance. Omar

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



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