|
|
| Author |
Message |
|
|
sunrain988 Familiar Face
Joined: 17 Jul 2008 Posts: 13
|
Posted: Tue Oct 07, 2008 4:38 am Post subject: How to run only a dialog window and run only a program? |
|
|
| I wrote a program with GTK.It run an About dialog when I clicked the About dialog every times.How can I run only a dialog window or program whenever I click the menuitem or program. |
|
| Back to top |
|
 |
ramesh GTK+ Guru
Joined: 16 Nov 2006 Posts: 270 Location: INDIA
|
Posted: Tue Oct 07, 2008 5:20 am Post subject: Re: How to run only a dialog window and run only a program? |
|
|
| sunrain988 wrote: | | I wrote a program with GTK.It run an About dialog when I clicked the About dialog every times.How can I run only a dialog window or program whenever I click the menuitem or program. |
use
| Quote: |
gtk_window_set_modal (GTK_WINDOW (About_dialog), TRUE);
|
or
| Quote: |
void
on_about_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
if(About_dialog==NULL)
gtk_widget_show (About_dialog);
}
|
|
|
| Back to top |
|
 |
sunrain988 Familiar Face
Joined: 17 Jul 2008 Posts: 13
|
Posted: Tue Oct 07, 2008 8:09 am Post subject: Thank you |
|
|
Thank you.
but I still can't solve it. |
|
| Back to top |
|
 |
tadeboro Never Seen the Sunlight
Joined: 23 Jul 2008 Posts: 2114 Location: Slovenia
|
Posted: Tue Oct 07, 2008 8:33 am Post subject: Re: How to run only a dialog window and run only a program? |
|
|
| sunrain988 wrote: | | I wrote a program with GTK.It run an About dialog when I clicked the About dialog every times.How can I run only a dialog window or program whenever I click the menuitem or program. | I don't quite understand what are you trying to do here. Do you wish to hide main window when showing dialog? Please try to explain a little more. |
|
| Back to top |
|
 |
sunrain988 Familiar Face
Joined: 17 Jul 2008 Posts: 13
|
Posted: Tue Oct 07, 2008 10:36 am Post subject: Thanks |
|
|
Thanks.
I have solved it with Modal Dialog.But,I still have not solved it with NonModal Dialog.I want to get only one Dialog whenever I click the "about" menuitem.
Others,I don't know how to write a program and execute the program,only one process,only one icon in the system tray. |
|
| Back to top |
|
 |
|