Hello community, here is the log from the commit of package blinken for openSUSE:Factory checked in at 2012-01-31 10:19:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/blinken (Old) and /work/SRC/openSUSE:Factory/.blinken.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "blinken", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/blinken/blinken.changes 2011-12-08 11:56:12.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.blinken.new/blinken.changes 2012-01-31 10:19:23.000000000 +0100 @@ -1,0 +2,16 @@ +Wed Jan 18 20:55:53 CET 2012 - [email protected] + +- update to 4.8.0 + * first stable release of KDE 4.8 (only critical fixes over 4.7.98) + * see http://kde.org/announcements/4.8/ for details + + +------------------------------------------------------------------- +Tue Jan 10 16:31:37 CET 2012 - [email protected] + +- update to 4.7.98 + * RC2+ milestone release of KDE 4.8 + * see http://kde.org/announcements/4.8/ for details + + +------------------------------------------------------------------- Old: ---- blinken-4.7.4.tar.bz2 New: ---- blinken-4.8.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ blinken.spec ++++++ --- /var/tmp/diff_new_pack.nmGmvL/_old 2012-01-31 10:19:24.000000000 +0100 +++ /var/tmp/diff_new_pack.nmGmvL/_new 2012-01-31 10:19:24.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package blinken # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 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 @@ -25,7 +25,7 @@ BuildRequires: ocaml BuildRequires: ocaml-facile %endif -Version: 4.7.4 +Version: 4.8.0 Release: 0 Summary: Simon Says Game License: GPL-2.0+ ++++++ blinken-4.7.4.tar.bz2 -> blinken-4.8.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/CMakeLists.txt new/blinken-4.8.0/CMakeLists.txt --- old/blinken-4.7.4/CMakeLists.txt 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/CMakeLists.txt 2011-07-27 20:37:45.000000000 +0200 @@ -5,6 +5,7 @@ include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) set(CMAKE_MODULE_PATH ${blinken_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH}) +add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS) add_subdirectory( doc ) add_subdirectory( src ) Files old/blinken-4.7.4/doc/index.cache.bz2 and new/blinken-4.8.0/doc/index.cache.bz2 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/blinken.cpp new/blinken-4.8.0/src/blinken.cpp --- old/blinken-4.7.4/src/blinken.cpp 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/blinken.cpp 2011-11-04 15:33:48.000000000 +0100 @@ -42,7 +42,7 @@ static const double nonButtonRibbonX = 150.0; static const double nonButtonRibbonY = 125.0; -blinken::blinken() : KMainWindow(), m_overHighscore(false), m_overQuit(false), m_overCentralText(false), m_overMenu(false), m_overAboutKDE(false), m_overAboutBlinken(false), m_overSettings(false), m_overManual(false), m_overCentralLetters(false), m_overCounter(false), m_overFont(false), m_overSound(false), m_showPreferences(false), m_updateButtonHighlighting(false), m_highlighted(blinkenGame::none) +blinken::blinken() : m_overHighscore(false), m_overQuit(false), m_overCentralText(false), m_overMenu(false), m_overAboutKDE(false), m_overAboutBlinken(false), m_overSettings(false), m_overManual(false), m_overCentralLetters(false), m_overCounter(false), m_overFont(false), m_overSound(false), m_showPreferences(false), m_updateButtonHighlighting(false), m_highlighted(blinkenGame::none) { m_renderer = new QSvgRenderer(KStandardDirs::locate("appdata", "images/blinken.svg")); @@ -393,7 +393,7 @@ blinkenSettings::self()->writeConfig(); update(); } - else if (m_overQuit) close(); + else if (m_overQuit) qApp->quit(); else if (m_overAboutBlinken || m_overCentralLetters) m_helpMenu -> aboutApplication(); else if (m_overAboutKDE) m_helpMenu -> aboutKDE(); else if (m_overSettings) togglePreferences(); @@ -440,16 +440,17 @@ void blinken::checkHS() { - highScoreDialog *hsd = new highScoreDialog(this, m_renderer); - if (hsd->scoreGoodEnough(m_game.level(), m_game.score())) + highScoreManager hsm; + if (hsm.scoreGoodEnough(m_game.level(), m_game.score())) { bool ok; QString name = KInputDialog::getText(i18n("Enter Your Name"), i18nc("@label:textbox refers to the user's name", "Name:"), m_lastName, &ok); if (!name.isNull() && ok) { m_lastName = name; - hsd->addScore(m_game.level(), m_game.score(), name); + hsm.addScore(m_game.level(), m_game.score(), name); } + highScoreDialog *hsd = new highScoreDialog(this, m_renderer); hsd->showLevel(m_game.level()); } } @@ -612,8 +613,14 @@ p.resetMatrix(); p.translate( (double)width() / 50.875, (double)height() / 30); p.scale(xScaleSquareButtons, yScaleSquareButtons); - if (m_overHighscore) m_renderer->render(&p, "highscore_hover"); - else m_renderer->render(&p, "highscore_normal"); + if (m_overHighscore) + { + m_renderer->render(&p, "highscore_hover"); + } + else + { + m_renderer->render(&p, "highscore_normal"); + } m_highscoreRect = QRect(qRound((double)width() / 50.875), qRound((double)height() / 30.0), qRound((double)width() * xScaleSquareButtons), @@ -623,8 +630,14 @@ p.resetMatrix(); p.translate( (double)width() / 1.15, (double)height() / 30.0); p.scale(xScaleSquareButtons, yScaleSquareButtons); - if (m_overQuit) m_renderer->render(&p, "quit_hover"); - else m_renderer->render(&p, "quit_normal"); + if (m_overQuit) + { + m_renderer->render(&p, "quit_hover"); + } + else + { + m_renderer->render(&p, "quit_normal"); + } m_quitRect = QRect(qRound((double)width() / 1.15), qRound((double)height() / 30.0), qRound((double)width() * xScaleSquareButtons), @@ -764,30 +777,72 @@ break; case blinkenGame::waiting3: - if (m_overCentralText) text = restartText; - else text = i18n("Next sequence in 3..."); + if (m_overCentralText) + { + text = restartText; + } + else + { + text = i18n("Next sequence in 3..."); + } break; case blinkenGame::waiting2: - if (m_overCentralText) text = restartText; - else if (m_game.level() == 1) text = i18n("Next sequence in 3, 2..."); - else text = i18n("Next sequence in 2..."); + if (m_overCentralText) + { + text = restartText; + } + else + { + if (m_game.level() == 1) + { + text = i18n("Next sequence in 3, 2..."); + } + else + { + text = i18n("Next sequence in 2..."); + } + } break; case blinkenGame::waiting1: - if (m_overCentralText) text = restartText; - else if (m_game.level() == 1) text = i18n("Next sequence in 3, 2, 1..."); - else text = i18n("Next sequence in 2, 1..."); + if (m_overCentralText) + { + text = restartText; + } + else + { + if (m_game.level() == 1) + { + text = i18n("Next sequence in 3, 2, 1..."); + } + else + { + text = i18n("Next sequence in 2, 1..."); + } + } break; case blinkenGame::learningTheSequence: - if (m_overCentralText) text = restartText; - else text = i18n("Remember this sequence..."); + if (m_overCentralText) + { + text = restartText; + } + else + { + text = i18n("Remember this sequence..."); + } break; case blinkenGame::typingTheSequence: - if (m_overCentralText) text = restartText; - else text = i18n("Repeat the sequence"); + if (m_overCentralText) + { + text = restartText; + } + else + { + text = i18n("Repeat the sequence"); + } break; } } @@ -847,8 +902,14 @@ p.drawRoundRect(r, 15, 15); } - if (!highlight) p.setPen(m_fontColor); - else p.setPen(m_fontHighlightColor); + if (highlight) + { + p.setPen(m_fontHighlightColor); + } + else + { + p.setPen(m_fontColor); + } p.drawText(r, Qt::AlignCenter, text); if (rect) *rect = p.worldMatrix().mapRect(r); @@ -1081,4 +1142,3 @@ return it.value(); } -#include "blinken.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/blinken.desktop new/blinken-4.8.0/src/blinken.desktop --- old/blinken-4.7.4/src/blinken.desktop 2011-10-28 09:43:02.000000000 +0200 +++ new/blinken-4.8.0/src/blinken.desktop 2011-11-04 15:33:48.000000000 +0100 @@ -1,6 +1,7 @@ [Desktop Entry] Name=Blinken Name[ast]=Blinken +Name[bg]=Blinken Name[bs]=Blinken Name[ca]=Blinken Name[ca@valencia]=Blinken @@ -54,6 +55,7 @@ Name[zh_TW]=記憶_BlinKen GenericName=Memory Enhancement Game GenericName[ast]=Xuegu p'ameyorar la memoria +GenericName[bg]=Игра за упражнение на паметта GenericName[bs]=Igra za poboljšanje pamćenja GenericName[ca]=Un Joc per Millorar la Memòria GenericName[ca@valencia]=Un Joc per Millorar la Memòria diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/blinkengame.cpp new/blinken-4.8.0/src/blinkengame.cpp --- old/blinken-4.7.4/src/blinkengame.cpp 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/blinkengame.cpp 2011-11-04 15:33:48.000000000 +0100 @@ -179,4 +179,3 @@ return c; } -#include "blinkengame.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/highscoredialog.cpp new/blinken-4.8.0/src/highscoredialog.cpp --- old/blinken-4.7.4/src/highscoredialog.cpp 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/highscoredialog.cpp 2011-11-04 15:33:48.000000000 +0100 @@ -26,6 +26,8 @@ static const int smallMargin = 5; static const int namesFontSize = 25; +static QSet<highScoreManager *> s_allHSM; + /* scoresWidget */ class scoresWidget : public QWidget @@ -38,7 +40,7 @@ void paintEvent(QPaintEvent *); private: - const QList< QPair<int, QString> > &m_scores; + const QList< QPair<int, QString> > m_scores; QSvgRenderer *m_renderer; }; @@ -140,21 +142,43 @@ m_tw = new myTabWidget(this); setMainWidget(m_tw); - for (int i = 1; i <= 3; i++) + highScoreManager hsm; + + m_tw -> addTab(new scoresWidget(0, hsm.scores(0), renderer), i18nc("@title:group High scores Level 1 tab title", "Level 1")); + m_tw -> addTab(new scoresWidget(0, hsm.scores(1), renderer), i18nc("@title:group High scores Level 2 tab title", "Level 2")); + m_tw -> addTab(new scoresWidget(0, hsm.scores(2), renderer), i18nc("@title:group High scores Level ? tab tible", "Level ?")); +} + +void highScoreDialog::showLevel(int level) +{ + QSize max, aux; + m_tw -> setCurrentIndex(level -1); + + for (int i = 0; i < 3; i++) { - KConfigGroup cfg(KGlobal::config(), QString("Level%1").arg(i)); - for (int j = 1; j <= 5; j++) - { - m_scores[i-1].append(qMakePair(cfg.readEntry(QString("Score%1").arg(j),QVariant(0)).toInt(),cfg.readEntry(QString("Name%1").arg(j),QString()))); - } + aux = static_cast<scoresWidget*>(m_tw -> widget(i)) -> calcSize(); + max = max.expandedTo(aux); } + if (max.width() < m_tw -> tabBarSizeHint().width() + 5) m_tw -> setMinimumSize(m_tw -> tabBarSizeHint().width() + 5, max.height() + m_tw -> tabBarSizeHint().height() + 5); - m_tw -> addTab(new scoresWidget(0, m_scores[0], renderer), i18nc("@title:group High scores Level 1 tab title", "Level 1")); - m_tw -> addTab(new scoresWidget(0, m_scores[1], renderer), i18nc("@title:group High scores Level 2 tab title", "Level 2")); - m_tw -> addTab(new scoresWidget(0, m_scores[2], renderer), i18nc("@title:group High scores Level ? tab tible", "Level ?")); + exec(); + delete this; +} + +/* highScoreManager */ + +highScoreManager::highScoreManager() +{ + s_allHSM << this; + update(); } -bool highScoreDialog::scoreGoodEnough(int level, int score) +highScoreManager::~highScoreManager() +{ + s_allHSM.remove(this); +} + +bool highScoreManager::scoreGoodEnough(int level, int score) { level--; QList< QPair<int, QString> >::iterator it, itEnd; @@ -165,7 +189,7 @@ return (it != itEnd); } -void highScoreDialog::addScore(int level, int score, const QString &name) +void highScoreManager::addScore(int level, int score, const QString &name) { level--; QList< QPair<int, QString> >::iterator it, itEnd; @@ -186,21 +210,44 @@ cfg.writeEntry(QString("Name%1").arg(j), (*it).second); } cfg.sync(); + + foreach(highScoreManager *hsm, s_allHSM) + { + if (hsm != this) + { + hsm->update(); + } + } } } -void highScoreDialog::showLevel(int level) +void highScoreManager::update() { - QSize max, aux; - m_tw -> setCurrentIndex(level -1); - - for (int i = 0; i < 3; i++) + for (int i = 0; i < 3; ++i) { - aux = static_cast<scoresWidget*>(m_tw -> widget(i)) -> calcSize(); - max = max.expandedTo(aux); + m_scores[i].clear(); } - if (max.width() < m_tw -> tabBarSizeHint().width() + 5) m_tw -> setMinimumSize(m_tw -> tabBarSizeHint().width() + 5, max.height() + m_tw -> tabBarSizeHint().height() + 5); - - exec(); - delete this; + for (int i = 1; i <= 3; i++) + { + KConfigGroup cfg(KGlobal::config(), QString("Level%1").arg(i)); + for (int j = 1; j <= 5; j++) + { + m_scores[i-1].append(qMakePair(cfg.readEntry(QString("Score%1").arg(j),QVariant(0)).toInt(),cfg.readEntry(QString("Name%1").arg(j),QString()))); + } + } +} + +QList< QPair<int, QString> > highScoreManager::scores(int level) const +{ + return m_scores[level]; +} + +int highScoreManager::score(int level, int position) const +{ + return m_scores[level][position].first; +} + +QString highScoreManager::name(int level, int position) const +{ + return m_scores[level][position].second; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/highscoredialog.h new/blinken-4.8.0/src/highscoredialog.h --- old/blinken-4.7.4/src/highscoredialog.h 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/highscoredialog.h 2011-11-04 15:33:48.000000000 +0100 @@ -24,12 +24,30 @@ public: highScoreDialog(QWidget *parent, QSvgRenderer *renderer); - bool scoreGoodEnough(int level, int score); - void addScore(int level, int score, const QString &name); void showLevel(int level); - QList< QPair<int, QString> > m_scores[3]; myTabWidget *m_tw; }; +class highScoreManager : public QObject +{ +Q_OBJECT + public: + highScoreManager(); + ~highScoreManager(); + + bool scoreGoodEnough(int level, int score); + void addScore(int level, int score, const QString &name); + + QList< QPair<int, QString> > scores(int level) const; + + Q_INVOKABLE int score(int level, int position) const; + Q_INVOKABLE QString name(int level, int position) const; + + private: + void update(); + + QList< QPair<int, QString> > m_scores[3]; +}; + #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/main.cpp new/blinken-4.8.0/src/main.cpp --- old/blinken-4.7.4/src/main.cpp 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/main.cpp 2012-01-18 19:49:06.000000000 +0100 @@ -12,7 +12,6 @@ #include <kaboutdata.h> #include <kcmdlineargs.h> #include <klocale.h> -#include <kprocess.h> #include <kstandarddirs.h> #include <kapplication.h> @@ -21,7 +20,7 @@ int main(int argc, char *argv[]) { - KAboutData about("blinken", 0, ki18n("Blinken"), "0.2", ki18n("A memory enhancement game"), KAboutData::License_GPL, ki18n("© 2005-2007 Albert Astals Cid\n© 2005-2007 Danny Allen")); + KAboutData about("blinken", 0, ki18n("Blinken"), "0.3", ki18n("A memory enhancement game"), KAboutData::License_GPL, ki18n("© 2005-2007 Albert Astals Cid\n© 2005-2007 Danny Allen")); about.addAuthor(ki18n("Albert Astals Cid"), ki18n("Coding"), "[email protected]"); about.addAuthor(ki18n("Danny Allen"), ki18n("Design, Graphics and Sounds"), "[email protected]"); about.addCredit(ki18n("Steve Jordi"), ki18n("GPL'ed his 'Steve' font so that we could use it"), "[email protected]"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/soundsplayer.cpp new/blinken-4.8.0/src/soundsplayer.cpp --- old/blinken-4.7.4/src/soundsplayer.cpp 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/soundsplayer.cpp 2011-11-04 15:33:48.000000000 +0100 @@ -13,7 +13,7 @@ #include <kstandarddirs.h> #include <kurl.h> -#include <Phonon/Path> +#include <phonon/Path> #include "settings.h" @@ -88,4 +88,3 @@ } } -#include "soundsplayer.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/blinken-4.7.4/src/soundsplayer.h new/blinken-4.8.0/src/soundsplayer.h --- old/blinken-4.7.4/src/soundsplayer.h 2011-10-02 15:23:35.000000000 +0200 +++ new/blinken-4.8.0/src/soundsplayer.h 2011-11-04 15:33:48.000000000 +0100 @@ -10,7 +10,7 @@ #ifndef SOUNDSPLAYER_H #define SOUNDSPLAYER_H -#include <Phonon/MediaObject> +#include <phonon/MediaObject> #include <phonon/audiooutput.h> #include <QList> -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
