summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-11-23 11:58:30 +0200
committerJasmine Hassan <[email protected]>2012-11-23 11:58:30 +0200
commitae06676815e24a27549e0c79a74bc81c77822554 (patch)
treecde88ea4e11a2f0809da857feaefa6824d4ba8fa /src
parentb00cccb74307a49df74deb785936e3cd9cf3a5ad (diff)
downloadcaja-ae06676815e24a27549e0c79a74bc81c77822554.tar.bz2
caja-ae06676815e24a27549e0c79a74bc81c77822554.tar.xz
[src] fix some incompatible pointer type warnings
including a silly mistake in caja-window where destroy function's return type was accidently ommitted during the addition of gtk version checks.
Diffstat (limited to 'src')
-rw-r--r--src/caja-application.c6
-rw-r--r--src/caja-window.c12
-rw-r--r--src/file-manager/fm-list-view.c2
-rw-r--r--src/file-manager/fm-properties-window.c2
4 files changed, 14 insertions, 8 deletions
diff --git a/src/caja-application.c b/src/caja-application.c
index 6c68198f..47a956c4 100644
--- a/src/caja-application.c
+++ b/src/caja-application.c
@@ -434,7 +434,11 @@ check_required_directories (CajaApplication *application)
dialog = eel_show_error_dialog (error_string, detail_string, NULL);
/* We need the main event loop so the user has a chance to see the dialog. */
+#if GTK_CHECK_VERSION (3, 0, 0)
caja_main_event_loop_register (GTK_WIDGET (dialog));
+#else
+ caja_main_event_loop_register (GTK_OBJECT (dialog));
+#endif
g_string_free (directories_as_string, TRUE);
g_free (error_string);
@@ -1171,7 +1175,7 @@ caja_application_close_desktop (void)
{
if (caja_application_desktop_windows != NULL)
{
- g_list_free_full (caja_application_desktop_windows, gtk_widget_destroy);
+ g_list_free_full (caja_application_desktop_windows, (GDestroyNotify) gtk_widget_destroy);
caja_application_desktop_windows = NULL;
}
}
diff --git a/src/caja-window.c b/src/caja-window.c
index 25003f6b..e351f007 100644
--- a/src/caja-window.c
+++ b/src/caja-window.c
@@ -191,12 +191,13 @@ caja_window_init (CajaWindow *window)
#if GTK_CHECK_VERSION(3, 0, 0)
gtk_quit_add_destroy (1, GTK_WIDGET (window));
-#else
- gtk_quit_add_destroy (1, GTK_OBJECT (window));
-#endif
/* Keep the main event loop alive as long as the window exists */
caja_main_event_loop_register (GTK_WIDGET (window));
+#else
+ gtk_quit_add_destroy (1, GTK_OBJECT (window));
+ caja_main_event_loop_register (GTK_OBJECT (window));
+#endif
}
/* Unconditionally synchronize the GtkUIManager of WINDOW. */
@@ -613,6 +614,7 @@ free_stored_viewers (CajaWindow *window)
window->details->extra_viewer = NULL;
}
+static void
#if GTK_CHECK_VERSION (3, 0, 0)
caja_window_destroy (GtkWidget *object)
#else
@@ -626,7 +628,7 @@ caja_window_destroy (GtkObject *object)
/* close all panes safely */
panes_copy = g_list_copy (window->details->panes);
- g_list_free_full (panes_copy, caja_window_close_pane);
+ g_list_free_full (panes_copy, (GDestroyNotify) caja_window_close_pane);
/* the panes list should now be empty */
g_assert (window->details->panes == NULL);
@@ -2156,7 +2158,7 @@ caja_window_class_init (CajaWindowClass *class)
#endif
GTK_WIDGET_CLASS (class)->show = caja_window_show;
-#if GTK_CHECK_VERSION(3,0,0)
+#if GTK_CHECK_VERSION (3,0,0)
GTK_WIDGET_CLASS (class)->get_preferred_width = caja_window_get_preferred_width;
GTK_WIDGET_CLASS (class)->get_preferred_height = caja_window_get_preferred_height;
#else
diff --git a/src/file-manager/fm-list-view.c b/src/file-manager/fm-list-view.c
index f35fb656..1ed8cd91 100644
--- a/src/file-manager/fm-list-view.c
+++ b/src/file-manager/fm-list-view.c
@@ -451,7 +451,7 @@ get_filtered_selection_refs (GtkTreeView *tree_view)
static void
ref_list_free (GList *ref_list)
{
- g_list_free_full (ref_list, gtk_tree_row_reference_free);
+ g_list_free_full (ref_list, (GDestroyNotify) gtk_tree_row_reference_free);
}
static void
diff --git a/src/file-manager/fm-properties-window.c b/src/file-manager/fm-properties-window.c
index 73b28e2f..29666607 100644
--- a/src/file-manager/fm-properties-window.c
+++ b/src/file-manager/fm-properties-window.c
@@ -3425,7 +3425,7 @@ get_initial_emblems (GList *files)
ret = g_hash_table_new_full (g_direct_hash,
g_direct_equal,
NULL,
- (GFunc) g_free);
+ (GDestroyNotify) g_free);
for (l = files; l != NULL; l = l->next) {
CajaFile *file;