From be70305365b7ec54bcb4235ad3ac8751401d8bc5 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 12 Jan 2010 03:15:50 +0000 Subject: [PATCH] Make sure that the port test status image is always reset between tests. Added a "loading" image when the test is in course. --- deluge/data/pixmaps/loading.gif | Bin 0 -> 723 bytes deluge/ui/gtkui/preferences.py | 18 ++++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 deluge/data/pixmaps/loading.gif diff --git a/deluge/data/pixmaps/loading.gif b/deluge/data/pixmaps/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..09d621ede9dbe610877292e554c858d60573359e GIT binary patch literal 723 zcmZ?wbhEHb6kygwuBNlDqaZ=af)8Vd`HpP%2eXU}fjxbfx77YhrEJ9qAU`t)hrwrvX*EI4)Q z)Vp`@7+^s0KewN2NU*bGfUA+70W%{51B2o}Dd(cp#FEq$h4Rdj428t3#EP8!#1y^E zytI4<#h)yk+zbp1Iv^83j$~lfRZ!?l$(*-j0oS8bOzRv3nk~+l7F@2rcYDWtKK3Vq z?OPr>oZ!(bUU!Ylb?r1KY$m8ABucO*%v+Hu(>`(Efm?@GzPYr#_xYQ>uXji2Ys_J7 zv=;1?V8W)+OhKWqJ5lFxhYF{X6i@P!q(vGhrO$8aeQhLlU^?@GroGW0Pk0M9p1pW^ zhp^wwL!sPSBGdd131BnIR6(I{35Tm-2vhH4lOz?-i?3|@h0m8(KDVC5yPWw%i(S$N z_g|v@XC@X~vPe~~zSg}9D(m%t5DPEVs%L1dIVm|NmY9 literal 0 HcmV?d00001 diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index 25c21f2a1..b772a396d 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -17,9 +17,9 @@ # # You should have received a copy of the GNU General Public License # along with deluge. If not, write to: -# The Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor -# Boston, MA 02110-1301, USA. +# The Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor +# Boston, MA 02110-1301, USA. # # In addition, as a special exception, the copyright holders give # permission to link the code of portions of this program with the OpenSSL @@ -72,8 +72,8 @@ class Preferences(component.Component): self.treeview.append_column(column) # Add the default categories i = 0 - for category in [_("Downloads"), _("Network"), _("Bandwidth"), _("Interface"), - _("Other"), _("Daemon"), _("Queue"), _("Proxy"), + for category in [_("Downloads"), _("Network"), _("Bandwidth"), + _("Interface"), _("Other"), _("Daemon"), _("Queue"), _("Proxy"), _("Cache"), _("Plugins")]: self.liststore.append([i, category]) i += 1 @@ -174,7 +174,8 @@ class Preferences(component.Component): self.liststore.remove(self.iter_to_remove) def show(self, page=None): - """Page should be the string in the left list.. ie, 'Network' or 'Bandwidth'""" + """Page should be the string in the left list.. ie, 'Network' or + 'Bandwidth'""" if page != None: for (index, string) in self.liststore: if page == string: @@ -734,6 +735,7 @@ class Preferences(component.Component): self.show() def hide(self): + self.glade.get_widget("port_img").hide() self.pref_dialog.hide() def __update_cache_status(self): @@ -833,6 +835,10 @@ class Preferences(component.Component): self.glade.get_widget("port_img").set_from_stock(gtk.STOCK_DIALOG_WARNING, 4) self.glade.get_widget("port_img").show() client.core.test_listen_port().addCallback(on_get_test) + self.glade.get_widget("port_img").set_from_file( + deluge.common.get_pixmap('loading.gif') + ) + self.glade.get_widget("port_img").show() client.force_call() def on_plugin_toggled(self, renderer, path):