Small fixes to banner delays and daemon's startup parameters.
authoreshe <jessehakanen@gmail.com>
Fri, 28 May 2010 18:03:13 +0000 (19:03 +0100)
committereshe <jessehakanen@gmail.com>
Fri, 28 May 2010 18:03:13 +0000 (19:03 +0100)
src/daemon/calllistener.cpp
src/daemon/calllistener.h
src/daemon/data/event.d/jenirokd
src/daemon/main.cpp
src/gui/daemon.cpp

index 344b73b..061c83a 100644 (file)
@@ -119,7 +119,7 @@ void CallListener::search(Eniro::SearchDetails const& details)
 
         showDelayedResult(createResult(result.name,
                                  result.street,
-                                 result.city));
+                                 result.city), BANNER_DELAY);
     }
     else
     {
@@ -163,7 +163,7 @@ void CallListener::requestFinished(QVector <Eniro::Result> const& results,
     timedMessage_ = message;
 
     // Show banner after small delay
-    showDelayedResult(message);
+    showDelayedResult(message, BANNER_DELAY);
 
 }
 
@@ -230,10 +230,10 @@ void CallListener::callTerminate()
        }
 }
 
-void CallListener::showDelayedResult(QString const& text)
+void CallListener::showDelayedResult(QString const& text, int delay)
 {
        timedMessage_ = text;
-       QTimer::singleShot(BANNER_DELAY, this, SLOT(showTimedMessage()));
+       QTimer::singleShot(delay, this, SLOT(showTimedMessage()));
 }
 
 void CallListener::showTimedMessage()
index 41ea53e..b7c6edf 100644 (file)
@@ -39,7 +39,7 @@ public:
     void begin();
     void end();
     static const int REQUEST_TIMEOUT = 15000;
-    static const int BANNER_DELAY = 400;
+    static const int BANNER_DELAY = 350;
 
 private slots:
     void requestFinished(QVector <Eniro::Result> const& results, Eniro::SearchDetails const& details, bool error);
@@ -52,7 +52,7 @@ private:
 
     void search(Eniro::SearchDetails const& details);
     void showResult(QString const& text);
-    void showDelayedResult(QString const& text);
+    void showDelayedResult(QString const& text, int delay);
     QString createResult(QString const& name, QString const& street, QString const& city);
     QString timedMessage_;
     Eniro* eniro_;
index 1eb193d..ff8866d 100644 (file)
@@ -1,4 +1,4 @@
 start on started hildon-desktop
 script
-       /etc/init.d/jenirokd start
+       /etc/init.d/jenirokd start -boot
 end script 
index d07a3ea..ef17c49 100644 (file)
@@ -27,8 +27,8 @@
 
 int main(int argc, char *argv[])
 {
-    // If daemon was started on boot, the first parameter is not set
-    if(!(argc >= 2 && QString(argv[1]) == "-manual"))
+    // If daemon was started on boot, the first parameter is set to "-boot"
+    if(argc >= 2 && QString(argv[1]) == "-boot")
     {
         if(Settings::instance()->get("autostart") == "0")
         {
index 28af8ee..0b0d635 100644 (file)
@@ -29,7 +29,7 @@ namespace
 bool Daemon::start()
 {
     QProcess proc;
-    proc.start(INIT_DIR + "/" + DAEMON_NAME, QStringList() << "start" << "-manual");
+    proc.start(INIT_DIR + "/" + DAEMON_NAME, QStringList() << "start");
 
     proc.waitForStarted();
     proc.waitForFinished();