Ability to reset im's used for imstatus

Bug #136205 reported by Adam Olsen
4
Affects Status Importance Assigned to Milestone
Exaile
Fix Released
Low
Nicholas Omann

Bug Description

This patch adds a button in the configuration panel under misc for reseting what im programs are up.

This ticket was migrated from the old trac: re #783

Revision history for this message
Nicholas Omann (alphacluster) wrote :

This is my old fix to the bug I am guna resubmit it. (imstatus is broken in another spot but this will fix this bug)

Changed in exaile:
assignee: nobody → alphacluster
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Johannes Sasongko (sjohannes) wrote :

As I mentioned in IRC:

- mHandlers.connect(APP, 'stop-track', stop_track)
- mHandlers.connect(APP, 'pause-toggled', lambda exaile, track : updateStatus())
+ mHandlers.connect(APP.player, 'stop-track', stop_track)
+ mHandlers.connect(APP.player, 'pause-toggled', lambda exaile, track : updateStatus())
         mHandlers.connect(APP, 'track-information-updated', lambda arg : updateStatus())

Re-align the callbacks.

+def reset(self):
+ mIMClients = []

May need `global mIMClients`.

+ mIMClients = []
+ activeServices = dbus.SessionBus().get_object('org.freedesktop.DBus', '/org/freedesktop/DBus').ListNames()
+
+ for client in mSupportedIMClients :
+ if client[IM_DBUS_SERVICE_NAME] in activeServices :
+ obj = dbus.SessionBus().get_object(client[IM_DBUS_SERVICE_NAME], client[IM_DBUS_OBJECT_NAME])
+ interface = dbus.Interface(obj, client[IM_DBUS_INTERFACE_NAME])
+
+ client[IM_INSTANCE] = client[IM_CLASS](interface)
+ client[IM_ACCOUNTS] = client[IM_INSTANCE].listAccounts()
+
+ mIMClients.append(client)

This chunk seems to be a duplicate of the code in initialize(), so you can simply call reset() in initialize().

Revision history for this message
Nicholas Omann (alphacluster) wrote :

Ok I actually realized connections are messed up and left on or never turned on with the separate function so i played with come if statements and it should work wonderfully now.

Revision history for this message
Nicholas Omann (alphacluster) wrote :

New patch since the plugins are now in main.

Changed in exaile:
status: In Progress → Fix Committed
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.