Hello community,

here is the log from the commit of package ksirk for openSUSE:Factory checked 
in at 2014-01-27 11:18:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ksirk (Old)
 and      /work/SRC/openSUSE:Factory/.ksirk.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ksirk"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ksirk/ksirk.changes      2013-12-19 
13:19:14.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ksirk.new/ksirk.changes 2014-01-27 
11:18:20.000000000 +0100
@@ -1,0 +2,7 @@
+Sat Jan 11 16:02:48 UTC 2014 - tittiatc...@gmail.com
+
+- Update to 4.12.1
+   * KDE 4.12.1  release
+   * See http://www.kde.org/announcements/announce-4.12.1.php
+
+-------------------------------------------------------------------

Old:
----
  ksirk-4.12.0.tar.xz

New:
----
  ksirk-4.12.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ksirk.spec ++++++
--- /var/tmp/diff_new_pack.hNp2G8/_old  2014-01-27 11:18:21.000000000 +0100
+++ /var/tmp/diff_new_pack.hNp2G8/_new  2014-01-27 11:18:21.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package ksirk
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -21,7 +21,7 @@
 License:        GPL-2.0+ and LGPL-2.0+
 Group:          Amusements/Games/Strategy/Turn Based
 Url:            http://www.kde.org
-Version:        4.12.0
+Version:        4.12.1
 Release:        0
 Source0:        ksirk-%{version}.tar.xz
 BuildRequires:  libkdegames-devel

++++++ ksirk-4.12.0.tar.xz -> ksirk-4.12.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksirk-4.12.0/ksirk/GameLogic/gameautomaton.cpp 
new/ksirk-4.12.1/ksirk/GameLogic/gameautomaton.cpp
--- old/ksirk-4.12.0/ksirk/GameLogic/gameautomaton.cpp  2013-10-20 
12:48:30.000000000 +0200
+++ new/ksirk-4.12.1/ksirk/GameLogic/gameautomaton.cpp  2014-01-07 
18:11:06.000000000 +0100
@@ -220,6 +220,7 @@
   kDebug() << "new state (id=" << state << ") is " << GameStateNames[state] << 
endl;
   m_state = state;
   m_game->setSaveGameActionEnabled(m_state == WAIT);
+  m_game->setContextualHelpActionEnabled(m_state, currentPlayer() && 
currentPlayer()->isAI());
   QByteArray buffer;
   QDataStream stream(&buffer, QIODevice::WriteOnly);
   stream << state;
@@ -1839,10 +1840,11 @@
     
((GameLogic::Player*)(*it))->incrNbCountries(distributedCountriesNumberMap[(*it)->
 name()]);
   }
 //   kDebug() << "All countries are now distributed." << endl;
-  QString nextPlayerName = (*playerList()->begin())-> name();
+  m_game->setCurrentPlayerToFirst();
+  QString nextPlayerName = currentPlayer()->name();
   QByteArray buffer;
   QDataStream stream(&buffer, QIODevice::WriteOnly);
-  stream << 
(quint32)((GameLogic::Player*)(*playerList()->begin()))->getNbAvailArmies();
+  stream << 
(quint32)((GameLogic::Player*)(currentPlayer()))->getNbAvailArmies();
 //   kDebug() << "  Setting status " << nextPlayerName << " / " << 
m_game->availArmies() << endl;
   QPixmap pm = playerNamed(nextPlayerName)->getFlag()->image(0);
   KMessageParts messageParts;
@@ -2258,6 +2260,7 @@
         {
           kDebug() << "at " <<  __FILE__ << ", line " << __LINE__ << ", 
setting state to " << newState << endl;
           state(GameState(newState));
+          m_game->slotContextualHelp();
         }
       }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksirk-4.12.0/ksirk/kgamewin.cpp 
new/ksirk-4.12.1/ksirk/kgamewin.cpp
--- old/ksirk-4.12.0/ksirk/kgamewin.cpp 2013-10-20 12:48:30.000000000 +0200
+++ new/ksirk-4.12.1/ksirk/kgamewin.cpp 2014-01-07 18:11:06.000000000 +0100
@@ -439,18 +439,19 @@
   kDebug() << "Adding action game_goal";
   actionCollection()->addAction("game_goal", m_goalAction);
   
