Code

enable Enter to activate filedialogs
authorbuliabyak <buliabyak@users.sourceforge.net>
Sat, 18 Nov 2006 00:36:01 +0000 (00:36 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sat, 18 Nov 2006 00:36:01 +0000 (00:36 +0000)
src/ui/dialog/filedialog.cpp

index 78f6efaf8ecf3fd4e6545d1b480589f906425426..4d796ff9bb7bb61dabae0f3556b4195396e3cc47 100644 (file)
@@ -913,7 +913,7 @@ FileOpenDialogImpl::FileOpenDialogImpl(const Glib::ustring &dir,
          sigc::mem_fun(*this, &FileOpenDialogImpl::updatePreviewCallback) );
 
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
-    add_button(Gtk::Stock::OPEN,   Gtk::RESPONSE_OK);
+    set_default(*add_button(Gtk::Stock::OPEN,   Gtk::RESPONSE_OK));
 
 }
 
@@ -1333,7 +1333,7 @@ FileSaveDialogImpl::FileSaveDialogImpl(const Glib::ustring &dir,
     //    checkbox.set_sensitive(FALSE);
 
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
-    add_button(Gtk::Stock::SAVE,   Gtk::RESPONSE_OK);
+    set_default(*add_button(Gtk::Stock::SAVE,   Gtk::RESPONSE_OK));
 
     show_all_children();
 }
@@ -1978,7 +1978,7 @@ FileExportDialogImpl::FileExportDialogImpl(const Glib::ustring &dir,
     //    checkbox.set_sensitive(FALSE);
 
     add_button(Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL);
-    add_button(Gtk::Stock::SAVE,   Gtk::RESPONSE_OK);
+    set_default(*add_button(Gtk::Stock::SAVE,   Gtk::RESPONSE_OK));
 
     show_all_children();
 }