Ticket #259: country-name-tooltip-in-peers-tab.patch
File country-name-tooltip-in-peers-tab.patch, 17.3 KB (added by Plisk, 15 years ago) |
---|
-
deluge/i18n/POTFILES.in
12 12 deluge/ui/gtkui/glade/queuedtorrents.glade 13 13 deluge/ui/gtkui/glade/move_storage_dialog.glade 14 14 deluge/ui/gtkui/glade/connection_manager.glade 15 deluge/ui/gtkui/glade/wizard.glade16 15 deluge/ui/gtkui/glade/create_torrent_dialog.glade 17 16 deluge/ui/gtkui/glade/dgtkpopups.glade 18 17 deluge/ui/gtkui/glade/tray_menu.glade … … 22 21 deluge/core/autoadd.py 23 22 deluge/core/preferencesmanager.py 24 23 deluge/core/filtermanager.py 25 deluge/core/signalmanager.py26 24 deluge/core/torrentmanager.py 27 25 deluge/core/daemon.py 28 26 deluge/core/torrent.py … … 33 31 deluge/core/alertmanager.py 34 32 deluge/core/rpcserver.py 35 33 deluge/config.py 34 deluge/countries.py 36 35 deluge/metafile.py 37 36 deluge/pluginmanagerbase.py 38 deluge/SimpleXMLRPCServer.py39 37 deluge/plugins/label/label/webui.py 40 38 deluge/plugins/label/label/test.py 41 39 deluge/plugins/label/label/gtkui/label_config.py 42 40 deluge/plugins/label/label/gtkui/sidebar_menu.py 43 41 deluge/plugins/label/label/gtkui/submenu.py 44 deluge/plugins/label/label/gtkui/ui.py45 42 deluge/plugins/label/label/gtkui/__init__.py 46 43 deluge/plugins/label/label/__init__.py 47 44 deluge/plugins/label/label/core.py 48 45 deluge/plugins/label/setup.py 49 deluge/plugins/ corepluginbase.py46 deluge/plugins/pluginbase.py 50 47 deluge/plugins/init.py 51 48 deluge/plugins/blocklist/setup.py 52 49 deluge/plugins/blocklist/blocklist/webui.py 53 50 deluge/plugins/blocklist/blocklist/gtkui.py 54 deluge/plugins/blocklist/blocklist/ui.py55 51 deluge/plugins/blocklist/blocklist/text.py 56 52 deluge/plugins/blocklist/blocklist/peerguardian.py 57 53 deluge/plugins/blocklist/blocklist/__init__.py 58 54 deluge/plugins/blocklist/blocklist/core.py 59 deluge/plugins/coreclient.py60 55 deluge/plugins/__init__.py 61 56 deluge/plugins/webuipluginbase.py 62 57 deluge/plugins/stats/setup.py … … 71 66 deluge/ui/tracker_icons.py 72 67 deluge/ui/client.py 73 68 deluge/ui/ui.py 74 deluge/ui/console/mapping.py75 69 deluge/ui/console/colors.py 76 70 deluge/ui/console/commands/resume.py 77 71 deluge/ui/console/commands/config.py … … 92 86 deluge/ui/gtkui/statusbar.py 93 87 deluge/ui/gtkui/status_tab.py 94 88 deluge/ui/gtkui/addtorrentdialog.py 95 deluge/ui/gtkui/coreconfig.py96 89 deluge/ui/gtkui/sidebar.py 97 90 deluge/ui/gtkui/gtkui.py 98 91 deluge/ui/gtkui/aboutdialog.py 99 92 deluge/ui/gtkui/systemtray.py 100 deluge/ui/gtkui/dbusinterface.py101 93 deluge/ui/gtkui/files_tab.py 102 94 deluge/ui/gtkui/menubar.py 103 95 deluge/ui/gtkui/peers_tab.py … … 110 102 deluge/ui/gtkui/mainwindow.py 111 103 deluge/ui/gtkui/removetorrentdialog.py 112 104 deluge/ui/gtkui/common.py 113 deluge/ui/gtkui/signals.py114 105 deluge/ui/gtkui/torrentdetails.py 115 106 deluge/ui/gtkui/__init__.py 116 107 deluge/ui/gtkui/edittrackersdialog.py … … 120 111 deluge/ui/gtkui/connectionmanager.py 121 112 deluge/ui/gtkui/createtorrentdialog.py 122 113 deluge/ui/gtkui/details_tab.py 123 deluge/ui/signalreceiver.py124 114 deluge/ui/common.py 125 115 deluge/ui/__init__.py 126 deluge/ui/webui/components.py 127 deluge/ui/webui/render.py 128 deluge/ui/webui/page_decorators.py 129 deluge/ui/webui/webui.py 130 deluge/ui/webui/debugerror.py 131 deluge/ui/webui/webserver_common.py 132 deluge/ui/webui/config_forms.py 133 deluge/ui/webui/deluge_webserver.py 134 deluge/ui/webui/json_api.py 135 deluge/ui/webui/register_menu.py 136 deluge/ui/webui/config_tabs_deluge.py 137 deluge/ui/webui/lib/webpy022/request.py 138 deluge/ui/webui/lib/webpy022/wsgiserver/__init__.py 139 deluge/ui/webui/lib/webpy022/db.py 140 deluge/ui/webui/lib/webpy022/template.py 141 deluge/ui/webui/lib/webpy022/cheetah.py 142 deluge/ui/webui/lib/webpy022/debugerror.py 143 deluge/ui/webui/lib/webpy022/http.py 144 deluge/ui/webui/lib/webpy022/httpserver.py 145 deluge/ui/webui/lib/webpy022/utils.py 146 deluge/ui/webui/lib/webpy022/__init__.py 147 deluge/ui/webui/lib/webpy022/net.py 148 deluge/ui/webui/lib/webpy022/wsgi.py 149 deluge/ui/webui/lib/webpy022/webapi.py 150 deluge/ui/webui/lib/webpy022/form.py 151 deluge/ui/webui/lib/json.py 152 deluge/ui/webui/lib/newforms_plus.py 153 deluge/ui/webui/lib/egg_render.py 154 deluge/ui/webui/lib/static_handler.py 155 deluge/ui/webui/lib/__init__.py 156 deluge/ui/webui/lib/web.py 157 deluge/ui/webui/lib/newforms_portable/django/core/__init__.py 158 deluge/ui/webui/lib/newforms_portable/django/core/exceptions.py 159 deluge/ui/webui/lib/newforms_portable/django/utils/html.py 160 deluge/ui/webui/lib/newforms_portable/django/utils/http.py 161 deluge/ui/webui/lib/newforms_portable/django/utils/encoding.py 162 deluge/ui/webui/lib/newforms_portable/django/utils/translation.py 163 deluge/ui/webui/lib/newforms_portable/django/utils/safestring.py 164 deluge/ui/webui/lib/newforms_portable/django/utils/__init__.py 165 deluge/ui/webui/lib/newforms_portable/django/utils/datastructures.py 166 deluge/ui/webui/lib/newforms_portable/django/utils/functional.py 167 deluge/ui/webui/lib/newforms_portable/django/__init__.py 168 deluge/ui/webui/lib/newforms_portable/forms.py 169 deluge/ui/webui/lib/newforms_portable/models.py 170 deluge/ui/webui/lib/newforms_portable/widgets.py 171 deluge/ui/webui/lib/newforms_portable/fields.py 172 deluge/ui/webui/lib/newforms_portable/__init__.py 173 deluge/ui/webui/lib/newforms_portable/util.py 174 deluge/ui/webui/lib/egg_handler.py 175 deluge/ui/webui/utils.py 176 deluge/ui/webui/pages.py 177 deluge/ui/webui/__init__.py 178 deluge/ui/webui/tests/test_all.py 179 deluge/ui/webui/apache.py 180 deluge/ui/webui/web.py 181 deluge/ui/webui/torrent_move.py 182 deluge/ui/webui/config_tabs_webui.py 183 deluge/ui/webui/torrent_options.py 184 deluge/ui/webui/torrent_add.py 185 deluge/ui/webui/scripts/template_strings.py 186 deluge/ui/webui/scripts/extract_ajax_strings.py 187 deluge/ui/webui/scripts/copy_icons.py 188 deluge/ui/webui/scripts/extract_template_strings.py 116 deluge/ui/web/auth.py 117 deluge/ui/web/common.py 118 deluge/ui/web/gen_gettext.py 119 deluge/ui/web/__init__.py 120 deluge/ui/web/json_api.py 121 deluge/ui/web/pluginmanager.py 122 deluge/ui/web/server.py 123 deluge/ui/web/web.py 189 124 deluge/common.py 190 125 deluge/component.py 191 126 deluge/main.py … … 198 133 deluge/tests/test_stats.py 199 134 deluge/tests/test_client.py 200 135 deluge/log.py 201 deluge/xmlrpclib.py202 136 deluge/scripts/deluge_remote.py 203 137 deluge/scripts/wiki_docgen.py 204 138 deluge/scripts/create_plugin.py -
deluge/countries.py
1 # 2 # countries.py 3 # 4 # **** copyright placeholder **** 5 # 6 # Deluge is free software. 7 # 8 # You may redistribute it and/or modify it under the terms of the 9 # GNU General Public License, as published by the Free Software 10 # Foundation; either version 3 of the License, or (at your option) 11 # any later version. 12 # 13 # deluge is distributed in the hope that it will be useful, 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 # See the GNU General Public License for more details. 17 # 18 # You should have received a copy of the GNU General Public License 19 # along with deluge. If not, write to: 20 # The Free Software Foundation, Inc., 21 # 51 Franklin Street, Fifth Floor 22 # Boston, MA 02110-1301, USA. 23 # 24 25 # ISO 3166-1 country names and codes 26 COUNTRIES = { 27 'AF': _('Afghanistan'), 28 'AX': _('Aland Islands'), 29 'AL': _('Albania'), 30 'DZ': _('Algeria'), 31 'AS': _('American Samoa'), 32 'AD': _('Andorra'), 33 'AO': _('Angola'), 34 'AI': _('Anguilla'), 35 'AQ': _('Antarctica'), 36 'AG': _('Antigua and Barbuda'), 37 'AR': _('Argentina'), 38 'AM': _('Armenia'), 39 'AW': _('Aruba'), 40 'AU': _('Australia'), 41 'AT': _('Austria'), 42 'AZ': _('Azerbaijan'), 43 'BS': _('Bahamas'), 44 'BH': _('Bahrain'), 45 'BD': _('Bangladesh'), 46 'BB': _('Barbados'), 47 'BY': _('Belarus'), 48 'BE': _('Belgium'), 49 'BZ': _('Belize'), 50 'BJ': _('Benin'), 51 'BM': _('Bermuda'), 52 'BT': _('Bhutan'), 53 'BO': _('Bolivia'), 54 'BA': _('Bosnia and Herzegovina'), 55 'BW': _('Botswana'), 56 'BV': _('Bouvet Island'), 57 'BR': _('Brazil'), 58 'IO': _('British Indian Ocean Territory'), 59 'BN': _('Brunei Darussalam'), 60 'BG': _('Bulgaria'), 61 'BF': _('Burkina Faso'), 62 'BI': _('Burundi'), 63 'KH': _('Cambodia'), 64 'CM': _('Cameroon'), 65 'CA': _('Canada'), 66 'CV': _('Cape Verde'), 67 'KY': _('Cayman Islands'), 68 'CF': _('Central African Republic'), 69 'TD': _('Chad'), 70 'CL': _('Chile'), 71 'CN': _('China'), 72 'CX': _('Christmas Island'), 73 'CC': _('Cocos (Keeling) Islands'), 74 'CO': _('Colombia'), 75 'KM': _('Comoros'), 76 'CG': _('Congo'), 77 'CD': _('Congo, The Democratic Republic of the'), 78 'CK': _('Cook Islands'), 79 'CR': _('Costa Rica'), 80 'CI': _('Cote d\'Ivoire'), 81 'HR': _('Croatia'), 82 'CU': _('Cuba'), 83 'CY': _('Cyprus'), 84 'CZ': _('Czech Republic'), 85 'DK': _('Denmark'), 86 'DJ': _('Djibouti'), 87 'DM': _('Dominica'), 88 'DO': _('Dominican Republic'), 89 'EC': _('Ecuador'), 90 'EG': _('Egypt'), 91 'SV': _('El Salvador'), 92 'GQ': _('Equatorial Guinea'), 93 'ER': _('Eritrea'), 94 'EE': _('Estonia'), 95 'ET': _('Ethiopia'), 96 'FK': _('Falkland Islands (Malvinas)'), 97 'FO': _('Faroe Islands'), 98 'FJ': _('Fiji'), 99 'FI': _('Finland'), 100 'FR': _('France'), 101 'GF': _('French Guiana'), 102 'PF': _('French Polynesia'), 103 'TF': _('French Southern Territories'), 104 'GA': _('Gabon'), 105 'GM': _('Gambia'), 106 'GE': _('Georgia'), 107 'DE': _('Germany'), 108 'GB': _('United Kingdom'), 109 'GH': _('Ghana'), 110 'GI': _('Gibraltar'), 111 'GR': _('Greece'), 112 'GL': _('Greenland'), 113 'GD': _('Grenada'), 114 'GP': _('Guadeloupe'), 115 'GU': _('Guam'), 116 'GT': _('Guatemala'), 117 'GG': _('Guernsey'), 118 'GN': _('Guinea'), 119 'GW': _('Guinea-Bissau'), 120 'GY': _('Guyana'), 121 'HT': _('Haiti'), 122 'HM': _('Heard Island and McDonald Islands'), 123 'VA': _('Holy See (Vatican City State)'), 124 'HN': _('Honduras'), 125 'HK': _('Hong Kong'), 126 'HU': _('Hungary'), 127 'IS': _('Iceland'), 128 'IN': _('India'), 129 'ID': _('Indonesia'), 130 'IR': _('Iran, Islamic Republic of'), 131 'IQ': _('Iraq'), 132 'IE': _('Ireland'), 133 'IM': _('Isle of Man'), 134 'IL': _('Israel'), 135 'IT': _('Italy'), 136 'JM': _('Jamaica'), 137 'JP': _('Japan'), 138 'JE': _('Jersey'), 139 'JO': _('Jordan'), 140 'KZ': _('Kazakhstan'), 141 'KE': _('Kenya'), 142 'KI': _('Kiribati'), 143 'KP': _('Korea, Democratic People\'s Republic of'), 144 'KR': _('Korea, Republic of'), 145 'KW': _('Kuwait'), 146 'KG': _('Kyrgyzstan'), 147 'LA': _('Lao People\'s Democratic Republic'), 148 'LV': _('Latvia'), 149 'LB': _('Lebanon'), 150 'LS': _('Lesotho'), 151 'LR': _('Liberia'), 152 'LY': _('Libyan Arab Jamahiriya'), 153 'LI': _('Liechtenstein'), 154 'LT': _('Lithuania'), 155 'LU': _('Luxembourg'), 156 'MO': _('Macao'), 157 'MK': _('Macedonia, The Former Yugoslav Republic of'), 158 'MG': _('Madagascar'), 159 'MW': _('Malawi'), 160 'MY': _('Malaysia'), 161 'MV': _('Maldives'), 162 'ML': _('Mali'), 163 'MT': _('Malta'), 164 'MH': _('Marshall Islands'), 165 'MQ': _('Martinique'), 166 'MR': _('Mauritania'), 167 'MU': _('Mauritius'), 168 'YT': _('Mayotte'), 169 'MX': _('Mexico'), 170 'FM': _('Micronesia, Federated States of'), 171 'MD': _('Moldova'), 172 'MC': _('Monaco'), 173 'MN': _('Mongolia'), 174 'ME': _('Montenegro'), 175 'MS': _('Montserrat'), 176 'MA': _('Morocco'), 177 'MZ': _('Mozambique'), 178 'MM': _('Myanmar'), 179 'NA': _('Namibia'), 180 'NR': _('Nauru'), 181 'NP': _('Nepal'), 182 'NL': _('Netherlands'), 183 'AN': _('Netherlands Antilles'), 184 'NC': _('New Caledonia'), 185 'NZ': _('New Zealand'), 186 'NI': _('Nicaragua'), 187 'NE': _('Niger'), 188 'NG': _('Nigeria'), 189 'NU': _('Niue'), 190 'NF': _('Norfolk Island'), 191 'MP': _('Northern Mariana Islands'), 192 'NO': _('Norway'), 193 'OM': _('Oman'), 194 'PK': _('Pakistan'), 195 'PW': _('Palau'), 196 'PS': _('Palestinian Territory, Occupied'), 197 'PA': _('Panama'), 198 'PG': _('Papua New Guinea'), 199 'PY': _('Paraguay'), 200 'PE': _('Peru'), 201 'PH': _('Philippines'), 202 'PN': _('Pitcairn'), 203 'PL': _('Poland'), 204 'PT': _('Portugal'), 205 'PR': _('Puerto Rico'), 206 'QA': _('Qatar'), 207 'RE': _('Reunion'), 208 'RO': _('Romania'), 209 'RU': _('Russian Federation'), 210 'RW': _('Rwanda'), 211 'BL': _('Saint Barthelemy'), 212 'SH': _('Saint Helena'), 213 'KN': _('Saint Kitts and Nevis'), 214 'LC': _('Saint Lucia'), 215 'MF': _('Saint Martin'), 216 'PM': _('Saint Pierre and Miquelon'), 217 'VC': _('Saint Vincent and the Grenadines'), 218 'WS': _('Samoa'), 219 'SM': _('San Marino'), 220 'ST': _('Sao Tome and Principe'), 221 'SA': _('Saudi Arabia'), 222 'SN': _('Senegal'), 223 'RS': _('Serbia'), 224 'SC': _('Seychelles'), 225 'SL': _('Sierra Leone'), 226 'SG': _('Singapore'), 227 'SK': _('Slovakia'), 228 'SI': _('Slovenia'), 229 'SB': _('Solomon Islands'), 230 'SO': _('Somalia'), 231 'ZA': _('South Africa'), 232 'GS': _('South Georgia and the South Sandwich Islands'), 233 'ES': _('Spain'), 234 'LK': _('Sri Lanka'), 235 'SD': _('Sudan'), 236 'SR': _('Suriname'), 237 'SJ': _('Svalbard and Jan Mayen'), 238 'SZ': _('Swaziland'), 239 'SE': _('Sweden'), 240 'CH': _('Switzerland'), 241 'SY': _('Syrian Arab Republic'), 242 'TW': _('Taiwan, Province of China'), 243 'TJ': _('Tajikistan'), 244 'TZ': _('Tanzania, United Republic of'), 245 'TH': _('Thailand'), 246 'TL': _('Timor-Leste'), 247 'TG': _('Togo'), 248 'TK': _('Tokelau'), 249 'TO': _('Tonga'), 250 'TT': _('Trinidad and Tobago'), 251 'TN': _('Tunisia'), 252 'TR': _('Turkey'), 253 'TM': _('Turkmenistan'), 254 'TC': _('Turks and Caicos Islands'), 255 'TV': _('Tuvalu'), 256 'UG': _('Uganda'), 257 'UA': _('Ukraine'), 258 'AE': _('United Arab Emirates'), 259 'GB': _('United Kingdom'), 260 'US': _('United States'), 261 'UM': _('United States Minor Outlying Islands'), 262 'UY': _('Uruguay'), 263 'UZ': _('Uzbekistan'), 264 'VU': _('Vanuatu'), 265 'VE': _('Venezuela'), 266 'VN': _('Viet Nam'), 267 'VG': _('Virgin Islands, British'), 268 'VI': _('Virgin Islands, U.S.'), 269 'WF': _('Wallis and Futuna'), 270 'EH': _('Western Sahara'), 271 'YE': _('Yemen'), 272 'ZM': _('Zambia'), 273 'ZW': _('Zimbabwe'), 274 } -
deluge/ui/gtkui/peers_tab.py
39 39 from deluge.ui.gtkui.listview import cell_data_speed as cell_data_speed 40 40 from deluge.ui.gtkui.torrentdetails import Tab 41 41 from deluge.log import LOG as log 42 from deluge.countries import COUNTRIES 42 43 43 44 def cell_data_progress(column, cell, model, row, data): 44 45 value = model.get_value(row, data) … … 59 60 }) 60 61 61 62 self.listview = glade.get_widget("peers_listview") 63 self.listview.props.has_tooltip = True 62 64 self.listview.connect("button-press-event", self._on_button_press_event) 65 self.listview.connect("query-tooltip", self._on_query_tooltip) 63 66 # country pixbuf, ip, client, downspeed, upspeed, country code, int_ip, seed/peer icon, progress 64 67 self.liststore = gtk.ListStore(gtk.gdk.Pixbuf, str, str, int, int, str, float, gtk.gdk.Pixbuf, float) 65 68 self.cached_flag_pixbufs = {} … … 342 345 self.peer_menu.popup(None, None, None, event.button, event.time) 343 346 return True 344 347 348 def _on_query_tooltip(self, widget, x, y, keyboard_tip, tooltip): 349 if not widget.get_tooltip_context(x, y, keyboard_tip): 350 return False 351 else: 352 model, path, iter = widget.get_tooltip_context(x, y, keyboard_tip) 353 354 country_code = model.get(iter, 5)[0] 355 if country_code != " " and country_code in COUNTRIES: 356 tooltip.set_text(COUNTRIES[country_code]) 357 # widget here is self.listview 358 widget.set_tooltip_cell(tooltip, path, widget.get_column(0), 359 None) 360 return True 361 else: 362 return False 363 345 364 def _on_menuitem_add_peer_activate(self, menuitem): 346 365 """This is a callback for manually adding a peer""" 347 366 log.debug("on_menuitem_add_peer") -
ChangeLog
9 9 * Implemented a cross-platform IPC method thus removing the DBUS dependency 10 10 * Implement a "True" Classic Mode where there is no longer a separate daemon process 11 11 * Add preferences option "Add torrent in paused state" 12 * Show tooltip with country name in the peers tab 12 13 13 14 ==== WebUI ==== 14 15 * Move over to using Twisted-Web for the webserver. 15 16 * Move to only AJAX interface built upon Ext-JS. 16 17 18 ==== Misc ==== 19 20 * PyGTK dependency bumped to => 2.12 to use new tooltip system 21 17 22 === Deluge 1.1.0 - "Time gas!" (10 January 2009) === 18 23 ==== Core ==== 19 24 * Implement #79 ability to change outgoing port range -
README
51 51 Gtk: 52 52 python-notify (libnotify python wrapper) 53 53 pygame 54 pygtk >= 2.1 054 pygtk >= 2.12 55 55 librsvg 56 56 xdg-utils 57 57 chardet