diff --git a/ChangeLog b/ChangeLog index 4a7762b16..a2239df73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ Deluge 0.5.7 (xx November 2007) list * Add preference for the location of torrent files * Add autoload folder + * Manual force-recheck Deluge 0.5.6.2 (31 October 2007) * Set default piece size to 256-KiB in TorrentCreator plugin and add 2048KiB diff --git a/TODO b/TODO index d6eddf0b5..66b7d965a 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ for 0.5.7 - * manual recheck + * possibly add queue support to manual recheck * remap filenames * decide what to do about the progress bar patch diff --git a/glade/torrent_menu.glade b/glade/torrent_menu.glade index 668d5996d..2b8088f60 100644 --- a/glade/torrent_menu.glade +++ b/glade/torrent_menu.glade @@ -4,6 +4,30 @@ True + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Recheck torrent data + _Force Recheck + True + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-execute + 1 + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + True @@ -110,77 +134,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Queue True - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Top - True - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-goto-top - 1 - - - - - - - True - _Up - True - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-go-up - 1 - - - - - - - True - _Down - True - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-go-down - 1 - - - - - - - True - _Bottom - True - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-goto-bottom - 1 - - - - - - True diff --git a/src/interface.py b/src/interface.py index c18c98e4a..cff74d0ed 100644 --- a/src/interface.py +++ b/src/interface.py @@ -154,6 +154,7 @@ class DelugeGTK: result = 0 def win_handler(self, ctrl_type): if ctrl_type == CTRL_CLOSE_EVENT: + self.window.hide() self.shutdown() result = 1 return result @@ -545,6 +546,7 @@ window, please enter your password")) "remove_torrent": self.remove_torrent_clicked, "edit_trackers": self.list_of_trackers, "tor_start": self.tor_start, + "torrent_recheck": self.torrent_recheck, "tor_pause": self.tor_pause, "update_tracker": self.update_tracker, "clear_finished": self.clear_finished, @@ -738,6 +740,36 @@ window, please enter your password")) except KeyError: pass + def torrent_recheck(self, widget): + unique_ids = self.get_selected_torrent_rows() + for uid in unique_ids: + torrent_state = self.manager.get_torrent_state(uid) + order = torrent_state['queue_pos'] + path = self.manager.unique_IDs[uid].filename + save_dir = self.manager.unique_IDs[uid].save_dir + save_info = [path, save_dir, order] + import os, xdg + try: + os.remove(self.manager.unique_IDs[uid].filename + ".fastresume") + except: + pass + if common.windows_check(): + self.filepath = os.path.join(os.path.expanduser("~"), 'deluge', 'saveinfo.txt') + else: + self.filepath = os.path.join(xdg.BaseDirectory.save_config_path('deluge'), 'saveinfo.txt') + filename = open(self.filepath, 'w') + import cPickle + cPickle.dump(save_info, filename) + filename.close() + self.manager.remove_torrent(uid, False, False) + self.torrent_model_remove(uid) + self.update() + filename = open(self.filepath, 'r') + save_info = cPickle.load(filename) + self.interactive_add_torrent_path(save_info[0], save_info[1]) + filename.close() + os.remove(self.filepath) + def tor_start(self, widget): unique_ids = self.get_selected_torrent_rows() try: @@ -1594,7 +1626,6 @@ want to remove all seeding torrents?")): self.save_column_widths() self.save_window_settings() self.save_tabs_order() - gtk.main_quit() enabled_plugins = ':'.join(self.plugins.get_enabled_plugins()) self.config.set('enabled_plugins', enabled_plugins) self.config.save()