-  KAction* contextualHelpAction = new KAction(KIcon(),
+  m_contextualHelpAction = new KAction(KIcon(),
         i18n("Contextual Help"), this);
-  contextualHelpAction->setShortcut(Qt::CTRL+Qt::Key_F1);
-  
connect(contextualHelpAction,SIGNAL(triggered(bool)),this,SLOT(slotContextualHelp()));
-  actionCollection()->addAction("help_contextual", contextualHelpAction);
+  m_contextualHelpAction->setEnabled(false);
+  m_contextualHelpAction->setShortcut(Qt::CTRL+Qt::Key_F1);
+  
connect(m_contextualHelpAction,SIGNAL(triggered(bool)),this,SLOT(slotContextualHelp()));
+  actionCollection()->addAction("help_contextual", m_contextualHelpAction);
 
 
   QString nextPlayerActionImageFileName = 
KGlobal::dirs()->findResource("appdata", m_automaton->skin() + '/' + 
CM_NEXTPLAYER);
   m_nextPlayerAction =  new KAction(KIcon(nextPlayerActionImageFileName),
         i18n("Next Player"), this);
   connect(m_nextPlayerAction, SIGNAL(triggered(bool)), this, 
SLOT(slotNextPlayer()));
-  contextualHelpAction->setStatusTip(i18n("Lets the next player play"));
+  m_contextualHelpAction->setStatusTip(i18n("Lets the next player play"));
   m_nextPlayerAction->setEnabled(false);
   actionCollection()->addAction("game_nextplayer", m_nextPlayerAction);
 
@@ -2222,7 +2223,9 @@
                 << " at " << __FILE__ << ", line " << __LINE__;
               m_automaton->sendMessage(buffer2,DisplayRecycleDetails);
             }
-            return setCurrentPlayerToNext();
+            int ret = setCurrentPlayerToNext();
+            setContextualHelpActionEnabled(getState(), currentPlayer() && 
currentPlayer()->isAI());
+            return ret;
           }
           else
           {
@@ -2338,7 +2341,6 @@
     }
     else if (currentPlayer() && !currentPlayer()->isVirtual())
     {
-      slotContextualHelp();
       m_nextPlayerAction->setEnabled(true);
     }
     else
@@ -3120,6 +3122,15 @@
   m_saveGameAction->setEnabled(value);
 }
 
+void 
KGameWindow::setContextualHelpActionEnabled(GameLogic::GameAutomaton::GameState 
gameState, bool isPlayerAI)
+{
+  kDebug() << isPlayerAI << gameState;
+  bool enabled = (gameState == GameLogic::GameAutomaton::WAIT || gameState == 
GameLogic::GameAutomaton::NEWARMIES || gameState == 
GameLogic::GameAutomaton::INTERLUDE) &&
+                 !isPlayerAI &&
+                 KsirkSettings::helpEnabled();
+  m_contextualHelpAction->setEnabled(enabled);
+}
+
 void KGameWindow::setupPopupMessage()
 {
   if (m_message == 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksirk-4.12.0/ksirk/kgamewin.h 
new/ksirk-4.12.1/ksirk/kgamewin.h
--- old/ksirk-4.12.0/ksirk/kgamewin.h   2013-10-20 12:48:30.000000000 +0200
+++ new/ksirk-4.12.1/ksirk/kgamewin.h   2014-01-07 18:11:06.000000000 +0100
@@ -610,6 +610,7 @@
 
   void setNextPlayerActionEnabled(bool value);
   void setSaveGameActionEnabled(bool value);
+  void setContextualHelpActionEnabled(GameLogic::GameAutomaton::GameState 
gameState, bool isPlayerAI);
 
   void updateScrollArrows();
 
@@ -738,6 +739,7 @@
   void slotDumpGameInformations();
   void slotFinishMoves();
   void slotArena(bool);
+  void slotContextualHelp();
   //@}
 
   /**
@@ -809,8 +811,6 @@
 
   void slotRemoveMessage();
 
-  void slotContextualHelp();
-
   void slotDisableHelp(const QString &);
 
   void slotArmiesNumberChanged(int);
@@ -1097,6 +1097,7 @@
   KAction* m_saveGameAction;
   KAction* m_zoomInAction;
   KAction* m_zoomOutAction;
+  KAction* m_contextualHelpAction;
 
   Sprites::ArrowSprite* m_uparrow;
   Sprites::ArrowSprite* m_downarrow;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/ksirk-4.12.0/ksirk/kgamewinslots.cpp 
new/ksirk-4.12.1/ksirk/kgamewinslots.cpp
--- old/ksirk-4.12.0/ksirk/kgamewinslots.cpp    2013-10-20 12:48:30.000000000 
+0200
+++ new/ksirk-4.12.1/ksirk/kgamewinslots.cpp    2014-01-07 18:11:06.000000000 
+0100
@@ -815,7 +815,11 @@
   {
     case GameLogic::GameAutomaton::WAIT:
       showMessage(i18n("Attack by drag & drop between countries<br>Move armies 
the same way (last action of a turn)."), 5);
-    break;
+      break;
+    case GameLogic::GameAutomaton::NEWARMIES:
+    case GameLogic::GameAutomaton::INTERLUDE:
+      showMessage(i18n("Now, place your armies in your countries<br>by 
clicking in the target countries."));
+      break;
     default:;
   }
 }

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to