mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-04 19:08:23 +00:00
bookmark-list: Save file on name changed
Now that we allow changing the name at any time, save the file when the name is updated, as that information ends up in the bookmarks file.
This commit is contained in:
parent
4dd0e6aa57
commit
3aca4ce418
1 changed files with 10 additions and 5 deletions
|
@ -113,14 +113,19 @@ bookmark_in_list_changed_callback (NautilusBookmark *bookmark,
|
|||
}
|
||||
|
||||
static void
|
||||
bookmark_in_list_notify (GObject *object,
|
||||
GParamSpec *pspec,
|
||||
NautilusBookmarkList *bookmarks)
|
||||
bookmark_in_list_icon_changed (NautilusBookmarkList *bookmarks)
|
||||
{
|
||||
/* emit the changed signal without saving, as only appearance properties changed */
|
||||
g_signal_emit (bookmarks, signals[CHANGED], 0);
|
||||
}
|
||||
|
||||
static void
|
||||
bookmark_in_list_name_changed (NautilusBookmarkList *bookmarks)
|
||||
{
|
||||
nautilus_bookmark_list_save_file (bookmarks);
|
||||
g_signal_emit (bookmarks, signals[CHANGED], 0);
|
||||
}
|
||||
|
||||
static void
|
||||
stop_monitoring_bookmark (NautilusBookmarkList *bookmarks,
|
||||
NautilusBookmark *bookmark)
|
||||
|
@ -226,9 +231,9 @@ insert_bookmark_internal (NautilusBookmarkList *bookmarks,
|
|||
g_signal_connect_object (bookmark, "contents-changed",
|
||||
G_CALLBACK (bookmark_in_list_changed_callback), bookmarks, 0);
|
||||
g_signal_connect_object (bookmark, "notify::icon",
|
||||
G_CALLBACK (bookmark_in_list_notify), bookmarks, 0);
|
||||
G_CALLBACK (bookmark_in_list_icon_changed), bookmarks, G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (bookmark, "notify::name",
|
||||
G_CALLBACK (bookmark_in_list_notify), bookmarks, 0);
|
||||
G_CALLBACK (bookmark_in_list_name_changed), bookmarks, G_CONNECT_SWAPPED);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue