yalong
unread,May 22, 2009, 10:42:23 PM5/22/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gmche...@googlegroups.com
hi,
check below.. any suggestion? :)
thanks, Yalong
Index: src/MainWindow.cc
===================================================================
--- src/MainWindow.cc (版本 147)
+++ src/MainWindow.cc (工作副本)
@@ -677,6 +677,30 @@
void MainWindow::on_lose_game()
{
+ if(board->is_filght_to_robot()){
+ Gtk::MessageDialog dialog(*this, _("end game"), false,
+ Gtk::MESSAGE_QUESTION,
+ Gtk::BUTTONS_OK_CANCEL);
+ Glib::ustring msg =_("Will you end this game?");
+ dialog.set_secondary_text(msg);
+ int result = dialog.run();
+ switch (result) {
+ case (Gtk::RESPONSE_OK): {
+ m_refTreeModel->clear();
+ board->free_game();
+ change_status();
+ break;
+ }
+ case (Gtk::RESPONSE_CANCEL): {
+ break;
+ }
+
+ default: {
+ break;
+ }
+ }
+ return;
+ }
}