[empathy/more-accounts-fixes: 2/4] When we're creating our first account, don't let the remove button become sensitive when we change t



commit 74be0ae5e7a1c1fe845a056cd38977c649e0989a
Author: Travis Reitter <treitter gmail com>
Date:   Fri Feb 26 15:13:36 2010 -0800

    When we're creating our first account, don't let the remove button become sensitive when we change the account protocol

 src/empathy-accounts-dialog.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 6501914..8ae8450 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1236,6 +1236,7 @@ accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
   GtkTreeModel *model;
   GtkTreeIter   iter;
   gboolean      is_selection;
+  gboolean creating = FALSE;
 
   is_selection = gtk_tree_selection_get_selected (selection, &model, &iter);
 
@@ -1245,8 +1246,14 @@ accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
   if (settings != NULL)
     g_object_unref (settings);
 
+  if (priv->setting_widget_object != NULL)
+    {
+      g_object_get (priv->setting_widget_object,
+          "creating-account", &creating, NULL);
+    }
+
   /* Update remove button sensitivity */
-  gtk_widget_set_sensitive (priv->button_remove, is_selection);
+  gtk_widget_set_sensitive (priv->button_remove, is_selection && !creating);
 }
 
 static void



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