diff options
author | Pablo Barciela <[email protected]> | 2019-06-14 09:30:32 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2022-07-20 00:07:37 +0200 |
commit | 25ffc1e58eeb5c2faef66eba1ac58bf0ac19ff67 (patch) | |
tree | 2a79eb2b3fe44cf6b49ec1b2bf23092cbef5d6a1 /src/caja-bookmarks-window.c | |
parent | ed722a990406ce48b353c5eb7499fa8662cdff12 (diff) | |
download | caja-25ffc1e58eeb5c2faef66eba1ac58bf0ac19ff67.tar.bz2 caja-25ffc1e58eeb5c2faef66eba1ac58bf0ac19ff67.tar.xz |
src: reduce the scope of some variables
Diffstat (limited to 'src/caja-bookmarks-window.c')
-rw-r--r-- | src/caja-bookmarks-window.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/caja-bookmarks-window.c b/src/caja-bookmarks-window.c index 1bc023e8..d77da773 100644 --- a/src/caja-bookmarks-window.c +++ b/src/caja-bookmarks-window.c @@ -684,7 +684,7 @@ on_row_changed (GtkListStore *store, GtkTreeIter *iter, gpointer user_data) { - CajaBookmark *bookmark = NULL, *bookmark_in_list; + CajaBookmark *bookmark = NULL; gint *indices, row; gboolean insert_bookmark = TRUE; @@ -700,8 +700,11 @@ on_row_changed (GtkListStore *store, have been dragged here, so we insert it into the list. */ if (row < (gint) caja_bookmark_list_length (bookmarks)) { + CajaBookmark *bookmark_in_list; + bookmark_in_list = caja_bookmark_list_item_at (bookmarks, row); + if (bookmark_in_list == bookmark) insert_bookmark = FALSE; } @@ -796,7 +799,6 @@ on_selection_changed (GtkTreeSelection *treeselection, { CajaBookmark *selected; char *name = NULL, *entry_text = NULL; - GFile *location; g_assert (GTK_IS_ENTRY (name_field)); g_assert (GTK_IS_ENTRY (uri_field)); @@ -805,6 +807,8 @@ on_selection_changed (GtkTreeSelection *treeselection, if (selected) { + GFile *location; + name = caja_bookmark_get_name (selected); location = caja_bookmark_get_location (selected); entry_text = g_file_get_parse_name (location); @@ -978,9 +982,9 @@ repopulate (void) { CajaBookmark *selected; GtkListStore *store; - GtkTreePath *path; GtkTreeRowReference *reference; guint index; + GtkTreePath *path = NULL; g_assert (GTK_IS_TREE_VIEW (bookmark_list_widget)); g_assert (CAJA_IS_BOOKMARK_LIST (bookmarks)); |