From c3f90c4f80896967d6a9703a052104c69c291a0b Mon Sep 17 00:00:00 2001 From: Zach Tibbitts Date: Mon, 26 Mar 2007 05:33:16 +0000 Subject: [PATCH] pause right click action works --- glade/delugegtk.glade | 1536 +++++++++++++++++++------------------- glade/torrent_menu.glade | 1 + src/interface.py | 13 +- 3 files changed, 793 insertions(+), 757 deletions(-) diff --git a/glade/delugegtk.glade b/glade/delugegtk.glade index ec6bcb4b2..c87292784 100644 --- a/glade/delugegtk.glade +++ b/glade/delugegtk.glade @@ -14,130 +14,671 @@ 4 3 - + True - False - + True - Add Torrent - Add Torrent - True - gtk-add - + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + True + True + False + + + - False + False + False - + True - Remove Torrent - Remove Torrent - True - gtk-remove - + True + + + True + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + + + True + 10 + 12 + 4 + + + + + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + 2 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + 1 + 2 + + + + + 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 + 0 + <b>Name:</b> + True + + + GTK_FILL + + + + + True + + + 1 + 2 + 1 + 2 + + + + + + 4 + 2 + + + + + True + + + 3 + 4 + 11 + 12 + + + + + True + 0 + <b>Estimated Time Remaining:</b> + True + + + 2 + 3 + 11 + 12 + + + + + True + 0 + + + 3 + 4 + 5 + 6 + + + + + True + 0 + + + 1 + 2 + 5 + 6 + + + + + True + 0 + <b>Peers:</b> + True + + + 2 + 3 + 5 + 6 + + + + + True + 0 + <b>Seeders:</b> + True + + + 5 + 6 + + + + + True + 0 + <b>Total Size:</b> + True + + + 2 + 3 + + + + + True + 0 + <b>Total Downloaded:</b> + True + + + 3 + 4 + + + + + True + 0 + <b>Downloaded this session:</b> + True + + + 7 + 8 + + + + + True + 0 + + + 1 + 2 + 2 + 3 + + + + + True + 0 + + + 1 + 2 + 3 + 4 + + + + + True + 0 + + + 1 + 2 + 7 + 8 + + + + + True + 0 + <b>Tracker:</b> + True + + + 8 + 9 + + + + + True + 0 + <b>Tracker Response:</b> + True + + + 9 + 10 + + + + + True + 0 + <b>Tracker Status:</b> + True + + + 10 + 11 + + + + + True + 0 + + + 1 + 2 + 10 + 11 + + + + + True + 0 + <b>Next Announce:</b> + True + + + 2 + 3 + 10 + 11 + + + + + True + 0 + + + 3 + 4 + 10 + 11 + + + + + True + 0 + <b>Pieces:</b> + True + + + 2 + 3 + 2 + 3 + + + + + True + 0 + <b>Total Uploaded:</b> + True + + + 2 + 3 + 3 + 4 + + + + + True + 0 + + + 3 + 4 + 2 + 3 + + + + + True + 0 + + + 3 + 4 + 3 + 4 + + + + + True + 0 + <b>Share Ratio:</b> + True + + + 2 + 3 + 6 + 7 + + + + + True + 0 + <b>Uploaded This Session:</b> + True + + + 2 + 3 + 7 + 8 + + + + + True + 0 + + + 3 + 4 + 6 + 7 + + + + + True + 0 + + + 3 + 4 + 7 + 8 + + + + + True + 0 + + + 1 + 4 + 8 + 9 + + + + + True + 0 + + + 1 + 4 + 9 + 10 + + + + + True + 0 + <b>Use compact storage allocation:</b> + True + + + 11 + 12 + + + + + True + 0 + + + 1 + 2 + 11 + 12 + + + + + True + 0 + <b>Download Rate:</b> + True + + + 4 + 5 + + + + + True + 0 + + + 1 + 2 + 4 + 5 + + + + + True + 0 + <b>Upload Rate:</b> + True + + + 2 + 3 + 4 + 5 + + + + + True + 0 + + + 3 + 4 + 4 + 5 + + + + + + + + + False + + + + + True + Details + + + tab + False + False + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + + + + + 1 + False + + + + + True + Peers + + + tab + 1 + False + False + + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + + + + + 2 + False + + + + + True + Files + + + tab + 2 + False + False + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + False + + + + + 3 + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Log + + + tab + 3 + False + False + + - False - - - - - True - Clear Finished Torrents - Clear Finished - True - gtk-clear - - - - False - - - - - True - - - False - False - - - - - True - Start / Pause - Start / Pause - True - gtk-media-play - - - - False - - - - - True - Queue Torrent Up - Move Up - True - gtk-go-up - - - - False - - - - - True - Queue Torrent Down - Move Down - True - gtk-go-down - - - - False + False + False - 1 - 2 - - GTK_FILL - - - - - True - GTK_TOOLBAR_BOTH_HORIZ - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - GTK_TOOLBAR_BOTH_HORIZ - False - - - 2 3 - 1 - 2 - - GTK_FILL + 2 + 3 + + + + + True + + + 3 + 3 + 4 + @@ -400,671 +941,164 @@ - + True + GTK_TOOLBAR_BOTH_HORIZ + False + 2 3 - 3 - 4 - + 1 + 2 + + GTK_FILL - + True + GTK_TOOLBAR_BOTH_HORIZ + + + 1 + 2 + 1 + 2 + GTK_FILL + + + + + True + False - + True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - True - True - False - - - + Add Torrent + Add Torrent + True + gtk-add + - False - False + False - + True - True - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - - - True - 10 - 12 - 4 - - - - - - - - - True - 0 - - - 3 - 4 - 4 - 5 - - - - - True - 0 - <b>Upload Rate:</b> - True - - - 2 - 3 - 4 - 5 - - - - - True - 0 - - - 1 - 2 - 4 - 5 - - - - - True - 0 - <b>Download Rate:</b> - True - - - 4 - 5 - - - - - True - 0 - - - 1 - 2 - 11 - 12 - - - - - True - 0 - <b>Use compact storage allocation:</b> - True - - - 11 - 12 - - - - - True - 0 - - - 1 - 4 - 9 - 10 - - - - - True - 0 - - - 1 - 4 - 8 - 9 - - - - - True - 0 - - - 3 - 4 - 7 - 8 - - - - - True - 0 - - - 3 - 4 - 6 - 7 - - - - - True - 0 - <b>Uploaded This Session:</b> - True - - - 2 - 3 - 7 - 8 - - - - - True - 0 - <b>Share Ratio:</b> - True - - - 2 - 3 - 6 - 7 - - - - - True - 0 - - - 3 - 4 - 3 - 4 - - - - - True - 0 - - - 3 - 4 - 2 - 3 - - - - - True - 0 - <b>Total Uploaded:</b> - True - - - 2 - 3 - 3 - 4 - - - - - True - 0 - <b>Pieces:</b> - True - - - 2 - 3 - 2 - 3 - - - - - True - 0 - - - 3 - 4 - 10 - 11 - - - - - True - 0 - <b>Next Announce:</b> - True - - - 2 - 3 - 10 - 11 - - - - - True - 0 - - - 1 - 2 - 10 - 11 - - - - - True - 0 - <b>Tracker Status:</b> - True - - - 10 - 11 - - - - - True - 0 - <b>Tracker Response:</b> - True - - - 9 - 10 - - - - - True - 0 - <b>Tracker:</b> - True - - - 8 - 9 - - - - - True - 0 - - - 1 - 2 - 7 - 8 - - - - - True - 0 - - - 1 - 2 - 3 - 4 - - - - - True - 0 - - - 1 - 2 - 2 - 3 - - - - - True - 0 - <b>Downloaded this session:</b> - True - - - 7 - 8 - - - - - True - 0 - <b>Total Downloaded:</b> - True - - - 3 - 4 - - - - - True - 0 - <b>Total Size:</b> - True - - - 2 - 3 - - - - - True - 0 - <b>Seeders:</b> - True - - - 5 - 6 - - - - - True - 0 - <b>Peers:</b> - True - - - 2 - 3 - 5 - 6 - - - - - True - 0 - - - 1 - 2 - 5 - 6 - - - - - True - 0 - - - 3 - 4 - 5 - 6 - - - - - True - 0 - <b>Estimated Time Remaining:</b> - True - - - 2 - 3 - 11 - 12 - - - - - True - - - 3 - 4 - 11 - 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 - - - - - - - - - False - - - - - True - Details - - - tab - False - False - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - - - - - 1 - False - - - - - True - Peers - - - tab - 1 - False - False - - - - - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - - - - - 2 - False - - - - - True - Files - - - tab - 2 - False - False - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - False - - - - - 3 - False - - - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Log - - - tab - 3 - False - False - - + Remove Torrent + Remove Torrent + True + gtk-remove + - False - False + False + + + + + True + Clear Finished Torrents + Clear Finished + True + gtk-clear + + + + False + + + + + True + + + False + False + + + + + True + Start / Pause + Start / Pause + True + gtk-media-play + + + + False + + + + + True + Queue Torrent Up + Move Up + True + gtk-go-up + + + + False + + + + + True + Queue Torrent Down + Move Down + True + gtk-go-down + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + False + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Preferences + gtk-preferences + + + + False + + + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Plugins + gtk-disconnect + + + + False - 3 - 2 - 3 + 1 + 2 + + GTK_FILL diff --git a/glade/torrent_menu.glade b/glade/torrent_menu.glade index 50b3e98ef..34204e06e 100644 --- a/glade/torrent_menu.glade +++ b/glade/torrent_menu.glade @@ -10,6 +10,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK StartPause True + True diff --git a/src/interface.py b/src/interface.py index e74d7f313..7f342e1eb 100644 --- a/src/interface.py +++ b/src/interface.py @@ -257,12 +257,13 @@ class DelugeGTK: self.torrent_view = self.wtree.get_widget("torrent_view") self.torrent_glade = gtk.glade.XML(dcommon.get_glade_file("torrent_menu.glade"), domain='deluge') self.torrent_menu = self.torrent_glade.get_widget("torrent_menu") - self.torrent_glade.signal_autoconnect({"update_tracker": self.update_tracker, - "clear_finished": self.clear_finished, - "queue_up": self.q_torrent_up, - "queue_down": self.q_torrent_down, - "queue_bottom": self.q_to_bottom, - }) + self.torrent_glade.signal_autoconnect({ "start_pause": self.start_pause, + "update_tracker": self.update_tracker, + "clear_finished": self.clear_finished, + "queue_up": self.q_torrent_up, + "queue_down": self.q_torrent_down, + "queue_bottom": self.q_to_bottom, + }) # UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share self.torrent_model = gtk.ListStore(int, int, str, str, float, str, int, int, int, int, int, int, str, float) self.torrent_view.set_model(self.torrent_model)