From b914af340318dbd604bc2e1c8b3daa2c92d48c6e Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Tue, 17 Jul 2007 20:40:50 +0000 Subject: [PATCH] toolbar button for scheduler --- plugins/Scheduler/plugin.py | 14 +++++++++++++- plugins/Scheduler/scheduler.png | Bin 0 -> 1411 bytes 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 plugins/Scheduler/scheduler.png diff --git a/plugins/Scheduler/plugin.py b/plugins/Scheduler/plugin.py index d739c13fe..326dc2f64 100644 --- a/plugins/Scheduler/plugin.py +++ b/plugins/Scheduler/plugin.py @@ -11,6 +11,17 @@ class plugin_Scheduler: self.config = deluge.pref.Preferences() self.button_state_temp = [[0] * 7 for dummy in xrange(24)] self.status = -1 + + self.toolbutton_image = gtk.Image() + filename = self.path + "/scheduler.png" + self.toolbutton_image.set_from_file(filename) + + self.toolbutton = gtk.ToolButton(self.toolbutton_image, _("Scheduler")) + self.toolbutton_tip = gtk.Tooltips() + self.toolbutton.set_tooltip(self.toolbutton_tip, _("Scheduler")) + self.toolbutton.connect("clicked", self.configure) + self.interface.toolbar.insert(self.toolbutton, -1) + self.toolbutton.show_all() #Load config try: @@ -26,6 +37,7 @@ class plugin_Scheduler: self.ullimit = float(-1) def unload(self): + self.interface.toolbar.remove(self.toolbutton) self.resume() self.unlimit() @@ -62,7 +74,7 @@ class plugin_Scheduler: self.interface.apply_prefs() #Configuration dialog - def configure(self): + def configure(self, widget=None, data=None): global scheduler_select self.button_state_temp = copy.deepcopy(self.button_state) diff --git a/plugins/Scheduler/scheduler.png b/plugins/Scheduler/scheduler.png new file mode 100644 index 0000000000000000000000000000000000000000..d676ffd4632b2e2271a9906e6d871eed2c14df31 GIT binary patch literal 1411 zcmV-}1$_F6P)#?6Cz*=ZsGs{1rSL@ zK~y-)eU)8oTt^khe>3;)-L==d{#bisH*r3kIM|59#&w&xrKlj`A}S=3D(wR=RDI|J zs!#z5$?(iWMO7YV+C}2&uOX#iXt*B{?#JfuSk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