testport in prefs
This commit is contained in:
parent
a074ef17ce
commit
e54affdbaa
|
@ -605,10 +605,13 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkButton" id="btn_test_port">
|
||||
<widget class="GtkButton" id="btn_testport">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Test Port</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="label" translatable="yes">Test Active Port</property>
|
||||
<signal name="clicked" handler="on_btn_testport_clicked"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
|
|
|
@ -31,6 +31,7 @@ class PreferencesDlg:
|
|||
self.dialog.set_icon_from_file(common.get_pixmap("deluge32.png"))
|
||||
self.glade.signal_autoconnect({
|
||||
'tray_toggle': self.tray_toggle,
|
||||
'on_btn_testport_clicked': self.TestPort,
|
||||
})
|
||||
self.parent = parent
|
||||
self.preferences = preferences
|
||||
|
@ -98,6 +99,11 @@ class PreferencesDlg:
|
|||
self.preferences.set("dht_connections", self.glade.get_widget("spin_dht").get_value())
|
||||
self.preferences.set("gui_update_interval", self.glade.get_widget("spin_gui").get_value())
|
||||
|
||||
def TestPort(self, widget):
|
||||
activep = str(self.parent.manager.get_state()['port'])
|
||||
common.open_url_in_browser(self.dialog,'http://www.dipconsultants.com/testport.php?port=%s' %activep)
|
||||
|
||||
|
||||
def tray_toggle(self, obj):
|
||||
if obj.get_active():
|
||||
self.glade.get_widget("chk_min_on_close").set_sensitive(True)
|
||||
|
|
Loading…
Reference in New Issue