summaryrefslogtreecommitdiff
path: root/gsearchtool
diff options
context:
space:
mode:
Diffstat (limited to 'gsearchtool')
-rw-r--r--gsearchtool/libmateui-deprecated/gsearchtool-entry.c3
-rw-r--r--gsearchtool/src/gsearchtool-callbacks.c34
-rw-r--r--gsearchtool/src/gsearchtool.c4
3 files changed, 15 insertions, 26 deletions
diff --git a/gsearchtool/libmateui-deprecated/gsearchtool-entry.c b/gsearchtool/libmateui-deprecated/gsearchtool-entry.c
index daa3c9aa..7b12466f 100644
--- a/gsearchtool/libmateui-deprecated/gsearchtool-entry.c
+++ b/gsearchtool/libmateui-deprecated/gsearchtool-entry.c
@@ -268,8 +268,7 @@ gsearch_history_entry_save_history (GsearchHistoryEntry *entry)
"search-history",
g_variant_new ("a{sas}", &history_builder));
- g_slist_foreach (items, (GFunc) g_free, NULL);
- g_slist_free (items);
+ g_slist_free_full (items, g_free);
g_free (key);
}
diff --git a/gsearchtool/src/gsearchtool-callbacks.c b/gsearchtool/src/gsearchtool-callbacks.c
index 55b1e086..23e81fc6 100644
--- a/gsearchtool/src/gsearchtool-callbacks.c
+++ b/gsearchtool/src/gsearchtool-callbacks.c
@@ -473,8 +473,7 @@ open_file_cb (GtkMenuItem * action,
response = display_dialog_file_open_limit (gsearch->window, g_list_length (list));
if (response == GTK_RESPONSE_CANCEL) {
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
return;
}
}
@@ -530,8 +529,7 @@ open_file_cb (GtkMenuItem * action,
g_free (utf8_name);
g_free (locale_file);
}
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
}
static gint
@@ -606,8 +604,7 @@ open_folder_cb (GtkAction * action,
response = display_dialog_folder_open_limit (gsearch->window, g_list_length (list));
if (response == GTK_RESPONSE_CANCEL) {
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
return;
}
}
@@ -641,8 +638,7 @@ open_folder_cb (GtkAction * action,
display_dialog_could_not_open_folder (gsearch->window, utf8_folder);
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
g_free (locale_folder);
g_free (utf8_folder);
g_object_unref (g_file);
@@ -655,8 +651,7 @@ open_folder_cb (GtkAction * action,
g_free (locale_file);
g_free (utf8_folder);
}
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
g_object_unref (g_file);
g_object_unref (g_file_info);
g_object_unref (g_app_info);
@@ -903,8 +898,7 @@ move_to_trash_cb (GtkAction * action,
g_free (message);
}
}
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
g_free (locale_filename);
g_free (utf8_filename);
g_free (utf8_basename);
@@ -1083,7 +1077,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch,
gtk_widget_show (new1);
g_object_set_data_full (G_OBJECT (new1), "app", (GAppInfo *)list->data,
- (GDestroyNotify) g_object_unref);
+ g_object_unref);
gtk_container_add (GTK_CONTAINER (gsearch->search_results_popup_menu), new1);
g_signal_connect ((gpointer) new1, "activate", G_CALLBACK (open_file_cb),
@@ -1123,7 +1117,7 @@ build_popup_menu_for_file (GSearchWindow * gsearch,
gtk_widget_show (new1);
g_object_set_data_full (G_OBJECT (new1), "app", (GAppInfo *)list->data,
- (GDestroyNotify) g_object_unref);
+ g_object_unref);
if (list_length >= 4) {
@@ -1378,8 +1372,7 @@ file_button_release_event_cb (GtkWidget * widget,
}
g_free (locale_file_first);
g_free (utf8_name_first);
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
}
else if (event->button == 1 || event->button == 2) {
if (gsearch->is_search_results_single_click_to_activate == TRUE) {
@@ -1531,8 +1524,7 @@ drag_begin_file_cb (GtkWidget * widget,
gtk_tree_model_get (GTK_TREE_MODEL (gsearch->search_results_list_store), &iter,
COLUMN_ICON, &pixbuf,
-1);
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
if (pixbuf) {
gtk_drag_set_icon_pixbuf (context, pixbuf, 0, 0);
@@ -1602,8 +1594,7 @@ drag_file_cb (GtkWidget * widget,
g_free (utf8_name);
g_free (locale_file);
}
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
g_free (uri_list);
}
@@ -1867,8 +1858,7 @@ key_press_cb (GtkWidget * widget,
gtk_tree_model_get (GTK_TREE_MODEL (gsearch->search_results_list_store), &iter,
COLUMN_NO_FILES_FOUND, &no_files_found, -1);
- g_list_foreach (list, (GFunc) gtk_tree_path_free, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
if (!no_files_found) {
gtk_menu_popup (GTK_MENU (gsearch->search_results_popup_menu), NULL, NULL, NULL, NULL,
diff --git a/gsearchtool/src/gsearchtool.c b/gsearchtool/src/gsearchtool.c
index eeae2ecd..7da8c12a 100644
--- a/gsearchtool/src/gsearchtool.c
+++ b/gsearchtool/src/gsearchtool.c
@@ -2942,7 +2942,7 @@ gsearch_window_finalize (GObject * object)
}
static void
-gsearch_window_class_init (GSearchWindowClass * klass)
+gsearch_window_class_init (GSearchWindowClass * klass, void * dara)
{
GObjectClass * object_class = (GObjectClass *) klass;
@@ -2965,7 +2965,7 @@ gsearch_window_get_type (void)
NULL,
sizeof (GSearchWindow),
0,
- (GInstanceInitFunc) gsearch_app_create
+ (GInstanceInitFunc)(void (*)(void)) gsearch_app_create
};
object_type = g_type_register_static (GTK_TYPE_WINDOW, "GSearchWindow", &object_info, 0);
}