summaryrefslogtreecommitdiffstats
path: root/deluge/ui/gtk3/glade
diff options
context:
space:
mode:
authortbkizle <tbkizle@gmail.com>2020-02-13 00:13:44 -0500
committerCalum Lind <calumlind+deluge@gmail.com>2022-01-30 16:13:27 +0000
commit540d557cb2163c41af894ee252cc677d01887376 (patch)
tree1e03424802944dde5d6cab4f2278173d39fff9ec /deluge/ui/gtk3/glade
parentd8acadb085a8f20bce15193c4b6e946199ab263d (diff)
downloaddeluge-540d557cb2163c41af894ee252cc677d01887376.tar.gz
deluge-540d557cb2163c41af894ee252cc677d01887376.tar.bz2
deluge-540d557cb2163c41af894ee252cc677d01887376.zip
[Common] Add is_interface to validate network interfaces
Libtorrent now supports interface names instead of just IP address so add new common functions to validate user input. * Added is_interface that will verify if a libtorrent interface of name or IP address. * Added is_interface_name to verify that the name supplied is a valid network interface name in the operating system. On Windows sock.if_nameindex() is only supported on 3.8+ and does not return a uuid (required by libtorrent) so use ifaddr package. Using git commit version for ifaddr due to adapter name decode bug in v0.1.7. On other OSes attempt to use stdlib and fallback to ifaddr if installed otherwiser return True. * Added tests for is_interface & is_interface_name * Updated UIs with change from address to interface * Updated is_ipv6 and is_ipv4 to used inet_pton; now supported on Windows. Ref: https://github.com/pydron/ifaddr/pull/32 Closes: https://github.com/deluge-torrent/deluge/pull/338
Diffstat (limited to 'deluge/ui/gtk3/glade')
-rw-r--r--deluge/ui/gtk3/glade/preferences_dialog.ui10
1 files changed, 5 insertions, 5 deletions
diff --git a/deluge/ui/gtk3/glade/preferences_dialog.ui b/deluge/ui/gtk3/glade/preferences_dialog.ui
index df56c4419..ae9ae98a3 100644
--- a/deluge/ui/gtk3/glade/preferences_dialog.ui
+++ b/deluge/ui/gtk3/glade/preferences_dialog.ui
@@ -2573,8 +2573,8 @@ used sparingly.</property>
<object class="GtkEntry" id="entry_interface">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="tooltip_text" translatable="yes">The IP address of the interface to listen for incoming bittorrent connections on. Leave this empty if you want to use the default.</property>
- <property name="max_length">15</property>
+ <property name="tooltip_text" translatable="yes">IP address or network interface name to listen for incoming BitTorrent connections. Leave empty to use system default.</property>
+ <property name="max_length">40</property>
<property name="width_chars">15</property>
<property name="truncate_multiline">True</property>
<property name="primary_icon_activatable">False</property>
@@ -2587,7 +2587,7 @@ used sparingly.</property>
<object class="GtkLabel" id="label110">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Incoming Address</property>
+ <property name="label" translatable="yes">Incoming Interface</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
@@ -2812,9 +2812,9 @@ used sparingly.</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="tooltip_text" translatable="yes">
-The network interface name or IP address for outgoing BitTorrent connections. (Leave empty for default.)
+ IP address or network interface name for outgoing BitTorrent connections. Leave empty to use system default.
</property>
- <property name="max_length">15</property>
+ <property name="max_length">40</property>
<property name="invisible_char">●</property>
<property name="width_chars">15</property>
<property name="truncate_multiline">True</property>