Ticket #1384: deluge_announce_ip.patch
File deluge_announce_ip.patch, 10.7 KB (added by OmegaPhil, 13 years ago) |
---|
-
deluge/core/preferencesmanager.py
diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py index bdc7f1c..6c7c41e 100644
a b 57 57 "download_location": deluge.common.get_default_download_dir(), 58 58 "listen_ports": [6881, 6891], 59 59 "listen_interface": "", 60 "announce_ip": "", 60 61 "copy_torrent_file": False, 61 62 "del_copy_torrent_file": False, 62 63 "torrentfiles_location": deluge.common.get_default_download_dir(), … … def _on_set_listen_interface(self, key, value): 204 205 # Call the random_port callback since it'll do what we need 205 206 self._on_set_random_port("random_port", self.config["random_port"]) 206 207 208 def _on_set_announce_ip(self, key, value): 209 if value != "": 210 log.debug("tracker announce IP address set to %s", value) 211 self.session_set_setting("announce_ip", str(value)) 212 207 213 def _on_set_random_port(self, key, value): 208 214 log.debug("random port value set to %s", value) 209 215 # We need to check if the value has been changed to true and false -
deluge/ui/gtkui/glade/preferences_dialog.ui
diff --git a/deluge/ui/gtkui/glade/preferences_dialog.ui b/deluge/ui/gtkui/glade/preferences_dialog.ui index 2364629..6732d41 100644
a b used sparingly.</property> 1372 1372 </packing> 1373 1373 </child> 1374 1374 <child> 1375 <object class="GtkFrame" id="frame24"> 1376 <property name="visible">True</property> 1377 <property name="can_focus">False</property> 1378 <property name="label_xalign">0</property> 1379 <property name="shadow_type">none</property> 1380 <child> 1381 <object class="GtkAlignment" id="alignment59"> 1382 <property name="visible">True</property> 1383 <property name="can_focus">False</property> 1384 <property name="top_padding">2</property> 1385 <property name="bottom_padding">2</property> 1386 <property name="left_padding">12</property> 1387 <child> 1388 <object class="GtkHBox" id="hbox23"> 1389 <property name="visible">True</property> 1390 <property name="can_focus">False</property> 1391 <child> 1392 <object class="GtkEntry" id="entry_announce_ip"> 1393 <property name="visible">True</property> 1394 <property name="can_focus">True</property> 1395 <property name="tooltip_text" translatable="yes">Enter the IP address to announce to trackers. Use this if you do not directly connect to the internet and NAT-PMP fails to retrieve your correct public IP address. Leave this empty to be automatically determined.</property> 1396 <property name="max_length">60</property> 1397 <property name="invisible_char">â</property> 1398 <property name="width_chars">30</property> 1399 <property name="primary_icon_activatable">False</property> 1400 <property name="secondary_icon_activatable">False</property> 1401 <property name="primary_icon_sensitive">True</property> 1402 <property name="secondary_icon_sensitive">True</property> 1403 </object> 1404 <packing> 1405 <property name="expand">False</property> 1406 <property name="fill">False</property> 1407 <property name="position">0</property> 1408 </packing> 1409 </child> 1410 <child> 1411 <placeholder/> 1412 </child> 1413 </object> 1414 </child> 1415 </object> 1416 </child> 1417 <child type="label"> 1418 <object class="GtkLabel" id="label68"> 1419 <property name="visible">True</property> 1420 <property name="can_focus">False</property> 1421 <property name="label" translatable="yes"><b>Tracker Announce IP Address</b></property> 1422 <property name="use_markup">True</property> 1423 </object> 1424 </child> 1425 </object> 1426 <packing> 1427 <property name="expand">False</property> 1428 <property name="fill">False</property> 1429 <property name="position">5</property> 1430 </packing> 1431 </child> 1432 <child> 1375 1433 <object class="GtkFrame" id="frame2"> 1376 1434 <property name="visible">True</property> 1377 1435 <property name="can_focus">False</property> … … used sparingly.</property> 1447 1505 <property name="expand">False</property> 1448 1506 <property name="fill">True</property> 1449 1507 <property name="padding">5</property> 1450 <property name="position"> 5</property>1508 <property name="position">6</property> 1451 1509 </packing> 1452 1510 </child> 1453 1511 <child> … … used sparingly.</property> 1577 1635 <property name="expand">False</property> 1578 1636 <property name="fill">True</property> 1579 1637 <property name="padding">5</property> 1580 <property name="position"> 6</property>1638 <property name="position">7</property> 1581 1639 </packing> 1582 1640 </child> 1583 1641 <child> … … used sparingly.</property> 1769 1827 <property name="expand">False</property> 1770 1828 <property name="fill">False</property> 1771 1829 <property name="padding">5</property> 1772 <property name="position"> 7</property>1830 <property name="position">8</property> 1773 1831 </packing> 1774 1832 </child> 1775 1833 </object> -
deluge/ui/gtkui/preferences.py
diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 7ba931a..e481fa5 100644
a b def _show(self): 316 316 "spin_outgoing_port_max": ("value", self.core_config["outgoing_ports"][1]), 317 317 "chk_random_outgoing_ports": ("active", self.core_config["random_outgoing_ports"]), 318 318 "entry_interface": ("text", self.core_config["listen_interface"]), 319 "entry_announce_ip": ("text", self.core_config["announce_ip"]), 319 320 "entry_peer_tos": ("text", self.core_config["peer_tos"]), 320 321 "chk_dht": ("active", self.core_config["dht"]), 321 322 "chk_upnp": ("active", self.core_config["upnp"]), … … def _show(self): 471 472 "spin_outgoing_port_max", 472 473 "chk_random_outgoing_ports", 473 474 "entry_interface", 475 "entry_announce_ip", 474 476 "entry_peer_tos", 475 477 "chk_dht", 476 478 "chk_upnp", … … def set_config(self, hide=False): 666 668 new_core_config["random_outgoing_ports"] = \ 667 669 self.builder.get_object("chk_random_outgoing_ports").get_active() 668 670 new_core_config["listen_interface"] = self.builder.get_object("entry_interface").get_text() 671 new_core_config["announce_ip"] = self.builder.get_object("entry_announce_ip").get_text() 669 672 new_core_config["peer_tos"] = self.builder.get_object("entry_peer_tos").get_text() 670 673 new_core_config["dht"] = self.builder.get_object("chk_dht").get_active() 671 674 new_core_config["upnp"] = self.builder.get_object("chk_upnp").get_active() -
deluge/ui/web/js/deluge-all/preferences/NetworkPage.js
diff --git a/deluge/ui/web/js/deluge-all/preferences/NetworkPage.js b/deluge/ui/web/js/deluge-all/preferences/NetworkPage.js index 13b1448..6f61d25 100644
a b Deluge.preferences.Network = Ext.extend(Ext.form.FormPanel, { 170 170 fieldset = this.add({ 171 171 xtype: 'fieldset', 172 172 border: false, 173 title: _('Tracker Announce IP Address'), 174 style: 'margin-bottom: 5px; padding-bottom: 0px;', 175 autoHeight: true, 176 labelWidth: 1, 177 defaultType: 'textfield' 178 }); 179 optMan.bind('announce_ip', fieldset.add({ 180 name: 'announce_ip', 181 fieldLabel: '', 182 labelSeparator: '', 183 width: 200 184 })); 185 186 fieldset = this.add({ 187 xtype: 'fieldset', 188 border: false, 173 189 title: _('TOS'), 174 190 style: 'margin-bottom: 5px; padding-bottom: 0px;', 175 191 bodyStyle: 'margin: 0px; padding: 0px', -
deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js
diff --git a/deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js b/deluge/ui/web/js/deluge-all/preferences/PreferencesWindow.js index 67f11fe..7f28263 100644
a b Deluge.preferences.PreferencesWindow = Ext.extend(Ext.Window, { 47 47 title: _('Preferences'), 48 48 layout: 'border', 49 49 width: 485, 50 height: 5 00,50 height: 510, 51 51 52 52 buttonAlign: 'right', 53 53 closeAction: 'hide',