aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-17 14:57:32 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:50 +0800
commitfdd6d71ab45cb312053bd84213ada4f58c67f54c (patch)
treebc9339c6f04182c839df6660bb8ee4d8ac28aa85 /addressbook
parent8c632f9e6a663390dea06ff5ada9173841ac3162 (diff)
downloadgsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.tar
gsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.tar.gz
gsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.tar.bz2
gsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.tar.lz
gsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.tar.xz
gsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.tar.zst
gsoc2013-evolution-fdd6d71ab45cb312053bd84213ada4f58c67f54c.zip
Bug #656722 - Incorrect prototype of notify:: signal callback
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c30
2 files changed, 12 insertions, 20 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 3d76a401eb..5dd02b48e6 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -4253,7 +4253,7 @@ e_contact_editor_new (EShell *shell,
}
static void
-notify_readonly_cb (EBookClient *book_client, EContactEditor *ce)
+notify_readonly_cb (EBookClient *book_client, GParamSpec *pspec, EContactEditor *ce)
{
gint new_target_editable;
gboolean changed = FALSE;
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 2a34ccf3c0..dc1068dea3 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -52,7 +52,6 @@ struct _EAddressbookModelPrivate {
guint search_in_progress : 1;
guint editable : 1;
- guint editable_set : 1;
guint first_get_view : 1;
};
@@ -325,16 +324,10 @@ view_complete_cb (EBookClientView *client_view,
static void
readonly_cb (EBookClient *book_client,
+ GParamSpec *pspec,
EAddressbookModel *model)
{
- if (!model->priv->editable_set) {
- model->priv->editable =
- !e_client_is_readonly (E_CLIENT (book_client));
-
- g_signal_emit (
- model, signals[WRITABLE_STATUS], 0,
- model->priv->editable);
- }
+ e_addressbook_model_set_editable (model, !e_client_is_readonly (E_CLIENT (book_client)));
}
static void
@@ -885,13 +878,7 @@ e_addressbook_model_set_client (EAddressbookModel *model,
book_client, "backend-died",
G_CALLBACK (backend_died_cb), model);
- if (!model->priv->editable_set) {
- model->priv->editable =
- !e_client_is_readonly (E_CLIENT (book_client));
- g_signal_emit (
- model, signals[WRITABLE_STATUS], 0,
- model->priv->editable);
- }
+ e_addressbook_model_set_editable (model, !e_client_is_readonly (E_CLIENT (book_client)));
if (model->priv->client_view_idle_id == 0)
model->priv->client_view_idle_id = g_idle_add (
@@ -915,10 +902,15 @@ e_addressbook_model_set_editable (EAddressbookModel *model,
{
g_return_if_fail (E_IS_ADDRESSBOOK_MODEL (model));
- model->priv->editable = editable;
- model->priv->editable_set = TRUE;
+ if ((model->priv->editable ? 1 : 0) != (editable ? 1 : 0)) {
+ model->priv->editable = editable;
- g_object_notify (G_OBJECT (model), "editable");
+ g_signal_emit (
+ model, signals[WRITABLE_STATUS], 0,
+ model->priv->editable);
+
+ g_object_notify (G_OBJECT (model), "editable");
+ }
}
gchar *