~ubuntu-branches/debian/sid/deluge/sid

« back to all changes in this revision

Viewing changes to deluge/ui/gtkui/queuedtorrents.py

  • Committer: Package Import Robot
  • Author(s): Andrew Starr-Bochicchio
  • Date: 2014-10-05 11:27:46 UTC
  • mfrom: (1.1.28)
  • Revision ID: package-import@ubuntu.com-20141005112746-fnzscj3ue77fcp9g
Tags: 1.3.9-1
* New upstream release.
* Use "canonical" URLs in the Vcs-* fields.
* Update "Format" URL in debian/copyright.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
        if len(self.queue) == 0:
87
87
            return
88
88
 
 
89
        # Make sure status bar info is showing
 
90
        self.update_status_bar()
 
91
 
 
92
        # We only want the add button sensitive if we're connected to a host
 
93
        self.glade.get_widget("button_add").set_sensitive(True)
 
94
 
89
95
        if self.config["autoadd_queued"] or self.config["classic_mode"]:
90
96
            self.on_button_add_clicked(None)
91
 
            return
92
 
        # Make sure status bar info is showing
93
 
        self.update_status_bar()
94
 
 
95
 
        # We only want the add button sensitive if we're connected to a host
96
 
        self.glade.get_widget("button_add").set_sensitive(True)
97
 
        self.run()
 
97
        else:
 
98
            self.run()
98
99
 
99
100
    def stop(self):
100
101
        # We only want the add button sensitive if we're connected to a host
164
165
 
165
166
    def on_button_clear_clicked(self, widget):
166
167
        self.liststore.clear()
 
168
        del self.queue[:]
167
169
        self.update_status_bar()
168
170
 
169
171
    def on_button_close_clicked(self, widget):
174
176
        def add_torrent(model, path, iter, data):
175
177
            torrent_path = model.get_value(iter, 1)
176
178
            process_args([torrent_path])
177
 
            
 
179
 
178
180
        self.liststore.foreach(add_torrent, None)
179
181
        del self.queue[:]
180
182
        self.dialog.hide()