Fix some whitespace style errors

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5886 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Colomban Wendling 2011-08-06 18:34:14 +00:00
parent ee1d546d8f
commit ddb4ad5fa5
17 changed files with 202 additions and 515 deletions

File diff suppressed because it is too large Load Diff

View File

@ -779,7 +779,7 @@ void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...)
win32_message_dialog(GTK_WIDGET(parent), type, string); win32_message_dialog(GTK_WIDGET(parent), type, string);
#else #else
dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT,
type, GTK_BUTTONS_OK, "%s", string); type, GTK_BUTTONS_OK, "%s", string);
show_msgbox_dialog(dialog, type, parent); show_msgbox_dialog(dialog, type, parent);
#endif #endif
g_free(string); g_free(string);
@ -797,7 +797,7 @@ void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text,
#else #else
GtkWidget *dialog; GtkWidget *dialog;
dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT, dialog = gtk_message_dialog_new(parent, GTK_DIALOG_DESTROY_WITH_PARENT,
type, GTK_BUTTONS_OK, "%s", text); type, GTK_BUTTONS_OK, "%s", text);
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", secondary); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", secondary);
show_msgbox_dialog(dialog, type, parent); show_msgbox_dialog(dialog, type, parent);
#endif #endif
@ -811,7 +811,7 @@ static gint run_unsaved_dialog(const gchar *msg, const gchar *msg2)
gint ret; gint ret;
dialog = gtk_message_dialog_new(GTK_WINDOW(main_widgets.window), GTK_DIALOG_DESTROY_WITH_PARENT, dialog = gtk_message_dialog_new(GTK_WINDOW(main_widgets.window), GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", msg); GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", msg);
gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", msg2); gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(dialog), "%s", msg2);
gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
@ -883,8 +883,7 @@ gboolean dialogs_show_unsaved_file(GeanyDocument *doc)
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
static void static void
on_font_apply_button_clicked (GtkButton *button, on_font_apply_button_clicked(GtkButton *button, gpointer user_data)
gpointer user_data)
{ {
gchar *fontname; gchar *fontname;
@ -896,8 +895,7 @@ on_font_apply_button_clicked (GtkButton *button,
static void static void
on_font_ok_button_clicked (GtkButton *button, on_font_ok_button_clicked(GtkButton *button, gpointer user_data)
gpointer user_data)
{ {
/* We do the same thing as apply, but we close the dialog after. */ /* We do the same thing as apply, but we close the dialog after. */
on_font_apply_button_clicked(button, NULL); on_font_apply_button_clicked(button, NULL);
@ -906,8 +904,7 @@ on_font_ok_button_clicked (GtkButton *button,
static void static void
on_font_cancel_button_clicked (GtkButton *button, on_font_cancel_button_clicked(GtkButton *button, gpointer user_data)
gpointer user_data)
{ {
gtk_widget_hide(ui_widgets.open_fontsel); gtk_widget_hide(ui_widgets.open_fontsel);
} }
@ -974,9 +971,7 @@ on_input_numeric_activate(GtkEntry *entry, GtkDialog *dialog)
static void static void
on_input_dialog_response(GtkDialog *dialog, on_input_dialog_response(GtkDialog *dialog, gint response, GtkWidget *entry)
gint response,
GtkWidget *entry)
{ {
gboolean persistent = (gboolean) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "has_combo")); gboolean persistent = (gboolean) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "has_combo"));

View File

@ -281,7 +281,7 @@ gchar *encodings_to_string(const GeanyEncoding* enc)
g_return_val_if_fail(enc->name != NULL, NULL); g_return_val_if_fail(enc->name != NULL, NULL);
g_return_val_if_fail(enc->charset != NULL, NULL); g_return_val_if_fail(enc->charset != NULL, NULL);
return g_strdup_printf("%s (%s)", enc->name, enc->charset); return g_strdup_printf("%s (%s)", enc->name, enc->charset);
} }

View File

@ -1029,8 +1029,7 @@ void filetypes_select_radio_item(const GeanyFiletype *ft)
static void static void
on_filetype_change (GtkCheckMenuItem *menuitem, on_filetype_change(GtkCheckMenuItem *menuitem, gpointer user_data)
gpointer user_data)
{ {
GeanyDocument *doc = document_get_current(); GeanyDocument *doc = document_get_current();
if (ignore_callback || doc == NULL || ! gtk_check_menu_item_get_active(menuitem)) if (ignore_callback || doc == NULL || ! gtk_check_menu_item_get_active(menuitem))

View File

@ -866,7 +866,7 @@ static GtkWidget *create_dialog(void)
gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree), FALSE); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree), FALSE);
text_renderer = gtk_cell_renderer_text_new(); text_renderer = gtk_cell_renderer_text_new();
/* we can't use "weight-set", see http://bugzilla.gnome.org/show_bug.cgi?id=355214 */ /* we can't use "weight-set", see http://bugzilla.gnome.org/show_bug.cgi?id=355214 */
column = gtk_tree_view_column_new_with_attributes( column = gtk_tree_view_column_new_with_attributes(
NULL, text_renderer, "text", 0, "weight", 2, NULL); NULL, text_renderer, "text", 0, "weight", 2, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);

View File

@ -96,7 +96,7 @@ static void handler_printerr(const gchar *msg)
static const gchar *get_log_prefix(GLogLevelFlags log_level) static const gchar *get_log_prefix(GLogLevelFlags log_level)
{ {
switch (log_level & G_LOG_LEVEL_MASK) switch (log_level & G_LOG_LEVEL_MASK)
{ {
case G_LOG_LEVEL_ERROR: case G_LOG_LEVEL_ERROR:
return "ERROR\t\t"; return "ERROR\t\t";
case G_LOG_LEVEL_CRITICAL: case G_LOG_LEVEL_CRITICAL:

View File

@ -950,8 +950,8 @@ gint main(gint argc, gchar **argv)
#endif #endif
parse_command_line_options(&argc, &argv); parse_command_line_options(&argc, &argv);
/* Initialize GLib's thread system in case any plugins want to use it or their /* Initialize GLib's thread system in case any plugins want to use it or their
* dependencies (e.g. WebKit, Soup, ...) */ * dependencies (e.g. WebKit, Soup, ...) */
if (!g_thread_supported()) if (!g_thread_supported())
g_thread_init(NULL); g_thread_init(NULL);
@ -965,7 +965,7 @@ gint main(gint argc, gchar **argv)
config_dir_result = setup_config_dir(); config_dir_result = setup_config_dir();
#ifdef HAVE_SOCKET #ifdef HAVE_SOCKET
/* check and create (unix domain) socket for remote operation */ /* check and create (unix domain) socket for remote operation */
if (! socket_info.ignore_socket) if (! socket_info.ignore_socket)
{ {
socket_info.lock_socket = -1; socket_info.lock_socket = -1;

View File

@ -424,8 +424,7 @@ void msgwin_status_add(const gchar *format, ...)
static void static void
on_message_treeview_clear_activate (GtkMenuItem *menuitem, on_message_treeview_clear_activate(GtkMenuItem *menuitem, gpointer user_data)
gpointer user_data)
{ {
gint tabnum = GPOINTER_TO_INT(user_data); gint tabnum = GPOINTER_TO_INT(user_data);
@ -434,8 +433,7 @@ on_message_treeview_clear_activate (GtkMenuItem *menuitem,
static void static void
on_compiler_treeview_copy_activate (GtkMenuItem *menuitem, on_compiler_treeview_copy_activate(GtkMenuItem *menuitem, gpointer user_data)
gpointer user_data)
{ {
GtkWidget *tv = NULL; GtkWidget *tv = NULL;
GtkTreeSelection *selection; GtkTreeSelection *selection;
@ -531,8 +529,7 @@ static void on_compiler_treeview_copy_all_activate(GtkMenuItem *menuitem, gpoint
static void static void
on_hide_message_window (GtkMenuItem *menuitem, on_hide_message_window(GtkMenuItem *menuitem, gpointer user_data)
gpointer user_data)
{ {
msgwin_show_hide(FALSE); msgwin_show_hide(FALSE);
} }

View File

@ -54,12 +54,12 @@ static GtkTargetEntry files_drop_targets[] = {
static void static void
notebook_page_reordered_cb(GtkNotebook *notebook, GtkWidget *child, guint page_num, notebook_page_reordered_cb(GtkNotebook *notebook, GtkWidget *child, guint page_num,
gpointer user_data); gpointer user_data);
static void static void
on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context,
gint x, gint y, GtkSelectionData *data, guint info, gint x, gint y, GtkSelectionData *data, guint target_type,
guint event_time, gpointer user_data); guint event_time, gpointer user_data);
static void static void
notebook_tab_close_clicked_cb(GtkButton *button, gpointer user_data); notebook_tab_close_clicked_cb(GtkButton *button, gpointer user_data);
@ -490,8 +490,8 @@ void notebook_remove_page(gint page_num)
static void static void
on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context,
gint x, gint y, GtkSelectionData *data, guint target_type, gint x, gint y, GtkSelectionData *data, guint target_type,
guint event_time, gpointer user_data) guint event_time, gpointer user_data)
{ {
gboolean success = FALSE; gboolean success = FALSE;

View File

@ -1232,19 +1232,19 @@ static void pm_prepare_treeview(GtkWidget *tree, GtkListStore *store)
GtkTreeSelection *sel; GtkTreeSelection *sel;
checkbox_renderer = gtk_cell_renderer_toggle_new(); checkbox_renderer = gtk_cell_renderer_toggle_new();
column = gtk_tree_view_column_new_with_attributes( column = gtk_tree_view_column_new_with_attributes(
_("Active"), checkbox_renderer, "active", PLUGIN_COLUMN_CHECK, NULL); _("Active"), checkbox_renderer, "active", PLUGIN_COLUMN_CHECK, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
g_signal_connect(checkbox_renderer, "toggled", G_CALLBACK(pm_plugin_toggled), NULL); g_signal_connect(checkbox_renderer, "toggled", G_CALLBACK(pm_plugin_toggled), NULL);
text_renderer = gtk_cell_renderer_text_new(); text_renderer = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes( column = gtk_tree_view_column_new_with_attributes(
_("Plugin"), text_renderer, "text", PLUGIN_COLUMN_NAME, NULL); _("Plugin"), text_renderer, "text", PLUGIN_COLUMN_NAME, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
text_renderer = gtk_cell_renderer_text_new(); text_renderer = gtk_cell_renderer_text_new();
g_object_set(text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL); g_object_set(text_renderer, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
column = gtk_tree_view_column_new_with_attributes( column = gtk_tree_view_column_new_with_attributes(
_("File"), text_renderer, "text", PLUGIN_COLUMN_FILE, NULL); _("File"), text_renderer, "text", PLUGIN_COLUMN_FILE, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);

View File

@ -55,8 +55,8 @@ static char *br_last_value = (char*)NULL;
static void static void
br_free_last_value () br_free_last_value ()
{ {
if (br_last_value) if (br_last_value)
free (br_last_value); free (br_last_value);
} }

View File

@ -614,8 +614,8 @@ static void prefs_init_dialog(void)
/* Tools Settings */ /* Tools Settings */
if (tool_prefs.term_cmd) if (tool_prefs.term_cmd)
gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_term")), tool_prefs.term_cmd); gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_com_term")), tool_prefs.term_cmd);
if (tool_prefs.browser_cmd) if (tool_prefs.browser_cmd)
gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser")), tool_prefs.browser_cmd); gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser")), tool_prefs.browser_cmd);

View File

@ -437,10 +437,10 @@ static gint compare_symbol(const TMTag *tag_a, const TMTag *tag_b)
return 0; return 0;
if (tag_a->name == NULL) if (tag_a->name == NULL)
return -(tag_a->name != tag_b->name); return -(tag_a->name != tag_b->name);
if (tag_b->name == NULL) if (tag_b->name == NULL)
return tag_a->name != tag_b->name; return tag_a->name != tag_b->name;
ret = strcmp(tag_a->name, tag_b->name); ret = strcmp(tag_a->name, tag_b->name);
if (ret == 0) if (ret == 0)
@ -633,9 +633,9 @@ tag_list_add_groups(GtkTreeStore *tree_store, ...)
g_return_if_fail(top_level_iter_names); g_return_if_fail(top_level_iter_names);
va_start(args, tree_store); va_start(args, tree_store);
for (; iter = va_arg(args, GtkTreeIter*), iter != NULL;) for (; iter = va_arg(args, GtkTreeIter*), iter != NULL;)
{ {
gchar *title = va_arg(args, gchar*); gchar *title = va_arg(args, gchar*);
gchar *icon_name = va_arg(args, gchar *); gchar *icon_name = va_arg(args, gchar *);
GdkPixbuf *icon = NULL; GdkPixbuf *icon = NULL;
@ -645,7 +645,7 @@ tag_list_add_groups(GtkTreeStore *tree_store, ...)
icon = get_tag_icon(icon_name); icon = get_tag_icon(icon_name);
} }
g_assert(title != NULL); g_assert(title != NULL);
g_ptr_array_add(top_level_iter_names, title); g_ptr_array_add(top_level_iter_names, title);
if (!find_toplevel_iter(tree_store, iter, title)) if (!find_toplevel_iter(tree_store, iter, title))

View File

@ -892,16 +892,14 @@ void tools_word_count(void)
*/ */
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
static void static void
on_color_cancel_button_clicked (GtkButton *button, on_color_cancel_button_clicked(GtkButton *button, gpointer user_data)
gpointer user_data)
{ {
gtk_widget_hide(ui_widgets.open_colorsel); gtk_widget_hide(ui_widgets.open_colorsel);
} }
static void static void
on_color_ok_button_clicked (GtkButton *button, on_color_ok_button_clicked(GtkButton *button, gpointer user_data)
gpointer user_data)
{ {
GdkColor color; GdkColor color;
GeanyDocument *doc = document_get_current(); GeanyDocument *doc = document_get_current();

View File

@ -2258,9 +2258,9 @@ static GtkWidget *progress_bar_create(void)
{ {
GtkWidget *bar = gtk_progress_bar_new(); GtkWidget *bar = gtk_progress_bar_new();
/* Set the progressbar's height to 1 to fit it in the statusbar */ /* Set the progressbar's height to 1 to fit it in the statusbar */
gtk_widget_set_size_request(bar, -1, 1); gtk_widget_set_size_request(bar, -1, 1);
gtk_box_pack_start (GTK_BOX(ui_widgets.statusbar), bar, FALSE, FALSE, 3); gtk_box_pack_start (GTK_BOX(ui_widgets.statusbar), bar, FALSE, FALSE, 3);
return bar; return bar;
} }

View File

@ -1392,17 +1392,17 @@ gchar **utils_strv_new(const gchar *first, ...)
strvlen = 1; /* for first argument */ strvlen = 1; /* for first argument */
/* count other arguments */ /* count other arguments */
va_start(args, first); va_start(args, first);
for (; va_arg(args, gchar*) != NULL; strvlen++); for (; va_arg(args, gchar*) != NULL; strvlen++);
va_end(args); va_end(args);
strv = g_new(gchar*, strvlen + 1); /* +1 for NULL terminator */ strv = g_new(gchar*, strvlen + 1); /* +1 for NULL terminator */
strv[0] = g_strdup(first); strv[0] = g_strdup(first);
va_start(args, first); va_start(args, first);
for (i = 1; str = va_arg(args, gchar*), str != NULL; i++) for (i = 1; str = va_arg(args, gchar*), str != NULL; i++)
{ {
strv[i] = g_strdup(str); strv[i] = g_strdup(str);
} }
va_end(args); va_end(args);

View File

@ -79,9 +79,9 @@ struct _VteTerminal
#define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type()) #define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type())
typedef enum { typedef enum {
VTE_CURSOR_BLINK_SYSTEM, VTE_CURSOR_BLINK_SYSTEM,
VTE_CURSOR_BLINK_ON, VTE_CURSOR_BLINK_ON,
VTE_CURSOR_BLINK_OFF VTE_CURSOR_BLINK_OFF
} VteTerminalCursorBlinkMode; } VteTerminalCursorBlinkMode;
@ -266,7 +266,7 @@ static void create_vte(void)
vf->vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), TRUE); vf->vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), TRUE);
vf->vte_terminal_set_word_chars(VTE_TERMINAL(vte), VTE_WORDCHARS); vf->vte_terminal_set_word_chars(VTE_TERMINAL(vte), VTE_WORDCHARS);
gtk_drag_dest_set(vte, GTK_DEST_DEFAULT_ALL, gtk_drag_dest_set(vte, GTK_DEST_DEFAULT_ALL,
dnd_targets, G_N_ELEMENTS(dnd_targets), GDK_ACTION_COPY); dnd_targets, G_N_ELEMENTS(dnd_targets), GDK_ACTION_COPY);
g_signal_connect(vte, "child-exited", G_CALLBACK(vte_start), NULL); g_signal_connect(vte, "child-exited", G_CALLBACK(vte_start), NULL);