Re: About Dialog : Close button to close dialog?
- From: Ed Rippy <ed rippy mindspring com>
- To: gtkmm-list gnome org
- Subject: Re: About Dialog : Close button to close dialog?
- Date: Fri, 23 Mar 2012 10:14:50 -0700
On Thu, 22 Mar 2012 20:15:59 +0000
harryhaaren gmail com wrote:
> Hey all,
>
> I've created an "About" dialog using Glade, getting that widget from
> a ui.glade file using
> refBuilder->get_widget("aboutDialog", aboutDialog);
> A simple "aboutDialog->show();" shows the dialog, but when I click
> the close button it doesn't do anything.
>
> So I looked into getting the button using get_widget(), but its in a
> ButtonBox, so I don't have access...
> Looked in the programming book, but I'm still a bit confused..
> -Harry
-- Hmm. I gather the widget is a Gtk::AboutDialog. I have a program
using a stock Gtk::AboutDialog (in a Glade file) that runs:
.
.
.
Gtk::AboutDialog *_about_dialog;
.
.
.
_builder->add_from_file( BUILDER_XML_FILE, "about_dialog" );
_builder->get_widget( "about_dialog", _about_dialog );
.
.
.
void ClassGen::on_help_about_imagemenuitem_activate() {
int response = _about_dialog->run();
// unnecessary, really:
if ( (response == Gtk::RESPONSE_DELETE_EVENT) || (response ==
Gtk::RESPONSE_CANCEL) ) _about_dialog->hide();
}
-- I gather you are doing something along those lines. Without more
info (code snip) it's hard to tell why yours doesn't work.
Regards.
Ed
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]