aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
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
parent9551d47dd1a42d1cce29926957a82238f9514272 (diff)
downloadgsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.gz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.bz2
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.lz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.xz
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.tar.zst
gsoc2013-evolution-9714a4bbf1a938871240640002c9dd369133c766.zip
Defer "backend-died" alerts to EShell.
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/addressbook.error.xml6
-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
4 files changed, 0 insertions, 67 deletions
diff --git a/addressbook/addressbook.error.xml b/addressbook/addressbook.error.xml
index 85151157a9..23dd3a2420 100644
--- a/addressbook/addressbook.error.xml
+++ b/addressbook/addressbook.error.xml
@@ -92,12 +92,6 @@
<_secondary>Error saving {0} to {1}: {2}</_secondary>
</error>
- <error id="backend-died" type="error">
- <_primary>The Evolution address book has quit unexpectedly.</_primary>
- <!-- Translators: {0} is replaced with an address book name which will not be available -->
- <_secondary>Your contacts for {0} will not be available until Evolution is restarted.</_secondary>
- </error>
-
<error id="ask-list-add-exists" type="question" default="GTK_RESPONSE_NO">
<_primary>Address '{0}' already exists.</_primary>
<_secondary>A contact already exists with this address. Would you like to add a new card with the same address anyway?</_secondary>
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,