Hello community,
here is the log from the commit of package kdegames3 for openSUSE:Factory checked in at 2012-03-02 13:48:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdegames3 (Old)
and /work/SRC/openSUSE:Factory/.kdegames3.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdegames3", Maintainer is "kde-maintainers@suse.de"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kdegames3/kdegames3.changes 2011-09-23 02:06:08.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kdegames3.new/kdegames3.changes 2012-03-02 13:48:18.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Mar 1 21:09:25 UTC 2012 - anixx@opensuse.org
+
+- fix katomic highscores display
+
+-------------------------------------------------------------------
New:
----
kdegames-trinity-fix-highscore.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kdegames3.spec ++++++
--- /var/tmp/diff_new_pack.7g7LRB/_old 2012-03-02 13:48:20.000000000 +0100
+++ /var/tmp/diff_new_pack.7g7LRB/_new 2012-03-02 13:48:20.000000000 +0100
@@ -13,10 +13,6 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
-#
-
-# norootforbuild
-
Name: kdegames3
BuildRequires: kdelibs3-devel
@@ -36,6 +32,7 @@
Url: http://www.kde.org
Source: kdegames-%{version}.tar.bz2
Patch0: 3_5_BRANCH.diff
+Patch1: kdegames-trinity-fix-highscore.diff
%description
The base libraries for kdegames as well as the games Solitaire and
@@ -43,12 +40,6 @@
kdegames3-arcade kdegames3-board kdegames3-card kdegames3-tactic
-
-
-Authors:
---------
- The KDE Team
-
%package arcade
License: GPL-2.0+
# usesubdirs kasteroids ksirtet ksmiletris ksnake kspaceduel ktron kbounce ktuberling kolf kfouleggs
@@ -60,12 +51,6 @@
Several arcade style games. Hunting asteroids, the famous Tetris, and
Tron are just an example of what is included.
-
-
-Authors:
---------
- The KDE Team
-
%package board
License: GPL-2.0+
# usesubdirs atlantik kbackgammon kbattleship kblackbox kenolaba kmahjongg kreversi kshisen kwin4 klickety
@@ -77,12 +62,6 @@
%description board
Board games like Backgammon, battleship, Mahjongg, and 4 wins.
-
-
-Authors:
---------
- The KDE Team
-
%package card
License: GPL-2.0+
# usesubdirs megami kpoker lskat
@@ -93,12 +72,6 @@
%description card
Card games for KDE. Poker and Skat.
-
-
-Authors:
---------
- The KDE Team
-
%package tactic
License: GPL-2.0 and GPL-2.0+
# usesubdirs katomic kjumpingcube klines konquest ksame ksokoban
@@ -110,12 +83,6 @@
Famous games for the time you should spend working: Sokoban, Same, and
more.
-
-
-Authors:
---------
- The KDE Team
-
%package devel
License: GPL-2.0+
Summary: Games for KDE: Build Environment
@@ -129,15 +96,10 @@
This package contains all necessary include files needed to develop
applications that require these.
-
-
-Authors:
---------
- The KDE Team
-
%prep
%setup -n kdegames-%{version} -q
%patch0
+%patch1 -p1
. /etc/opt/kde3/common_options
update_admin
++++++ kdegames-trinity-fix-highscore.diff ++++++
commit 18b5622af48967838240687fc54ff937acaae903
Author: tpearson
Date: 1260832269 +0000
Fix high scores display
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1062508 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
diff --git a/katomic/gamewidget.cpp b/katomic/gamewidget.cpp
index fc6838a..165e55c 100644
--- a/katomic/gamewidget.cpp
+++ b/katomic/gamewidget.cpp
@@ -116,6 +116,25 @@ void GameWidget::getMoves(int moves)
ys->setText(current);
}
+void GameWidget::mergeHighScores(int l)
+{
+ KConfigGroup oldConfig(kapp->config(), QString("High Scores Level %1").arg(l).utf8());
+ KConfigGroup newConfig(kapp->config(), QString("Highscores Level %1").arg(l).utf8());
+
+ newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer"));
+
+ QString num;
+ for (int i = 1; i <= 10; ++i)
+ {
+ num.setNum(i);
+ QString key = "Pos" + num + "Name";
+ newConfig.writeEntry(key, oldConfig.readEntry(key, "-"));
+ key = "Pos" + num + "Score";
+ newConfig.writeEntry(key, oldConfig.readEntry(key, "-"));
+ }
+ kapp->config()->sync();
+}
+
void GameWidget::updateLevel (int l)
{
level=l;
@@ -128,7 +147,11 @@ void GameWidget::updateLevel (int l)
cfg.setGroup("Level");
feld->load(cfg);
- highScore->setConfigGroup(QString("High Scores Level %1").arg(level));
+ if (!kapp->config()->hasGroup(QString("Highscores Level %1").arg(level)) &&
+ kapp->config()->hasGroup(QString("High Scores Level %1").arg(level)))
+ mergeHighScores(level);
+
+ highScore->setConfigGroup(QString("Highscores Level %1").arg(level));
highest.setNum(highScore->highScore());
if (highest != "0" ) hs->setText(highest);
diff --git a/katomic/gamewidget.h b/katomic/gamewidget.h
index 6259e6b..00e9537 100644
--- a/katomic/gamewidget.h
+++ b/katomic/gamewidget.h
@@ -28,6 +28,9 @@ class GameWidget : public QWidget
// bringt level auf neuesten stand
void updateLevel (int);
+ // copy highscores from "High Scores" key to "Highscores" key
+ void mergeHighScores(int l);
+
// restart current level
void restartLevel();
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org