[Xfce4-commits] [xfce/thunar] 01/01: Fix more warnings

noreply at xfce.org noreply at xfce.org
Wed May 30 04:21:05 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit 24322ac18d711cfa9e2bdf6237611bf6029f966f
Author: Andre Miranda <andreldm at xfce.org>
Date:   Tue May 29 23:20:41 2018 -0300

    Fix more warnings
---
 thunar/thunar-clipboard-manager.c | 6 +++---
 thunar/thunar-file.c              | 4 ++--
 thunar/thunar-icon-factory.c      | 4 ++--
 thunar/thunar-list-model.c        | 2 +-
 thunar/thunar-path-entry.c        | 2 +-
 thunar/thunar-properties-dialog.c | 2 +-
 thunar/thunar-renamer-model.c     | 2 +-
 thunar/thunar-renamer-pair.c      | 2 +-
 thunar/thunar-shortcuts-model.c   | 2 +-
 thunar/thunar-standard-view.c     | 4 ++--
 thunar/thunar-tree-model.c        | 4 ++--
 thunar/thunar-tree-view.c         | 4 ++--
 12 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/thunar/thunar-clipboard-manager.c b/thunar/thunar-clipboard-manager.c
index a5de04e..9092ef6 100644
--- a/thunar/thunar-clipboard-manager.c
+++ b/thunar/thunar-clipboard-manager.c
@@ -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;
 
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index 7259527..6ace63f 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -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);
diff --git a/thunar/thunar-icon-factory.c b/thunar/thunar-icon-factory.c
index d2cbd6d..4ec16c9 100644
--- a/thunar/thunar-icon-factory.c
+++ b/thunar/thunar-icon-factory.c
@@ -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 */
diff --git a/thunar/thunar-list-model.c b/thunar/thunar-list-model.c
index cb907e6..2821b67 100644
--- a/thunar/thunar-list-model.c
+++ b/thunar/thunar-list-model.c
@@ -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 */
diff --git a/thunar/thunar-path-entry.c b/thunar/thunar-path-entry.c
index e4a9cc8..0d5d959 100644
--- a/thunar/thunar-path-entry.c
+++ b/thunar/thunar-path-entry.c
@@ -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);
     }
diff --git a/thunar/thunar-properties-dialog.c b/thunar/thunar-properties-dialog.c
index e4d0dc8..0d53f82 100644
--- a/thunar/thunar-properties-dialog.c
+++ b/thunar/thunar-properties-dialog.c
@@ -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);
diff --git a/thunar/thunar-renamer-model.c b/thunar/thunar-renamer-model.c
index aeb3ea0..e8fd4cf 100644
--- a/thunar/thunar-renamer-model.c
+++ b/thunar/thunar-renamer-model.c
@@ -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;
 
diff --git a/thunar/thunar-renamer-pair.c b/thunar/thunar-renamer-pair.c
index 7529687..23e77f4 100644
--- a/thunar/thunar-renamer-pair.c
+++ b/thunar/thunar-renamer-pair.c
@@ -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;
diff --git a/thunar/thunar-shortcuts-model.c b/thunar/thunar-shortcuts-model.c
index 40fcc1c..07c25c4 100644
--- a/thunar/thunar-shortcuts-model.c
+++ b/thunar/thunar-shortcuts-model.c
@@ -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");
     }
 
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 43abc5d..fc53e72 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -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)));
         }
     }
 
diff --git a/thunar/thunar-tree-model.c b/thunar/thunar-tree-model.c
index df06fd3..fc4a5c1 100644
--- a/thunar/thunar-tree-model.c
+++ b/thunar/thunar-tree-model.c
@@ -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 */
diff --git a/thunar/thunar-tree-view.c b/thunar/thunar-tree-view.c
index a1a3224..6a0cbe3 100644
--- a/thunar/thunar-tree-view.c
+++ b/thunar/thunar-tree-view.c
@@ -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))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list