Author: mir3x
Date: Thu Jul 28 12:33:38 2016
New Revision: 33348

URL: http://svn.gna.org/viewcvs/freeciv?rev=33348&view=rev
Log:
Qt client - open diplomacy window on right clicking diplomacy message

See patch #7505


Modified:
    trunk/client/gui-qt/messagewin.cpp

Modified: trunk/client/gui-qt/messagewin.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/messagewin.cpp?rev=33348&r1=33347&r2=33348&view=diff
==============================================================================
--- trunk/client/gui-qt/messagewin.cpp  (original)
+++ trunk/client/gui-qt/messagewin.cpp  Thu Jul 28 12:33:38 2016
@@ -235,7 +235,7 @@
                                const QItemSelection &ds)
 {
   const struct message *pmsg;
-  int i;
+  int i, j;
   QFont f;
   QModelIndex index;
   QModelIndexList indexes = sl.indexes();
@@ -262,6 +262,11 @@
     if (QApplication::mouseButtons() == Qt::RightButton && pmsg->city_ok) {
       meswin_popup_city(i);
     }
+    if (QApplication::mouseButtons() == Qt::RightButton
+        && pmsg->event == E_DIPLOMACY) {
+      j = gui()->gimme_index_of("DDI");
+      gui()->game_tab_widget->setCurrentIndex(j);
+    }
   }
   mesg_table->clearSelection();
 }


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to