Code clean-up.
This commit is contained in:
parent
55fc7f4725
commit
e9917bfbb2
|
@ -31,26 +31,14 @@
|
|||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import logging
|
||||
|
||||
try:
|
||||
import dbus, dbus.service
|
||||
dbus_version = getattr(dbus, "version", (0,0,0))
|
||||
if dbus_version >= (0,41,0) and dbus_version < (0,80,0):
|
||||
import dbus.glib
|
||||
elif dbus_version >= (0,80,0):
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
else:
|
||||
pass
|
||||
except: dbus_imported = False
|
||||
else: dbus_imported = True
|
||||
import dbus
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
|
||||
import pkg_resources
|
||||
import gtk.glade
|
||||
|
||||
# Get the logger
|
||||
log = logging.getLogger("deluge")
|
||||
from deluge.log import LOG as log
|
||||
|
||||
class GtkUI:
|
||||
def __init__(self, plugin_manager):
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import logging
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk, gtk.glade
|
||||
|
@ -43,8 +41,7 @@ from mainwindow import MainWindow
|
|||
from signals import Signals
|
||||
from pluginmanager import PluginManager
|
||||
|
||||
# Get the logger
|
||||
log = logging.getLogger("deluge")
|
||||
from deluge.log import LOG as log
|
||||
|
||||
class GtkUI:
|
||||
def __init__(self):
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import logging
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk, gtk.glade
|
||||
|
@ -43,8 +41,7 @@ from menubar import MenuBar
|
|||
from toolbar import ToolBar
|
||||
from torrentview import TorrentView
|
||||
|
||||
# Get the logger
|
||||
log = logging.getLogger("deluge")
|
||||
from deluge.log import LOG as log
|
||||
|
||||
class MainWindow:
|
||||
def __init__(self):
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import logging
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk, gtk.glade
|
||||
|
@ -40,8 +38,7 @@ import pkg_resources
|
|||
|
||||
import deluge.ui.functions as functions
|
||||
|
||||
# Get the logger
|
||||
log = logging.getLogger("deluge")
|
||||
from deluge.log import LOG as log
|
||||
|
||||
class MenuBar:
|
||||
def __init__(self, window):
|
||||
|
|
|
@ -31,14 +31,11 @@
|
|||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import logging
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk, gtk.glade
|
||||
|
||||
# Get the logger
|
||||
log = logging.getLogger("deluge")
|
||||
from deluge.log import LOG as log
|
||||
|
||||
class ToolBar:
|
||||
def __init__(self, window):
|
||||
|
|
|
@ -31,14 +31,9 @@
|
|||
# this exception statement from your version. If you delete this exception
|
||||
# statement from all source files in the program, then also delete it here.
|
||||
|
||||
import logging
|
||||
|
||||
import time
|
||||
|
||||
from deluge.config import Config
|
||||
|
||||
# Get the logger
|
||||
log = logging.getLogger("deluge")
|
||||
from deluge.log import LOG as log
|
||||
|
||||
DEFAULT_PREFS = {
|
||||
"selected_ui": "gtk"
|
||||
|
|
Loading…
Reference in New Issue