aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/new-mail-notify
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2007-11-15 06:04:21 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-11-15 06:04:21 +0800
commit9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91 (patch)
tree2e1e96f33404781354c422a7e9beaf458ebeb655 /plugins/new-mail-notify
parent7e8f8bb9e5167b0219b48ab3e8062080d3740b0a (diff)
downloadgsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.gz
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.tar.zst
gsoc2013-evolution-9e4fcb29cf7f05c18f7fd34e318f9e795fa32e91.zip
** Remove trailing whitespace from source code.
2007-11-14 Matthew Barnes <mbarnes@redhat.com> ** Remove trailing whitespace from source code. svn path=/trunk/; revision=34537
Diffstat (limited to 'plugins/new-mail-notify')
-rw-r--r--plugins/new-mail-notify/new-mail-notify.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/plugins/new-mail-notify/new-mail-notify.c b/plugins/new-mail-notify/new-mail-notify.c
index 9960e40b11..139838b64a 100644
--- a/plugins/new-mail-notify/new-mail-notify.c
+++ b/plugins/new-mail-notify/new-mail-notify.c
@@ -49,18 +49,18 @@ static void
send_dbus_message (const char *name, const char *data, guint new)
{
DBusMessage *message;
-
+
/* Create a new message on the DBUS_INTERFACE */
if (!(message = dbus_message_new_signal (DBUS_PATH, DBUS_INTERFACE, name)))
return;
-
+
/* Appends the data as an argument to the message */
dbus_message_append_args (message,
#if DBUS_VERSION >= 310
DBUS_TYPE_STRING, &data,
#else
DBUS_TYPE_STRING, data,
-#endif
+#endif
DBUS_TYPE_INVALID);
if (new) {
@@ -70,14 +70,14 @@ send_dbus_message (const char *name, const char *data, guint new)
DBUS_TYPE_STRING, &display_name, DBUS_TYPE_UINT32, &new,
#else
DBUS_TYPE_STRING, display_name, DBUS_TYPE_UINT32, new,
-#endif
+#endif
DBUS_TYPE_INVALID);
-
+
}
/* Sends the message */
dbus_connection_send (bus, message, NULL);
-
+
/* Frees the message */
dbus_message_unref (message);
}
@@ -102,9 +102,9 @@ reinit_dbus (gpointer user_data)
{
if (!enabled || init_dbus ())
return FALSE;
-
+
/* keep trying to re-establish dbus connection */
-
+
return TRUE;
}
@@ -115,12 +115,12 @@ filter_function (DBusConnection *connection, DBusMessage *message, void *user_da
strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
dbus_connection_unref (bus);
bus = NULL;
-
+
g_timeout_add (3000, reinit_dbus, NULL);
-
+
return DBUS_HANDLER_RESULT_HANDLED;
}
-
+
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
}
@@ -128,22 +128,22 @@ static gboolean
init_dbus (void)
{
DBusError error;
-
+
if (bus != NULL)
return TRUE;
-
+
dbus_error_init (&error);
if (!(bus = dbus_bus_get (DBUS_BUS_SESSION, &error))) {
g_warning ("could not get system bus: %s\n", error.message);
dbus_error_free (&error);
return FALSE;
}
-
+
dbus_connection_setup_with_g_main (bus, NULL);
dbus_connection_set_exit_on_disconnect (bus, FALSE);
-
+
dbus_connection_add_filter (bus, filter_function, NULL, NULL);
-
+
return TRUE;
}
@@ -154,17 +154,17 @@ e_plugin_lib_enable (EPluginLib *ep, int enable)
if (enable) {
if (!init_dbus ())
return -1;
-
+
enabled = TRUE;
} else {
if (bus != NULL) {
dbus_connection_unref (bus);
bus = NULL;
}
-
+
enabled = FALSE;
}
-
+
return 0;
}