#2046: Issue with prefs pages when enabling/disabling plugins in webui
-------------------+--------------------------------------------------------
 Reporter:  Cas    |       Owner:  damoxc
     Type:  bug    |      Status:  new   
 Priority:  minor  |   Milestone:  1.3.6 
Component:  webui  |     Version:  1.3.3 
 Keywords:         |  
-------------------+--------------------------------------------------------

Comment(by Cas):

 The problem here is that the event manager stops not long after starting
 due to `null` events so any PluginEnabledEvents are just not processed
 unless browser refreshed. Also noticed that the errorCount is never reset
 if there are successful events.

 From testing so far this seems the likely solution:

 {{{
 #!diff
 --- a/deluge/ui/web/js/deluge-all/EventsManager.js
 +++ b/deluge/ui/web/js/deluge-all/EventsManager.js
 @@ -91,12 +91,14 @@ Deluge.EventsManager = Ext.extend(Ext.util.Observable,
 {
         },

         onGetEventsSuccess: function(events) {
 -               if (!events) return;
 +               this.errorCount = 0;
 +               if (events){
                         Ext.each(events, function(event) {
                                 var name = event[0], args = event[1];
                                 args.splice(0, 0, name);
                                 this.fireEvent.apply(this, args);
                         }, this);
 +               }
                 if (this.running) this.getEvents();
         },
 }}}

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/2046#comment:2>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" 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-dev?hl=en.

Reply via email to