From 61b94ba9a4953aba56764dac7e0f8751aaa11571 Mon Sep 17 00:00:00 2001 From: Laurent Napias Date: Sat, 29 Jun 2019 11:57:35 +0200 Subject: Remove trailing whitespaces --- gsearchtool/libeggsmclient/eggsmclient-xsmp.c | 8 +++--- gsearchtool/libeggsmclient/eggsmclient.c | 2 +- gsearchtool/src/gsearchtool-callbacks.c | 38 +++++++++++++-------------- gsearchtool/src/gsearchtool.c | 22 ++++++++-------- 4 files changed, 35 insertions(+), 35 deletions(-) (limited to 'gsearchtool') diff --git a/gsearchtool/libeggsmclient/eggsmclient-xsmp.c b/gsearchtool/libeggsmclient/eggsmclient-xsmp.c index 97813788..2fef4df1 100644 --- a/gsearchtool/libeggsmclient/eggsmclient-xsmp.c +++ b/gsearchtool/libeggsmclient/eggsmclient-xsmp.c @@ -227,7 +227,7 @@ sm_client_xsmp_set_initial_properties (gpointer user_data) if (xsmp->restart_style == SmRestartIfRunning) { - if (egg_desktop_file_get_boolean (desktop_file, + if (egg_desktop_file_get_boolean (desktop_file, "X-MATE-AutoRestart", NULL)) xsmp->restart_style = SmRestartImmediately; } @@ -1127,7 +1127,7 @@ delete_properties (EggSMClientXSMP *xsmp, ...) * until you're done with the SmProp. */ static SmProp * -array_prop (const char *name, ...) +array_prop (const char *name, ...) { SmProp *prop; SmPropValue pv; @@ -1343,13 +1343,13 @@ ice_error_handler (IceConn ice_conn, IcePointer values) { /* Do nothing */ -} +} static void ice_io_error_handler (IceConn ice_conn) { /* Do nothing */ -} +} static void smc_error_handler (SmcConn smc_conn, diff --git a/gsearchtool/libeggsmclient/eggsmclient.c b/gsearchtool/libeggsmclient/eggsmclient.c index da0a0f2d..2fdf7dbb 100644 --- a/gsearchtool/libeggsmclient/eggsmclient.c +++ b/gsearchtool/libeggsmclient/eggsmclient.c @@ -112,7 +112,7 @@ egg_sm_client_class_init (EggSMClientClass *klass) * handling this signal; if the user has requested that the session * be saved when logging out, then ::save_state will be emitted * separately. - * + * * If the application agrees to quit, it should then wait for either * the ::quit_cancelled or ::quit signals to be emitted. **/ diff --git a/gsearchtool/src/gsearchtool-callbacks.c b/gsearchtool/src/gsearchtool-callbacks.c index da8b7bda..b20aed79 100644 --- a/gsearchtool/src/gsearchtool-callbacks.c +++ b/gsearchtool/src/gsearchtool-callbacks.c @@ -186,7 +186,7 @@ click_help_cb (GtkWidget * widget, GtkWidget * window = data; GError * error = NULL; - gtk_show_uri_on_window (GTK_WINDOW (window), "help:mate-search-tool", + gtk_show_uri_on_window (GTK_WINDOW (window), "help:mate-search-tool", gtk_get_current_event_time (), &error); if (error) { @@ -922,17 +922,17 @@ move_to_trash_cb (GtkAction * action, /* Bugzilla #397945: Select next row in the search results list */ if (last_selected_path != NULL) { if (gtk_tree_selection_count_selected_rows (GTK_TREE_SELECTION (gsearch->search_results_selection)) == 0) { - gtk_tree_selection_select_path (GTK_TREE_SELECTION (gsearch->search_results_selection), + gtk_tree_selection_select_path (GTK_TREE_SELECTION (gsearch->search_results_selection), last_selected_path); if (gtk_tree_selection_count_selected_rows (GTK_TREE_SELECTION (gsearch->search_results_selection)) == 0) { gtk_tree_path_prev (last_selected_path); - gtk_tree_selection_select_path (GTK_TREE_SELECTION (gsearch->search_results_selection), + gtk_tree_selection_select_path (GTK_TREE_SELECTION (gsearch->search_results_selection), last_selected_path); } } gtk_tree_path_free (last_selected_path); } - + if (gsearch->command_details->command_status != RUNNING) { update_search_counts (gsearch); } @@ -1051,7 +1051,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch, GList * list; gchar * str; gint list_length; - + g_file = g_file_new_for_path (file); file_info = g_file_query_info (g_file, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, G_FILE_QUERY_INFO_NONE, NULL, NULL); list = g_app_info_get_all_for_type (g_file_info_get_content_type (file_info)); @@ -1084,7 +1084,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch, list = g_list_prepend (list, tmp->data); g_list_free (tmp); } - + /* Popup menu item: Open with (default) */ str = g_strdup_printf (_("_Open with %s"), g_app_info_get_name (list->data)); new1 = gtk_image_menu_item_new_with_mnemonic (str); @@ -1111,11 +1111,11 @@ build_popup_menu_for_file (GSearchWindow * gsearch, gtk_widget_show (image1); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (new1), image1); } - + separatormenuitem1 = gtk_separator_menu_item_new (); gtk_widget_show (separatormenuitem1); gtk_container_add (GTK_CONTAINER (gsearch->search_results_popup_menu), separatormenuitem1); - gtk_widget_set_sensitive (separatormenuitem1, FALSE); + gtk_widget_set_sensitive (separatormenuitem1, FALSE); for (list = g_list_next (list), i = 0; list != NULL; list = g_list_next (list), i++) { @@ -1126,7 +1126,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch, else { str = g_strdup_printf ("%s", g_app_info_get_name (list->data)); } - + new1 = gtk_image_menu_item_new_with_mnemonic (str); g_free (str); gtk_widget_show (new1); @@ -1143,13 +1143,13 @@ build_popup_menu_for_file (GSearchWindow * gsearch, if (file_icon == NULL) { file_icon = g_themed_icon_new ("gtk-open"); } - + image1 = gtk_image_new_from_gicon (file_icon, GTK_ICON_SIZE_MENU); g_object_unref (file_icon); gtk_widget_show (image1); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (new1), image1); } - + if (i == 0) { gsearch->search_results_popup_submenu = gtk_menu_new (); @@ -1162,9 +1162,9 @@ build_popup_menu_for_file (GSearchWindow * gsearch, } gtk_container_add (GTK_CONTAINER (gsearch->search_results_popup_submenu), new1); - /* For submenu items, the "activate" signal is only emitted if the user first clicks + /* For submenu items, the "activate" signal is only emitted if the user first clicks on the parent menu item. Since submenus in gtk+ are automatically displayed when - the user hovers over them, most will never click on the parent menu item. + the user hovers over them, most will never click on the parent menu item. The work-around is to connect to "button-press-event". */ g_signal_connect (G_OBJECT(new1), "button-press-event", G_CALLBACK (open_file_event_cb), (gpointer) gsearch); @@ -1178,7 +1178,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch, if (file_icon == NULL) { file_icon = g_themed_icon_new ("gtk-open"); } - + image1 = gtk_image_new_from_gicon (file_icon, GTK_ICON_SIZE_MENU); g_object_unref (file_icon); gtk_widget_show (image1); @@ -1189,7 +1189,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch, (gpointer) gsearch); } } - + if (list_length >= 2) { separatormenuitem1 = gtk_separator_menu_item_new (); gtk_container_add (GTK_CONTAINER (gsearch->search_results_popup_menu), separatormenuitem1); @@ -1255,7 +1255,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch, "activate", G_CALLBACK (show_file_selector_cb), (gpointer) gsearch); -} +} gboolean file_button_release_event_cb (GtkWidget * widget, @@ -1332,7 +1332,7 @@ file_button_release_event_cb (GtkWidget * widget, /* Verify the selected files each have the same default handler. */ for (tmp = g_list_first (list), idx = 0; tmp != NULL; tmp = g_list_next (tmp), idx++) { - + GFile * g_file; GAppInfo * app_info; @@ -1350,7 +1350,7 @@ file_button_release_event_cb (GtkWidget * widget, show_app_list = FALSE; } else { - if (idx == 0) { + if (idx == 0) { first_app_info = g_app_info_dup (app_info); g_object_unref (app_info); continue; @@ -1376,7 +1376,7 @@ file_button_release_event_cb (GtkWidget * widget, g_object_unref (first_app_info); } } - + file = g_strdup (((show_app_list == TRUE) ? locale_file_first : NULL)); build_popup_menu_for_file (gsearch, file); diff --git a/gsearchtool/src/gsearchtool.c b/gsearchtool/src/gsearchtool.c index 68c14b80..a788edf4 100644 --- a/gsearchtool/src/gsearchtool.c +++ b/gsearchtool/src/gsearchtool.c @@ -279,19 +279,19 @@ setup_case_insensitive_arguments (GSearchWindow * gsearch) if ((cmd_stderr != NULL) && (strlen (cmd_stderr) == 0)) { g_free (cmd_stderr); g_free (grep_cmd); - + /* check grep command for -I argument compatibility, bug 568840 */ grep_cmd = g_strdup_printf ("%s -i -I 'string' /dev/null", GREP_COMMAND); g_spawn_command_line_sync (grep_cmd, NULL, &cmd_stderr, NULL, NULL); - + if ((cmd_stderr != NULL) && (strlen (cmd_stderr) == 0)) { GSearchOptionTemplates[SEARCH_CONSTRAINT_CONTAINS_THE_TEXT].option = g_strdup_printf ("'!' -type p -exec %s -i -I -c '%%s' {} \\;", GREP_COMMAND); } else { GSearchOptionTemplates[SEARCH_CONSTRAINT_CONTAINS_THE_TEXT].option = - g_strdup_printf ("'!' -type p -exec %s -i -c '%%s' {} \\;", GREP_COMMAND); - } + g_strdup_printf ("'!' -type p -exec %s -i -c '%%s' {} \\;", GREP_COMMAND); + } } else { GSearchOptionTemplates[SEARCH_CONSTRAINT_CONTAINS_THE_TEXT].option = @@ -867,7 +867,7 @@ add_file_to_search_results (const gchar * file, if (gtk_tree_view_get_headers_visible (GTK_TREE_VIEW (gsearch->search_results_tree_view)) == FALSE) { gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (gsearch->search_results_tree_view), TRUE); } - + g_file = g_file_new_for_path (file); file_info = g_file_query_info (g_file, "standard::*,time::modified,thumbnail::path", 0, NULL, NULL); @@ -876,7 +876,7 @@ add_file_to_search_results (const gchar * file, readable_size = g_format_size (g_file_info_get_size (file_info)); g_file_info_get_modification_time (file_info, &time_val); - readable_date = get_readable_date (gsearch->search_results_date_format, time_val.tv_sec); + readable_date = get_readable_date (gsearch->search_results_date_format, time_val.tv_sec); base_name = g_path_get_basename (file); dir_name = g_path_get_dirname (file); @@ -1919,7 +1919,7 @@ spawn_search_command (GSearchWindow * gsearch, gtk_tree_model_foreach (GTK_TREE_MODEL (gsearch->search_results_list_store), (GtkTreeModelForeachFunc) tree_model_iter_free_monitor, gsearch); gtk_list_store_clear (GTK_LIST_STORE (gsearch->search_results_list_store)); - + gtk_tree_view_column_set_visible (gsearch->search_results_folder_column, TRUE); gtk_tree_view_column_set_visible (gsearch->search_results_size_column, TRUE); gtk_tree_view_column_set_visible (gsearch->search_results_type_column, TRUE); @@ -2311,7 +2311,7 @@ create_search_results_section (GSearchWindow * gsearch) gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 0); gsearch->progress_spinner = gtk_spinner_new (); - gtk_widget_set_size_request (gsearch->progress_spinner, + gtk_widget_set_size_request (gsearch->progress_spinner, GTK_ICON_SIZE_MENU, GTK_ICON_SIZE_MENU); gtk_box_pack_start (GTK_BOX (hbox), gsearch->progress_spinner, FALSE, FALSE, 0); @@ -2553,7 +2553,7 @@ set_clone_command (GSearchWindow * gsearch, g_free (file_is_named_locale); look_in_folder_locale = gtk_file_chooser_get_current_folder (GTK_FILE_CHOOSER (gsearch->look_in_folder_button)); - + if (look_in_folder_locale == NULL) { look_in_folder_locale = g_strdup (""); } @@ -2843,12 +2843,12 @@ gsearch_app_create (GSearchWindow * gsearch) locale_string = g_settings_get_string (gsearch->mate_search_tool_settings, "look-in-folder"); - if ((g_file_test (locale_string, G_FILE_TEST_EXISTS) == FALSE) || + if ((g_file_test (locale_string, G_FILE_TEST_EXISTS) == FALSE) || (g_file_test (locale_string, G_FILE_TEST_IS_DIR) == FALSE)) { g_free (locale_string); locale_string = g_get_current_dir (); } - + utf8_string = g_filename_to_utf8 (locale_string, -1, NULL, NULL, NULL); gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (gsearch->look_in_folder_button), utf8_string); -- cgit v1.2.1