diff options
author | Milan Crha <mcrha@redhat.com> | 2010-04-01 20:13:23 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-04-01 20:13:23 +0800 |
commit | 09e53887ce88141c014bb99e117fbb28f47febcc (patch) | |
tree | a087440676568be5277a72b7958b624d0e409cce | |
parent | 94cc603cca2152ad8aedcbec3cd0e28110e9a21c (diff) | |
download | gsoc2013-evolution-09e53887ce88141c014bb99e117fbb28f47febcc.tar.gz gsoc2013-evolution-09e53887ce88141c014bb99e117fbb28f47febcc.tar.zst gsoc2013-evolution-09e53887ce88141c014bb99e117fbb28f47febcc.zip |
Bug #488979 - Disable Edit for card views in contacts
-rw-r--r-- | widgets/menus/gal-define-views-dialog.c | 7 |
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); } } |