aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-02-13 07:49:39 +0800
committerChris Lahey <clahey@src.gnome.org>2002-02-13 07:49:39 +0800
commit2788f38ed6cd4e82a8eda5183242457e145019d1 (patch)
tree7c3dd73c6250660ce083c98a6c1e42bdbab0e61f /addressbook/gui/widgets/e-addressbook-reflow-adapter.c
parentf4d3822695cea3f07e8fb2a40231451884796da3 (diff)
downloadgsoc2013-evolution-2788f38ed6cd4e82a8eda5183242457e145019d1.tar.gz
gsoc2013-evolution-2788f38ed6cd4e82a8eda5183242457e145019d1.tar.zst
gsoc2013-evolution-2788f38ed6cd4e82a8eda5183242457e145019d1.zip
Added an argument to get the model.
2002-02-12 Christopher James Lahey <clahey@ximian.com> * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_get_arg): Added an argument to get the model. * gui/widgets/e-addressbook-view.c (writable_status): Don't bother connecting to the writable_status callback on the book, simply rely on the writable_status callback on the addressbook model. * gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h (set_empty_message): Handle the case of a read only view here. svn path=/trunk/; revision=15698
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-reflow-adapter.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-reflow-adapter.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
index 06be8543c7..51bf381802 100644
--- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c
@@ -36,6 +36,7 @@ enum {
ARG_BOOK,
ARG_QUERY,
ARG_EDITABLE,
+ ARG_MODEL,
};
enum {
@@ -263,8 +264,8 @@ open_card (GtkWidget *widget, ModelAndSelection *mns)
list = get_card_list (mns);
e_addressbook_show_multiple_cards (book, list, e_addressbook_model_editable (priv->model));
-
e_free_object_list (list);
+
model_and_selection_free (mns);
}
@@ -286,7 +287,7 @@ e_addressbook_reflow_adapter_right_click (EAddressbookReflowAdapter *adapter, Gd
{N_("Copy"), NULL, GTK_SIGNAL_FUNC (copy), NULL, 0},
{N_("Paste"), NULL, GTK_SIGNAL_FUNC (paste), NULL, POPUP_READONLY_MASK},
{N_("Delete"), NULL, GTK_SIGNAL_FUNC(delete), NULL, POPUP_READONLY_MASK},
- {NULL, NULL, NULL, 0}};
+ E_POPUP_TERMINATOR};
mns->adapter = adapter;
mns->selection = selection;
@@ -514,7 +515,10 @@ addressbook_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
gtk_object_get (GTK_OBJECT (priv->model),
"book", &book,
NULL);
- GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(book);
+ if (book)
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT(book);
+ else
+ GTK_VALUE_OBJECT (*arg) = NULL;
break;
}
case ARG_QUERY: {
@@ -533,6 +537,12 @@ addressbook_get_arg (GtkObject *o, GtkArg *arg, guint arg_id)
GTK_VALUE_BOOL (*arg) = editable;
break;
}
+ case ARG_MODEL:
+ if (priv->model)
+ GTK_VALUE_OBJECT (*arg) = GTK_OBJECT (priv->model);
+ else
+ GTK_VALUE_OBJECT (*arg) = NULL;
+ break;
default:
arg->type = GTK_TYPE_INVALID;
break;
@@ -556,6 +566,8 @@ e_addressbook_reflow_adapter_class_init (GtkObjectClass *object_class)
GTK_ARG_READWRITE, ARG_QUERY);
gtk_object_add_arg_type ("EAddressbookReflowAdapter::editable", GTK_TYPE_BOOL,
GTK_ARG_READWRITE, ARG_EDITABLE);
+ gtk_object_add_arg_type ("EAddressbookReflowAdapter::model", E_ADDRESSBOOK_MODEL_TYPE,
+ GTK_ARG_READABLE, ARG_MODEL);
e_addressbook_reflow_adapter_signals [DRAG_BEGIN] =
gtk_signal_new ("drag_begin",