fix import calls

This commit is contained in:
Marcos Pinto 2007-05-17 19:20:03 +00:00
parent c88d19be14
commit 6d7004f4d9
3 changed files with 6 additions and 6 deletions

View File

@ -13,9 +13,9 @@ class plugin_Example: # The plugin's class
self.interface = deluge_interface
# Classes must be imported as they are needed from within
# the plugin's functions
import dcommon, gtk, gtk.glade, dgtk, pref
import common, gtk, gtk.glade, dgtk, pref
# Create an options file and try to load existing Values
self.config_file = dcommon.CONFIG_DIR + "/example.conf"
self.config_file = common.CONFIG_DIR + "/example.conf"
self.config = pref.Preferences()
try:
self.config.load_from_file(self.config_file)

View File

@ -114,9 +114,9 @@ class plugin_NetGraph:
meanDownSpeed = sum(self.savedDownSpeeds)/len(self.savedDownSpeeds)
shownSpeed = max(meanUpSpeed, meanDownSpeed)
import dcommon
import common
self.pangoLayout.set_text(dcommon.frate(shownSpeed))
self.pangoLayout.set_text(common.frate(shownSpeed))
self.networkPixmap.draw_layout(self.image.get_style().black_gc,
4,
int(self.height - 1 - (self.height*shownSpeed/maxSpeed)),

View File

@ -2,10 +2,10 @@
class plugin_Search:
def __init__(self, path, deluge_core, deluge_interface):
import dcommon, gtk, gtk.glade, dgtk, pref
import common, gtk, gtk.glade, dgtk, pref
self.core = deluge_core
self.interface = deluge_interface
self.conf_file = dcommon.CONFIG_DIR + "/search.conf"
self.conf_file = common.CONFIG_DIR + "/search.conf"
if not os.path.isfile(self.conf_file):
f = open(self.conf_file, mode='w')
f.flush()