Module: deluge
Branch: 1.3-stable
Commit: a0d4141afd9b234590ef2ea70decf92f74e2ea4d

Author: Damien Churchill <[email protected]>
Date:   Sat May  7 13:19:41 2011 +0100

fix unrequired requests

---

 deluge/ui/web/js/deluge-all/ConnectionManager.js |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/deluge/ui/web/js/deluge-all/ConnectionManager.js 
b/deluge/ui/web/js/deluge-all/ConnectionManager.js
index 54b3b25..c7f8121 100644
--- a/deluge/ui/web/js/deluge-all/ConnectionManager.js
+++ b/deluge/ui/web/js/deluge-all/ConnectionManager.js
@@ -1,6 +1,6 @@
 /*!
  * Deluge.ConnectionManager.js
- * 
+ *
  * Copyright (c) Damien Churchill 2009-2010 <[email protected]>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -88,7 +88,7 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, {
                                'selectionchange': {fn: 
this.onSelectionChanged, scope: this}
                        }
                });
-               
+
                this.panel = this.add({
                        autoScroll: true,
                        items: [this.list],
@@ -172,7 +172,7 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, {
         */
        updateButtons: function(record) {
                var button = this.buttons[1], status = record.get('status');
-       
+
                // Update the Connect/Disconnect button
                if (status == _('Connected')) {
                        button.enable();
@@ -183,7 +183,7 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, {
                        button.enable();
                        button.setText(_('Connect'));
                }
-               
+
                // Update the Stop/Start Daemon button
                if (status == _('Offline')) {
                        if (record.get('host') == '127.0.0.1' || 
record.get('host') == 'localhost') {
@@ -333,6 +333,7 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, {
                }
        },
 
+    // FIXME: Find out why this is being fired twice
        // private
        onShow: function() {
                if (!this.addHostButton) {
@@ -342,9 +343,10 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, {
                        this.stopHostButton = bbar.items.get('cm-stop');
                }
                this.loadHosts();
+        if (this.running) return;
                this.running = window.setInterval(this.update, 2000, this);
        },
-       
+
        // private
        onStopClick: function(button, e) {
                var connection = this.list.getSelectedRecords()[0];

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to