aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/printing
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-07-01 12:07:26 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-08-13 23:27:51 +0800
commitf59681796df8fe0138a1754abbe8ec781bc1535e (patch)
tree0ced0c119ffed095713d7f64732686df9b2d9152 /addressbook/printing
parentbf4a1a13e3295deefc4031a446627ff9b1c95c7a (diff)
downloadgsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.gz
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.tar.zst
gsoc2013-evolution-f59681796df8fe0138a1754abbe8ec781bc1535e.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 {