From 5146ff4c535f443fe25290eb96631e91ad44c8ef Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 21 May 2011 10:02:58 -0400 Subject: Coding style and whitespace cleanup. --- modules/calendar/e-cal-shell-view.c | 24 +++++++++++++--------- modules/mail/e-mail-shell-view-private.c | 8 +++++--- .../offline-alert/evolution-offline-alert.error | 13 ------------ modules/plugin-lib/e-plugin-lib.c | 16 ++++++++++++--- modules/plugin-mono/e-plugin-mono.c | 4 +++- 5 files changed, 35 insertions(+), 30 deletions(-) delete mode 100644 modules/offline-alert/evolution-offline-alert.error (limited to 'modules') diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index 20f30c12c4..b325160ded 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -252,27 +252,31 @@ is_delegated (icalcomponent *icalcomp, const gchar *user_email) prop = get_attendee_prop (icalcomp, user_email); - if (prop) { - param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDTO_PARAMETER); - if (param) + if (prop != NULL) { + param = icalproperty_get_first_parameter ( + prop, ICAL_DELEGATEDTO_PARAMETER); + if (param != NULL) delto = icalparameter_get_delegatedto (param); } else return FALSE; prop = get_attendee_prop (icalcomp, itip_strip_mailto (delto)); - if (prop) { + if (prop != NULL) { const gchar *delfrom = NULL; icalparameter_partstat status = ICAL_PARTSTAT_NONE; - param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER); - if (param) + param = icalproperty_get_first_parameter ( + prop, ICAL_DELEGATEDFROM_PARAMETER); + if (param != NULL) delfrom = icalparameter_get_delegatedfrom (param); - param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER); - if (param) + param = icalproperty_get_first_parameter ( + prop, ICAL_PARTSTAT_PARAMETER); + if (param != NULL) status = icalparameter_get_partstat (param); - if ((delfrom && *delfrom) && g_str_equal (itip_strip_mailto (delfrom), user_email) - && status != ICAL_PARTSTAT_DECLINED) + if ((delfrom != NULL && *delfrom != '\0') && + g_str_equal (itip_strip_mailto (delfrom), + user_email) && status != ICAL_PARTSTAT_DECLINED) return TRUE; } diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index 01ceca277e..32f8058c2e 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -326,10 +326,11 @@ mail_shell_view_popup_event_cb (EMailShellView *mail_shell_view, const gchar *uri) { EMailShellContent *mail_shell_content; - EMFormatHTML *html_formatter; + EMFormatHTML *formatter; EShellView *shell_view; EMailReader *reader; EMailView *mail_view; + EWebView *web_view; GtkMenu *menu; if (uri != NULL) @@ -339,9 +340,10 @@ mail_shell_view_popup_event_cb (EMailShellView *mail_shell_view, mail_view = e_mail_shell_content_get_mail_view (mail_shell_content); reader = E_MAIL_READER (mail_view); - html_formatter = e_mail_reader_get_formatter (reader); + formatter = e_mail_reader_get_formatter (reader); + web_view = em_format_html_get_web_view (formatter); - if (html_formatter && e_web_view_get_cursor_image (em_format_html_get_web_view (html_formatter)) != NULL) + if (e_web_view_get_cursor_image (web_view) != NULL) return FALSE; menu = e_mail_reader_get_popup_menu (reader); diff --git a/modules/offline-alert/evolution-offline-alert.error b/modules/offline-alert/evolution-offline-alert.error deleted file mode 100644 index 13ba4ff238..0000000000 --- a/modules/offline-alert/evolution-offline-alert.error +++ /dev/null @@ -1,13 +0,0 @@ - - - - Evolution is currently offline. - Click 'Work Online' to return to online mode. - - - - Evolution is currently offline due to a network outage. - Evolution will return to online mode once a network connection is established. - - - \ No newline at end of file diff --git a/modules/plugin-lib/e-plugin-lib.c b/modules/plugin-lib/e-plugin-lib.c index 33ba699258..1bd7190a68 100644 --- a/modules/plugin-lib/e-plugin-lib.c +++ b/modules/plugin-lib/e-plugin-lib.c @@ -46,6 +46,7 @@ plugin_lib_loadmodule (EPlugin *plugin) { EPluginLib *plugin_lib = E_PLUGIN_LIB (plugin); EPluginLibEnableFunc enable; + gboolean found_symbol; if (plugin_lib->module != NULL) return 0; @@ -56,9 +57,13 @@ plugin_lib_loadmodule (EPlugin *plugin) return -1; } - if ((plugin_lib->module = g_module_open (plugin_lib->location, 0)) == NULL) { + plugin_lib->module = g_module_open (plugin_lib->location, 0); + + if (plugin_lib->module == NULL) { plugin->enabled = FALSE; - g_warning ("can't load plugin '%s': %s", plugin_lib->location, g_module_error ()); + g_warning ( + "can't load plugin '%s': %s", + plugin_lib->location, g_module_error ()); return -1; } @@ -66,7 +71,12 @@ plugin_lib_loadmodule (EPlugin *plugin) if (!plugin->enabled) return 0; - if (g_module_symbol (plugin_lib->module, "e_plugin_lib_enable", (gpointer)&enable)) { + found_symbol = g_module_symbol ( + plugin_lib->module, + "e_plugin_lib_enable", + (gpointer) &enable); + + if (found_symbol) { if (enable (plugin, TRUE) != 0) { plugin->enabled = FALSE; g_module_close (plugin_lib->module); diff --git a/modules/plugin-mono/e-plugin-mono.c b/modules/plugin-mono/e-plugin-mono.c index e2d6756af4..20a6dcff56 100644 --- a/modules/plugin-mono/e-plugin-mono.c +++ b/modules/plugin-mono/e-plugin-mono.c @@ -161,7 +161,9 @@ plugin_mono_invoke (EPlugin *plugin, }*/ while ((mono_method = mono_class_get_methods (priv->class, &iter))) { - g_print ("\n\a Method name is : <%s>\n\a", mono_method_get_name (mono_method)); + g_print ( + "\n\a Method name is : <%s>\n\a", + mono_method_get_name (mono_method)); } //mono_class_get_method_from_name m = mono_class_get_method_from_name (priv->class, name, -1); -- cgit v1.2.3