aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/printing
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-01 12:07:26 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:48 +0800
commitae9db3ed236b0c734fd12c8dc8c99764626bf0b8 (patch)
treebd45389467f43a96c36172d8a925dd5df041cf5b /addressbook/printing
parentdb969c7f664d0a1d901bedd794b0c7e0762ede33 (diff)
downloadgsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar
gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.gz
gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.bz2
gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.lz
gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.xz
gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.tar.zst
gsoc2013-evolution-ae9db3ed236b0c734fd12c8dc8c99764626bf0b8.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'addressbook/printing')
-rw-r--r--addressbook/printing/e-contact-print.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 8057192f77..7719533fdd 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -410,8 +410,10 @@ view_complete (EBookClientView *client_view,
g_return_if_fail (ctxt != NULL);
e_book_client_view_stop (client_view, NULL);
- g_signal_handlers_disconnect_by_func (client_view, G_CALLBACK (contacts_added), ctxt);
- g_signal_handlers_disconnect_by_func (client_view, G_CALLBACK (view_complete), operation);
+ g_signal_handlers_disconnect_by_func (
+ client_view, G_CALLBACK (contacts_added), ctxt);
+ g_signal_handlers_disconnect_by_func (
+ client_view, G_CALLBACK (view_complete), operation);
g_object_unref (client_view);
@@ -780,7 +782,9 @@ contact_end_print (GtkPrintOperation *operation,
}
static void
-get_view_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data)
+get_view_ready_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
GtkPrintOperation *operation = user_data;
EBookClient *book_client = E_BOOK_CLIENT (source_object);
@@ -793,20 +797,28 @@ get_view_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_d
ctxt = g_object_get_data (G_OBJECT (operation), "contact-print-ctx");
g_return_if_fail (ctxt != NULL);
- if (error) {
- g_debug ("%s: Failed to get view: %s", G_STRFUNC, error->message);
+ if (error != NULL) {
+ g_warning (
+ "%s: Failed to get view: %s",
+ G_STRFUNC, error->message);
g_error_free (error);
gtk_print_operation_run (operation, ctxt->action, NULL, NULL);
g_object_unref (operation);
} else {
- g_signal_connect (client_view, "objects-added", G_CALLBACK (contacts_added), ctxt);
- g_signal_connect (client_view, "complete", G_CALLBACK (view_complete), operation);
+ g_signal_connect (
+ client_view, "objects-added",
+ G_CALLBACK (contacts_added), ctxt);
+ g_signal_connect (
+ client_view, "complete",
+ G_CALLBACK (view_complete), operation);
e_book_client_view_start (client_view, &error);
- if (error) {
- g_debug ("%s: Failed to start view: %s\n", G_STRFUNC, error->message);
+ if (error != NULL) {
+ g_warning (
+ "%s: Failed to start view: %s",
+ G_STRFUNC, error->message);
g_error_free (error);
gtk_print_operation_run (operation, ctxt->action, NULL, NULL);
@@ -834,7 +846,8 @@ e_contact_print (EBookClient *book_client,
operation = e_print_operation_new ();
gtk_print_operation_set_n_pages (operation, 1);
- g_object_set_data_full (G_OBJECT (operation), "contact-print-ctx", ctxt, g_free);
+ g_object_set_data_full (
+ G_OBJECT (operation), "contact-print-ctx", ctxt, g_free);
g_signal_connect (
operation, "begin-print",
@@ -849,7 +862,9 @@ e_contact_print (EBookClient *book_client,
if (book_client) {
gchar *query_str = e_book_query_to_string (query);
- e_book_client_get_view (book_client, query_str, NULL, get_view_ready_cb, operation);
+ e_book_client_get_view (
+ book_client, query_str, NULL,
+ get_view_ready_cb, operation);
g_free (query_str);
} else {