diff options
author | Emmanuel Vasilakis <mrzammler@gmail.com> | 2013-09-27 16:21:47 +0300 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2014-02-17 13:28:29 -0800 |
commit | a1c3133427e40ccc7ff4082249eb0e20e23ff51a (patch) | |
tree | 9a10efcf192a843c8462991402d7d6d90b9d527f | |
parent | a1b42a6756d478492303a89273236b2a8c56f387 (diff) | |
download | nautilus-a1c3133427e40ccc7ff4082249eb0e20e23ff51a.tar.gz |
bookmarks-window: always get the bookmark name from the name field.
Always get the current value in the name field when editing a bookmark.
This will prevent passing NULL to nautilus_bookmark_new when the user
edits only the URI field. I suspect that passing NULL to
nautilus_bookmark_new causes nautilus to create a new name from URI,
thus overwriting the current bookmark name.
https://bugzilla.gnome.org/show_bug.cgi?id=576976
-rw-r--r-- | src/nautilus-bookmarks-window.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nautilus-bookmarks-window.c b/src/nautilus-bookmarks-window.c index 8b15c6c11..39bb97b80 100644 --- a/src/nautilus-bookmarks-window.c +++ b/src/nautilus-bookmarks-window.c @@ -86,7 +86,6 @@ struct NautilusBookmarksWindowPrivate { gulong name_changed_id; gulong uri_changed_id; gboolean text_changed; - gboolean name_text_changed; GtkWidget *remove_button; GtkWidget *up_button; @@ -231,7 +230,6 @@ on_selection_changed (GtkTreeSelection *treeselection, g_signal_handler_unblock (self->priv->uri_field, self->priv->uri_changed_id); self->priv->text_changed = FALSE; - self->priv->name_text_changed = FALSE; g_free (entry_text); } @@ -375,7 +373,6 @@ on_name_field_changed (GtkEditable *editable, -1); self->priv->text_changed = TRUE; - self->priv->name_text_changed = TRUE; } static void @@ -518,8 +515,8 @@ update_bookmark_from_text (NautilusBookmarksWindow *self) (gtk_entry_get_text (GTK_ENTRY (self->priv->uri_field))); bookmark = nautilus_bookmark_new (location, - self->priv->name_text_changed ? - gtk_entry_get_text (GTK_ENTRY (self->priv->name_field)) : NULL); + gtk_entry_get_text (GTK_ENTRY (self->priv->name_field))); + g_object_unref (location); selected_row = get_selected_row (self); |