aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-new-bookmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks/ephy-new-bookmark.c')
-rw-r--r--src/bookmarks/ephy-new-bookmark.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index de3cdbe80..dab846439 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -48,6 +48,7 @@ struct EphyNewBookmarkPrivate
char *location;
char *smarturl;
char *icon;
+ gulong id;
GtkWidget *title_entry;
GtkWidget *keywords_entry;
@@ -144,14 +145,16 @@ ephy_new_bookmark_add (EphyNewBookmark *new_bookmark)
{
char *title;
char *keywords;
+ EphyNode *node;
title = gtk_editable_get_chars
(GTK_EDITABLE (new_bookmark->priv->title_entry), 0, -1);
keywords = gtk_editable_get_chars
(GTK_EDITABLE (new_bookmark->priv->keywords_entry), 0, -1);
- ephy_bookmarks_add (new_bookmark->priv->bookmarks, title,
- new_bookmark->priv->location,
- new_bookmark->priv->smarturl, keywords);
+ node = ephy_bookmarks_add (new_bookmark->priv->bookmarks, title,
+ new_bookmark->priv->location,
+ new_bookmark->priv->smarturl, keywords);
+ new_bookmark->priv->id = ephy_node_get_id (node);
if (new_bookmark->priv->icon)
{
@@ -174,8 +177,6 @@ ephy_new_bookmark_response_cb (GtkDialog *dialog,
ephy_new_bookmark_add (new_bookmark);
break;
}
-
- gtk_widget_destroy (GTK_WIDGET (dialog));
}
static GtkWidget *
@@ -334,6 +335,7 @@ ephy_new_bookmark_init (EphyNewBookmark *editor)
editor->priv->location = NULL;
editor->priv->smarturl = NULL;
editor->priv->icon = NULL;
+ editor->priv->id = 0;
}
void
@@ -361,3 +363,9 @@ ephy_new_bookmark_set_icon (EphyNewBookmark *bookmark,
bookmark->priv->icon = icon ? g_strdup (icon) : NULL;
}
+gulong
+ephy_new_bookmark_get_id (EphyNewBookmark *bookmark)
+{
+ return bookmark->priv->id;
+}
+