toolbar button for scheduler

This commit is contained in:
Zach Tibbitts 2007-07-17 20:40:50 +00:00
parent f04a29bb03
commit b914af3403
2 changed files with 13 additions and 1 deletions

View File

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB