GtkAboutDialog close

2008-08-15 Thread Roland Roberts
Okay, I'm a newbie with Gtk.  I'm designing with glade-3.  I've got an 
annoying problem with my about dialog.


I connected the help-about menu item to a callback that pops up the 
dialog.  The Credits and License buttons work fine.  The Close 
button does nothing.  I've seen a bug report in one of the Ubuntu forums 
that claimed this was not a bug, that I have to connect a signal to the 
close button.  Great, but how do I *access* the close button to connect 
it.  In glade, the action area shows up as an internal object with no 
buttons for me to connect to.


Instead, another set of messages I found related to Gtk-perl said I 
should do something like this:


void
on_menu_help_about_activate_cb(GtkObject *object, gpointer user_data)
{
   GtkWidget *window = GTK_ABOUT_DIALOG(gtk_builder_get_object(builder, 
help_about_dialog));

   gtk_about_dialog_set_version(window, VERSION);
   gtk_dialog_run(window);
   gtk_widget_hide(window);
}

which effectively makes the dialog modal.  I really don't like modal 
dialogs unless there is a good reason for them to be modal.  And I can't 
see any reason a help dialog of any sort should be modal.


How can I get the Close button to just hide the dialog so I don't have 
to do the run/hide thing in the callback?



roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220

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


Re: GtkAboutDialog close

2008-08-15 Thread Roland Roberts

Roland Roberts wrote:
How can I get the Close button to just hide the dialog so I don't have 
to do the run/hide thing in the callback?
Ack, I posted this after fighting with it all day and then found my 
answer right after posting.


Apparently, the correct signal is to attach a callback to the response 
signal of the dialog.  I had already tried connecting something to the 
close signal with no effect (and wasn't really surprised).   Doing 
some more reading I now find what I need to know in the GtkDialog 
section of the help.


roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220

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