summaryrefslogtreecommitdiff
path: root/plugins/filebrowser
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-21 14:50:15 +0200
committerVictor Kareh <[email protected]>2022-03-23 12:06:35 -0400
commit6bd34181f2490f313a835ce59f82f696c42a2d0a (patch)
tree45efe38c45e5812c633fdbeb80655db628a4abec /plugins/filebrowser
parent5358eaef9720283551321b6cd8c7f63efd15ed0f (diff)
downloadpluma-6bd34181f2490f313a835ce59f82f696c42a2d0a.tar.bz2
pluma-6bd34181f2490f313a835ce59f82f696c42a2d0a.tar.xz
filebrowser: fix warning -Wincompatible-pointer-types
Diffstat (limited to 'plugins/filebrowser')
-rw-r--r--plugins/filebrowser/pluma-file-bookmarks-store.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/plugins/filebrowser/pluma-file-bookmarks-store.c b/plugins/filebrowser/pluma-file-bookmarks-store.c
index ed58f067..0f92ca66 100644
--- a/plugins/filebrowser/pluma-file-bookmarks-store.c
+++ b/plugins/filebrowser/pluma-file-bookmarks-store.c
@@ -824,10 +824,8 @@ pluma_file_bookmarks_store_get_uri (PlumaFileBookmarksStore * model,
GtkTreeIter * iter)
{
GObject * obj;
- GFile * file = NULL;
guint flags;
gchar * ret = NULL;
- gboolean isfs;
g_return_val_if_fail (PLUMA_IS_FILE_BOOKMARKS_STORE (model), NULL);
g_return_val_if_fail (iter != NULL, NULL);
@@ -839,26 +837,25 @@ pluma_file_bookmarks_store_get_uri (PlumaFileBookmarksStore * model,
&obj,
-1);
- if (obj == NULL)
- return NULL;
-
- isfs = (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS);
-
- if (isfs && (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT))
- {
- file = g_mount_get_root (G_MOUNT (obj));
- }
- else if (!isfs)
+ if (obj != NULL)
{
- file = g_object_ref (obj);
- }
+ if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_FS)
+ {
+ if (flags & PLUMA_FILE_BOOKMARKS_STORE_IS_MOUNT)
+ {
+ GFile * file;
- g_object_unref (obj);
+ file = g_mount_get_root (G_MOUNT (obj));
+ ret = g_file_get_uri (file);
+ g_object_unref (file);
+ }
+ }
+ else
+ {
+ ret = g_file_get_uri (G_FILE (obj));
+ }
- if (file)
- {
- ret = g_file_get_uri (file);
- g_object_unref (file);
+ g_object_unref (obj);
}
return ret;