From: Leandro Lucarella Date: Sun, 30 Nov 2003 00:59:20 +0000 (+0000) Subject: Hago que se desconecte el cliente antes de salir y agrego handler para el evento X-Git-Tag: svn_import~157 X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/commitdiff_plain/a0d48c665de2a880c7587063ea7d9bc8959430d0?ds=sidebyside Hago que se desconecte el cliente antes de salir y agrego handler para el evento delete_event para que tambien salga bien cuando lo mata el WM :) --- diff --git a/Client/include/principal.h b/Client/include/principal.h index e781d42..6984359 100644 --- a/Client/include/principal.h +++ b/Client/include/principal.h @@ -83,6 +83,7 @@ protected: virtual void on_btn_pause_clicked(); virtual bool on_item_clicked(GdkEventButton *, ViewItem *); virtual bool on_workplace_expose_event(GdkEventExpose *); + virtual bool on_delete_event(GdkEventAny *); // Callbacks para las conexiones void on_conexion_finished(); diff --git a/Client/src/principal.cpp b/Client/src/principal.cpp index 46ec40b..96093c1 100644 --- a/Client/src/principal.cpp +++ b/Client/src/principal.cpp @@ -173,9 +173,16 @@ void Principal::on_dlg_connect_ok() void Principal::on_mnu_file_exit() { + on_mnu_file_disconnect(); Gtk::Main::quit(); } +bool Principal::on_delete_event(GdkEventAny *e) +{ + on_mnu_file_exit(); + return false; +} + void Principal::on_btn_activar_clicked() { if ((conexion == NULL) || (last_selected == NULL)) return;