summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-bookmark.c
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-05-02 01:09:20 +0200
committerraveit65 <[email protected]>2022-07-20 00:04:14 +0200
commitfdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f (patch)
tree1c8c8a9001e359113708688dd9c98cdee15ad85a /libcaja-private/caja-bookmark.c
parent64b7d2640fc91c28db3a16239f8fe5f6243bec26 (diff)
downloadcaja-fdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f.tar.bz2
caja-fdb2e20b29bd1d2cf6e7b1a2fb93fc52c631927f.tar.xz
libcaja-private: reduce the scope of some variables
Diffstat (limited to 'libcaja-private/caja-bookmark.c')
-rw-r--r--libcaja-private/caja-bookmark.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libcaja-private/caja-bookmark.c b/libcaja-private/caja-bookmark.c
index 1017508c..71dfb7d4 100644
--- a/libcaja-private/caja-bookmark.c
+++ b/libcaja-private/caja-bookmark.c
@@ -467,8 +467,7 @@ bookmark_file_changed_callback (CajaFile *file, CajaBookmark *bookmark)
static void
caja_bookmark_set_icon_to_default (CajaBookmark *bookmark)
{
- GIcon *icon, *emblemed_icon, *folder;
- GEmblem *emblem;
+ GIcon *emblemed_icon, *folder;
if (bookmark->details->icon)
{
@@ -479,6 +478,9 @@ caja_bookmark_set_icon_to_default (CajaBookmark *bookmark)
if (caja_bookmark_uri_known_not_to_exist (bookmark))
{
+ GIcon *icon;
+ GEmblem *emblem;
+
icon = g_themed_icon_new ("dialog-warning");
emblem = g_emblem_new (icon);
@@ -644,13 +646,14 @@ bookmark_image_menu_item_new_from_surface (cairo_surface_t *icon_surface,
GtkWidget *
caja_bookmark_menu_item_new (CajaBookmark *bookmark)
{
- GtkWidget *menu_item;
cairo_surface_t *image_cairo;
image_cairo = create_image_cairo_for_bookmark (bookmark);
if (strlen (bookmark->details->name) > 0)
{
+ GtkWidget *menu_item;
+
menu_item = bookmark_image_menu_item_new_from_surface (image_cairo, bookmark->details->name);
return menu_item;