summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-04-18 12:53:11 +0200
committerraveit65 <[email protected]>2022-07-21 19:33:51 +0200
commit3c3ca50505fac6c93d76addf10f0eae1f7991743 (patch)
treef198149c4f80d0b0d8511c717d95c2f376351c13
parent6d8a8a0532e9d22652de91162b73c2262676524f (diff)
downloadcaja-3c3ca50505fac6c93d76addf10f0eae1f7991743.tar.bz2
caja-3c3ca50505fac6c93d76addf10f0eae1f7991743.tar.xz
caja-window: remove -Wcast-function-type warning
-rw-r--r--src/caja-window.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/caja-window.c b/src/caja-window.c
index d719765f..faa51452 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -1114,14 +1114,14 @@ caja_window_key_press_event (GtkWidget *widget,
*/
static void
-free_activate_view_data (gpointer data)
+free_activate_view_data (gpointer data,
+ GClosure *closure)
{
ActivateViewData *activate_data;
+ (void) closure;
activate_data = data;
-
g_free (activate_data->id);
-
g_slice_free (ActivateViewData, activate_data);
}
@@ -1205,7 +1205,7 @@ add_view_as_menu_item (CajaWindow *window,
data->id = g_strdup (identifier);
g_signal_connect_data (action, "activate",
G_CALLBACK (action_view_as_callback),
- data, (GClosureNotify) free_activate_view_data, 0);
+ data, free_activate_view_data, 0);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_action_group_add_action (window->details->view_as_action_group,
@@ -1974,10 +1974,18 @@ caja_get_history_list (void)
return history_list;
}
+static gpointer
+caja_window_copy_history_item (gconstpointer src,
+ gpointer data)
+{
+ (void) data;
+ return g_object_ref (G_OBJECT (src));
+}
+
static GList *
caja_window_get_history (CajaWindow *window)
{
- return g_list_copy_deep (history_list, (GCopyFunc) g_object_ref, NULL);
+ return g_list_copy_deep (history_list, caja_window_copy_history_item, NULL);
}