diff --git a/glade/delugegtk.glade b/glade/delugegtk.glade index 3bb57edef..bb7922843 100644 --- a/glade/delugegtk.glade +++ b/glade/delugegtk.glade @@ -459,27 +459,6 @@ - - - - - - - - - - - - - - - True - - - 4 - - - True @@ -903,6 +882,66 @@ 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + 2 + + + True + + + 1 + 2 + 1 + 2 + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <b>Name:</b> + True + + + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <b>Progress:</b> + True + + + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + + + + + 4 + 2 + + diff --git a/glade/plugin_dialog.glade b/glade/plugin_dialog.glade index 48360b956..d9d680e30 100644 --- a/glade/plugin_dialog.glade +++ b/glade/plugin_dialog.glade @@ -9,10 +9,9 @@ 583 431 True - GDK_WINDOW_TYPE_HINT_NORMAL + GDK_WINDOW_TYPE_HINT_DIALOG True True - False True diff --git a/glade/preferences_dialog.glade b/glade/preferences_dialog.glade index 7421ce378..6f7163c09 100644 --- a/glade/preferences_dialog.glade +++ b/glade/preferences_dialog.glade @@ -9,7 +9,8 @@ GTK_WIN_POS_CENTER_ON_PARENT 500 GDK_WINDOW_TYPE_HINT_DIALOG - False + True + True True @@ -455,6 +456,161 @@ 1 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + 2 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 1 + 0 0 100 1 10 10 + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Max number of DHT connections: + + + 1 + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Enable Mainline DHT + True + + + 2 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>DHT</b> + True + + + label_item + + + + + False + 2 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Enable Peer Exchange + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>PEX</b> + True + + + label_item + + + + + False + 3 + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + GTK_SHADOW_NONE + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 12 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Enable UPnP support + True + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <b>UPnP</b> + True + + + label_item + + + + + False + 4 + + @@ -555,7 +711,7 @@ True 10 1 - 0 -1 1024 1 10 10 + -1 -1 1024 1 10 10 1 @@ -582,7 +738,7 @@ True 10 1 - 0 -1 100 1 10 10 + -1 -1 100 1 10 10 1 @@ -631,7 +787,7 @@ True 10 1 - 0 -1 100 1 10 10 + -1 -1 100 1 10 10 1 @@ -647,7 +803,7 @@ True 10 1 - 0 -1 2048 1 10 10 + -1 -1 2048 1 10 10 1 diff --git a/src/deluge.py b/src/deluge.py index b3d274052..01f65c24d 100644 --- a/src/deluge.py +++ b/src/deluge.py @@ -658,10 +658,10 @@ class Manager: if size > avail: # Not enough free space torrent.user_paused = True no_space = True -# deluge_core.remove_torrent(unique_ID) #Remove the torrent -# self.state.torrents.remove(torrent) -# os.remove(torrent.filename) -# raise InsufficientFreeSpaceError(avail, size) + deluge_core.remove_torrent(unique_ID) #Remove the torrent + self.state.torrents.remove(torrent) + os.remove(torrent.filename) + raise InsufficientFreeSpaceError(avail, size) ret = unique_ID self.unique_IDs[unique_ID] = torrent @@ -711,7 +711,7 @@ class Manager: if no_space: self.apply_queue() - return (ret, no_space) + return ret def get_queue_index(self, unique_ID): return self.state.queue.index(unique_ID) diff --git a/src/delugegtk.py b/src/delugegtk.py index 597992568..b047f8be1 100644 --- a/src/delugegtk.py +++ b/src/delugegtk.py @@ -874,14 +874,13 @@ class DelugeGTK: path = dgtk.show_directory_chooser_dialog(self.window) if path is None: return - -# unique_id = self.manager.add_torrent(torrent, path, self.config.get('use_compact_storage', bool, default=False)) - (unique_id, paused) = self.manager.add_torrent(torrent, path, False) -# nice_need = dcommon.fsize(err.needed_space) -# nice_free = dcommon.fsize(err.free_space) - if paused: - dgtk.show_popup_warning(self.window, _("There is not enough free space to complete this download.") + \ - _("Please ensure you have enough space available, then unpause the download.")) + + try: + unique_id = self.manager.add_torrent(torrent, path, self.config.get('use_compact_storage', bool, default=False)) + except deluge.InsufficientFreeSpaceError, err: + nice_need = dcommon.fsize(err.needed_space) + nice_free = dcommon.fsize(err.free_space) + if append: self.torrent_model.append(self.get_list_from_unique_id(unique_id))