aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-14 05:55:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-17 07:57:09 +0800
commit9714a4bbf1a938871240640002c9dd369133c766 (patch)
tree99ffa3e5a7cbdb5f672909c62080a8ae5eb8d163 /addressbook/gui/widgets
parent9551d47dd1a42d1cce29926957a82238f9514272 (diff)
downloadgsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.gz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.zst
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.zip
Defer "backend-died" alerts to EShell.
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.c34
-rw-r--r--addressbook/gui/widgets/e-addressbook-model.h1
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c26
3 files changed, 0 insertions, 61 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c
index 1720b19a09..948c74d432 100644
--- a/addressbook/gui/widgets/e-addressbook-model.c
+++ b/addressbook/gui/widgets/e-addressbook-model.c
@@ -52,7 +52,6 @@ struct _EAddressbookModelPrivate {
gulong status_message_id;
gulong writable_status_id;
gulong view_complete_id;
- gulong backend_died_id;
guint remove_status_id;
guint search_in_progress : 1;
@@ -79,7 +78,6 @@ enum {
CONTACT_CHANGED,
MODEL_CHANGED,
STOP_STATE_CHANGED,
- BACKEND_DIED,
LAST_SIGNAL
};
@@ -348,13 +346,6 @@ readonly_cb (EBookClient *book_client,
}
static void
-backend_died_cb (EBookClient *book_client,
- EAddressbookModel *model)
-{
- g_signal_emit (model, signals[BACKEND_DIED], 0);
-}
-
-static void
client_view_ready_cb (GObject *source_object,
GAsyncResult *result,
gpointer user_data)
@@ -558,12 +549,6 @@ addressbook_model_dispose (GObject *object)
model->priv->writable_status_id);
model->priv->writable_status_id = 0;
- if (model->priv->backend_died_id)
- g_signal_handler_disconnect (
- model->priv->book_client,
- model->priv->backend_died_id);
- model->priv->backend_died_id = 0;
-
g_object_unref (model->priv->book_client);
model->priv->book_client = NULL;
}
@@ -747,15 +732,6 @@ e_addressbook_model_class_init (EAddressbookModelClass *class)
NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
- signals[BACKEND_DIED] = g_signal_new (
- "backend_died",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EAddressbookModelClass, backend_died),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
}
static void
@@ -907,12 +883,6 @@ e_addressbook_model_set_client (EAddressbookModel *model,
model->priv->writable_status_id);
model->priv->writable_status_id = 0;
- if (model->priv->backend_died_id != 0)
- g_signal_handler_disconnect (
- model->priv->book_client,
- model->priv->backend_died_id);
- model->priv->backend_died_id = 0;
-
g_object_unref (model->priv->book_client);
}
@@ -923,10 +893,6 @@ e_addressbook_model_set_client (EAddressbookModel *model,
book_client, "notify::readonly",
G_CALLBACK (readonly_cb), model);
- model->priv->backend_died_id = g_signal_connect (
- book_client, "backend-died",
- G_CALLBACK (backend_died_cb), model);
-
editable = !e_client_is_readonly (E_CLIENT (book_client));
e_addressbook_model_set_editable (model, editable);
diff --git a/addressbook/gui/widgets/e-addressbook-model.h b/addressbook/gui/widgets/e-addressbook-model.h
index c5b6489434..0fb7be340f 100644
--- a/addressbook/gui/widgets/e-addressbook-model.h
+++ b/addressbook/gui/widgets/e-addressbook-model.h
@@ -76,7 +76,6 @@ struct _EAddressbookModelClass {
gint index);
void (*model_changed) (EAddressbookModel *model);
void (*stop_state_changed) (EAddressbookModel *model);
- void (*backend_died) (EAddressbookModel *model);
};
GType e_addressbook_model_get_type (void);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 14293f5344..3fb30fe0f9 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -62,7 +62,6 @@ static void folder_bar_message (EAddressbookView *view,
const gchar *status);
static void stop_state_changed (GObject *object,
EAddressbookView *view);
-static void backend_died (EAddressbookView *view);
static void command_state_change (EAddressbookView *view);
struct _EAddressbookViewPrivate {
@@ -913,9 +912,6 @@ e_addressbook_view_new (EShellView *shell_view,
g_signal_connect_swapped (
view->priv->model, "writable-status",
G_CALLBACK (command_state_change), view);
- g_signal_connect_swapped (
- view->priv->model, "backend_died",
- G_CALLBACK (backend_died), view);
return widget;
}
@@ -1113,28 +1109,6 @@ command_state_change (EAddressbookView *view)
}
static void
-backend_died (EAddressbookView *view)
-{
- EShellView *shell_view;
- EAlertSink *alert_sink;
- EAddressbookModel *model;
- EBookClient *book_client;
- ESource *source;
-
- shell_view = e_addressbook_view_get_shell_view (view);
- alert_sink = E_ALERT_SINK (e_shell_view_get_shell_content (shell_view));
-
- model = e_addressbook_view_get_model (view);
- book_client = e_addressbook_model_get_client (model);
- source = e_client_get_source (E_CLIENT (book_client));
-
- e_alert_submit (
- alert_sink,
- "addressbook:backend-died",
- e_source_get_display_name (source), NULL);
-}
-
-static void
contact_print_button_draw_page (GtkPrintOperation *operation,
GtkPrintContext *context,
gint page_nr,