From ddb4ad5fa5071e4579c847992066285f2a5dbb45 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Sat, 6 Aug 2011 18:34:14 +0000 Subject: [PATCH] Fix some whitespace style errors git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5886 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- src/callbacks.c | 606 ++++++++++++++---------------------------------------- src/dialogs.c | 19 +- src/encodings.c | 2 +- src/filetypes.c | 3 +- src/keybindings.c | 2 +- src/log.c | 2 +- src/main.c | 6 +- src/msgwindow.c | 9 +- src/notebook.c | 10 +- src/plugins.c | 6 +- src/prefix.c | 4 +- src/prefs.c | 4 +- src/symbols.c | 12 +- src/tools.c | 6 +- src/ui_utils.c | 6 +- src/utils.c | 12 +- src/vte.c | 8 +- 17 files changed, 202 insertions(+), 515 deletions(-) diff --git a/src/callbacks.c b/src/callbacks.c index 3b9380d0a..645c4375a 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -131,8 +131,7 @@ static void quit_app(void) /* wrapper function to abort exit process if cancel button is pressed */ -gboolean -on_exit_clicked (GtkWidget *widget, gpointer gdata) +gboolean on_exit_clicked(GtkWidget *widget, gpointer gdata) { main_status.quitting = TRUE; @@ -162,17 +161,13 @@ on_exit_clicked (GtkWidget *widget, gpointer gdata) * GUI callbacks */ -void -on_new1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_new1_activate(GtkMenuItem *menuitem, gpointer user_data) { document_new_file(NULL, NULL, NULL); } -void -on_save1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_save1_activate(GtkMenuItem *menuitem, gpointer user_data) { gint cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(main_widgets.notebook)); GeanyDocument *doc = document_get_current(); @@ -187,17 +182,13 @@ on_save1_activate (GtkMenuItem *menuitem, } -void -on_save_as1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_save_as1_activate(GtkMenuItem *menuitem, gpointer user_data) { dialogs_show_save_as(); } -void -on_save_all1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_save_all1_activate(GtkMenuItem *menuitem, gpointer user_data) { gint i, max = gtk_notebook_get_n_pages(GTK_NOTEBOOK(main_widgets.notebook)); GeanyDocument *doc, *cur_doc = document_get_current(); @@ -232,17 +223,13 @@ on_save_all1_activate (GtkMenuItem *menuitem, } -void -on_close_all1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_close_all1_activate(GtkMenuItem *menuitem, gpointer user_data) { document_close_all(); } -void -on_close1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_close1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -252,17 +239,13 @@ on_close1_activate (GtkMenuItem *menuitem, } -void -on_quit1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_quit1_activate(GtkMenuItem *menuitem, gpointer user_data) { on_exit_clicked(NULL, NULL); } -void -on_file1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_file1_activate(GtkMenuItem *menuitem, gpointer user_data) { gtk_widget_set_sensitive(ui_widgets.recent_files_menuitem, g_queue_get_length(ui_prefs.recent_queue) > 0); @@ -272,9 +255,7 @@ on_file1_activate (GtkMenuItem *menuitem, /* edit actions, c&p & co, from menu bar and from popup menu */ -void -on_edit1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_edit1_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *item; GeanyDocument *doc = document_get_current(); @@ -291,9 +272,7 @@ on_edit1_activate (GtkMenuItem *menuitem, } -void -on_undo1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_undo1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -307,9 +286,7 @@ on_undo1_activate (GtkMenuItem *menuitem, } -void -on_redo1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_redo1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -323,9 +300,7 @@ on_redo1_activate (GtkMenuItem *menuitem, } -void -on_cut1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_cut1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window)); @@ -345,9 +320,7 @@ on_cut1_activate (GtkMenuItem *menuitem, } -void -on_copy1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_copy1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window)); @@ -367,9 +340,7 @@ on_copy1_activate (GtkMenuItem *menuitem, } -void -on_paste1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_paste1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window)); @@ -392,9 +363,7 @@ on_paste1_activate (GtkMenuItem *menuitem, } -void -on_delete1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_delete1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); GtkWidget *focusw = gtk_window_get_focus(GTK_WINDOW(main_widgets.window)); @@ -414,54 +383,42 @@ on_delete1_activate (GtkMenuItem *menuitem, } -void -on_preferences1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_preferences1_activate(GtkMenuItem *menuitem, gpointer user_data) { prefs_show_dialog(); } /* about menu item */ -void -on_info1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_info1_activate(GtkMenuItem *menuitem, gpointer user_data) { about_dialog_show(); } /* open file */ -void -on_open1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_open1_activate(GtkMenuItem *menuitem, gpointer user_data) { dialogs_show_open_file(); } /* quit toolbar button */ -void -on_toolbutton_quit_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_quit_clicked(GtkAction *action, gpointer user_data) { on_exit_clicked(NULL, NULL); } /* reload file */ -void -on_toolbutton_reload_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_reload_clicked(GtkAction *action, gpointer user_data) { on_reload_as_activate(NULL, GINT_TO_POINTER(-1)); } /* also used for reloading when user_data is -1 */ -void -on_reload_as_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_reload_as_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gchar *base_name; @@ -495,36 +452,28 @@ on_reload_as_activate (GtkMenuItem *menuitem, } -void -on_change_font1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_change_font1_activate(GtkMenuItem *menuitem, gpointer user_data) { dialogs_show_open_font(); } /* new file */ -void -on_toolbutton_new_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_new_clicked(GtkAction *action, gpointer user_data) { document_new_file(NULL, NULL, NULL); } /* open file */ -void -on_toolbutton_open_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_open_clicked(GtkAction *action, gpointer user_data) { dialogs_show_open_file(); } /* save file */ -void -on_toolbutton_save_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_save_clicked(GtkAction *action, gpointer user_data) { on_save1_activate(NULL, user_data); } @@ -554,25 +503,21 @@ static void do_toolbar_search(const gchar *text, gboolean incremental, gboolean /* search text */ -void -on_toolbar_search_entry_changed(GtkAction *action, const gchar *text, gpointer user_data) +void on_toolbar_search_entry_changed(GtkAction *action, const gchar *text, gpointer user_data) { do_toolbar_search(text, TRUE, FALSE); } /* search text */ -void -on_toolbar_search_entry_activate(GtkAction *action, const gchar *text, gpointer user_data) +void on_toolbar_search_entry_activate(GtkAction *action, const gchar *text, gpointer user_data) { do_toolbar_search(text, FALSE, GPOINTER_TO_INT(user_data)); } /* search text */ -void -on_toolbutton_search_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_search_clicked(GtkAction *action, gpointer user_data) { GeanyDocument *doc = document_get_current(); gboolean result; @@ -593,9 +538,7 @@ on_toolbutton_search_clicked (GtkAction *action, /* hides toolbar from toolbar popup menu */ -void -on_hide_toolbar1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_hide_toolbar1_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *tool_item = ui_lookup_widget(GTK_WIDGET(main_widgets.window), "menu_show_toolbar1"); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(tool_item), FALSE); @@ -603,9 +546,7 @@ on_hide_toolbar1_activate (GtkMenuItem *menuitem, /* zoom in from menu bar and popup menu */ -void -on_zoom_in1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_zoom_in1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); static gint done = 1; @@ -620,9 +561,7 @@ on_zoom_in1_activate (GtkMenuItem *menuitem, /* zoom out from menu bar and popup menu */ -void -on_zoom_out1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_zoom_out1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -634,9 +573,7 @@ on_zoom_out1_activate (GtkMenuItem *menuitem, } -void -on_normal_size1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_normal_size1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -648,25 +585,19 @@ on_normal_size1_activate (GtkMenuItem *menuitem, /* close tab */ -void -on_toolbutton_close_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_close_clicked(GtkAction *action, gpointer user_data) { on_close1_activate(NULL, NULL); } -void -on_toolbutton_close_all_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_close_all_clicked(GtkAction *action, gpointer user_data) { on_close_all1_activate(NULL, NULL); } -void -on_toolbutton_preferences_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_preferences_clicked(GtkAction *action, gpointer user_data) { on_preferences1_activate(NULL, NULL); } @@ -681,11 +612,8 @@ static gboolean delayed_check_disk_status(gpointer data) /* Changes window-title after switching tabs and lots of other things. * note: using 'after' makes Scintilla redraw before the UI, appearing more responsive */ -void -on_notebook1_switch_page_after (GtkNotebook *notebook, - GtkNotebookPage *page, - guint page_num, - gpointer user_data) +void on_notebook1_switch_page_after(GtkNotebook *notebook, GtkNotebookPage *page, + guint page_num, gpointer user_data) { GeanyDocument *doc; @@ -722,22 +650,16 @@ on_notebook1_switch_page_after (GtkNotebook *notebook, } -void -on_tv_notebook_switch_page (GtkNotebook *notebook, - GtkNotebookPage *page, - guint page_num, - gpointer user_data) +void on_tv_notebook_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, + guint page_num, gpointer user_data) { /* suppress selection changed signal when switching to the open files list */ ignore_callback = TRUE; } -void -on_tv_notebook_switch_page_after (GtkNotebook *notebook, - GtkNotebookPage *page, - guint page_num, - gpointer user_data) +void on_tv_notebook_switch_page_after(GtkNotebook *notebook, GtkNotebookPage *page, + guint page_num, gpointer user_data) { ignore_callback = FALSE; } @@ -755,9 +677,7 @@ static void convert_eol(gint mode) } -void -on_crlf_activate (GtkCheckMenuItem *menuitem, - gpointer user_data) +void on_crlf_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { if (ignore_callback || ! gtk_check_menu_item_get_active(menuitem)) return; @@ -766,9 +686,7 @@ on_crlf_activate (GtkCheckMenuItem *menuitem, } -void -on_lf_activate (GtkCheckMenuItem *menuitem, - gpointer user_data) +void on_lf_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { if (ignore_callback || ! gtk_check_menu_item_get_active(menuitem)) return; @@ -777,9 +695,7 @@ on_lf_activate (GtkCheckMenuItem *menuitem, } -void -on_cr_activate (GtkCheckMenuItem *menuitem, - gpointer user_data) +void on_cr_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { if (ignore_callback || ! gtk_check_menu_item_get_active(menuitem)) return; @@ -788,9 +704,7 @@ on_cr_activate (GtkCheckMenuItem *menuitem, } -void -on_replace_tabs_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_replace_tabs_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -800,10 +714,7 @@ on_replace_tabs_activate (GtkMenuItem *menuitem, } -gboolean -toolbar_popup_menu (GtkWidget *widget, - GdkEventButton *event, - gpointer user_data) +gboolean toolbar_popup_menu(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->button == 3) { @@ -840,7 +751,7 @@ void on_toggle_case1_activate(GtkMenuItem *menuitem, gpointer user_data) sci_get_selected_text(sci, text); if (utils_str_has_upper(text)) - { + { if (rectsel) cmd = SCI_LOWERCASE; else @@ -872,9 +783,7 @@ void on_toggle_case1_activate(GtkMenuItem *menuitem, gpointer user_data) } -void -on_show_toolbar1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_show_toolbar1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -883,9 +792,7 @@ on_show_toolbar1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_fullscreen1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_fullscreen1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -895,9 +802,7 @@ on_fullscreen1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_show_messages_window1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_show_messages_window1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -907,9 +812,7 @@ on_show_messages_window1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_markers_margin1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_markers_margin1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -919,9 +822,7 @@ on_markers_margin1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_show_line_numbers1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_show_line_numbers1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -931,9 +832,7 @@ on_show_line_numbers1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_menu_show_white_space1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_menu_show_white_space1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -943,9 +842,7 @@ on_menu_show_white_space1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_menu_show_line_endings1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_menu_show_line_endings1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -955,9 +852,7 @@ on_menu_show_line_endings1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_menu_show_indentation_guides1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_menu_show_indentation_guides1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -967,9 +862,7 @@ on_menu_show_indentation_guides1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_line_wrapping1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_line_wrapping1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (! ignore_callback) { @@ -981,9 +874,7 @@ on_line_wrapping1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_set_file_readonly1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_set_file_readonly1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (! ignore_callback) { @@ -998,9 +889,7 @@ on_set_file_readonly1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_use_auto_indentation1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_use_auto_indentation1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (! ignore_callback) { @@ -1039,17 +928,13 @@ static void find_usage(gboolean in_session) } -void -on_find_document_usage1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_document_usage1_activate(GtkMenuItem *menuitem, gpointer user_data) { find_usage(FALSE); } -void -on_find_usage1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_usage1_activate(GtkMenuItem *menuitem, gpointer user_data) { find_usage(TRUE); } @@ -1073,33 +958,25 @@ static void goto_tag(gboolean definition) } -void -on_goto_tag_definition1 (GtkMenuItem *menuitem, - gpointer user_data) +void on_goto_tag_definition1(GtkMenuItem *menuitem, gpointer user_data) { goto_tag(TRUE); } -void -on_goto_tag_declaration1 (GtkMenuItem *menuitem, - gpointer user_data) +void on_goto_tag_declaration1(GtkMenuItem *menuitem, gpointer user_data) { goto_tag(FALSE); } -void -on_count_words1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_count_words1_activate(GtkMenuItem *menuitem, gpointer user_data) { tools_word_count(); } -void -on_show_color_chooser1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_show_color_chooser1_activate(GtkMenuItem *menuitem, gpointer user_data) { gchar colour[9]; GeanyDocument *doc = document_get_current(); @@ -1113,33 +990,25 @@ on_show_color_chooser1_activate (GtkMenuItem *menuitem, } -void -on_toolbutton_compile_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_compile_clicked(GtkAction *action, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_BUILD, GEANY_KEYS_BUILD_COMPILE); } -void -on_find1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find1_activate(GtkMenuItem *menuitem, gpointer user_data) { search_show_find_dialog(); } -void -on_find_next1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_next1_activate(GtkMenuItem *menuitem, gpointer user_data) { search_find_again(FALSE); } -void -on_find_previous1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_previous1_activate(GtkMenuItem *menuitem, gpointer user_data) { if (search_data.flags & SCFIND_REGEXP) /* Can't reverse search order for a regex (find next ignores search backwards) */ @@ -1149,33 +1018,25 @@ on_find_previous1_activate (GtkMenuItem *menuitem, } -void -on_find_nextsel1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_nextsel1_activate(GtkMenuItem *menuitem, gpointer user_data) { search_find_selection(document_get_current(), FALSE); } -void -on_find_prevsel1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_prevsel1_activate(GtkMenuItem *menuitem, gpointer user_data) { search_find_selection(document_get_current(), TRUE); } -void -on_replace1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_replace1_activate(GtkMenuItem *menuitem, gpointer user_data) { search_show_replace_dialog(); } -void -on_find_in_files1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_find_in_files1_activate(GtkMenuItem *menuitem, gpointer user_data) { search_show_find_in_files_dialog(NULL); } @@ -1196,9 +1057,7 @@ static void get_line_and_offset_from_text(const gchar *text, gint *line_no, gint } -void -on_go_to_line_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_go_to_line_activate(GtkMenuItem *menuitem, gpointer user_data) { static gchar value[16] = ""; gchar *result; @@ -1225,8 +1084,7 @@ on_go_to_line_activate (GtkMenuItem *menuitem, } -void -on_toolbutton_goto_entry_activate(GtkAction *action, const gchar *text, gpointer user_data) +void on_toolbutton_goto_entry_activate(GtkAction *action, const gchar *text, gpointer user_data) { GeanyDocument *doc = document_get_current(); gint offset; @@ -1242,9 +1100,7 @@ on_toolbutton_goto_entry_activate(GtkAction *action, const gchar *text, gpointer } -void -on_toolbutton_goto_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_goto_clicked(GtkAction *action, gpointer user_data) { GtkWidget *entry = toolbar_get_widget_child_by_name("GotoEntry"); @@ -1259,9 +1115,7 @@ on_toolbutton_goto_clicked (GtkAction *action, } -void -on_help1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_help1_activate(GtkMenuItem *menuitem, gpointer user_data) { gchar *uri; @@ -1271,25 +1125,19 @@ on_help1_activate (GtkMenuItem *menuitem, } -void -on_help_shortcuts1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_help_shortcuts1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_show_shortcuts(); } -void -on_website1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_website1_activate(GtkMenuItem *menuitem, gpointer user_data) { utils_open_browser(GEANY_HOMEPAGE); } -void -on_comments_function_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_comments_function_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gchar *text; @@ -1317,9 +1165,7 @@ on_comments_function_activate (GtkMenuItem *menuitem, } -void -on_comments_multiline_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_comments_multiline_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -1339,9 +1185,7 @@ on_comments_multiline_activate (GtkMenuItem *menuitem, } -void -on_comments_gpl_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_comments_gpl_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gchar *text; @@ -1359,11 +1203,8 @@ on_comments_gpl_activate (GtkMenuItem *menuitem, } -void -on_comments_bsd_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_comments_bsd_activate(GtkMenuItem *menuitem, gpointer user_data) { - GeanyDocument *doc = document_get_current(); gchar *text; @@ -1381,9 +1222,7 @@ on_comments_bsd_activate (GtkMenuItem *menuitem, } -void -on_comments_changelog_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_comments_changelog_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gchar *text; @@ -1402,9 +1241,7 @@ on_comments_changelog_activate (GtkMenuItem *menuitem, } -void -on_comments_fileheader_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_comments_fileheader_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gchar *text; @@ -1425,9 +1262,7 @@ on_comments_fileheader_activate (GtkMenuItem *menuitem, } -void -on_insert_date_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_insert_date_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); const gchar *format = NULL; @@ -1487,9 +1322,7 @@ on_insert_date_activate (GtkMenuItem *menuitem, } -void -on_insert_include_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_insert_include_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gint pos = -1; @@ -1519,9 +1352,7 @@ on_insert_include_activate (GtkMenuItem *menuitem, } -void -on_file_properties_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_file_properties_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1530,9 +1361,7 @@ on_file_properties_activate (GtkMenuItem *menuitem, } -void -on_menu_fold_all1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_fold_all1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1541,9 +1370,7 @@ on_menu_fold_all1_activate (GtkMenuItem *menuitem, } -void -on_menu_unfold_all1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_unfold_all1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1552,17 +1379,13 @@ on_menu_unfold_all1_activate (GtkMenuItem *menuitem, } -void -on_toolbutton_run_clicked (GtkAction *action, - gpointer user_data) +void on_toolbutton_run_clicked(GtkAction *action, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_BUILD, GEANY_KEYS_BUILD_RUN); } -void -on_menu_remove_indicators1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_remove_indicators1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1571,9 +1394,7 @@ on_menu_remove_indicators1_activate (GtkMenuItem *menuitem, } -void -on_print1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_print1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1582,9 +1403,7 @@ on_print1_activate (GtkMenuItem *menuitem, } -void -on_menu_select_all1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_select_all1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1593,9 +1412,7 @@ on_menu_select_all1_activate (GtkMenuItem *menuitem, } -void -on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_menu_show_sidebar1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (ignore_callback) return; @@ -1624,9 +1441,7 @@ on_menu_show_sidebar1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_menu_write_unicode_bom1_toggled (GtkCheckMenuItem *checkmenuitem, - gpointer user_data) +void on_menu_write_unicode_bom1_toggled(GtkCheckMenuItem *checkmenuitem, gpointer user_data) { if (! ignore_callback) { @@ -1648,9 +1463,7 @@ on_menu_write_unicode_bom1_toggled (GtkCheckMenuItem *checkmenuitem, } -void -on_menu_comment_line1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_comment_line1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1659,9 +1472,7 @@ on_menu_comment_line1_activate (GtkMenuItem *menuitem, } -void -on_menu_uncomment_line1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_uncomment_line1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1670,10 +1481,7 @@ on_menu_uncomment_line1_activate (GtkMenuItem *menuitem, } -void -on_menu_toggle_line_commentation1_activate - (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_toggle_line_commentation1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1682,9 +1490,7 @@ on_menu_toggle_line_commentation1_activate } -void -on_menu_increase_indent1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_increase_indent1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1693,9 +1499,7 @@ on_menu_increase_indent1_activate (GtkMenuItem *menuitem, } -void -on_menu_decrease_indent1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_decrease_indent1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1704,9 +1508,7 @@ on_menu_decrease_indent1_activate (GtkMenuItem *menuitem, } -void -on_next_message1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_next_message1_activate(GtkMenuItem *menuitem, gpointer user_data) { if (! ui_tree_view_find_next(GTK_TREE_VIEW(msgwindow.tree_msg), msgwin_goto_messages_file_line)) @@ -1714,9 +1516,7 @@ on_next_message1_activate (GtkMenuItem *menuitem, } -void -on_previous_message1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_previous_message1_activate(GtkMenuItem *menuitem, gpointer user_data) { if (! ui_tree_view_find_previous(GTK_TREE_VIEW(msgwindow.tree_msg), msgwin_goto_messages_file_line)) @@ -1724,86 +1524,66 @@ on_previous_message1_activate (GtkMenuItem *menuitem, } -void -on_menu_comments_multiline_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_comments_multiline_activate(GtkMenuItem *menuitem, gpointer user_data) { insert_callback_from_menu = TRUE; on_comments_multiline_activate(menuitem, user_data); } -void -on_menu_comments_gpl_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_comments_gpl_activate(GtkMenuItem *menuitem, gpointer user_data) { insert_callback_from_menu = TRUE; on_comments_gpl_activate(menuitem, user_data); } -void -on_menu_comments_bsd_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_comments_bsd_activate(GtkMenuItem *menuitem, gpointer user_data) { insert_callback_from_menu = TRUE; on_comments_bsd_activate(menuitem, user_data); } -void -on_menu_insert_include_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_insert_include_activate(GtkMenuItem *menuitem, gpointer user_data) { insert_callback_from_menu = TRUE; on_insert_include_activate(menuitem, user_data); } -void -on_menu_insert_date_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_insert_date_activate(GtkMenuItem *menuitem, gpointer user_data) { insert_callback_from_menu = TRUE; on_insert_date_activate(menuitem, user_data); } -void -on_project_new1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_project_new1_activate(GtkMenuItem *menuitem, gpointer user_data) { project_new(); } -void -on_project_open1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_project_open1_activate(GtkMenuItem *menuitem, gpointer user_data) { project_open(); } -void -on_project_close1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_project_close1_activate(GtkMenuItem *menuitem, gpointer user_data) { project_close(TRUE); } -void -on_project_properties1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_project_properties1_activate(GtkMenuItem *menuitem, gpointer user_data) { project_properties(); } -void -on_menu_project1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_project1_activate(GtkMenuItem *menuitem, gpointer user_data) { static GtkWidget *item_close = NULL; static GtkWidget *item_properties = NULL; @@ -1821,9 +1601,7 @@ on_menu_project1_activate (GtkMenuItem *menuitem, } -void -on_menu_open_selected_file1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_open_selected_file1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); gchar *sel = NULL; @@ -1875,9 +1653,7 @@ on_menu_open_selected_file1_activate (GtkMenuItem *menuitem, } -void -on_remove_markers1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_remove_markers1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); g_return_if_fail(doc != NULL); @@ -1888,17 +1664,13 @@ on_remove_markers1_activate (GtkMenuItem *menuitem, } -void -on_load_tags1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_load_tags1_activate(GtkMenuItem *menuitem, gpointer user_data) { symbols_show_load_tags_dialog(); } -void -on_context_action1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_context_action1_activate(GtkMenuItem *menuitem, gpointer user_data) { gchar *word, *command; GError *error = NULL; @@ -1943,10 +1715,7 @@ on_context_action1_activate (GtkMenuItem *menuitem, } -void -on_menu_toggle_all_additional_widgets1_activate - (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_toggle_all_additional_widgets1_activate(GtkMenuItem *menuitem, gpointer user_data) { static gint hide_all = -1; GtkCheckMenuItem *msgw = GTK_CHECK_MENU_ITEM( @@ -1999,17 +1768,13 @@ on_menu_toggle_all_additional_widgets1_activate } -void -on_forward_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_forward_activate(GtkMenuItem *menuitem, gpointer user_data) { navqueue_go_forward(); } -void -on_back_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_back_activate(GtkMenuItem *menuitem, gpointer user_data) { navqueue_go_back(); } @@ -2039,33 +1804,25 @@ static void set_indent_type(GtkCheckMenuItem *menuitem, GeanyIndentType type) } -void -on_tabs1_activate (GtkCheckMenuItem *menuitem, - gpointer user_data) +void on_tabs1_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { set_indent_type(menuitem, GEANY_INDENT_TYPE_TABS); } -void -on_spaces1_activate (GtkCheckMenuItem *menuitem, - gpointer user_data) +void on_spaces1_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { set_indent_type(menuitem, GEANY_INDENT_TYPE_SPACES); } -void -on_tabs_and_spaces1_activate (GtkCheckMenuItem *menuitem, - gpointer user_data) +void on_tabs_and_spaces1_activate(GtkCheckMenuItem *menuitem, gpointer user_data) { set_indent_type(menuitem, GEANY_INDENT_TYPE_BOTH); } -void -on_strip_trailing_spaces1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_strip_trailing_spaces1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc; @@ -2079,18 +1836,13 @@ on_strip_trailing_spaces1_activate (GtkMenuItem *menuitem, } -void -on_page_setup1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_page_setup1_activate(GtkMenuItem *menuitem, gpointer user_data) { printing_page_setup_gtk(); } -gboolean -on_escape_key_press_event (GtkWidget *widget, - GdkEventKey *event, - gpointer user_data) +gboolean on_escape_key_press_event(GtkWidget *widget, GdkEventKey *event, gpointer user_data) { guint state = event->state & gtk_accelerator_get_default_mod_mask(); @@ -2104,9 +1856,7 @@ on_escape_key_press_event (GtkWidget *widget, } -void -on_line_breaking1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_line_breaking1_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc; @@ -2120,9 +1870,7 @@ on_line_breaking1_activate (GtkMenuItem *menuitem, } -void -on_replace_spaces_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_replace_spaces_activate(GtkMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); @@ -2132,9 +1880,7 @@ on_replace_spaces_activate (GtkMenuItem *menuitem, } -void -on_search1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_search1_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *next_message = ui_lookup_widget(main_widgets.window, "next_message1"); GtkWidget *previous_message = ui_lookup_widget(main_widgets.window, "previous_message1"); @@ -2150,9 +1896,7 @@ on_search1_activate (GtkMenuItem *menuitem, /* simple implementation (vs. close all which doesn't close documents if cancelled) */ -void -on_close_other_documents1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_close_other_documents1_activate(GtkMenuItem *menuitem, gpointer user_data) { guint i; GeanyDocument *doc, *cur_doc = document_get_current(); @@ -2170,25 +1914,19 @@ on_close_other_documents1_activate (GtkMenuItem *menuitem, } -void -on_menu_reload_configuration1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_menu_reload_configuration1_activate(GtkMenuItem *menuitem, gpointer user_data) { main_reload_configuration(); } -void -on_debug_messages1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_debug_messages1_activate(GtkMenuItem *menuitem, gpointer user_data) { log_show_debug_messages_dialog(); } -void -on_send_selection_to_vte1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_send_selection_to_vte1_activate(GtkMenuItem *menuitem, gpointer user_data) { #ifdef HAVE_VTE if (vte_info.have_vte) @@ -2197,9 +1935,7 @@ on_send_selection_to_vte1_activate (GtkMenuItem *menuitem, } -gboolean on_window_state_event (GtkWidget *widget, - GdkEventWindowState *event, - gpointer user_data) +gboolean on_window_state_event(GtkWidget *widget, GdkEventWindowState *event, gpointer user_data) { if (event->changed_mask & GDK_WINDOW_STATE_FULLSCREEN) @@ -2233,9 +1969,7 @@ static void show_notebook_page(const gchar *notebook_name, const gchar *page_nam } -void -on_customize_toolbar1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_customize_toolbar1_activate(GtkMenuItem *menuitem, gpointer user_data) { prefs_show_dialog(); @@ -2246,115 +1980,85 @@ on_customize_toolbar1_activate (GtkMenuItem *menuitem, } -void -on_button_customize_toolbar_clicked (GtkButton *button, - gpointer user_data) +void on_button_customize_toolbar_clicked(GtkButton *button, gpointer user_data) { toolbar_configure(GTK_WINDOW(ui_widgets.prefs_dialog)); } -void -on_cut_current_line_s_1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_cut_current_line_s_1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_CLIPBOARD, GEANY_KEYS_CLIPBOARD_CUTLINE); } -void -on_copy_current_line_s_1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_copy_current_line_s_1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_CLIPBOARD, GEANY_KEYS_CLIPBOARD_COPYLINE); } -void -on_delete_current_line_s_1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_delete_current_line_s_1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_EDITOR, GEANY_KEYS_EDITOR_DELETELINE); } -void -on_duplicate_line_or_selection1_activate - (GtkMenuItem *menuitem, - gpointer user_data) +void on_duplicate_line_or_selection1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_EDITOR, GEANY_KEYS_EDITOR_DUPLICATELINE); } -void -on_select_current_line_s_1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_select_current_line_s_1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_SELECT, GEANY_KEYS_SELECT_LINE); } -void -on_select_current_paragraph1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_select_current_paragraph1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_SELECT, GEANY_KEYS_SELECT_PARAGRAPH); } -void -on_insert_alternative_white_space1_activate - (GtkMenuItem *menuitem, - gpointer user_data) +void on_insert_alternative_white_space1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_INSERT, GEANY_KEYS_INSERT_ALTWHITESPACE); } -void -on_go_to_next_marker1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_go_to_next_marker1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_GOTO, GEANY_KEYS_GOTO_NEXTMARKER); } -void -on_go_to_previous_marker1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_go_to_previous_marker1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_GOTO, GEANY_KEYS_GOTO_PREVIOUSMARKER); } -void -on_reflow_lines_block1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_reflow_lines_block1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_FORMAT, GEANY_KEYS_FORMAT_REFLOWPARAGRAPH); } -void -on_transpose_current_line1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_transpose_current_line1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_EDITOR, GEANY_KEYS_EDITOR_TRANSPOSELINE); } -void -on_smart_line_indent1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_smart_line_indent1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_FORMAT, GEANY_KEYS_FORMAT_AUTOINDENT); } -void -on_plugin_preferences1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_plugin_preferences1_activate(GtkMenuItem *menuitem, gpointer user_data) { #ifdef HAVE_PLUGINS plugin_show_configure(NULL); @@ -2376,9 +2080,7 @@ static void set_indent_width(guint width) } -void -on_indent_width_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_indent_width_activate(GtkMenuItem *menuitem, gpointer user_data) { gchar *label = ui_menu_item_get_text(menuitem); gint width = atoi(label); @@ -2389,9 +2091,7 @@ on_indent_width_activate (GtkMenuItem *menuitem, } -void -on_reset_indentation1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_reset_indentation1_activate(GtkMenuItem *menuitem, gpointer user_data) { guint i; @@ -2403,9 +2103,7 @@ on_reset_indentation1_activate (GtkMenuItem *menuitem, } -void -on_mark_all1_activate (GtkMenuItem *menuitem, - gpointer user_data) +void on_mark_all1_activate(GtkMenuItem *menuitem, gpointer user_data) { keybindings_send_command(GEANY_KEY_GROUP_SEARCH, GEANY_KEYS_SEARCH_MARKALL); } diff --git a/src/dialogs.c b/src/dialogs.c index 444be60af..6df29d4b6 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -779,7 +779,7 @@ void dialogs_show_msgbox(GtkMessageType type, const gchar *text, ...) win32_message_dialog(GTK_WIDGET(parent), type, string); #else 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); #endif g_free(string); @@ -797,7 +797,7 @@ void dialogs_show_msgbox_with_secondary(GtkMessageType type, const gchar *text, #else GtkWidget *dialog; 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); show_msgbox_dialog(dialog, type, parent); #endif @@ -811,7 +811,7 @@ static gint run_unsaved_dialog(const gchar *msg, const gchar *msg2) gint ret; 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_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 static void -on_font_apply_button_clicked (GtkButton *button, - gpointer user_data) +on_font_apply_button_clicked(GtkButton *button, gpointer user_data) { gchar *fontname; @@ -896,8 +895,7 @@ on_font_apply_button_clicked (GtkButton *button, static void -on_font_ok_button_clicked (GtkButton *button, - gpointer user_data) +on_font_ok_button_clicked(GtkButton *button, gpointer user_data) { /* We do the same thing as apply, but we close the dialog after. */ on_font_apply_button_clicked(button, NULL); @@ -906,8 +904,7 @@ on_font_ok_button_clicked (GtkButton *button, static void -on_font_cancel_button_clicked (GtkButton *button, - gpointer user_data) +on_font_cancel_button_clicked(GtkButton *button, gpointer user_data) { gtk_widget_hide(ui_widgets.open_fontsel); } @@ -974,9 +971,7 @@ on_input_numeric_activate(GtkEntry *entry, GtkDialog *dialog) static void -on_input_dialog_response(GtkDialog *dialog, - gint response, - GtkWidget *entry) +on_input_dialog_response(GtkDialog *dialog, gint response, GtkWidget *entry) { gboolean persistent = (gboolean) GPOINTER_TO_INT(g_object_get_data(G_OBJECT(dialog), "has_combo")); diff --git a/src/encodings.c b/src/encodings.c index cebc822e7..fbc7e5408 100644 --- a/src/encodings.c +++ b/src/encodings.c @@ -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->charset != NULL, NULL); - return g_strdup_printf("%s (%s)", enc->name, enc->charset); + return g_strdup_printf("%s (%s)", enc->name, enc->charset); } diff --git a/src/filetypes.c b/src/filetypes.c index 408a58129..5b404d1e5 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -1029,8 +1029,7 @@ void filetypes_select_radio_item(const GeanyFiletype *ft) static void -on_filetype_change (GtkCheckMenuItem *menuitem, - gpointer user_data) +on_filetype_change(GtkCheckMenuItem *menuitem, gpointer user_data) { GeanyDocument *doc = document_get_current(); if (ignore_callback || doc == NULL || ! gtk_check_menu_item_get_active(menuitem)) diff --git a/src/keybindings.c b/src/keybindings.c index 2a3c94004..bbe97e2a0 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -866,7 +866,7 @@ static GtkWidget *create_dialog(void) gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(tree), FALSE); 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( NULL, text_renderer, "text", 0, "weight", 2, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); diff --git a/src/log.c b/src/log.c index 850259b01..a75f99797 100644 --- a/src/log.c +++ b/src/log.c @@ -96,7 +96,7 @@ static void handler_printerr(const gchar *msg) static const gchar *get_log_prefix(GLogLevelFlags log_level) { switch (log_level & G_LOG_LEVEL_MASK) - { + { case G_LOG_LEVEL_ERROR: return "ERROR\t\t"; case G_LOG_LEVEL_CRITICAL: diff --git a/src/main.c b/src/main.c index 922f9b8a8..3db6e1a5d 100644 --- a/src/main.c +++ b/src/main.c @@ -950,8 +950,8 @@ gint main(gint argc, gchar **argv) #endif parse_command_line_options(&argc, &argv); - /* Initialize GLib's thread system in case any plugins want to use it or their - * dependencies (e.g. WebKit, Soup, ...) */ + /* Initialize GLib's thread system in case any plugins want to use it or their + * dependencies (e.g. WebKit, Soup, ...) */ if (!g_thread_supported()) g_thread_init(NULL); @@ -965,7 +965,7 @@ gint main(gint argc, gchar **argv) config_dir_result = setup_config_dir(); #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) { socket_info.lock_socket = -1; diff --git a/src/msgwindow.c b/src/msgwindow.c index cfa4392f0..4aeac4645 100644 --- a/src/msgwindow.c +++ b/src/msgwindow.c @@ -424,8 +424,7 @@ void msgwin_status_add(const gchar *format, ...) static void -on_message_treeview_clear_activate (GtkMenuItem *menuitem, - gpointer user_data) +on_message_treeview_clear_activate(GtkMenuItem *menuitem, gpointer user_data) { gint tabnum = GPOINTER_TO_INT(user_data); @@ -434,8 +433,7 @@ on_message_treeview_clear_activate (GtkMenuItem *menuitem, static void -on_compiler_treeview_copy_activate (GtkMenuItem *menuitem, - gpointer user_data) +on_compiler_treeview_copy_activate(GtkMenuItem *menuitem, gpointer user_data) { GtkWidget *tv = NULL; GtkTreeSelection *selection; @@ -531,8 +529,7 @@ static void on_compiler_treeview_copy_all_activate(GtkMenuItem *menuitem, gpoint static void -on_hide_message_window (GtkMenuItem *menuitem, - gpointer user_data) +on_hide_message_window(GtkMenuItem *menuitem, gpointer user_data) { msgwin_show_hide(FALSE); } diff --git a/src/notebook.c b/src/notebook.c index 2d696a615..9188d5393 100644 --- a/src/notebook.c +++ b/src/notebook.c @@ -54,12 +54,12 @@ static GtkTargetEntry files_drop_targets[] = { static void notebook_page_reordered_cb(GtkNotebook *notebook, GtkWidget *child, guint page_num, - gpointer user_data); + gpointer user_data); static void on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, - gint x, gint y, GtkSelectionData *data, guint info, - guint event_time, gpointer user_data); + gint x, gint y, GtkSelectionData *data, guint target_type, + guint event_time, gpointer user_data); static void notebook_tab_close_clicked_cb(GtkButton *button, gpointer user_data); @@ -490,8 +490,8 @@ void notebook_remove_page(gint page_num) static void on_window_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, - gint x, gint y, GtkSelectionData *data, guint target_type, - guint event_time, gpointer user_data) + gint x, gint y, GtkSelectionData *data, guint target_type, + guint event_time, gpointer user_data) { gboolean success = FALSE; diff --git a/src/plugins.c b/src/plugins.c index 67c1c7075..5b60554af 100644 --- a/src/plugins.c +++ b/src/plugins.c @@ -1232,19 +1232,19 @@ static void pm_prepare_treeview(GtkWidget *tree, GtkListStore *store) GtkTreeSelection *sel; 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); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); g_signal_connect(checkbox_renderer, "toggled", G_CALLBACK(pm_plugin_toggled), NULL); 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); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); text_renderer = gtk_cell_renderer_text_new(); 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); gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); diff --git a/src/prefix.c b/src/prefix.c index f06380d06..b6ebbfa52 100644 --- a/src/prefix.c +++ b/src/prefix.c @@ -55,8 +55,8 @@ static char *br_last_value = (char*)NULL; static void br_free_last_value () { - if (br_last_value) - free (br_last_value); + if (br_last_value) + free (br_last_value); } diff --git a/src/prefs.c b/src/prefs.c index 1208f0ca7..218ba6f0c 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -614,8 +614,8 @@ static void prefs_init_dialog(void) /* Tools Settings */ - 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); + 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); if (tool_prefs.browser_cmd) gtk_entry_set_text(GTK_ENTRY(ui_lookup_widget(ui_widgets.prefs_dialog, "entry_browser")), tool_prefs.browser_cmd); diff --git a/src/symbols.c b/src/symbols.c index 79f1219a3..f944185aa 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -437,10 +437,10 @@ static gint compare_symbol(const TMTag *tag_a, const TMTag *tag_b) return 0; if (tag_a->name == NULL) - return -(tag_a->name != tag_b->name); + return -(tag_a->name != tag_b->name); 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); if (ret == 0) @@ -633,9 +633,9 @@ tag_list_add_groups(GtkTreeStore *tree_store, ...) g_return_if_fail(top_level_iter_names); - va_start(args, tree_store); - for (; iter = va_arg(args, GtkTreeIter*), iter != NULL;) - { + va_start(args, tree_store); + for (; iter = va_arg(args, GtkTreeIter*), iter != NULL;) + { gchar *title = va_arg(args, gchar*); gchar *icon_name = va_arg(args, gchar *); GdkPixbuf *icon = NULL; @@ -645,7 +645,7 @@ tag_list_add_groups(GtkTreeStore *tree_store, ...) icon = get_tag_icon(icon_name); } - g_assert(title != NULL); + g_assert(title != NULL); g_ptr_array_add(top_level_iter_names, title); if (!find_toplevel_iter(tree_store, iter, title)) diff --git a/src/tools.c b/src/tools.c index 6ed80b6b4..93e2cffad 100644 --- a/src/tools.c +++ b/src/tools.c @@ -892,16 +892,14 @@ void tools_word_count(void) */ #ifndef G_OS_WIN32 static void -on_color_cancel_button_clicked (GtkButton *button, - gpointer user_data) +on_color_cancel_button_clicked(GtkButton *button, gpointer user_data) { gtk_widget_hide(ui_widgets.open_colorsel); } static void -on_color_ok_button_clicked (GtkButton *button, - gpointer user_data) +on_color_ok_button_clicked(GtkButton *button, gpointer user_data) { GdkColor color; GeanyDocument *doc = document_get_current(); diff --git a/src/ui_utils.c b/src/ui_utils.c index 79546a9a9..c8e6ff69b 100644 --- a/src/ui_utils.c +++ b/src/ui_utils.c @@ -2258,9 +2258,9 @@ static GtkWidget *progress_bar_create(void) { GtkWidget *bar = gtk_progress_bar_new(); - /* Set the progressbar's height to 1 to fit it in the statusbar */ - gtk_widget_set_size_request(bar, -1, 1); - gtk_box_pack_start (GTK_BOX(ui_widgets.statusbar), bar, FALSE, FALSE, 3); + /* Set the progressbar's height to 1 to fit it in the statusbar */ + gtk_widget_set_size_request(bar, -1, 1); + gtk_box_pack_start (GTK_BOX(ui_widgets.statusbar), bar, FALSE, FALSE, 3); return bar; } diff --git a/src/utils.c b/src/utils.c index 63c6c794f..bc7be09bb 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1392,17 +1392,17 @@ gchar **utils_strv_new(const gchar *first, ...) strvlen = 1; /* for first argument */ - /* count other arguments */ - va_start(args, first); - for (; va_arg(args, gchar*) != NULL; strvlen++); + /* count other arguments */ + va_start(args, first); + for (; va_arg(args, gchar*) != NULL; strvlen++); va_end(args); strv = g_new(gchar*, strvlen + 1); /* +1 for NULL terminator */ strv[0] = g_strdup(first); - va_start(args, first); - for (i = 1; str = va_arg(args, gchar*), str != NULL; i++) - { + va_start(args, first); + for (i = 1; str = va_arg(args, gchar*), str != NULL; i++) + { strv[i] = g_strdup(str); } va_end(args); diff --git a/src/vte.c b/src/vte.c index b0251bbb4..ff47a1633 100644 --- a/src/vte.c +++ b/src/vte.c @@ -79,9 +79,9 @@ struct _VteTerminal #define VTE_TYPE_TERMINAL (vf->vte_terminal_get_type()) typedef enum { - VTE_CURSOR_BLINK_SYSTEM, - VTE_CURSOR_BLINK_ON, - VTE_CURSOR_BLINK_OFF + VTE_CURSOR_BLINK_SYSTEM, + VTE_CURSOR_BLINK_ON, + VTE_CURSOR_BLINK_OFF } VteTerminalCursorBlinkMode; @@ -266,7 +266,7 @@ static void create_vte(void) vf->vte_terminal_set_mouse_autohide(VTE_TERMINAL(vte), TRUE); 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); g_signal_connect(vte, "child-exited", G_CALLBACK(vte_start), NULL); -- 2.11.4.GIT