[evolution-data-server/gnome-3-38] I#277 - Reminders: Preselect a reminder in the notification window



commit ddf0741cdb086b51953dfea7e53d402d4fd1fe8e
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 27 12:39:16 2020 +0100

    I#277 - Reminders: Preselect a reminder in the notification window
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/277

 src/libedataserverui/e-reminders-widget.c | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/src/libedataserverui/e-reminders-widget.c b/src/libedataserverui/e-reminders-widget.c
index d9ae6ef05..392055c04 100644
--- a/src/libedataserverui/e-reminders-widget.c
+++ b/src/libedataserverui/e-reminders-widget.c
@@ -661,6 +661,15 @@ reminders_widget_refresh_content_cb (gpointer user_data)
        g_list_free_full (previous_paths, (GDestroyNotify) gtk_tree_path_free);
        g_slist_free_full (past, e_reminder_data_free);
 
+       /* Make sure there's always something selected */
+       if (!gtk_tree_selection_count_selected_rows (selection)) {
+               GtkTreePath *path;
+
+               path = gtk_tree_path_new_first ();
+               gtk_tree_selection_select_path (selection, path);
+               gtk_tree_path_free (path);
+       }
+
        g_signal_emit (reminders, signals[CHANGED], 0, NULL);
 
        return FALSE;


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