A signal for Gtk::MessageDialog
- From: "Jamiil Abduqadir" <jalqadir gmail com>
- To: "Gtkmm Mailing List" <gtkmm-list gnome org>
- Subject: A signal for Gtk::MessageDialog
- Date: Wed, 27 Dec 2006 19:03:51 -0800
Hello,
I am writing a class that derives from 'Gtk::MessageDialog'. What does the class do? you got it, it displays a dialog box with some information on it. Now, to the problem. Just like any 'Gtk::MessageDialog' it has a button in there that I need to connect to a signal, but since I don't know the name of the button, I cannot write something like
Mybutton.signal_clicked().connect(sigc::ptr_fun(&on_button_clicked));
What can I do to find the object name of Gtk::Button in the Gtk::MessageDialog?
------snip------
namespace jme{
class GtkmmException : public virtual Gtk::MessageDialog{
private:
jme::Exception* ex;
protected:
public:
GtkmmException(Glib::ustring&, jme::Exception&);
~GtkmmException();
virtual void btnClicked();
}; // class
}
jme::GtkmmException::GtkmmException( Glib::ustring& str, jme::Exception& e)
: Gtk::MessageDialog(str){
try{ex = new jme::Exception();}
catch(std::bad_alloc& x){ std::cout <<
x.what(); exit(-1); }
ex->copy(e);
Gtk::MessageDialog::set_moday(true);
Is this right?
~~~~~~~~~~
this->signal_clicked().connect( sigc::mem_fun(*this,
&GtkmmException::btnClicked) );
}
//void jme::GtkmmException::btnClicked(){/*Initiate atomic reactor, hihihi*/}
jme::GtkmmException::~GtkmmException(){ delete ex;}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]