summaryrefslogtreecommitdiffstats
path: root/deluge/plugins/Label/deluge_label/data
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/plugins/Label/deluge_label/data')
-rw-r--r--deluge/plugins/Label/deluge_label/data/label.js635
-rw-r--r--deluge/plugins/Label/deluge_label/data/label_add.ui172
-rw-r--r--deluge/plugins/Label/deluge_label/data/label_options.ui723
-rw-r--r--deluge/plugins/Label/deluge_label/data/label_pref.ui56
4 files changed, 1586 insertions, 0 deletions
diff --git a/deluge/plugins/Label/deluge_label/data/label.js b/deluge/plugins/Label/deluge_label/data/label.js
new file mode 100644
index 0000000..a0327e3
--- /dev/null
+++ b/deluge/plugins/Label/deluge_label/data/label.js
@@ -0,0 +1,635 @@
+/**
+ * label.js
+ *
+ * Copyright (C) Damien Churchill 2010 <damoxc@gmail.com>
+ *
+ * This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
+ * the additional special exception to link portions of this program with the OpenSSL library.
+ * See LICENSE for more details.
+ *
+ */
+
+Ext.ns('Deluge.ux.preferences');
+
+/**
+ * @class Deluge.ux.preferences.LabelPage
+ * @extends Ext.Panel
+ */
+Deluge.ux.preferences.LabelPage = Ext.extend(Ext.Panel, {
+ title: _('Label'),
+ layout: 'fit',
+ border: false,
+
+ initComponent: function () {
+ Deluge.ux.preferences.LabelPage.superclass.initComponent.call(this);
+ fieldset = this.add({
+ xtype: 'fieldset',
+ border: false,
+ title: _('Label Preferences'),
+ autoHeight: true,
+ labelWidth: 1,
+ defaultType: 'panel',
+ });
+ fieldset.add({
+ border: false,
+ bodyCfg: {
+ html: _(
+ '<p>The Label plugin is enabled.</p><br>' +
+ '<p>To add, remove or edit labels right-click on the Label filter ' +
+ 'entry in the sidebar.</p><br>' +
+ '<p>To apply a label right-click on torrent(s).<p>'
+ ),
+ },
+ });
+ },
+});
+
+Ext.ns('Deluge.ux');
+
+/**
+ * @class Deluge.ux.AddLabelWindow
+ * @extends Ext.Window
+ */
+Deluge.ux.AddLabelWindow = Ext.extend(Ext.Window, {
+ title: _('Add Label'),
+ width: 300,
+ height: 100,
+ closeAction: 'hide',
+
+ initComponent: function () {
+ Deluge.ux.AddLabelWindow.superclass.initComponent.call(this);
+ this.addButton(_('Cancel'), this.onCancelClick, this);
+ this.addButton(_('Ok'), this.onOkClick, this);
+
+ this.form = this.add({
+ xtype: 'form',
+ height: 35,
+ baseCls: 'x-plain',
+ bodyStyle: 'padding:5px 5px 0',
+ defaultType: 'textfield',
+ labelWidth: 50,
+ items: [
+ {
+ fieldLabel: _('Name'),
+ name: 'name',
+ allowBlank: false,
+ width: 220,
+ listeners: {
+ specialkey: {
+ fn: function (field, e) {
+ if (e.getKey() == 13) this.onOkClick();
+ },
+ scope: this,
+ },
+ },
+ },
+ ],
+ });
+ },
+
+ onCancelClick: function () {
+ this.hide();
+ },
+
+ onOkClick: function () {
+ var label = this.form.getForm().getValues().name;
+ deluge.client.label.add(label, {
+ success: function () {
+ deluge.ui.update();
+ this.fireEvent('labeladded', label);
+ },
+ scope: this,
+ });
+ this.hide();
+ },
+
+ onHide: function (comp) {
+ Deluge.ux.AddLabelWindow.superclass.onHide.call(this, comp);
+ this.form.getForm().reset();
+ },
+
+ onShow: function (comp) {
+ Deluge.ux.AddLabelWindow.superclass.onShow.call(this, comp);
+ this.form.getForm().findField('name').focus(false, 150);
+ },
+});
+
+/**
+ * @class Deluge.ux.LabelOptionsWindow
+ * @extends Ext.Window
+ */
+Deluge.ux.LabelOptionsWindow = Ext.extend(Ext.Window, {
+ title: _('Label Options'),
+ width: 325,
+ height: 240,
+ closeAction: 'hide',
+
+ initComponent: function () {
+ Deluge.ux.LabelOptionsWindow.superclass.initComponent.call(this);
+ this.addButton(_('Cancel'), this.onCancelClick, this);
+ this.addButton(_('Ok'), this.onOkClick, this);
+
+ this.form = this.add({
+ xtype: 'form',
+ });
+
+ this.tabs = this.form.add({
+ xtype: 'tabpanel',
+ height: 175,
+ border: false,
+ items: [
+ {
+ title: _('Maximum'),
+ items: [
+ {
+ border: false,
+ items: [
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ style: 'margin-bottom: 0px; padding-bottom: 0px;',
+ items: [
+ {
+ xtype: 'checkbox',
+ name: 'apply_max',
+ fieldLabel: '',
+ boxLabel: _(
+ 'Apply per torrent max settings:'
+ ),
+ listeners: {
+ check: this.onFieldChecked,
+ },
+ },
+ ],
+ },
+ {
+ xtype: 'fieldset',
+ border: false,
+ defaultType: 'spinnerfield',
+ style: 'margin-top: 0px; padding-top: 0px;',
+ items: [
+ {
+ fieldLabel: _('Download Speed'),
+ name: 'max_download_speed',
+ width: 80,
+ disabled: true,
+ value: -1,
+ minValue: -1,
+ },
+ {
+ fieldLabel: _('Upload Speed'),
+ name: 'max_upload_speed',
+ width: 80,
+ disabled: true,
+ value: -1,
+ minValue: -1,
+ },
+ {
+ fieldLabel: _('Upload Slots'),
+ name: 'max_upload_slots',
+ width: 80,
+ disabled: true,
+ value: -1,
+ minValue: -1,
+ },
+ {
+ fieldLabel: _('Connections'),
+ name: 'max_connections',
+ width: 80,
+ disabled: true,
+ value: -1,
+ minValue: -1,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ title: _('Queue'),
+ items: [
+ {
+ border: false,
+ items: [
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ style: 'margin-bottom: 0px; padding-bottom: 0px;',
+ items: [
+ {
+ xtype: 'checkbox',
+ name: 'apply_queue',
+ fieldLabel: '',
+ boxLabel: _(
+ 'Apply queue settings:'
+ ),
+ listeners: {
+ check: this.onFieldChecked,
+ },
+ },
+ ],
+ },
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ defaultType: 'checkbox',
+ style: 'margin-top: 0px; padding-top: 0px;',
+ defaults: {
+ style: 'margin-left: 20px',
+ },
+ items: [
+ {
+ boxLabel: _('Auto Managed'),
+ name: 'is_auto_managed',
+ disabled: true,
+ },
+ {
+ boxLabel: _('Stop seed at ratio:'),
+ name: 'stop_at_ratio',
+ disabled: true,
+ },
+ {
+ xtype: 'spinnerfield',
+ name: 'stop_ratio',
+ width: 60,
+ decimalPrecision: 2,
+ incrementValue: 0.1,
+ style: 'position: relative; left: 100px',
+ disabled: true,
+ },
+ {
+ boxLabel: _('Remove at ratio'),
+ name: 'remove_at_ratio',
+ disabled: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ title: _('Folders'),
+ items: [
+ {
+ border: false,
+ items: [
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ style: 'margin-bottom: 0px; padding-bottom: 0px;',
+ items: [
+ {
+ xtype: 'checkbox',
+ name: 'apply_move_completed',
+ fieldLabel: '',
+ boxLabel: _(
+ 'Apply folder settings:'
+ ),
+ listeners: {
+ check: this.onFieldChecked,
+ },
+ },
+ ],
+ },
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ defaultType: 'checkbox',
+ labelWidth: 1,
+ style: 'margin-top: 0px; padding-top: 0px;',
+ defaults: {
+ style: 'margin-left: 20px',
+ },
+ items: [
+ {
+ boxLabel: _('Move completed to:'),
+ name: 'move_completed',
+ disabled: true,
+ },
+ {
+ xtype: 'textfield',
+ name: 'move_completed_path',
+ width: 250,
+ disabled: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ {
+ title: _('Trackers'),
+ items: [
+ {
+ border: false,
+ items: [
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ style: 'margin-bottom: 0px; padding-bottom: 0px;',
+ items: [
+ {
+ xtype: 'checkbox',
+ name: 'auto_add',
+ fieldLabel: '',
+ boxLabel: _(
+ 'Automatically apply label:'
+ ),
+ listeners: {
+ check: this.onFieldChecked,
+ },
+ },
+ ],
+ },
+ {
+ xtype: 'fieldset',
+ border: false,
+ labelWidth: 1,
+ style: 'margin-top: 0px; padding-top: 0px;',
+ defaults: {
+ style: 'margin-left: 20px',
+ },
+ defaultType: 'textarea',
+ items: [
+ {
+ boxLabel: _('Move completed to:'),
+ name: 'auto_add_trackers',
+ width: 250,
+ height: 100,
+ disabled: true,
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ },
+ ],
+ });
+ },
+
+ getLabelOptions: function () {
+ deluge.client.label.get_options(this.label, {
+ success: this.gotOptions,
+ scope: this,
+ });
+ },
+
+ gotOptions: function (options) {
+ this.form.getForm().setValues(options);
+ },
+
+ show: function (label) {
+ Deluge.ux.LabelOptionsWindow.superclass.show.call(this);
+ this.label = label;
+ this.setTitle(_('Label Options') + ': ' + this.label);
+ this.tabs.setActiveTab(0);
+ this.getLabelOptions();
+ },
+
+ onCancelClick: function () {
+ this.hide();
+ },
+
+ onOkClick: function () {
+ var values = this.form.getForm().getFieldValues();
+ if (values['auto_add_trackers']) {
+ values['auto_add_trackers'] =
+ values['auto_add_trackers'].split('\n');
+ }
+ deluge.client.label.set_options(this.label, values);
+ this.hide();
+ },
+
+ onFieldChecked: function (field, checked) {
+ var fs = field.ownerCt.nextSibling();
+ fs.items.each(function (field) {
+ field.setDisabled(!checked);
+ });
+ },
+});
+
+Ext.ns('Deluge.plugins');
+
+/**
+ * @class Deluge.plugins.LabelPlugin
+ * @extends Deluge.Plugin
+ */
+Deluge.plugins.LabelPlugin = Ext.extend(Deluge.Plugin, {
+ name: 'Label',
+
+ createMenu: function () {
+ this.labelMenu = new Ext.menu.Menu({
+ items: [
+ {
+ text: _('Add Label'),
+ iconCls: 'icon-add',
+ handler: this.onLabelAddClick,
+ scope: this,
+ },
+ {
+ text: _('Remove Label'),
+ disabled: true,
+ iconCls: 'icon-remove',
+ handler: this.onLabelRemoveClick,
+ scope: this,
+ },
+ {
+ text: _('Label Options'),
+ disabled: true,
+ handler: this.onLabelOptionsClick,
+ scope: this,
+ },
+ ],
+ });
+ },
+
+ setFilter: function (filter) {
+ filter.show_zero = true;
+
+ filter.list.on('contextmenu', this.onLabelContextMenu, this);
+ filter.header.on('contextmenu', this.onLabelHeaderContextMenu, this);
+ this.filter = filter;
+ },
+
+ updateTorrentMenu: function (states) {
+ this.torrentMenu.removeAll(true);
+ this.torrentMenu.addMenuItem({
+ text: _('No Label'),
+ label: '',
+ handler: this.onTorrentMenuClick,
+ scope: this,
+ });
+ for (var state in states) {
+ if (!state || state == 'All') continue;
+ this.torrentMenu.addMenuItem({
+ text: state,
+ label: state,
+ handler: this.onTorrentMenuClick,
+ scope: this,
+ });
+ }
+ },
+
+ onDisable: function () {
+ deluge.sidebar.un('filtercreate', this.onFilterCreate);
+ deluge.sidebar.un('afterfiltercreate', this.onAfterFilterCreate);
+ delete Deluge.FilterPanel.templates.label;
+ this.deregisterTorrentStatus('label');
+ deluge.menus.torrent.remove(this.tmSep);
+ deluge.menus.torrent.remove(this.tm);
+ deluge.preferences.removePage(this.prefsPage);
+ },
+
+ onEnable: function () {
+ this.prefsPage = deluge.preferences.addPage(
+ new Deluge.ux.preferences.LabelPage()
+ );
+ this.torrentMenu = new Ext.menu.Menu();
+
+ this.tmSep = deluge.menus.torrent.add({
+ xtype: 'menuseparator',
+ });
+
+ this.tm = deluge.menus.torrent.add({
+ text: _('Label'),
+ menu: this.torrentMenu,
+ });
+
+ var lbltpl =
+ '<div class="x-deluge-filter">' +
+ '<tpl if="filter">{filter}</tpl>' +
+ '<tpl if="!filter">No Label</tpl>' +
+ ' ({count})' +
+ '</div>';
+
+ if (deluge.sidebar.hasFilter('label')) {
+ var filter = deluge.sidebar.getFilter('label');
+ filter.list.columns[0].tpl = new Ext.XTemplate(lbltpl);
+ this.setFilter(filter);
+ this.updateTorrentMenu(filter.getStates());
+ filter.list.refresh();
+ } else {
+ deluge.sidebar.on('filtercreate', this.onFilterCreate, this);
+ deluge.sidebar.on(
+ 'afterfiltercreate',
+ this.onAfterFilterCreate,
+ this
+ );
+ Deluge.FilterPanel.templates.label = lbltpl;
+ }
+ this.registerTorrentStatus('label', _('Label'));
+ },
+
+ onAfterFilterCreate: function (sidebar, filter) {
+ if (filter.filter != 'label') return;
+ this.updateTorrentMenu(filter.getStates());
+ },
+
+ onFilterCreate: function (sidebar, filter) {
+ if (filter.filter != 'label') return;
+ this.setFilter(filter);
+ },
+
+ onLabelAddClick: function () {
+ if (!this.addWindow) {
+ this.addWindow = new Deluge.ux.AddLabelWindow();
+ this.addWindow.on('labeladded', this.onLabelAdded, this);
+ }
+ this.addWindow.show();
+ },
+
+ onLabelAdded: function (label) {
+ var filter = deluge.sidebar.getFilter('label');
+ var states = filter.getStates();
+ var statesArray = [];
+
+ for (state in states) {
+ if (!state || state == 'All') continue;
+ statesArray.push(state);
+ }
+
+ statesArray.push(label.toLowerCase());
+ statesArray.sort();
+
+ //console.log(states);
+ //console.log(statesArray);
+
+ states = {};
+
+ for (i = 0; i < statesArray.length; ++i) {
+ states[statesArray[i]] = 0;
+ }
+
+ this.updateTorrentMenu(states);
+ },
+
+ onLabelContextMenu: function (dv, i, node, e) {
+ e.preventDefault();
+ if (!this.labelMenu) this.createMenu();
+ var r = dv.getRecord(node).get('filter');
+ if (!r || r == 'All') {
+ this.labelMenu.items.get(1).setDisabled(true);
+ this.labelMenu.items.get(2).setDisabled(true);
+ } else {
+ this.labelMenu.items.get(1).setDisabled(false);
+ this.labelMenu.items.get(2).setDisabled(false);
+ }
+ dv.select(i);
+ this.labelMenu.showAt(e.getXY());
+ },
+
+ onLabelHeaderContextMenu: function (e, t) {
+ e.preventDefault();
+ if (!this.labelMenu) this.createMenu();
+ this.labelMenu.items.get(1).setDisabled(true);
+ this.labelMenu.items.get(2).setDisabled(true);
+ this.labelMenu.showAt(e.getXY());
+ },
+
+ onLabelOptionsClick: function () {
+ if (!this.labelOpts)
+ this.labelOpts = new Deluge.ux.LabelOptionsWindow();
+ this.labelOpts.show(this.filter.getState());
+ },
+
+ onLabelRemoveClick: function () {
+ var state = this.filter.getState();
+ deluge.client.label.remove(state, {
+ success: function () {
+ deluge.ui.update();
+ this.torrentMenu.items.each(function (item) {
+ if (item.text != state) return;
+ this.torrentMenu.remove(item);
+ var i = item;
+ }, this);
+ },
+ scope: this,
+ });
+ },
+
+ onTorrentMenuClick: function (item, e) {
+ var ids = deluge.torrents.getSelectedIds();
+ Ext.each(ids, function (id, i) {
+ if (ids.length == i + 1) {
+ deluge.client.label.set_torrent(id, item.label, {
+ success: function () {
+ deluge.ui.update();
+ },
+ });
+ } else {
+ deluge.client.label.set_torrent(id, item.label);
+ }
+ });
+ },
+});
+Deluge.registerPlugin('Label', Deluge.plugins.LabelPlugin);
diff --git a/deluge/plugins/Label/deluge_label/data/label_add.ui b/deluge/plugins/Label/deluge_label/data/label_add.ui
new file mode 100644
index 0000000..e550675
--- /dev/null
+++ b/deluge/plugins/Label/deluge_label/data/label_add.ui
@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="dlg_label_add">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Add Label</property>
+ <property name="resizable">False</property>
+ <property name="modal">True</property>
+ <property name="window_position">mouse</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_add_cancel" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button1">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_add_ok" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-add</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;b&gt;Add Label&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Name:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="txt_add">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="activates_default">True</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">button2</action-widget>
+ <action-widget response="0">button1</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/deluge/plugins/Label/deluge_label/data/label_options.ui b/deluge/plugins/Label/deluge_label/data/label_options.ui
new file mode 100644
index 0000000..d390865
--- /dev/null
+++ b/deluge/plugins/Label/deluge_label/data/label_options.ui
@@ -0,0 +1,723 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkAdjustment" id="adjustment1">
+ <property name="lower">-1</property>
+ <property name="upper">9999</property>
+ <property name="value">-1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">-1</property>
+ <property name="upper">9999</property>
+ <property name="value">-1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="lower">-1</property>
+ <property name="upper">9999</property>
+ <property name="value">-1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment4">
+ <property name="lower">-1</property>
+ <property name="upper">9999</property>
+ <property name="value">-1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment5">
+ <property name="lower">0.10000000000000001</property>
+ <property name="upper">100</property>
+ <property name="value">2</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkTextBuffer" id="textbuffer1">
+ <property name="text" translatable="yes">tracker1.org</property>
+ </object>
+ <object class="GtkDialog" id="dlg_label_options">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="title" translatable="yes">Label Options</property>
+ <property name="modal">True</property>
+ <property name="window_position">mouse</property>
+ <property name="destroy_with_parent">True</property>
+ <property name="type_hint">dialog</property>
+ <property name="skip_taskbar_hint">True</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button4">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_options_cancel" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button3">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_options_ok" swapped="no"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="hbox3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkImage" id="image2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-preferences</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label_header">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;b&gt;Label Options&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkNotebook" id="notebook2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">5</property>
+ <property name="n_columns">4</property>
+ <property name="column_spacing">5</property>
+ <property name="row_spacing">5</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">3</property>
+ <property name="right_attach">4</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="max_upload_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">KiB/s</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="max_download_speed">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Upload Slots:</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Upload Speed:</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Download Speed:</property>
+ <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">KiB/s</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="max_upload_slots">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment3</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Connections:</property>
+ <property name="xalign">0</property>
+ </object>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="max_connections">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment4</property>
+ <property name="numeric">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options"/>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label14">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkCheckButton" id="apply_max">
+ <property name="label" translatable="yes">Apply per torrent max settings:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Maximum</property>
+ </object>
+ <packing>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">3</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="is_auto_managed">
+ <property name="label" translatable="yes">Auto Managed</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="stop_at_ratio">
+ <property name="label" translatable="yes">Stop seed at ratio:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="remove_at_ratio">
+ <property name="label" translatable="yes">Remove at ratio</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSpinButton" id="stop_ratio">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">adjustment5</property>
+ <property name="digits">2</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options"/>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkCheckButton" id="apply_queue">
+ <property name="label" translatable="yes">Apply Queue settings:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Queue</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkTable" id="table3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <child>
+ <object class="GtkCheckButton" id="move_completed">
+ <property name="label" translatable="yes">Move completed to:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </object>
+ <packing>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFileChooserButton" id="move_completed_path">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="action">select-folder</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="move_completed_path_entry">
+ <property name="can_focus">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkCheckButton" id="apply_move_completed">
+ <property name="label" translatable="yes">Apply folder settings:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label21">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Folders</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">2</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <object class="GtkTextView" id="auto_add_trackers">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="buffer">textbuffer1</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label23">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;i&gt;(1 line per tracker)&lt;/i&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkCheckButton" id="auto_add">
+ <property name="label" translatable="yes">Automatically apply label:</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label99">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Trackers</property>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">button4</action-widget>
+ <action-widget response="0">button3</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/deluge/plugins/Label/deluge_label/data/label_pref.ui b/deluge/plugins/Label/deluge_label/data/label_pref.ui
new file mode 100644
index 0000000..81edc37
--- /dev/null
+++ b/deluge/plugins/Label/deluge_label/data/label_pref.ui
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkWindow" id="window1">
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <object class="GtkBox" id="label_prefs_box">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">5</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;i&gt;Use the sidebar to add,edit and remove labels. &lt;/i&gt;
+</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">&lt;b&gt;Labels&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+</interface>