aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-21 22:02:58 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:17 +0800
commit5146ff4c535f443fe25290eb96631e91ad44c8ef (patch)
treeb8cc31419c1f297092e13eedd9a5877f4c106eda /plugins
parentea8a59a443f861af88ddb21d5dcbde1c95006203 (diff)
downloadgsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar
gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.gz
gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.bz2
gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.lz
gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.xz
gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.tar.zst
gsoc2013-evolution-5146ff4c535f443fe25290eb96631e91ad44c8ef.zip
Coding style and whitespace cleanup.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/bbdb/gaimbuddies.c9
-rw-r--r--plugins/dbx-import/dbx-importer.c6
-rw-r--r--plugins/external-editor/external-editor.c62
-rw-r--r--plugins/save-calendar/format-handler.h5
-rw-r--r--plugins/save-calendar/save-calendar.c6
5 files changed, 60 insertions, 28 deletions
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index 3e6f344ed0..4056793963 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -117,7 +117,8 @@ bbdb_sync_buddy_list_check (void)
/* Reprocess the buddy list if it's been updated. */
gconf = gconf_client_get_default ();
- last_sync_str = gconf_client_get_string (gconf, GCONF_KEY_GAIM_LAST_SYNC_TIME, NULL);
+ last_sync_str = gconf_client_get_string (
+ gconf, GCONF_KEY_GAIM_LAST_SYNC_TIME, NULL);
if (last_sync_str == NULL || !strcmp ((const gchar *)last_sync_str, ""))
last_sync_time = (time_t) 0;
else
@@ -162,8 +163,10 @@ store_last_sync_idle_cb (gpointer data)
md5 = get_md5_as_string (blist_path);
gconf = gconf_client_get_default ();
- gconf_client_set_string (gconf, GCONF_KEY_GAIM_LAST_SYNC_TIME, last_sync_time, NULL);
- gconf_client_set_string (gconf, GCONF_KEY_GAIM_LAST_SYNC_MD5, md5, NULL);
+ gconf_client_set_string (
+ gconf, GCONF_KEY_GAIM_LAST_SYNC_TIME, last_sync_time, NULL);
+ gconf_client_set_string (
+ gconf, GCONF_KEY_GAIM_LAST_SYNC_MD5, md5, NULL);
g_object_unref (G_OBJECT (gconf));
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index c2ca34cdb7..c9ecca9127 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -253,8 +253,10 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei,
_("Select folder to import into"));
gtk_label_set_mnemonic_widget (label, w);
- em_folder_selection_button_set_selection ((EMFolderSelectionButton *) w, select_uri);
- folder_selected ((EMFolderSelectionButton *) w, (EImportTargetURI *) target);
+ em_folder_selection_button_set_selection (
+ EM_FOLDER_SELECTION_BUTTON (w), select_uri);
+ folder_selected (
+ EM_FOLDER_SELECTION_BUTTON (w), (EImportTargetURI *) target);
g_signal_connect (w, "selected", G_CALLBACK(folder_selected), target);
gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, TRUE, 6);
diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c
index 5ca435a0e6..48fd243873 100644
--- a/plugins/external-editor/external-editor.c
+++ b/plugins/external-editor/external-editor.c
@@ -49,16 +49,24 @@
#define d(x)
-#define EDITOR_GCONF_KEY_COMMAND "/apps/evolution/eplugin/external-editor/editor-command"
-#define EDITOR_GCONF_KEY_IMMEDIATE "/apps/evolution/eplugin/external-editor/launch-on-key-press"
-
-gboolean e_plugin_ui_init (GtkUIManager *manager, EMsgComposer *composer);
-GtkWidget * e_plugin_lib_get_configure_widget (EPlugin *epl);
-static void ee_editor_command_changed (GtkWidget *textbox);
-static void ee_editor_immediate_launch_changed (GtkWidget *checkbox);
-static void async_external_editor (EMsgComposer *composer);
-static gboolean editor_running (void);
-static gboolean key_press_cb (GtkWidget * widget, GdkEventKey * event, EMsgComposer *composer);
+#define EDITOR_GCONF_KEY_COMMAND \
+ "/apps/evolution/eplugin/external-editor/editor-command"
+#define EDITOR_GCONF_KEY_IMMEDIATE \
+ "/apps/evolution/eplugin/external-editor/launch-on-key-press"
+
+gboolean e_plugin_ui_init (GtkUIManager *manager,
+ EMsgComposer *composer);
+GtkWidget * e_plugin_lib_get_configure_widget
+ (EPlugin *epl);
+static void ee_editor_command_changed
+ (GtkWidget *textbox);
+static void ee_editor_immediate_launch_changed
+ (GtkWidget *checkbox);
+static void async_external_editor (EMsgComposer *composer);
+static gboolean editor_running (void);
+static gboolean key_press_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ EMsgComposer *composer);
/* used to track when the external editor is active */
static GThread *editor_thread;
@@ -133,12 +141,16 @@ e_plugin_lib_get_configure_widget (EPlugin *epl)
gtk_box_pack_start (GTK_BOX (vbox), help, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), checkbox, FALSE, FALSE, 0);
- g_signal_connect (textbox, "changed", G_CALLBACK(ee_editor_command_changed), textbox);
+ g_signal_connect (
+ textbox, "changed",
+ G_CALLBACK (ee_editor_command_changed), textbox);
- g_signal_connect (checkbox, "toggled",
- G_CALLBACK (ee_editor_immediate_launch_changed), checkbox);
+ g_signal_connect (
+ checkbox, "toggled",
+ G_CALLBACK (ee_editor_immediate_launch_changed), checkbox);
gtk_widget_show_all (vbox);
+
return vbox;
}
@@ -277,7 +289,8 @@ async_external_editor (EMsgComposer *composer)
}
gconf = gconf_client_get_default ();
- editor_cmd = gconf_client_get_string (gconf, EDITOR_GCONF_KEY_COMMAND, NULL);
+ editor_cmd = gconf_client_get_string (
+ gconf, EDITOR_GCONF_KEY_COMMAND, NULL);
if (!editor_cmd) {
if (!(editor_cmd = g_strdup (g_getenv ("EDITOR"))) )
/* Make gedit the default external editor,
@@ -288,21 +301,27 @@ async_external_editor (EMsgComposer *composer)
g_object_unref (gconf);
if (g_strrstr (editor_cmd, "vim") != NULL
- && gtk_html_get_cursor_pos (gtkhtml_editor_get_html (GTKHTML_EDITOR (composer)), &position, &offset)
+ && gtk_html_get_cursor_pos (
+ gtkhtml_editor_get_html (
+ GTKHTML_EDITOR (composer)), &position, &offset)
&& position >= 0 && offset >= 0) {
gchar *tmp = editor_cmd;
gint lineno;
gboolean set_nofork;
set_nofork = g_strrstr (editor_cmd, "gvim") != NULL;
- /* increment 1 so that entering vim insert mode places you in the same
- * entry position you were at in the html */
+ /* Increment 1 so that entering vim insert mode places you
+ * in the same entry position you were at in the html. */
offset++;
/* calculate the line number that the cursor is in */
lineno = numlines (content, position);
- editor_cmd = g_strdup_printf ("%s \"+call cursor(%d,%d)\"%s%s", tmp, lineno, offset, set_nofork ? " " : "", set_nofork ? "--nofork" : "");
+ editor_cmd = g_strdup_printf (
+ "%s \"+call cursor(%d,%d)\"%s%s",
+ tmp, lineno, offset,
+ set_nofork ? " " : "",
+ set_nofork ? "--nofork" : "");
g_free (tmp);
}
@@ -372,7 +391,8 @@ static void launch_editor (GtkAction *action, EMsgComposer *composer)
disable_composer (composer);
- editor_thread = g_thread_create ((GThreadFunc) async_external_editor, composer, FALSE, NULL);
+ editor_thread = g_thread_create (
+ (GThreadFunc) async_external_editor, composer, FALSE, NULL);
}
static GtkActionEntry entries[] = {
@@ -436,7 +456,9 @@ static gboolean
delete_cb (GtkWidget *widget, EMsgComposer *composer)
{
if (editor_running ()) {
- e_alert_run_dialog_for_args (NULL, "org.gnome.evolution.plugins.external-editor:editor-still-running", NULL);
+ e_alert_run_dialog_for_args (
+ NULL, "org.gnome.evolution.plugins."
+ "external-editor:editor-still-running", NULL);
return TRUE;
}
diff --git a/plugins/save-calendar/format-handler.h b/plugins/save-calendar/format-handler.h
index 7b5bf286a7..7c697725cd 100644
--- a/plugins/save-calendar/format-handler.h
+++ b/plugins/save-calendar/format-handler.h
@@ -42,7 +42,10 @@ struct _FormatHandler
gpointer data;
- void (*save) (FormatHandler *handler, ESourceSelector *selector, ECalSourceType type, gchar *dest_uri);
+ void (*save) (FormatHandler *handler,
+ ESourceSelector *selector,
+ ECalSourceType type,
+ gchar *dest_uri);
};
FormatHandler *csv_format_handler_new (void);
diff --git a/plugins/save-calendar/save-calendar.c b/plugins/save-calendar/save-calendar.c
index facb915566..8bf0067b79 100644
--- a/plugins/save-calendar/save-calendar.c
+++ b/plugins/save-calendar/save-calendar.c
@@ -81,8 +81,10 @@ on_type_combobox_changed (GtkComboBox *combobox, gpointer data)
GtkTreeIter iter;
GtkTreeModel *model = gtk_combo_box_get_model (combobox);
- gtk_container_foreach (GTK_CONTAINER (extra_widget),
- extra_widget_foreach_hide, g_object_get_data (G_OBJECT (combobox), "format-box"));
+ gtk_container_foreach (
+ GTK_CONTAINER (extra_widget),
+ extra_widget_foreach_hide,
+ g_object_get_data (G_OBJECT (combobox), "format-box"));
gtk_combo_box_get_active_iter (combobox, &iter);