sorry, it is a stupid question,Re: [gtk-list] question about gtk_window_do_modal and gtk_main
- From: Jiang XU <jiang xu echostar com>
- To: gtk-list redhat com
- Subject: sorry, it is a stupid question,Re: [gtk-list] question about gtk_window_do_modal and gtk_main
- Date: Wed, 17 Nov 1999 16:23:57 -0700
I am sorry, that is a stupid question, I misunderstand gtk_widget_set_modal().
Sorry!
Jiang XU wrote:
> I use multi gtk_main() call in my app.
> I made a message box function, which use the gtk_main as the following
> void ShowMessageBox(GtkWidget *parent)
> {
> GtkWidget *box;
> box=CreateMessageBox(...);
>
> gtk_window_set_transient_for(GTK_WINDOW(box),GTK_WINDOW(parent));
> gtk_widget_show(box);
>
> gtk_main();
> }
>
> in the main.cpp, I create another window with a button as the following
> int main(....)
> {
> ....
> window=CreateWindow(....);
>
> gtk_signal_connect(GTK_OBJECT(button)......);
> //when click button, it will brings up the MessageBox
>
> gtk_widget_show(window);
> gtk_widget_main();
> }
>
> In the call back function of clicking button in the window, the code is
> as the following
> void ButtonClicked(.....)
> {
> gtk_winow_set_modal(GTK_WINDOW(window),true);
> ShowMessageBox(window);
> }
>
> but what happened is after I click the button, GTK didn't set the modal
> of the window, instead, it set the modal of the message box. That is
> strange, anybody knows why?
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]