]> granicus.if.org Git - nethack/commitdiff
Qt: Fix default dialog button
authorwarwick <warwick>
Mon, 4 Feb 2002 10:23:30 +0000 (10:23 +0000)
committerwarwick <warwick>
Mon, 4 Feb 2002 10:23:30 +0000 (10:23 +0000)
In Qt 3, default button is always set to something... it was set to "Cancel"
in this case - not a good thing when you are granted a wish :-(

win/Qt/qt_win.cpp

index cd7e48eee6350c80cda48bfa9dda66dbbb1f85a0..b10c8a932c6fb42427663cd644a237e543622521 100644 (file)
@@ -1297,6 +1297,7 @@ NetHackQtStringRequestor::NetHackQtStringRequestor(NetHackQtKeyBuffer& ks, const
     okay=new QPushButton("Okay",this);
     connect(okay,SIGNAL(clicked()),this,SLOT(accept()));
     connect(&input,SIGNAL(returnPressed()),this,SLOT(accept()));
+    okay->setDefault(TRUE);
 
     setFocusPolicy(StrongFocus);
 }
@@ -4437,6 +4438,7 @@ NetHackQtSavedGameSelector::NetHackQtSavedGameSelector(const char** saved) :
     connect(q, SIGNAL(clicked()), this, SLOT(reject()));
     QPushButton* c = new QPushButton("New Game",hb);
     connect(c, SIGNAL(clicked()), this, SLOT(accept()));
+    c->setDefault(TRUE);
 
     QButtonGroup* bg = new QButtonGroup(3, Horizontal, "Saved Characters",this);
     vbl->addWidget(bg);