[easytag] Deselect when clicking a blank image treeview area
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [easytag] Deselect when clicking a blank image treeview area
- Date: Sat, 20 Apr 2013 12:51:37 +0000 (UTC)
commit b7ad8a101ddafc788728704cbc8ffc41103f02e9
Author: Abhinav <abhijangda hotmail com>
Date: Sat Apr 20 17:48:22 2013 +0530
Deselect when clicking a blank image treeview area
When clicking on a blank area in the tree view of image tags, deselect
all rows. Fixes bug 698149.
src/picture.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/picture.c b/src/picture.c
index a159b86..1204b8f 100644
--- a/src/picture.c
+++ b/src/picture.c
@@ -1209,6 +1209,18 @@ Picture_Save_File_Data (const Picture *pic, const gchar *filename)
*/
gboolean Picture_Entry_View_Button_Pressed (GtkTreeView *treeview, GdkEventButton *event, gpointer data)
{
+ if (event->type == GDK_BUTTON_PRESS && event->button == 1)
+ {
+ if (event->window == gtk_tree_view_get_bin_window (treeview))
+ {
+ if (!gtk_tree_view_get_path_at_pos (treeview, event->x, event->y,
+ NULL, NULL, NULL, NULL))
+ {
+ gtk_tree_selection_unselect_all (gtk_tree_view_get_selection (treeview));
+ }
+ }
+ }
+
if (event->type==GDK_2BUTTON_PRESS && event->button==1)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(PictureEntryView));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]