Code clean-up.

This commit is contained in:
Andrew Resch 2007-09-01 11:52:01 +00:00
parent 55fc7f4725
commit e9917bfbb2
6 changed files with 9 additions and 38 deletions

View File

@ -31,26 +31,14 @@
# this exception statement from your version. If you delete this exception # this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import logging import dbus
from dbus.mainloop.glib import DBusGMainLoop
try: DBusGMainLoop(set_as_default=True)
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 pkg_resources import pkg_resources
import gtk.glade import gtk.glade
# Get the logger from deluge.log import LOG as log
log = logging.getLogger("deluge")
class GtkUI: class GtkUI:
def __init__(self, plugin_manager): def __init__(self, plugin_manager):

View File

@ -31,8 +31,6 @@
# this exception statement from your version. If you delete this exception # this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import logging
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
import gtk, gtk.glade import gtk, gtk.glade
@ -43,8 +41,7 @@ from mainwindow import MainWindow
from signals import Signals from signals import Signals
from pluginmanager import PluginManager from pluginmanager import PluginManager
# Get the logger from deluge.log import LOG as log
log = logging.getLogger("deluge")
class GtkUI: class GtkUI:
def __init__(self): def __init__(self):

View File

@ -31,8 +31,6 @@
# this exception statement from your version. If you delete this exception # this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import logging
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
import gtk, gtk.glade import gtk, gtk.glade
@ -43,8 +41,7 @@ from menubar import MenuBar
from toolbar import ToolBar from toolbar import ToolBar
from torrentview import TorrentView from torrentview import TorrentView
# Get the logger from deluge.log import LOG as log
log = logging.getLogger("deluge")
class MainWindow: class MainWindow:
def __init__(self): def __init__(self):

View File

@ -31,8 +31,6 @@
# this exception statement from your version. If you delete this exception # this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import logging
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
import gtk, gtk.glade import gtk, gtk.glade
@ -40,8 +38,7 @@ import pkg_resources
import deluge.ui.functions as functions import deluge.ui.functions as functions
# Get the logger from deluge.log import LOG as log
log = logging.getLogger("deluge")
class MenuBar: class MenuBar:
def __init__(self, window): def __init__(self, window):

View File

@ -31,14 +31,11 @@
# this exception statement from your version. If you delete this exception # this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import logging
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
import gtk, gtk.glade import gtk, gtk.glade
# Get the logger from deluge.log import LOG as log
log = logging.getLogger("deluge")
class ToolBar: class ToolBar:
def __init__(self, window): def __init__(self, window):

View File

@ -31,14 +31,9 @@
# this exception statement from your version. If you delete this exception # this exception statement from your version. If you delete this exception
# statement from all source files in the program, then also delete it here. # statement from all source files in the program, then also delete it here.
import logging
import time
from deluge.config import Config from deluge.config import Config
# Get the logger from deluge.log import LOG as log
log = logging.getLogger("deluge")
DEFAULT_PREFS = { DEFAULT_PREFS = {
"selected_ui": "gtk" "selected_ui": "gtk"