|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Gtk::AboutDialogHello,
I added a Gtk::AboutDialog with glade to my project. Then I show it with the code below: void AppMenubar::onHelpInfoActivate () { Gtk::AboutDialog *aboutDialog = NULL; // Load the Glade file and reference its widgets: Glib::RefPtr<Gnome::Glade::Xml> xml_glade; try { xml_glade = createGlade ("AboutDialog"); } catch (const Gnome::Glade::XmlError& ex) { std::cerr << ex.what() << std::endl; return; } // get the application window xml_glade->get_widget ("AboutDialog", aboutDialog); aboutDialog->show_all (); } The problem is that the AboutDialog doesn't close by pressing the close button. What is the problem. I found no example code for the AboutDialog. Another problem is that my url is displayed blue, underlined and clickable in glade, but as plain label while executing it. Any ideas? regards Andreas _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Gtk::AboutDialogDid you try the modal / not modal setting? What happens if you "run()" the dialog? Does the 'delete window' (the right upper X) work? Could you strip down your glade file to just the AboutDialog and attach it? We then could try it. I recently did several about dialogs, never encountered a problem with 'close'. Which GTK version are you using? With regard to the URL: you need to add your own "lauch method" with set_url_hook (const SlotActivateLink& slot), and yes, that is a bit painful... :-) There is a (C) example in glade3-3.x.x/src/glade-window.c: gtk_about_dialog_set_url_hook... Chris Am Mittwoch 30 April 2008 21:48:46 schrieb Andreas Volz: > Another problem is that my url is displayed blue, underlined and > clickable in glade, but as plain label while executing it. http://www.acurana.de/ _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Gtk::AboutDialogOn Wed, Apr 30, 2008 at 12:48 PM, Andreas Volz <lists@...> wrote:
> The problem is that the AboutDialog doesn't close by pressing the close > button. What is the problem. I found no example code for the > AboutDialog. Don't you have to add a signal handler to make a button press do anything? I don't use glade so I don't know what all it add, but I didn't think it added any code. This is what I've often done in the past: button->signal_clicked().connect(sigc::mem_fun(*this, &Gtk::window::hide)); Put that in the constructor of your dialog, make sure you have "button" defined, and you should be good to go. No gui code will do anything without signal handlers. _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Gtk::AboutDialogAm Wed, 30 Apr 2008 22:20:21 +0200 schrieb Christopher Lang:
> > Did you try the modal / not modal setting? Same result. > What happens if you "run()" the dialog? Same result. > Does the 'delete window' (the right upper X) work? Yes. > Could you strip down your glade file to just the AboutDialog and > attach it? We then could try it. Maybe later if nothing else works. > I recently did several about dialogs, never encountered a problem > with 'close'. > > Which GTK version are you using? gtk-2.12.0 gtkmm2.4-2.12.0 regards Andreas _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
|
|
Re: Gtk::AboutDialogIt's a Gtk::Dialog so you can either use ::run() and then check the response _after which you are yourself responsible for disposing or at least hiding_ the dialog, or connect to signal_response() and do there basically the same.
In other words, nothing will happen on CLOSE as it will only make it return a Gtk::RESPONSE_CLOSE (IIRC) from the run() function. 2008/4/30 Andreas Volz <lists@...>: Am Wed, 30 Apr 2008 22:20:21 +0200 schrieb Christopher Lang: _______________________________________________ gtkmm-list mailing list gtkmm-list@... http://mail.gnome.org/mailman/listinfo/gtkmm-list |
| Free Forum Powered by Nabble | Forum Help |