[Xfce4-commits] <xfmpc:master> dbbrowser, playlist: Fix right click button release event

Mike Massonnet noreply at xfce.org
Sat Aug 13 10:54:02 CEST 2011


Updating branch refs/heads/master
         to 241b415a196ec5e95be43b96259e68f28d0cbdeb (commit)
       from e25f572063f6e73b99ca03232bcb371612b17b19 (commit)

commit 241b415a196ec5e95be43b96259e68f28d0cbdeb
Author: Mike Massonnet <mmassonnet at xfce.org>
Date:   Sun Jul 31 14:24:50 2011 +0200

    dbbrowser, playlist: Fix right click button release event
    
    The menu didn't popup on right click as long as no item was selected.

 src/dbbrowser.vala |    5 +++--
 src/playlist.vala  |    5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/dbbrowser.vala b/src/dbbrowser.vala
index 9f76535..f8cae68 100644
--- a/src/dbbrowser.vala
+++ b/src/dbbrowser.vala
@@ -359,8 +359,6 @@ namespace Xfmpc {
 
 			Gtk.TreePath path;
 			var selection = this.treeview.get_selection ();
-			if (selection.count_selected_rows () < 1)
-				return true;
 
 			if (this.treeview.get_path_at_pos ((int) event.x, (int) event.y,
 						           out path, null, null, null))
@@ -371,6 +369,9 @@ namespace Xfmpc {
 				}
 			}
 
+			if (selection.count_selected_rows () < 1)
+				return true;
+
 			menu_popup ();
 
 			return true;
diff --git a/src/playlist.vala b/src/playlist.vala
index 36086ad..c668bac 100644
--- a/src/playlist.vala
+++ b/src/playlist.vala
@@ -284,8 +284,6 @@ namespace Xfmpc {
 				return false;
 
 			selection = this.treeview.get_selection ();
-			if (selection.count_selected_rows () < 1)
-				return true;
 
 			bool sensitive = selection.count_selected_rows () == 1;
 			this.mi_browse.set_sensitive (sensitive);
@@ -300,6 +298,9 @@ namespace Xfmpc {
 				}
 			}
 
+			if (selection.count_selected_rows () < 1)
+				return true;
+
 			menu_popup ();
 
 			return true;


More information about the Xfce4-commits mailing list