diff --git a/deluge/core/core.py b/deluge/core/core.py index 807c7433e..de38f9372 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -131,22 +131,6 @@ class Core(component.Component): # Get the core config self.config = deluge.configmanager.ConfigManager("core.conf") - # Load the GeoIP DB for country look-ups if available - geoip_db = "" - if os.path.exists(self.config["geoip_db_location"]): - geoip_db = self.config["geoip_db_location"] - elif os.path.exists(pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))): - geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat")) - else: - log.warning("Unable to find GeoIP database file!") - - if geoip_db: - try: - self.session.load_country_db(geoip_db) - except Exception, e: - log.error("Unable to load geoip database!") - log.exception(e) - # If there was an interface value from the command line, use it, but # store the one in the config so we can restore it on shutdown self.__old_interface = None diff --git a/deluge/core/preferencesmanager.py b/deluge/core/preferencesmanager.py index fb8dfb61f..6a01a1995 100644 --- a/deluge/core/preferencesmanager.py +++ b/deluge/core/preferencesmanager.py @@ -36,6 +36,7 @@ import os.path import threading +import pkg_resources from twisted.internet import reactor from twisted.internet.task import LoopingCall @@ -224,6 +225,8 @@ class PreferencesManager(component.Component): self._on_new_release_check) self.config.register_set_function("rate_limit_ip_overhead", self._on_rate_limit_ip_overhead) + self.config.register_set_function("geoip_db_location", + self._on_geoip_db_location) self.config.register_change_callback(self._on_config_value_change) @@ -495,3 +498,21 @@ class PreferencesManager(component.Component): log.debug("%s: %s", key, value) self.settings.rate_limit_ip_overhead = value self.session.set_settings(self.settings) + + def _on_geoip_db_location(self, key, value): + log.debug("%s: %s", key, value) + # Load the GeoIP DB for country look-ups if available + geoip_db = "" + if os.path.exists(value): + geoip_db = value + elif os.path.exists(pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat"))): + geoip_db = pkg_resources.resource_filename("deluge", os.path.join("data", "GeoIP.dat")) + else: + log.warning("Unable to find GeoIP database file!") + + if geoip_db: + try: + self.session.load_country_db(geoip_db) + except Exception, e: + log.error("Unable to load geoip database!") + log.exception(e) diff --git a/deluge/data/GEOIP_LICENSE.txt b/deluge/data/GEOIP_LICENSE.txt deleted file mode 100644 index 01c2910fe..000000000 --- a/deluge/data/GEOIP_LICENSE.txt +++ /dev/null @@ -1,39 +0,0 @@ -There are two licenses, one for the C library software, and one for -the database. - -SOFTWARE LICENSE (C library) - -The GeoIP C Library is licensed under the LGPL. For details see -the COPYING file. - -OPEN DATA LICENSE (GeoLite Country and GeoLite City databases) - -Copyright (c) 2008 MaxMind, Inc. All Rights Reserved. - -All advertising materials and documentation mentioning features or use of -this database must display the following acknowledgment: -"This product includes GeoLite data created by MaxMind, available from -http://maxmind.com/" - -Redistribution and use with or without modification, are permitted provided -that the following conditions are met: -1. Redistributions must retain the above copyright notice, this list of -conditions and the following disclaimer in the documentation and/or other -materials provided with the distribution. -2. All advertising materials and documentation mentioning features or use of -this database must display the following acknowledgement: -"This product includes GeoLite data created by MaxMind, available from -http://maxmind.com/" -3. "MaxMind" may not be used to endorse or promote products derived from this -database without specific prior written permission. - -THIS DATABASE IS PROVIDED BY MAXMIND, INC ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MAXMIND BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -DATABASE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/deluge/data/GeoIP.dat b/deluge/data/GeoIP.dat deleted file mode 100644 index e776d07b5..000000000 Binary files a/deluge/data/GeoIP.dat and /dev/null differ diff --git a/deluge/ui/gtkui/glade/preferences_dialog.glade b/deluge/ui/gtkui/glade/preferences_dialog.glade index 03e340b27..23b6d5cd0 100644 --- a/deluge/ui/gtkui/glade/preferences_dialog.glade +++ b/deluge/ui/gtkui/glade/preferences_dialog.glade @@ -1,16 +1,16 @@ - - - + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 Preferences - GTK_WIN_POS_CENTER_ON_PARENT + center-on-parent 510 530 True - GDK_WINDOW_TYPE_HINT_DIALOG + dialog False @@ -27,7 +27,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE + queue True @@ -53,14 +53,14 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -77,6 +77,7 @@ False + 0 @@ -93,7 +94,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -118,8 +119,11 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + select-folder + + 0 + @@ -153,9 +157,12 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + select-folder Select A Folder + + 0 + @@ -187,9 +194,12 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + select-folder Select A Folder + + 0 + @@ -211,11 +221,11 @@ + Auto add .torrents from: True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Auto add .torrents from: - 0 True @@ -227,10 +237,10 @@ + Copy of .torrent files to: True True - Copy of .torrent files to: - 0 + False True @@ -242,10 +252,10 @@ + Move completed to: True True - Move completed to: - 0 + False True @@ -265,9 +275,12 @@ True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER + select-folder Select A Folder + + 0 + @@ -320,7 +333,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -334,28 +347,29 @@ 10 + Use Full Allocation True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Full allocation preallocates all of the space that is needed for the torrent and prevents disk fragmentation - Use Full Allocation - 0 True True False False + 0 + Use Compact Allocation True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Compact allocation only allocates space as needed - Use Compact Allocation - 0 True radio_full_allocation @@ -391,7 +405,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -403,24 +417,25 @@ True + Prioritize first and last pieces of torrent True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Prioritize first and last pieces of files in torrent - Prioritize first and last pieces of torrent - 0 True False + 0 + Add torrents in Paused state True True - Add torrents in Paused state - 0 + False True @@ -462,8 +477,8 @@ page 6 - tab False + tab @@ -471,14 +486,14 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -495,6 +510,7 @@ False + 0 @@ -511,7 +527,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -528,18 +544,19 @@ 20 + Use Random Ports True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Deluge will automatically choose a different port to use every time. - Use Random Ports - 0 True False 5 + 0 @@ -551,11 +568,12 @@ True 1 Active Port: - GTK_JUSTIFY_RIGHT + right False 5 + 0 @@ -581,6 +599,7 @@ 5 + 0 @@ -593,6 +612,7 @@ False + 0 @@ -645,12 +665,11 @@ + Test Active Port True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Test Active Port - 0 @@ -706,7 +725,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -718,16 +737,17 @@ 5 + Use Random Ports True True - Use Random Ports - 0 + False True False False + 0 @@ -742,6 +762,7 @@ False False + 0 @@ -821,7 +842,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -844,6 +865,7 @@ False False + 0 @@ -860,6 +882,9 @@ + + 0 + @@ -886,7 +911,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -899,17 +924,14 @@ 2 3 5 - - - + UPnP True True + False Universal Plug and Play - UPnP True - 0 True True @@ -919,12 +941,12 @@ + NAT-PMP True True + False NAT Port Mapping Protocol - NAT-PMP True - 0 True True @@ -936,12 +958,12 @@ + Peer Exchange True True + False Peer Exchange - Peer Exchange True - 0 True True @@ -953,12 +975,12 @@ + LSD True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Local Service Discovery finds local peers on your network. - LSD - 0 True @@ -969,12 +991,12 @@ + DHT True True + False Distributed hash table may improve the amount of active connections. - DHT True - 0 True @@ -985,6 +1007,9 @@ GTK_FILL + + + @@ -1010,7 +1035,7 @@ True 0 - GTK_SHADOW_NONE + none True @@ -1032,6 +1057,9 @@ 1 Inbound: + + 0 + @@ -1047,6 +1075,7 @@ False False + 0 @@ -1060,6 +1089,9 @@ Enabled Disabled + + 0 + @@ -1096,6 +1128,7 @@ Either False False + 0 @@ -1111,14 +1144,17 @@ Disabled + + 0 + + Encrypt entire stream True True - Encrypt entire stream + False True - 0 True @@ -1176,9 +1212,9 @@ Disabled page 7 - tab 1 False + tab @@ -1186,14 +1222,14 @@ Disabled True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -1210,6 +1246,7 @@ Disabled False + 0 @@ -1226,7 +1263,7 @@ Disabled True 0 - GTK_SHADOW_NONE + none True @@ -1348,7 +1385,7 @@ Disabled 1 True True - GTK_UPDATE_IF_VALID + if-valid 1 @@ -1428,6 +1465,9 @@ Disabled + + 0 + @@ -1435,10 +1475,10 @@ Disabled 5 + Ignore limits on local network True True - Ignore limits on local network - 0 + False True True @@ -1454,11 +1494,11 @@ Disabled 5 + Rate limit IP overhead True True + False If checked, the estimated TCP/IP overhead is drained from the rate limiters, to avoid exceeding the limits with the total traffic - Rate limit IP overhead - 0 True True @@ -1495,7 +1535,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -1669,9 +1709,9 @@ Disabled page 8 - tab 2 False + tab @@ -1679,14 +1719,14 @@ Disabled True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -1703,6 +1743,7 @@ Disabled False + 0 @@ -1720,7 +1761,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -1730,12 +1771,12 @@ Disabled 12 + Enable True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Classic Mode will hide most of the daemon functionality and will make Deluge appear to be a single application. Use this if you do not want to take advantage of running Deluge as a daemon. You need to restart Deluge for this setting to take effect. - Enable - 0 True @@ -1764,7 +1805,7 @@ Disabled True 0 - GTK_SHADOW_NONE + none True @@ -1777,14 +1818,16 @@ Disabled GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Show session speed in titlebar True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Show the current download and upload speed in the titlebar - Show session speed in titlebar - 0 True + + 0 + @@ -1812,7 +1855,7 @@ Disabled True 0 - GTK_SHADOW_NONE + none True @@ -1825,15 +1868,17 @@ Disabled GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Always show True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Show the Add Torrents dialog when adding files from an external source - Always show - 0 True + + 0 + @@ -1841,12 +1886,11 @@ Disabled GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Bring the dialog to focus True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Bring the Add Torrents dialog to focus - Bring the dialog to focus - 0 True @@ -1881,7 +1925,7 @@ Disabled True 0 - GTK_SHADOW_NONE + none True @@ -1893,13 +1937,17 @@ Disabled True - True Enable system tray icon + True + False + False True - 0 True + + 0 + @@ -1907,11 +1955,12 @@ Disabled 10 + Minimize to tray on close True False - Minimize to tray on close + False + False True - 0 True @@ -1926,11 +1975,12 @@ Disabled 10 + Start in tray True False - Start in tray + False + False True - 0 True @@ -1946,12 +1996,12 @@ Disabled 10 + Password protect system tray True False True - Password protect system tray + False True - 0 True @@ -1980,6 +2030,7 @@ Disabled False + 0 @@ -2040,9 +2091,9 @@ Disabled page 10 - tab 3 False + tab @@ -2050,14 +2101,14 @@ Disabled True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -2074,6 +2125,7 @@ Disabled False + 0 @@ -2091,7 +2143,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2108,12 +2160,12 @@ Disabled GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Be alerted about new releases True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Deluge will check our servers and will tell you if a newer version has been released - Be alerted about new releases - 0 True @@ -2121,6 +2173,7 @@ Disabled False False + 0 @@ -2151,7 +2204,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2174,6 +2227,7 @@ Disabled False False 2 + 0 @@ -2183,11 +2237,11 @@ Disabled 10 + Yes, please send anonymous statistics True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Yes, please send anonymous statistics - 0 True @@ -2220,6 +2274,85 @@ Disabled 3 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + none + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + vertical + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + 5 + + + True + Location: + + + False + False + 0 + + + + + True + True + If Deluge cannot find the database file at this location it will fallback to using DNS to resolve the peer's country. + + + + 1 + + + + + + + False + False + 0 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>GeoIP Database</b> + True + + + label_item + + + + + False + False + 5 + 4 + + @@ -2235,9 +2368,9 @@ Disabled page 11 - tab 4 False + tab @@ -2245,14 +2378,14 @@ Disabled True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -2269,6 +2402,7 @@ Disabled False + 0 @@ -2286,7 +2420,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2311,6 +2445,7 @@ Disabled False False + 0 @@ -2331,6 +2466,7 @@ Disabled False False + 0 @@ -2361,7 +2497,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2370,11 +2506,11 @@ Disabled 10 + Allow Remote Connections True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Allow Remote Connections - 0 True @@ -2404,7 +2540,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2413,11 +2549,11 @@ Disabled 10 + Periodically check the website for new releases True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Periodically check the website for new releases - 0 True @@ -2457,9 +2593,9 @@ Disabled page 11 - tab 5 False + tab @@ -2467,14 +2603,14 @@ Disabled True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -2491,6 +2627,7 @@ Disabled False + 0 @@ -2513,7 +2650,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2526,13 +2663,16 @@ Disabled GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Queue new torrents to top True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Queue new torrents to top - 0 True + + 0 + @@ -2553,6 +2693,7 @@ Disabled False False + 0 @@ -2560,7 +2701,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2667,13 +2808,16 @@ Disabled + + 0 + + Do not count slow torrents True True - Do not count slow torrents - 0 + False True @@ -2707,7 +2851,7 @@ Disabled True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 - GTK_SHADOW_NONE + none True @@ -2715,7 +2859,7 @@ Disabled 5 12 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 @@ -2808,6 +2952,9 @@ Disabled + + 0 + @@ -2816,17 +2963,18 @@ Disabled 5 + Stop seeding when share ratio reaches: True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Stop seeding when share ratio reaches: - 0 True False False + 0 @@ -2860,12 +3008,12 @@ Disabled 10 + Remove torrent when share ratio reached True False True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Remove torrent when share ratio reached - 0 True @@ -2917,9 +3065,9 @@ Disabled page 12 - tab 6 False + tab @@ -2927,14 +3075,14 @@ Disabled True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -2951,6 +3099,7 @@ Disabled False + 0 @@ -2970,7 +3119,7 @@ Disabled True 0 - GTK_SHADOW_NONE + none True @@ -3141,12 +3290,15 @@ HTTP W/ Auth + + 0 + True 0 - GTK_SHADOW_NONE + none True @@ -3325,7 +3477,7 @@ HTTP W/ Auth True 0 - GTK_SHADOW_NONE + none True @@ -3504,7 +3656,7 @@ HTTP W/ Auth True 0 - GTK_SHADOW_NONE + none True @@ -3704,13 +3856,13 @@ HTTP W/ Auth True True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True @@ -3726,6 +3878,7 @@ HTTP W/ Auth False + 0 @@ -3749,7 +3902,7 @@ HTTP W/ Auth True 0 - GTK_SHADOW_NONE + none True @@ -3763,12 +3916,12 @@ HTTP W/ Auth 5 + Sound: True True + False Only OGG and WAV files are supported - Sound: True - 0 True @@ -3779,12 +3932,12 @@ HTTP W/ Auth + Popup True True + False Not available on Windows - Popup True - 0 True @@ -3796,11 +3949,11 @@ HTTP W/ Auth + Blinking tray icon True True - Blinking tray icon + False True - 0 True @@ -3838,13 +3991,14 @@ HTTP W/ Auth False False 5 + 0 True 0 - GTK_SHADOW_NONE + none True @@ -3874,24 +4028,25 @@ HTTP W/ Auth 5 + None True True - None - 0 + False True True False False + 0 + SSL True True - SSL - 0 + False True rad_ntf_none @@ -3903,10 +4058,10 @@ HTTP W/ Auth + TLS True True - TLS - 0 + False True rad_ntf_none @@ -4026,10 +4181,10 @@ HTTP W/ Auth + Enable True True - Enable - 0 + False True @@ -4086,16 +4241,16 @@ HTTP W/ Auth True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4110,6 +4265,7 @@ HTTP W/ Auth False + 0 @@ -4131,9 +4287,9 @@ HTTP W/ Auth True True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN + automatic + automatic + in True @@ -4151,18 +4307,18 @@ HTTP W/ Auth True True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True - GTK_RESIZE_QUEUE - GTK_SHADOW_NONE + queue + none True 0 - GTK_SHADOW_NONE + none True @@ -4332,13 +4488,12 @@ HTTP W/ Auth True - GTK_BUTTONBOX_CENTER + center True True True - 0 @@ -4352,6 +4507,7 @@ HTTP W/ Auth False False + 0 @@ -4373,6 +4529,7 @@ HTTP W/ Auth False False + 0 @@ -4380,7 +4537,6 @@ HTTP W/ Auth True True True - 0 @@ -4394,6 +4550,7 @@ HTTP W/ Auth False False + 0 @@ -4423,7 +4580,6 @@ HTTP W/ Auth True True True - 0 @@ -4437,6 +4593,7 @@ HTTP W/ Auth False False + 0 @@ -4456,6 +4613,8 @@ HTTP W/ Auth + False + False 2 @@ -4505,53 +4664,60 @@ HTTP W/ Auth True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_BUTTONBOX_END + end + gtk-cancel True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-cancel True - 0 + + False + False + 0 + + gtk-apply True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-apply True - 0 + False + False 1 + gtk-ok True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-ok True - 0 + False + False 2 False - GTK_PACK_END + end + 0 diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 451d23518..d64aa804a 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -235,6 +235,7 @@ class Preferences(component.Component): "chk_lsd": ("active", self.core_config["lsd"]), "chk_new_releases": ("active", self.core_config["new_release_check"]), "chk_send_info": ("active", self.core_config["send_info"]), + "entry_geoip": ("text", self.core_config["geoip_db_location"]), "combo_encin": ("active", self.core_config["enc_in_policy"]), "combo_encout": ("active", self.core_config["enc_out_policy"]), "combo_enclevel": ("active", self.core_config["enc_level"]), @@ -376,6 +377,7 @@ class Preferences(component.Component): "chk_lsd", "chk_send_info", "chk_new_releases", + "entry_geoip", "combo_encin", "combo_encout", "combo_enclevel", @@ -667,6 +669,8 @@ class Preferences(component.Component): self.glade.get_widget("chk_show_new_releases").get_active() new_core_config["send_info"] = \ self.glade.get_widget("chk_send_info").get_active() + new_core_config["geoip_db_location"] = \ + self.glade.get_widget("entry_geoip").get_text() ## Daemon tab ## new_core_config["daemon_port"] = \