diff options
Diffstat (limited to 'src/bookmarks/ephy-new-bookmark.c')
-rw-r--r-- | src/bookmarks/ephy-new-bookmark.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c index dbda8b11b..de3cdbe80 100644 --- a/src/bookmarks/ephy-new-bookmark.c +++ b/src/bookmarks/ephy-new-bookmark.c @@ -47,6 +47,7 @@ struct EphyNewBookmarkPrivate EphyBookmarks *bookmarks; char *location; char *smarturl; + char *icon; GtkWidget *title_entry; GtkWidget *keywords_entry; @@ -131,6 +132,7 @@ ephy_new_bookmark_finalize (GObject *object) g_free (editor->priv->location); g_free (editor->priv->smarturl); + g_free (editor->priv->icon); g_free (editor->priv); @@ -150,6 +152,13 @@ ephy_new_bookmark_add (EphyNewBookmark *new_bookmark) ephy_bookmarks_add (new_bookmark->priv->bookmarks, title, new_bookmark->priv->location, new_bookmark->priv->smarturl, keywords); + + if (new_bookmark->priv->icon) + { + ephy_bookmarks_set_icon (new_bookmark->priv->bookmarks, + new_bookmark->priv->location, + new_bookmark->priv->icon); + } } static void @@ -324,6 +333,7 @@ ephy_new_bookmark_init (EphyNewBookmark *editor) editor->priv = g_new0 (EphyNewBookmarkPrivate, 1); editor->priv->location = NULL; editor->priv->smarturl = NULL; + editor->priv->icon = NULL; } void @@ -343,3 +353,11 @@ ephy_new_bookmark_set_smarturl (EphyNewBookmark *bookmark, bookmark->priv->smarturl = g_strdup (url); } +void +ephy_new_bookmark_set_icon (EphyNewBookmark *bookmark, + const char *icon) +{ + g_free (bookmark->priv->icon); + bookmark->priv->icon = icon ? g_strdup (icon) : NULL; +} + |