fix import calls
This commit is contained in:
parent
c88d19be14
commit
6d7004f4d9
|
@ -13,9 +13,9 @@ class plugin_Example: # The plugin's class
|
||||||
self.interface = deluge_interface
|
self.interface = deluge_interface
|
||||||
# Classes must be imported as they are needed from within
|
# Classes must be imported as they are needed from within
|
||||||
# the plugin's functions
|
# 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
|
# 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()
|
self.config = pref.Preferences()
|
||||||
try:
|
try:
|
||||||
self.config.load_from_file(self.config_file)
|
self.config.load_from_file(self.config_file)
|
||||||
|
|
|
@ -114,9 +114,9 @@ class plugin_NetGraph:
|
||||||
meanDownSpeed = sum(self.savedDownSpeeds)/len(self.savedDownSpeeds)
|
meanDownSpeed = sum(self.savedDownSpeeds)/len(self.savedDownSpeeds)
|
||||||
shownSpeed = max(meanUpSpeed, meanDownSpeed)
|
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,
|
self.networkPixmap.draw_layout(self.image.get_style().black_gc,
|
||||||
4,
|
4,
|
||||||
int(self.height - 1 - (self.height*shownSpeed/maxSpeed)),
|
int(self.height - 1 - (self.height*shownSpeed/maxSpeed)),
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
class plugin_Search:
|
class plugin_Search:
|
||||||
def __init__(self, path, deluge_core, deluge_interface):
|
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.core = deluge_core
|
||||||
self.interface = deluge_interface
|
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):
|
if not os.path.isfile(self.conf_file):
|
||||||
f = open(self.conf_file, mode='w')
|
f = open(self.conf_file, mode='w')
|
||||||
f.flush()
|
f.flush()
|
||||||
|
|
Loading…
Reference in New Issue