Commit 24322ac1 authored by Andre Miranda's avatar Andre Miranda

Fix more warnings

parent c5b37dd8
......@@ -537,7 +537,7 @@ thunar_clipboard_manager_transfer_files (ThunarClipboardManager *manager,
/* setup the new file list */
for (lp = g_list_last (files), manager->files = NULL; lp != NULL; lp = lp->prev)
{
file = g_object_ref (G_OBJECT (lp->data));
file = THUNAR_FILE (g_object_ref (G_OBJECT (lp->data)));
manager->files = g_list_prepend (manager->files, file);
g_signal_connect (G_OBJECT (file), "destroy", G_CALLBACK (thunar_clipboard_manager_file_destroyed), manager);
}
......@@ -593,7 +593,7 @@ thunar_clipboard_manager_get_for_display (GdkDisplay *display)
/* allocate a new manager */
manager = g_object_new (THUNAR_TYPE_CLIPBOARD_MANAGER, NULL);
manager->clipboard = g_object_ref (G_OBJECT (clipboard));
manager->clipboard = GTK_CLIPBOARD (g_object_ref (G_OBJECT (clipboard)));
g_object_set_qdata (G_OBJECT (clipboard), thunar_clipboard_manager_quark, manager);
/* listen for the "owner-change" signal on the clipboard */
......@@ -715,7 +715,7 @@ thunar_clipboard_manager_paste_files (ThunarClipboardManager *manager,
/* prepare the paste request */
request = g_slice_new0 (ThunarClipboardPasteRequest);
request->manager = g_object_ref (G_OBJECT (manager));
request->manager = THUNAR_CLIPBOARD_MANAGER (g_object_ref (G_OBJECT (manager)));
request->target_file = g_object_ref (target_file);
request->widget = widget;
......
......@@ -725,13 +725,13 @@ thunar_file_monitor_moved (ThunarFile *file,
GFile *previous_file;
/* ref the old location */
previous_file = g_object_ref (G_OBJECT (file->gfile));
previous_file = G_FILE (g_object_ref (G_OBJECT (file->gfile)));
/* notify the thumbnail cache that we can now also move the thumbnail */
thunar_file_move_thumbnail_cache_file (previous_file, renamed_file);
/* set the new file */
file->gfile = g_object_ref (G_OBJECT (renamed_file));
file->gfile = G_FILE (g_object_ref (G_OBJECT (renamed_file)));
/* reload file information */
thunar_file_load (file, NULL, NULL);
......
......@@ -537,7 +537,7 @@ thunar_icon_factory_lookup_icon (ThunarIconFactory *factory,
thunar_icon_factory_sweep_timer_destroy);
}
return g_object_ref (G_OBJECT (pixbuf));
return GDK_PIXBUF (g_object_ref (G_OBJECT (pixbuf)));
}
......@@ -669,7 +669,7 @@ thunar_icon_factory_get_for_icon_theme (GtkIconTheme *icon_theme)
{
/* allocate a new factory and connect it to the icon theme */
factory = g_object_new (THUNAR_TYPE_ICON_FACTORY, NULL);
factory->icon_theme = g_object_ref (G_OBJECT (icon_theme));
factory->icon_theme = GTK_ICON_THEME (g_object_ref (G_OBJECT (icon_theme)));
g_object_set_qdata (G_OBJECT (factory->icon_theme), thunar_icon_factory_quark, factory);
/* connect the "show-thumbnails" property to the global preference */
......
......@@ -1272,7 +1272,7 @@ thunar_list_model_files_added (ThunarFolder *folder,
for (lp = files; lp != NULL; lp = lp->next)
{
/* take a reference on that file */
file = g_object_ref (G_OBJECT (lp->data));
file = THUNAR_FILE (g_object_ref (G_OBJECT (lp->data)));
_thunar_return_if_fail (THUNAR_IS_FILE (file));
/* check if the file should be hidden */
......
......@@ -565,7 +565,7 @@ thunar_path_entry_changed (GtkEditable *editable)
/* use the same file if the text assumes we're in a directory */
if (g_str_has_suffix (text, "/"))
folder_path = g_object_ref (G_OBJECT (file_path));
folder_path = G_FILE (g_object_ref (G_OBJECT (file_path)));
else
folder_path = g_file_get_parent (file_path);
}
......
......@@ -1430,7 +1430,7 @@ thunar_properties_dialog_set_files (ThunarPropertiesDialog *dialog,
for (lp = dialog->files; lp != NULL; lp = lp->next)
{
_thunar_assert (THUNAR_IS_FILE (lp->data));
file = g_object_ref (G_OBJECT (lp->data));
file = THUNAR_FILE (g_object_ref (G_OBJECT (lp->data)));
/* watch the file for changes */
thunar_file_watch (file);
......
......@@ -987,7 +987,7 @@ thunar_renamer_model_item_new (ThunarFile *file)
ThunarRenamerModelItem *item;
item = g_slice_new0 (ThunarRenamerModelItem);
item->file = g_object_ref (G_OBJECT (file));
item->file = THUNAR_FILE (g_object_ref (G_OBJECT (file)));
item->date_changed = thunar_file_get_date (file, THUNAR_FILE_DATE_CHANGED);
item->dirty = TRUE;
......
......@@ -71,7 +71,7 @@ thunar_renamer_pair_new (ThunarFile *file,
_thunar_return_val_if_fail (g_utf8_validate (name, -1, NULL), NULL);
renamer_pair = g_slice_new (ThunarRenamerPair);
renamer_pair->file = g_object_ref (G_OBJECT (file));
renamer_pair->file = THUNAR_FILE (g_object_ref (G_OBJECT (file)));
renamer_pair->name = g_strdup (name);
return renamer_pair;
......
......@@ -1955,7 +1955,7 @@ thunar_shortcuts_model_add (ThunarShortcutsModel *model,
}
else
{
shortcut->location = g_object_ref (G_OBJECT (location));
shortcut->location = G_FILE (g_object_ref (G_OBJECT (location)));
shortcut->gicon = g_themed_icon_new ("folder-remote");
}
......
......@@ -1810,7 +1810,7 @@ thunar_standard_view_scroll_to_file (ThunarView *view,
if (thunar_view_get_loading (view))
{
/* remember a reference for the new file and settings */
standard_view->priv->scroll_to_file = g_object_ref (G_OBJECT (file));
standard_view->priv->scroll_to_file = THUNAR_FILE (g_object_ref (G_OBJECT (file)));
standard_view->priv->scroll_to_select = select_file;
standard_view->priv->scroll_to_use_align = use_align;
standard_view->priv->scroll_to_row_align = row_align;
......@@ -1919,7 +1919,7 @@ thunar_standard_view_get_dest_actions (ThunarStandardView *standard_view,
{
/* tell the caller about the file (if it's interested) */
if (G_UNLIKELY (file_return != NULL))
*file_return = g_object_ref (G_OBJECT (file));
*file_return = THUNAR_FILE (g_object_ref (G_OBJECT (file)));
}
}
......
......@@ -1129,7 +1129,7 @@ thunar_tree_model_item_new_with_file (ThunarTreeModel *model,
ThunarTreeModelItem *item;
item = g_slice_new0 (ThunarTreeModelItem);
item->file = g_object_ref (G_OBJECT (file));
item->file = THUNAR_FILE (g_object_ref (G_OBJECT (file)));
item->model = model;
return item;
......@@ -1145,7 +1145,7 @@ thunar_tree_model_item_new_with_device (ThunarTreeModel *model,
GFile *mount_point;
item = g_slice_new0 (ThunarTreeModelItem);
item->device = g_object_ref (G_OBJECT (device));
item->device = THUNAR_DEVICE (g_object_ref (G_OBJECT (device)));
item->model = model;
/* check if the volume is mounted */
......
......@@ -578,7 +578,7 @@ thunar_tree_view_set_current_directory (ThunarNavigator *navigator,
if (!view->show_hidden)
{
/* look if the file or one of it's parents is hidden */
for (file = g_object_ref (G_OBJECT (view->current_directory)); file != NULL; file = file_parent)
for (file = THUNAR_FILE (g_object_ref (G_OBJECT (view->current_directory))); file != NULL; file = file_parent)
{
/* check if this file is hidden */
if (thunar_file_is_hidden (file))
......@@ -619,7 +619,7 @@ thunar_tree_view_set_current_directory (ThunarNavigator *navigator,
if (!needs_refiltering && !view->show_hidden)
{
/* look if the file or one of it's parents is hidden */
for (file = g_object_ref (G_OBJECT (current_directory)); file != NULL; file = file_parent)
for (file = THUNAR_FILE (g_object_ref (G_OBJECT (current_directory))); file != NULL; file = file_parent)
{
/* check if this file is hidden */
if (thunar_file_is_hidden (file))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment