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:
parent
ee1d546d8f
commit
ddb4ad5fa5
606
src/callbacks.c
606
src/callbacks.c
File diff suppressed because it is too large
Load Diff
@ -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"));
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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))
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
}
|
||||
|
12
src/utils.c
12
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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user