aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-04-01 20:14:56 +0800
committerMilan Crha <mcrha@redhat.com>2010-04-01 20:14:56 +0800
commitcc7240b28e554ec88bbba7f67c52699b7588c59b (patch)
tree19a1d7805708372f5c83f0a200c1ca61206811c3
parent21981b4515c3a0509b8bbf852fccd7c684e8e634 (diff)
downloadgsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.tar
gsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.tar.gz
gsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.tar.bz2
gsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.tar.lz
gsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.tar.xz
gsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.tar.zst
gsoc2013-evolution-cc7240b28e554ec88bbba7f67c52699b7588c59b.zip
Bug #488979 - Disable Edit for card views in contacts
-rw-r--r--widgets/menus/gal-define-views-dialog.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/widgets/menus/gal-define-views-dialog.c b/widgets/menus/gal-define-views-dialog.c
index 34c20be18a..3a32dc64f6 100644
--- a/widgets/menus/gal-define-views-dialog.c
+++ b/widgets/menus/gal-define-views-dialog.c
@@ -188,13 +188,18 @@ gdvd_cursor_changed_callback (GtkWidget *widget, GalDefineViewsDialog *dialog)
if (gtk_tree_selection_get_selected (gtk_tree_view_get_selection (dialog->treeview),
&dialog->model,
&iter)) {
+ GalViewClass *gvclass = NULL;
+
gtk_tree_model_get (dialog->model, &iter, COL_GALVIEW_DATA, &item, -1);
button = e_builder_get_widget (dialog->builder, "button-delete");
gtk_widget_set_sensitive (GTK_WIDGET (button), !item->built_in);
+ if (item->view)
+ gvclass = GAL_VIEW_GET_CLASS (item->view);
+
button = e_builder_get_widget (dialog->builder, "button-modify");
- gtk_widget_set_sensitive (GTK_WIDGET (button), !item->built_in);
+ gtk_widget_set_sensitive (GTK_WIDGET (button), !item->built_in && gvclass && gvclass->edit != NULL);
}
}