New version 0.1.0
authorLuciano Montanaro <mileima@cirulla.net>
Sun, 29 May 2011 17:10:04 +0000 (19:10 +0200)
committerLuciano Montanaro <mileima@cirulla.net>
Sun, 29 May 2011 17:10:04 +0000 (19:10 +0200)
Version number is taken from the application.pro file

application/app.cpp
application/app.h
application/application.pro
application/debian/changelog
application/main.cpp
application/stationview.cpp
quandoparte.pro

index 5245591..e5d6f3e 100644 (file)
@@ -41,7 +41,7 @@ App::App(QObject *parent) :
     stationListModel(new StationListModel(this)),
     stationListView(new StationListView(stationListModel, stationView))
 {
-    stationListModel->load("/opt/usr/share/apps/quandoparte/stations/stations.qpl");
+    stationListModel->load(dataDir() + "stations/stations.qpl");
 
     connect(stationListView, SIGNAL(stationSelected(const QString &)),
             SLOT(queryStation(const QString &)));
@@ -116,7 +116,7 @@ void App::showAboutDialog()
     QString version = QApplication::instance()->applicationVersion();
     QString aboutText = QString(
                 tr("<p>%1 version %2</p>"
-                   "<p>Copyright (c) 2010</p>"
+                   "<p>Copyright (c) 2010, 2011</p>"
                    "<p>Luciano Montanaro (mikelima@cirulla.net)</p>"
                    "<p>Licensed under the GNU Public License v2 or above</p>")).arg(name).arg(version);
     QMessageBox::about(stationView, name, aboutText);
@@ -152,3 +152,12 @@ void App::setShowingArrivals(bool showArrivals)
 {
     showingArrivals = showArrivals;
 }
+
+QString App::dataDir(void)
+{
+#ifdef Q_WS_MAEMO_5
+    return QString("/opt/usr/share/apps/quandoparte/");
+#else
+    return QString("/usr/share/apps/quandoparte/");
+#endif
+}
index 66383dc..666eaa3 100644 (file)
@@ -38,6 +38,8 @@ public:
     explicit App(QObject *parent = 0);
     ~App();
 
+    static QString dataDir(void);
+
 signals:
 
 public slots:
index bb05bcf..7d846d2 100644 (file)
@@ -4,10 +4,14 @@
 #
 #-------------------------------------------------
 
-QT += webkit network xml maemo5
+QT += webkit network maemo5
 
 TARGET = quandoparte
 TEMPLATE = app
+VERSION = 0.1.0
+
+VERSION_STRING = '\\"$${VERSION}\\"'
+DEFINES += QP_VERSION=\"$${VERSION_STRING}\"
 
 TRANSLATIONS = resources/i18n/quandoparte_it.ts
 
@@ -100,3 +104,9 @@ unix:!symbian {
     INSTALLS += i18n
     INSTALLS += stations
 }
+
+maemo5 {
+    desktopfile.files = $${TARGET}.desktop
+    desktopfile.path = /usr/share/applications/hildon
+    INSTALLS += desktopfile
+}
index 68abd23..b087619 100644 (file)
@@ -1,10 +1,7 @@
-quandoparte (0.0.2) unstable; urgency=low
+quandoparte (0.1.0) unstable; urgency=low
+  * Updated for new package version 2011-05-29 15:42:00 +0200
 
-  * Autohiding for Station List filter 2011-05-20 00:53:00 +0200
-  * Implemented Station List filtering 2011-05-19 01:49:13 +0200
-  * Added localization 2011-05-17 01:13:35 +0200
-  * Added download throbber to station list view 2011-05-16 22:55:37 +0200
-  * Implemented Arrival/Departures selection 2011-05-14 18:46:01 +0200
+quandoparte (0.0.2) unstable; urgency=low
   * Initial version 2011-05-08 23:04:26 +0200.
 
  -- Luciano Montanaro <mikelima@zaphod>  Sat, 20 Nov 2010 18:46:46 +0100
index 751ba5f..a80b695 100644 (file)
@@ -26,17 +26,21 @@ Boston, MA 02110-1301, USA.
 #include <QLocale>
 #include <QTranslator>
 
+#ifndef QP_VERSION
+#define QP_VERSION "0.0.2"
+#endif
+
 int main(int argc, char *argv[])
 {
     QApplication a(argc, argv);
     a.setApplicationName("QuandoParte");
     a.setOrganizationDomain("cirulla.net");
-    a.setApplicationVersion("0.0.2");
+    a.setApplicationVersion(QP_VERSION);
 
     QString locale = QLocale::system().name();
     QTranslator translator;
     if (translator.load(QString("quandoparte_") + locale,
-                        "/opt/usr/share/apps/quandoparte/i18n")) {
+                        App::dataDir() + "i18n")) {
         qDebug() << "Translation for locale" << locale << "loaded";
         a.installTranslator(&translator);
     } else {
index d085512..2f098a5 100644 (file)
@@ -140,18 +140,6 @@ void StationView::viewSelectionGroupTriggered(QAction *action)
 
 void StationView::updateCss(void)
 {
-    QByteArray styleSheet("data:text/css;charset=utf-8,base64,");
-    QByteArray styleSheetText = QByteArray(
-                "body {\n"
-                "-webkit-user-select: none ! important;\n"
-                "background-color: black ! important;\n"
-                "color: white ! important;}\n"
-                ".testata_red {visibility: hidden ! important;}\n"
-                "#footer {\n"
-                "visibility: hidden ! important;}\n");
-    styleSheet += styleSheetText.toBase64();
-    qDebug() << styleSheet;
-    //QUrl cssUrl = QUrl::fromEncoded(styleSheet);
     QUrl cssUrl;
 
     // XXX Maemo5 specific
index 80c03bc..3402df3 100644 (file)
@@ -1,4 +1,3 @@
 TEMPLATE = subdirs
 
-SUBDIRS = application \
-    test
+SUBDIRS = application