[evolution/gnome-42] I#1941 - ESourceSelectorDialog: Close on double-click on source only



commit 38284701a92cdd52be5936d8d1ea006d90ee5821
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jun 27 15:27:07 2022 +0200

    I#1941 - ESourceSelectorDialog: Close on double-click on source only
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1941

 src/e-util/e-source-selector-dialog.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/src/e-util/e-source-selector-dialog.c b/src/e-util/e-source-selector-dialog.c
index e91dbdb812..5d1ec1d0f4 100644
--- a/src/e-util/e-source-selector-dialog.c
+++ b/src/e-util/e-source-selector-dialog.c
@@ -57,6 +57,16 @@ source_selector_dialog_row_activated_cb (GtkTreeView *tree_view,
                                          GtkTreeViewColumn *column,
                                          GtkWidget *dialog)
 {
+       GtkTreeSelection *selection;
+
+       if (!path)
+               return;
+
+       selection = gtk_tree_view_get_selection (tree_view);
+
+       if (!gtk_tree_selection_path_is_selected (selection, path))
+               return;
+
        gtk_dialog_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 }
 


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