[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kdelirc
From:       Michael Zanetti <michael_zanetti () gmx ! net>
Date:       2010-03-02 22:12:48
Message-ID: 1267567968.309996.21693.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1098118 by mzanetti:

tray app is updated correctly on backend changes


 M  +8 -5      kded/kremotecontroldaemon.cpp  
 M  +7 -6      kded/kremotecontroldaemon.h  
 M  +14 -5     kded/org.kde.krcd.xml  
 M  +6 -1      krcdnotifieritem/krcdnotifieritem.cpp  
 M  +2 -3      krcdnotifieritem/krcdnotifieritem.h  


--- branches/work/kdelirc/kded/kremotecontroldaemon.cpp #1098117:1098118
@@ -123,8 +123,8 @@
 
     d->applicationData = KComponentData(aboutData);
     connect(RemoteControlManager::notifier(), SIGNAL(statusChanged(bool)), this, \
                SLOT(slotStatusChanged(bool)));
-    connect(RemoteControlManager::notifier(), SIGNAL(remoteControlAdded(const \
                QString&)), this, SLOT(remoteControlAdded(const QString&)));
-    connect(RemoteControlManager::notifier(), SIGNAL(remoteControlRemoved(const \
QString&)), this, SLOT(remoteControlRemoved(const QString&))); +    \
connect(RemoteControlManager::notifier(), SIGNAL(remoteControlAdded(const QString&)), \
this, SLOT(slotRemoteControlAdded(const QString&))); +    \
connect(RemoteControlManager::notifier(), SIGNAL(remoteControlRemoved(const \
QString&)), this, SLOT(slotRemoteControlRemoved(const QString&)));  d_ptr->reload();
     foreach(const QString &remote, RemoteControl::allRemoteNames()){
         RemoteControl *rc = new RemoteControl(remote);
@@ -153,6 +153,7 @@
     } else {
         notifyEvent(i18n("The remote control subsystem  has severed its connection. \
Remote controls are no longer available."));  }
+    emit connectionChanged(connected);
 }
 
 
@@ -222,7 +223,7 @@
     }
 }
 
-void KRemoteControlDaemon::remoteControlAdded(const QString& name) {
+void KRemoteControlDaemon::slotRemoteControlAdded(const QString& name) {
     if(d_ptr->getRemote(name)){
         kDebug() << "remote found";
         notifyEvent(i18n("The remote %1 is now available.", name));
@@ -233,6 +234,7 @@
         notification->setActions(QStringList() << i18nc("Configure the remote", \
                "Configure remote"));
         connect(notification, SIGNAL(activated(unsigned int)), \
SLOT(lauchKcmShell()));  }
+    emit remoteControlAdded(name);
 }
 
 void KRemoteControlDaemon::lauchKcmShell() {    
@@ -240,8 +242,9 @@
    KToolInvocation::startServiceByDesktopName("kcm_lirc");    
 }
    
-void KRemoteControlDaemon::remoteControlRemoved(const QString& name) {
- notifyEvent(i18n("The remote %1 was removed from system.", name));
+void KRemoteControlDaemon::slotRemoteControlRemoved(const QString& name) {
+    notifyEvent(i18n("The remote %1 was removed from system.", name));
+    emit remoteControlRemoved(name);
 }
 
 bool KRemoteControlDaemon::changeMode(const QString& remoteName, const QString& \
                modeName) {
--- branches/work/kdelirc/kded/kremotecontroldaemon.h #1098117:1098118
@@ -66,17 +66,18 @@
     
     
    signals:
+      void connectionChanged(bool connected);
+      void remoteControlAdded(const QString &remote);
+      void remoteControlRemoved(const QString &remote);
       void modeChanged(const QString &remoteName, const QString &modeName);
       void buttonPressed();
       void unloadTray();
       
   private slots:
-    void lauchKcmShell();   
-    
-    void slotStatusChanged(bool connected);
-    
-    void remoteControlAdded(const QString &name);                        
-    void remoteControlRemoved(const QString &name);   
+    void lauchKcmShell();       
+    void slotStatusChanged(bool connected);    
+    void slotRemoteControlAdded(const QString &name);                        
+    void slotRemoteControlRemoved(const QString &name);   
     void gotMessage(const Solid::Control::RemoteControlButton &button);
 
 };
--- branches/work/kdelirc/kded/org.kde.krcd.xml #1098117:1098118
@@ -35,11 +35,20 @@
       <arg name="modeName" type="s" direction="in"/>
       <arg type="s" direction="out" />
     </method>
-  <method name="reloadConfiguration"/>
-  <signal name="modeChanged">
-       <arg name="remotName" type="s" direction="out"/>
-       <arg name="modeName" type="s" direction="out"/>
-     </signal>
+    <method name="reloadConfiguration"/>
+    <signal name="connectionChanged">
+      <arg name="connected" type="b" />
+    </signal>    
+    <signal name="remoteControlAdded">
+      <arg name="remoteName" type="s" />
+    </signal>    
+    <signal name="remoteControlRemoved">
+      <arg name="remoteName" type="s" />
+    </signal>    
+    <signal name="modeChanged">
+      <arg name="remotName" type="s" direction="out"/>
+      <arg name="modeName" type="s" direction="out"/>
+    </signal>
   <signal name="buttonPressed"/>
   <signal name="unloadTray"/>
   </interface>
--- branches/work/kdelirc/krcdnotifieritem/krcdnotifieritem.cpp #1098117:1098118
@@ -38,6 +38,11 @@
     // No need for close button...
     setStandardActionsEnabled(false); 
     updateContextMenu();
+    QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
"org.kde.krcd", "connectionChanged",  this, SLOT(updateTray())); +    \
QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
"org.kde.krcd", "remoteControlAdded",  this, SLOT(updateTray())); +    \
QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
"org.kde.krcd", "remoteControlAdded",  this, SLOT(updateContextMenu())); +    \
QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
"org.kde.krcd", "remoteControlRemoved",  this, SLOT(updateTray())); +    \
QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
                "org.kde.krcd", "remoteControlRemoved",  this, \
                SLOT(updateContextMenu()));
     QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
                "org.kde.krcd", "buttonPressed",  this, SLOT(flash()));
     QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/kremotecontrol", \
"org.kde.krcd", "modeChanged",  this, SLOT(updateContextMenu()));  }
@@ -48,7 +53,7 @@
     QString icon = "krcd";
     if (!Solid::Control::RemoteControlManager::connected()) {
         toolTipHeader += i18nc("The state of kremotecontrol", "Stopped");
-        toolTip += i18n("No Remote Control Backend is currently available.");
+        toolTip += i18n("No Remote Control is currently available.");
         icon = "krcd_off";
         setStatus(Passive);
     } else {
--- branches/work/kdelirc/krcdnotifieritem/krcdnotifieritem.h #1098117:1098118
@@ -31,10 +31,9 @@
         
     private:
         KMenu m_menu;
-        
-        void updateTray();
-        
+                
     private slots:
+        void updateTray();
         void slotConfigure();
         void slotModeSelected(QAction *action);
         void flash();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic