remove dbus import

This commit is contained in:
Zach Tibbitts 2007-02-27 19:38:55 +00:00
parent 6e8fe28fd8
commit 463d94fce6
1 changed files with 7 additions and 17 deletions

View File

@ -27,17 +27,6 @@ import pygtk
pygtk.require('2.0')
import gtk, gtk.glade, gobject
import xdg, xdg.BaseDirectory
import dbus, dbus.service
dbus_version = getattr(dbus, 'version', (0,0,0))
if dbus_version >= (0,41,0) and dbus_version < (0,80,0):
dbus.SessionBus()
import dbus.glib
elif dbus_version >= (0,80,0):
from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)
dbus.SessionBus()
else:
pass
class DelugeGTK:
@ -591,12 +580,13 @@ class DelugeGTK:
self.torrent_model.remove(itr)
if not self.torrent_model.iter_is_valid(itr):
itr = None
if self.manager.is_user_paused(self.get_selected_torrent()):
self.wtree.get_widget("toolbutton_pause").set_stock_id(gtk.STOCK_MEDIA_PLAY)
else:
self.wtree.get_widget("toolbutton_pause").set_stock_id(gtk.STOCK_MEDIA_PAUSE)
try:
if self.manager.is_user_paused(self.get_selected_torrent()):
self.wtree.get_widget("toolbutton_pause").set_stock_id(gtk.STOCK_MEDIA_PLAY)
else:
self.wtree.get_widget("toolbutton_pause").set_stock_id(gtk.STOCK_MEDIA_PAUSE)
except KeyError:
pass
self.saved_peer_info = None