summaryrefslogtreecommitdiff
path: root/plugins/filebrowser
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-28 09:07:37 +0100
committerraveit65 <[email protected]>2020-03-14 13:14:35 +0100
commit28a6895df5fa4a1a60c794ed5e85e31d764e85e7 (patch)
treef9b5d3eae40ecb5bd8eb357c10ce8458b2faa7f9 /plugins/filebrowser
parentd265d00b72fc9a7fb126079780303df9ea217a29 (diff)
downloadpluma-28a6895df5fa4a1a60c794ed5e85e31d764e85e7.tar.bz2
pluma-28a6895df5fa4a1a60c794ed5e85e31d764e85e7.tar.xz
Remove warnings: cast between incompatible function types
Diffstat (limited to 'plugins/filebrowser')
-rw-r--r--plugins/filebrowser/pluma-file-bookmarks-store.c9
-rw-r--r--plugins/filebrowser/pluma-file-browser-messages.c3
-rw-r--r--plugins/filebrowser/pluma-file-browser-store.c6
-rw-r--r--plugins/filebrowser/pluma-file-browser-view.c3
-rw-r--r--plugins/filebrowser/pluma-file-browser-widget.c18
5 files changed, 14 insertions, 25 deletions
diff --git a/plugins/filebrowser/pluma-file-bookmarks-store.c b/plugins/filebrowser/pluma-file-bookmarks-store.c
index 4493742c..c8da938e 100644
--- a/plugins/filebrowser/pluma-file-bookmarks-store.c
+++ b/plugins/filebrowser/pluma-file-bookmarks-store.c
@@ -370,8 +370,7 @@ init_drives (PlumaFileBookmarksStore *model)
drives = g_volume_monitor_get_connected_drives (model->priv->volume_monitor);
g_list_foreach (drives, (GFunc)process_drive_cb, model);
- g_list_foreach (drives, (GFunc)g_object_unref, NULL);
- g_list_free (drives);
+ g_list_free_full (drives, g_object_unref);
}
static void
@@ -399,8 +398,7 @@ init_volumes (PlumaFileBookmarksStore *model)
volumes = g_volume_monitor_get_volumes (model->priv->volume_monitor);
g_list_foreach (volumes, (GFunc)process_volume_nodrive_cb, model);
- g_list_foreach (volumes, (GFunc)g_object_unref, NULL);
- g_list_free (volumes);
+ g_list_free_full (volumes, g_object_unref);
}
static void
@@ -430,8 +428,7 @@ init_mounts (PlumaFileBookmarksStore *model)
mounts = g_volume_monitor_get_mounts (model->priv->volume_monitor);
g_list_foreach (mounts, (GFunc)process_mount_novolume_cb, model);
- g_list_foreach (mounts, (GFunc)g_object_unref, NULL);
- g_list_free (mounts);
+ g_list_free_full (mounts, g_object_unref);
}
static void
diff --git a/plugins/filebrowser/pluma-file-browser-messages.c b/plugins/filebrowser/pluma-file-browser-messages.c
index 2c703973..2aa27418 100644
--- a/plugins/filebrowser/pluma-file-browser-messages.c
+++ b/plugins/filebrowser/pluma-file-browser-messages.c
@@ -154,7 +154,8 @@ track_row_lookup (WindowData *data,
}
static void
-message_cache_data_free (MessageCacheData *data)
+message_cache_data_free (MessageCacheData *data,
+ GClosure *closure)
{
g_object_unref (data->message);
g_slice_free (MessageCacheData, data);
diff --git a/plugins/filebrowser/pluma-file-browser-store.c b/plugins/filebrowser/pluma-file-browser-store.c
index 03fd1fd2..ae100379 100644
--- a/plugins/filebrowser/pluma-file-browser-store.c
+++ b/plugins/filebrowser/pluma-file-browser-store.c
@@ -3253,8 +3253,7 @@ async_data_free (AsyncData * data)
{
g_object_unref (data->cancellable);
- g_list_foreach (data->files, (GFunc)g_object_unref, NULL);
- g_list_free (data->files);
+ g_list_free_full (data->files, g_object_unref);
if (!data->removed)
data->model->priv->async_handles = g_slist_remove (data->model->priv->async_handles, data);
@@ -3444,8 +3443,7 @@ pluma_file_browser_store_delete (PlumaFileBrowserStore * model,
rows = g_list_append(NULL, pluma_file_browser_store_get_path_real (model, node));
result = pluma_file_browser_store_delete_all (model, rows, trash);
- g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_free (rows);
+ g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free);
return result;
}
diff --git a/plugins/filebrowser/pluma-file-browser-view.c b/plugins/filebrowser/pluma-file-browser-view.c
index 496d5626..5fae1745 100644
--- a/plugins/filebrowser/pluma-file-browser-view.c
+++ b/plugins/filebrowser/pluma-file-browser-view.c
@@ -379,8 +379,7 @@ activate_selected_files (PlumaFileBrowserView *view) {
g_signal_emit (view, signals[DIRECTORY_ACTIVATED], 0, &iter);
}
- g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_free (rows);
+ g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free);
}
static void
diff --git a/plugins/filebrowser/pluma-file-browser-widget.c b/plugins/filebrowser/pluma-file-browser-widget.c
index 25ec921a..58afc036 100644
--- a/plugins/filebrowser/pluma-file-browser-widget.c
+++ b/plugins/filebrowser/pluma-file-browser-widget.c
@@ -343,8 +343,7 @@ pluma_file_browser_widget_finalize (GObject * object)
g_object_unref (obj->priv->bookmarks_store);
g_object_unref (obj->priv->combo_model);
- g_slist_foreach (obj->priv->filter_funcs, (GFunc) g_free, NULL);
- g_slist_free (obj->priv->filter_funcs);
+ g_slist_free_full (obj->priv->filter_funcs, g_free);
for (loc = obj->priv->locations; loc; loc = loc->next)
location_free ((Location *) (loc->data));
@@ -1334,8 +1333,7 @@ pluma_file_browser_widget_get_first_selected (PlumaFileBrowserWidget *obj,
result = gtk_tree_model_get_iter(model, iter, (GtkTreePath *)(rows->data));
- g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_free (rows);
+ g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free);
return result;
}
@@ -1457,8 +1455,7 @@ get_deletable_files (PlumaFileBrowserWidget *obj) {
paths = g_list_append (paths, gtk_tree_path_copy (path));
}
- g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_free (rows);
+ g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free);
return paths;
}
@@ -1491,8 +1488,7 @@ delete_selected_files (PlumaFileBrowserWidget * obj, gboolean trash)
result = pluma_file_browser_store_delete_all (PLUMA_FILE_BROWSER_STORE (model),
rows, trash);
- g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_free (rows);
+ g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free);
return result == PLUMA_FILE_BROWSER_STORE_RESULT_OK;
}
@@ -2055,8 +2051,7 @@ pluma_file_browser_widget_get_num_selected_files_or_directories (PlumaFileBrowse
}
}
- g_list_foreach (rows, (GFunc)gtk_tree_path_free, NULL);
- g_list_free (rows);
+ g_list_free_full (rows, (GDestroyNotify) gtk_tree_path_free);
return result;
}
@@ -2179,8 +2174,7 @@ try_activate_drive (PlumaFileBrowserWidget *widget,
try_mount_volume (widget, volume);
}
- g_list_foreach (volumes, (GFunc)g_object_unref, NULL);
- g_list_free (volumes);
+ g_list_free_full (volumes, g_object_unref);
}
static void