diff --git a/plugins/ExamplePlugin/__init__.py b/plugins/ExamplePlugin/__init__.py deleted file mode 100644 index 58f0e59eb..000000000 --- a/plugins/ExamplePlugin/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -# An example plugin for use with Deluge - -plugin_name = "Example Plugin" # The name of the plugin -plugin_author = "Zach Tibbitts" # The author's Name -plugin_version = "0.5.0" # The plugin's version number -plugin_description = "An example plugin" # A description of the plugin - -def deluge_init(deluge_path): - global path - path = deluge_path - - -from ExamplePlugin.plugin import plugin_Example - -def enable(core, interface): - global path - return plugin_Example(path, core, interface) diff --git a/plugins/ExamplePlugin/example-plugin.png b/plugins/ExamplePlugin/example-plugin.png deleted file mode 100644 index 1f2b3b392..000000000 Binary files a/plugins/ExamplePlugin/example-plugin.png and /dev/null differ diff --git a/plugins/ExamplePlugin/example.glade b/plugins/ExamplePlugin/example.glade deleted file mode 100644 index 6a95761ec..000000000 --- a/plugins/ExamplePlugin/example.glade +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - 5 - Example Plugin - 313 - 167 - False - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK - 2 - - - True - 2 - 2 - - - True - - - 1 - 2 - - - - - True - - - 1 - 2 - 1 - 2 - - - - - True - First Value - - - - - True - Second Value - - - 1 - 2 - - - - - 1 - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK - GTK_BUTTONBOX_END - - - True - gtk-cancel - True - - - - - True - gtk-ok - True - 1 - - - 1 - - - - - False - GTK_PACK_END - - - - - - diff --git a/plugins/ExamplePlugin/plugin.py b/plugins/ExamplePlugin/plugin.py deleted file mode 100644 index 61010d8ce..000000000 --- a/plugins/ExamplePlugin/plugin.py +++ /dev/null @@ -1,92 +0,0 @@ -# An example plugin for use with Deluge - -import deluge.common, deluge.pref, gtk, gtk.glade - -# This plugin is intended to be used with Deluge's default GTK interface -class plugin_Example: # The plugin's class - ## Your plugin's contructor should follow this format - ## path = A string containing the path to the plugin - ## deluge_core = The active instance of the Deluge Manager - ## deluge_interface = The active instance of the Deluge Interface - def __init__(self, path, deluge_core, deluge_interface): - # Save the path, interface, and core so they can be used later - self.path = path - self.core = deluge_core - self.interface = deluge_interface - - # Create an options file and try to load existing Values - self.config_file = deluge.common.CONFIG_DIR + "/example.conf" - self.config = deluge.pref.Preferences() - try: - self.config.load(self.config_file) - except IOError: - # File does not exist - pass - - # Extract the configuration dialog from the gladefile - self.glade = gtk.glade.XML(path + "/example.glade") - self.dialog = self.glade.get_widget("dialog") - self.dialog.set_icon_from_file(self.path + "/example-plugin.png") - # Access the interface's toolbar - self.toolbar = self.interface.toolbar - # Make a toolbar button - icon = gtk.Image() - icon.set_from_file(self.path + "/example-plugin.png") # Toolbar items should be 22x22 pixel images - self.button = gtk.ToolButton(icon_widget=icon, label="Example Plugin") - self.button.connect("clicked", self.clicked) # Connect the signal handler for the button - self.toolbar.add(self.button) # Add button to toolbar - self.button.show_all() # Show the button - - - ## unload is called when the plugin is removed or Deluge is shut down - def unload(self): - self.toolbar.remove(self.button) # Remove the button from the toolbar - self.config.save(self.config_file) - - ## update will be called every UPDATE_INTERVAL (usually about 1 second) - def update(self): - # As this plugin doesn't need to do anything every interval, this - # function will remain empty - pass - - ## This will be only called if your plugin is configurable - def configure(self): - entry1 = self.glade.get_widget("entry1") - entry2 = self.glade.get_widget("entry2") - try: - entry1.set_text(self.config.get("option1")) - entry2.set_text(self.config.get("option2")) - except: - entry1.set_text("") - entry2.set_text("") - self.dialog.show() - response = self.dialog.run() - self.dialog.hide() - if response: - self.config.set("option1", entry1.get_text()) - self.config.set("option2", entry2.get_text()) - - - - ## This will be called whenever self.button is clicked - def clicked(self, button): - # Build a dialog from scratch rather than from a glade file - dialog = gtk.Dialog(title="Example Plugin", parent=self.interface.window, - buttons=(gtk.STOCK_OK, 0)) - dialog.set_icon_from_file(self.path + "/example-plugin.png") - try: - text = "This is a popup notification from Example Plugin\n" + \ - "Your value for option1 is %s\n"%self.config.get("option1") + \ - "and option2 is %s"%self.config.get("option2") - except KeyError: - text = "This is a popup notification from Example Plugin\n" + \ - "If you had set options by configuring this plugin,\n" + \ - "they would appear here" - label = gtk.Label(text) - dialog.vbox.pack_start(label) - - dialog.show_all() - dialog.run() - dialog.hide() - dialog.destroy() - diff --git a/plugins/HelloWorld/__init__.py b/plugins/HelloWorld/__init__.py deleted file mode 100644 index 199f43a33..000000000 --- a/plugins/HelloWorld/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -# A simple plugin to display Hello, World - -plugin_name = "Hello World" -plugin_author = "Zach Tibbitts" -plugin_version = "1.0" -plugin_description = 'Displays "Hello, World"' - -def deluge_init(deluge_path): - global path - path = deluge_path - -def enable(core, interface): - global path - return plugin_Hello(path, core, interface) - - -class plugin_Hello: - def __init__(self, path, deluge_core, deluge_interface): - self.path = path - self.core = deluge_core - self.interface = deluge_interface - - def unload(self): - pass - - def update(self): - print "Hello, World!" - -