Psst.. new poll here.
you@paste.org web/email now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!
Paste
Pasted as C++ by registered user adam ( 13 years ago )
#include <gtkmm.h> #include <cstdlib> class Win : public Gtk::Window { public: Win() : button("test") { add(button); button.signal_clicked().connect(sigc::mem_fun(*this, &Win;::func)); show_all_children(); } private: Gtk::Button button; void func() { button.set_sensitive(0); int i; while (i < 10) { while (Gtk::Main::events_pending()) Gtk::Main::iteration(); i++; sleep(1); } button.set_sensitive(1); } }; int main(int argc, char *argv[]) { Gtk::Main kit(argc, argv); Win window; Gtk::Main::run(window); return 0; }
Revise this Paste