Some error banner delays fixed.
authoreshe <jessehakanen@gmail.com>
Fri, 11 Jun 2010 14:29:35 +0000 (15:29 +0100)
committereshe <jessehakanen@gmail.com>
Fri, 11 Jun 2010 14:29:35 +0000 (15:29 +0100)
debian/control
src/common/settings.cpp
src/daemon/calllistener.cpp
src/daemon/calllistener.h

index fa1e74a..5e19a27 100644 (file)
@@ -12,6 +12,8 @@ Description: Searches unknown callers' details using Eniro person search.
  Jenirok finds unknown callers' details 
  automatically using Eniro person search. Person 
  search can also be done by using a gui application.
  Jenirok finds unknown callers' details 
  automatically using Eniro person search. Person 
  search can also be done by using a gui application.
+ Jenirok is currently mainly usable for Finnish, Swedish 
+ and Danish users.
 XB-Description-fi_FI: Hakee tuntemattoman soittajan tiedot Eniron henkilöhaulla.
  Jenirok hakee tuntemattoman soittajan tiedot
  automaattisesti Eniron henkilöhakua käyttämällä. 
 XB-Description-fi_FI: Hakee tuntemattoman soittajan tiedot Eniron henkilöhaulla.
  Jenirok hakee tuntemattoman soittajan tiedot
  automaattisesti Eniron henkilöhakua käyttämällä. 
index c0296cd..956173e 100644 (file)
@@ -208,7 +208,6 @@ Settings::ConnectionType Settings::getConnectionType()
                 values.push_back((char *)list->data);
                 list = list->next;
             }
                 values.push_back((char *)list->data);
                 list = list->next;
             }
-
         }
 
         g_object_unref(gcClient);
         }
 
         g_object_unref(gcClient);
index 6c25bfc..4307347 100644 (file)
@@ -374,7 +374,7 @@ bool CallListener::handleConnection()
 
     if(configType == Settings::ALWAYS_ASK)
     {
 
     if(configType == Settings::ALWAYS_ASK)
     {
-        showError(tr("Automatic connecting is not allowed by settings."));
+        showError(tr("Automatic connecting is not allowed by settings."), BANNER_DELAY);
         return false;
     }
 
         return false;
     }
 
@@ -460,11 +460,19 @@ bool CallListener::handleConnection()
     return initialized_;
 }
 
     return initialized_;
 }
 
-void CallListener::showError(QString const& msg)
+void CallListener::showError(QString const& msg, int timeout)
 {
     qDebug() << "Error: " << msg;
     box_->setTimeout(ERROR_BANNER_TIMEOUT);
 {
     qDebug() << "Error: " << msg;
     box_->setTimeout(ERROR_BANNER_TIMEOUT);
-    showResult(msg);
+
+    if(timeout)
+    {
+        showDelayedResult(msg, timeout);
+    }
+    else
+    {
+        showResult(msg);
+    }
 }
 
 void CallListener::timerEvent(QTimerEvent* event)
 }
 
 void CallListener::timerEvent(QTimerEvent* event)
index 6395048..0cd70ed 100644 (file)
@@ -42,7 +42,7 @@ public:
     static const int CONNECT_RETRIES = 3;
     static const int CONNECTION_LOOKUP_RETRIES = 15;
     static const int WAIT_BETWEEN_RETRIES = 1000;
     static const int CONNECT_RETRIES = 3;
     static const int CONNECTION_LOOKUP_RETRIES = 15;
     static const int WAIT_BETWEEN_RETRIES = 1000;
-    static const int ERROR_BANNER_TIMEOUT = 4000;
+    static const int ERROR_BANNER_TIMEOUT = 4500;
 
 protected:
     virtual void timerEvent(QTimerEvent* event);
 
 protected:
     virtual void timerEvent(QTimerEvent* event);
@@ -62,7 +62,7 @@ private:
     void searchInit();
     void searchClose();
     bool handleConnection();
     void searchInit();
     void searchClose();
     bool handleConnection();
-    void showError(QString const& msg);
+    void showError(QString const& msg, int delay = 0);
     void sleep(int ms);
     QString createResult(QString const& name, QString const& street, QString const& city);
     QString timedMessage_;
     void sleep(int ms);
     QString createResult(QString const& name, QString const& street, QString const& city);
     QString timedMessage_;