Update gtk108
This commit is contained in:
parent
4891c36536
commit
ca67793ac5
|
@ -66,9 +66,5 @@ MyWin * MyWin::create(){
|
||||||
void MyWin::btnprefs_clicked(){
|
void MyWin::btnprefs_clicked(){
|
||||||
auto prefs=MyPrefs::create(*this);
|
auto prefs=MyPrefs::create(*this);
|
||||||
prefs->present();
|
prefs->present();
|
||||||
prefs->signal_hide().connect(sigc::bind(sigc::mem_fun(*this,&MyWin::on_hide_window),prefs));
|
prefs->signal_hide().connect(sigc::bind(sigc::ptr_fun(on_hide_window),prefs));
|
||||||
}
|
|
||||||
|
|
||||||
void MyWin::on_hide_window(Gtk::Window* window){
|
|
||||||
delete window;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,5 +17,8 @@ class MyWin : public Gtk::Window{
|
||||||
|
|
||||||
//Signal Handlers
|
//Signal Handlers
|
||||||
void btnprefs_clicked();
|
void btnprefs_clicked();
|
||||||
void on_hide_window(Gtk::Window* window);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static inline void on_hide_window(Gtk::Window* window){
|
||||||
|
delete window;
|
||||||
|
}
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
#include "MyWin.hh"
|
#include "MyWin.hh"
|
||||||
|
|
||||||
void on_hide(Gtk::Window* window){
|
|
||||||
delete window;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc,char **argv){
|
int main(int argc,char **argv){
|
||||||
//Initalize env
|
//Initalize env
|
||||||
Glib::setenv("GSETTINGS_SCHEMA_DIR",".",false);
|
Glib::setenv("GSETTINGS_SCHEMA_DIR",".",false);
|
||||||
|
@ -11,7 +7,7 @@ int main(int argc,char **argv){
|
||||||
//Create a application and run
|
//Create a application and run
|
||||||
auto app=Gtk::Application::create(argc,argv,"org.gtk.daleclack");
|
auto app=Gtk::Application::create(argc,argv,"org.gtk.daleclack");
|
||||||
auto window=MyWin::create();
|
auto window=MyWin::create();
|
||||||
window->signal_hide().connect(sigc::bind(sigc::ptr_fun(on_hide),window));
|
window->signal_hide().connect(sigc::bind(sigc::ptr_fun(on_hide_window),window));
|
||||||
|
|
||||||
return app->run(*window);
|
return app->run(*window);
|
||||||
}
|
}
|
Loading…
Reference in New Issue