[gthumb] do not activate the paste command if the file view is not focused



commit 9b985af9c331be98b28f600c0dbdcd5d609db182
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Thu Jul 29 09:22:22 2010 +0200

    do not activate the paste command if the file view is not focused
    
    this fixes a shortcut conflict when pressing control+v in a text
    entry that causes the paste command to be activated.

 extensions/file_manager/actions.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/extensions/file_manager/actions.c b/extensions/file_manager/actions.c
index 212d5d3..5a8c308 100644
--- a/extensions/file_manager/actions.c
+++ b/extensions/file_manager/actions.c
@@ -349,6 +349,9 @@ gth_browser_activate_action_edit_paste (GtkAction  *action,
 {
 	PasteData *paste_data;
 
+	if (gtk_window_get_focus (GTK_WINDOW (browser)) != gth_browser_get_file_list_view (browser))
+		return;
+
 	paste_data = g_new0 (PasteData, 1);
 	paste_data->browser = g_object_ref (browser);
 	paste_data->destination = g_object_ref (gth_browser_get_location_data (browser));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]