Re[4]: GtkDialog Usage
- From: jan jakon <janjakon mail ru>
- To: Harring Figueiredo <harringf yahoo com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re[4]: GtkDialog Usage
- Date: Sat, 25 Dec 2004 21:50:06 +0300
It is very bad, but already have this code in "quit" handler.
I have close dialog function with such code:
printf("close dialog\n");
fflush(stdout);
if(window){
gtk_widget_destroy(window);
window = NULL;
}
I have response dialog function with suce code:
switch(res_id){
case GTK_RESPONSE_HELP:
//some code
default:
printf("close from response_handler\n");
close_dialog_function();
}
I have main_quit function with such code:
printf("main window close\n");
//some code
close_dialog_function();
//some code
gtk_main_quit();
I get such output:
close from response_handler
close dialog
close from response_handler
close dialog
close from response_handler
close dialog
main end is execute
close dialog
And application hang up.
-----Original Message-----
From: Harring Figueiredo <harringf yahoo com>
To: jan jakon <janjakon mail ru>
Date: Sat, 25 Dec 2004 10:07:51 -0800 (PST)
Subject: Re: Re[2]: GtkDialog Usage
Jan:
In that case, you still have to destroy the dialog when the main "window" is
being destroyed.
callback_to_quit_app(){
if(dialog)
gtk_widget_destroy(dialog)
destroy other widget like the dialog you mentioned.
gtk_main_quit()
}
This should do it.
Reg,
Harring
--- jan jakon <janjakon mail ru> wrote:
The main idea: didn't create dialog each time, because it required too much
time,
create it once.
But in any way it didn't help.
I try this code:
#if 0
if(dialog){
gint res=gtk_dialog_run(dialog);
return res;
}
#endif
dialog = gtk_dialog_new();
//fill dialog with widgest
gint res=gtk_dialog_run(dilog);
gtk_widget_destroy(GTK_WINDOW(dialog));
dialog=NULL;
return res;
But it DIDN'T solve the problem.
-----Original Message-----
From: Harring Figueiredo <harringf yahoo com>
To: jan jakon <janjakon mail ru>
Date: Sat, 25 Dec 2004 07:34:30 -0800 (PST)
Subject: Re: GtkDialog Usage
--- jan jakon <janjakon mail ru> wrote:
Hello.
I have problem with GtkDialog.
In my application there is main window, on main window there is button
wich
activate
the follow code:
if(dialog){
gint res=gtk_dialog_run(GTK_DIALOG(window));
return res;
}
dialog = gtk_dialog_new();
//fill dialog with widgest
gint res=gtk_dialog_run(GTK_DIALOG(window));
return res;
If I didn't click on button which show dialog all right.
But if I click, then after close main window program still alive,
and only Ctrl+C help to close it.
You are not destroying the dialog.
try gtk_widget_destroy(dialog);
once you are done with it.
Harring
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___________________________________________________________
Mail.ru напоминает что у отправителя этого письма скоро день рождения:)
___________________________________________________________
Путешествие - безупречный подарок ко Дню Рождения!
Теперь его можно подарить красиво.
http://r.mail.ru/cln2625/www.Puteshestvie.ru
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
___________________________________________________________
Mail.ru напоминает что у отправителя этого письма скоро день рождения:)
___________________________________________________________
Путешествие - безупречный подарок ко Дню Рождения!
Теперь его можно подарить красиво.
http://r.mail.ru/cln2625/www.Puteshestvie.ru
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]