Added logout dialog, confirmation is now binded to Enter key.

This commit is contained in:
Sanel Zukan 2014-06-20 09:29:18 +00:00
parent 7ebc86ca41
commit a735fa7e84
2 changed files with 4 additions and 2 deletions

View File

@ -27,6 +27,8 @@
#include <edelib/Nls.h> #include <edelib/Nls.h>
#include <edelib/Run.h> #include <edelib/Run.h>
#include <FL/Fl.H>
#if EDELIB_HAVE_DBUS #if EDELIB_HAVE_DBUS
#include <edelib/EdbusMessage.h> #include <edelib/EdbusMessage.h>
#include <edelib/EdbusConnection.h> #include <edelib/EdbusConnection.h>

View File

@ -11,7 +11,7 @@
*/ */
#include <FL/Fl_Box.H> #include <FL/Fl_Box.H>
#include <FL/Fl_Button.H> #include <FL/Fl_Return_Button.H>
#include <FL/Fl_Choice.H> #include <FL/Fl_Choice.H>
#include <FL/Fl.H> #include <FL/Fl.H>
#include <edelib/Window.h> #include <edelib/Window.h>
@ -78,7 +78,7 @@ int logout_dialog_show(int screen_w, int screen_h, int opt) {
c->value(0); c->value(0);
description->label(logout_options[0].opt_long); description->label(logout_options[0].opt_long);
Fl_Button* ok = new Fl_Button(140, 145, 90, 25, _("&OK")); Fl_Return_Button* ok = new Fl_Return_Button(140, 145, 90, 25, _("&OK"));
ok->callback(ok_cb, c); ok->callback(ok_cb, c);
Fl_Button* cancel = new Fl_Button(235, 145, 90, 25, _("&Cancel")); Fl_Button* cancel = new Fl_Button(235, 145, 90, 25, _("&Cancel"));
cancel->callback(cancel_cb); cancel->callback(cancel_cb);