Package: psi
Version: 0.12-2
Severity: wishlist
Tags: patch

The psi developers seem to be only using long running machines or
eventually windows or mac (where this problem doesn't occur). They seem
to not care about any method to use psi with suspend to disk (on linux)
or any other remote control with reasonings like "for other operating
systems there are interfaces for that, so we wait for linux to come up
with one, too". While this seems valid it is heavily breaking the
usability of psi. Many users (me being an example) would be almost happy
with any kind of remote control such as dbus. Fortunately psi uses dbus
now, so it is kind of easy to extend that interface with status
functions. So please patch the Debian psi version until upstream
understands the importance of this matter. The patch is to be applied to
src/dbus.cpp and does nothing except extending the dbus interface by six
functions. While it might be^W^Wis cleaner to use one function for this
using 6 functions avoids parsing a string to an enum.

Helmut

--- dbus.cpp.orig       2007-12-10 21:44:47.000000000 +0100
+++ dbus.cpp    2008-09-09 13:43:29.000000000 +0200
@@ -27,6 +27,13 @@
 public Q_SLOTS:
 //     void openURI(QString uri);
        void raise();
+       void setstatusonline(const QString &message);
+       void setstatusaway(const QString &message);
+       void setstatusffc(const QString &message);
+       void setstatusxa(const QString &message);
+       void setstatusdnd(const QString &message);
+       void setstatusoffline(const QString &message);
+
 /*Q_SIGNALS:
        void psi_pong();
 */
@@ -54,9 +61,41 @@
 {
        psicon->raiseMainwin();
 }
+void PsiConAdapter::setstatusonline(const QString &message)
+{
+       Status s(Status::Online, message);
+       psicon->setGlobalStatus(s);
+}      
 
+void PsiConAdapter::setstatusaway(const QString &message)
+{
+       Status s(Status::Away, message);
+       psicon->setGlobalStatus(s);
+}      
 
+void PsiConAdapter::setstatusffc(const QString &message)
+{
+       Status s(Status::FFC, message);
+       psicon->setGlobalStatus(s);
+}      
 
+void PsiConAdapter::setstatusxa(const QString &message)
+{
+       Status s(Status::XA, message);
+       psicon->setGlobalStatus(s);
+}      
+
+void PsiConAdapter::setstatusdnd(const QString &message)
+{
+       Status s(Status::DND, message);
+       psicon->setGlobalStatus(s);
+}      
+
+void PsiConAdapter::setstatusoffline(const QString &message)
+{
+       Status s(Status::Offline, message);
+       psicon->setGlobalStatus(s);
+}      
 
 void addPsiConAdapter(PsiCon *psicon)
 {



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to