[epiphany] add-bookmark-popover: Always create new bookmarks grid when shown
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] add-bookmark-popover: Always create new bookmarks grid when shown
- Date: Sun, 22 Jan 2017 18:20:39 +0000 (UTC)
commit 6784843ea48a4493a841fe40c96a63f6cb513d26
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Jan 22 12:19:25 2017 -0600
add-bookmark-popover: Always create new bookmarks grid when shown
Otherwise it could be stale and lead to crashes.
https://bugzilla.gnome.org/show_bug.cgi?id=777615
src/bookmarks/ephy-add-bookmark-popover.c | 25 +++++++++++--------------
1 files changed, 11 insertions(+), 14 deletions(-)
---
diff --git a/src/bookmarks/ephy-add-bookmark-popover.c b/src/bookmarks/ephy-add-bookmark-popover.c
index d3c74af..4ba209b 100644
--- a/src/bookmarks/ephy-add-bookmark-popover.c
+++ b/src/bookmarks/ephy-add-bookmark-popover.c
@@ -201,20 +201,17 @@ ephy_add_bookmark_popover_show (EphyAddBookmarkPopover *self)
self,
G_CONNECT_SWAPPED);
- if (!self->address || g_strcmp0 (address, self->address) != 0) {
- if (self->grid)
- gtk_widget_destroy (self->grid);
-
- self->grid = ephy_bookmark_properties_grid_new (bookmark,
- EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_POPOVER,
- GTK_WIDGET (self));
- gtk_container_add (GTK_CONTAINER (self), self->grid);
- gtk_popover_set_default_widget (GTK_POPOVER (self),
- ephy_bookmark_properties_grid_get_add_tag_button
(EPHY_BOOKMARK_PROPERTIES_GRID (self->grid)));
-
- g_free (self->address);
- self->address = g_strdup (address);
- }
+ if (self->grid)
+ gtk_widget_destroy (self->grid);
+ self->grid = ephy_bookmark_properties_grid_new (bookmark,
+ EPHY_BOOKMARK_PROPERTIES_GRID_TYPE_POPOVER,
+ GTK_WIDGET (self));
+ gtk_container_add (GTK_CONTAINER (self), self->grid);
+ gtk_popover_set_default_widget (GTK_POPOVER (self),
+ ephy_bookmark_properties_grid_get_add_tag_button
(EPHY_BOOKMARK_PROPERTIES_GRID (self->grid)));
+
+ g_free (self->address);
+ self->address = g_strdup (address);
gtk_popover_popup (GTK_POPOVER (self));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]