[gnome-calendar/calendar-editor] source-dialog: insensitivize the add button at errors



commit da5abfeb49de69a881e9c53d07a0ebc9cd7e49d8
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Mar 30 23:29:35 2015 -0300

    source-dialog: insensitivize the add button at errors

 src/gcal-source-dialog.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 573e1a9..4e2079c 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -742,6 +742,9 @@ discover_sources_cb (GObject      *source,
   if (!e_webdav_discover_sources_finish (E_SOURCE (source), result, NULL, NULL, &discovered_sources, 
&user_adresses,
                                         &error))
     {
+      // Don't add an source with errors
+      gtk_widget_set_sensitive (priv->add_button, FALSE);
+
       /*
        * If it's the first try and things went wrong,
        * retry with the user credentials.


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