Debian packaging fixes for icons and files
authorSakari Poussa <sakari.poussa@nokia.com>
Sun, 25 Oct 2009 20:54:18 +0000 (22:54 +0200)
committerSakari Poussa <sakari.poussa@nokia.com>
Sun, 25 Oct 2009 20:54:18 +0000 (22:54 +0200)
Directory handling fixes for using the SD card if present

TODO
scorecard.pro
src/main-window.cpp

diff --git a/TODO b/TODO
index a05f84e..dd34367 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,12 +6,16 @@ TODO General:
 - New score - first entry does not update
   - Seems to be bug in the Qt/Maemo
 - Date picker button (widget is missing)
+- Use syslog
+- If no data files, the hole numbers are missing from main-window
 
 TODO Hildon 2.2
 - Replace LineEdit w/ HildonEntry
+- Use info dialogs and system banners
+
+TODO Debian packaging
+- don't install club.xml if it has been modified
+- install data to SD card if present
  
 TODO Arch
 - move scorelist (and all data handling) to table-model 
-
-Know issues
-  - Data on MMC does not work
index 830f8a3..ee9ab08 100644 (file)
@@ -40,7 +40,7 @@ unix {
     PREFIX = /opt/scorecard
     BINDIR = $$PREFIX/bin
     DATADIR = $$PREFIX/data
-    IMGDIR = $$PREFIX/images
+    IMGDIR = /usr/share/icons/hicolor
     MAEMODIR = /usr/share/applications/hildon
 
     DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
@@ -52,21 +52,20 @@ unix {
 
     data.path = $$DATADIR
     data.files += data/club.xml
-    data.files += data/score.xml
 
     desktop.path = $$MAEMODIR
     desktop.files += maemo/scorecard.desktop
 
-    iconxpm.path = $$IMGDIR/pixmap
+    iconxpm.path = /usr/share/pixmap
     iconxpm.files += images/scorecard.xpm 
 
-    icon26.path = $$IMGDIR/icons/hicolor/26x26/apps
+    icon26.path = $$IMGDIR/26x26/apps
     icon26.files += images/scorecard_icon_26x26.png 
 
-    icon40.path = $$IMGADIR/icons/hicolor/40x40/apps
+    icon40.path = $$IMGADIR/40x40/apps
     icon40.files += images/scorecard_icon_40x40.png 
 
-    icon64.path = $$IMGDIR/icons/hicolor/64x64/apps
+    icon64.path = $$IMGDIR/64x64/apps
     icon64.files += images/scorecard_icon_64x64.png 
     
 }
index 101b335..e54f1fd 100644 (file)
@@ -12,9 +12,9 @@
 #include "xml-dom-parser.h"
 
 QString appName("scorecard");
-QString topDir("/opt/scorecard");
-QString mmcDir("/media/mmc1/scorecard");
-QString dataDirName("/data/");
+QString topDir("/opt");
+QString mmcDir("/media/mmc1");
+QString dataDirName("data");
 QString dataDir;
 QString imgDir(topDir + "/pixmaps");
 QString scoreFileName("score.xml");
@@ -67,18 +67,17 @@ void MainWindow::loadSettings(void)
     external = true;
 
   if (external) {
-    dataDir = mmcDir + dataDirName;
+    dataDir = mmcDir + "/" + appName + "/" + dataDirName;
   }
   else {
-    dataDir = topDir + dataDirName;
+    dataDir = topDir + "/" + appName + "/" + dataDirName;
   }
-  scoreFile = dataDir + scoreFileName;
-  clubFile = dataDir + clubFileName;
+  scoreFile = dataDir + "/" + scoreFileName;
+  clubFile = dataDir + "/" + clubFileName;
 
   QDir dir(dataDir);
   if (!dir.exists())
-    if (!dir.mkdir(dataDir)) {
-      // TODO: mkdir does not work...
+    if (!dir.mkpath(dataDir)) {
       qDebug() << "Unable to create: " + dataDir;
       return;
     }