aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-17 14:57:32 +0800
committerMilan Crha <mcrha@redhat.com>2011-08-17 14:57:32 +0800
commitcdf7dc43ec5a42ec9962223e54ec80ce678a807e (patch)
tree5a3e38904d957d815caecb093e1cde457df89dec
parenta462d33a6da18e08667a7111c70cef72fca86dc5 (diff)
downloadgsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.tar
gsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.tar.gz
gsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.tar.bz2
gsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.tar.lz
gsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.tar.xz
gsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.tar.zst
gsoc2013-evolution-cdf7dc43ec5a42ec9962223e54ec80ce678a807e.zip
Bug #656722 - Incorrect prototype of notify:: signal callback
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c2
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c30
-rw-r--r--widgets/misc/e-contact-map-window.c2
3 files changed, 13 insertions, 21 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 *
diff --git a/widgets/misc/e-contact-map-window.c b/widgets/misc/e-contact-map-window.c
index 41570ee748..2984d4094d 100644
--- a/widgets/misc/e-contact-map-window.c
+++ b/widgets/misc/e-contact-map-window.c
@@ -130,7 +130,7 @@ contact_map_window_zoom_out_cb (GtkButton *button,
}
static void
zoom_level_changed_cb (ChamplainView *view,
- gint bzoom_level,
+ GParamSpec *pspec,
gpointer user_data)
{
EContactMapWindow *window = user_data;