aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmark-properties.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-03-22 23:15:07 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-03-22 23:15:07 +0800
commit63135332334125311908d415423cd15602cd6535 (patch)
treea810ec0e8ceced82d4003f9bf0d1d4d449260097 /src/bookmarks/ephy-bookmark-properties.c
parent7038fa5c1a3d6eee199e0731e1fae8430498eeab (diff)
downloadgsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.gz
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.bz2
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.lz
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.xz
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.tar.zst
gsoc2013-epiphany-63135332334125311908d415423cd15602cd6535.zip
Some more bookmarks work ...
2003-03-22 Marco Pesenti Gritti <marco@it.gnome.org> * data/ui/epiphany-bookmark-editor-ui.xml.in: * src/bookmarks/ephy-bookmark-properties.c: (update_entry), (title_entry_changed_cb), (location_entry_changed_cb), (build_ui): * src/bookmarks/ephy-bookmarks-editor.c: (cmd_add_topic), (cmd_remove_topic), (cmd_rename_bookmark), (cmd_open_bookmarks_in_tabs), (cmd_open_bookmarks_in_browser), (cmd_remove_bookmarks), (cmd_bookmark_properties), (add_widget), (ephy_bookmarks_editor_construct): * src/bookmarks/ephy-bookmarks.c: (bookmarks_removed_cb), (ephy_bookmarks_has_keyword), (ephy_bookmarks_unset_keyword): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-new-bookmark.c: (build_editing_table): * src/bookmarks/ephy-topics-selector.c: (fill_model), (topic_toggled), (ephy_topics_selector_new): * src/bookmarks/ephy-topics-selector.h: Some more bookmarks work ...
Diffstat (limited to 'src/bookmarks/ephy-bookmark-properties.c')
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c42
1 files changed, 41 insertions, 1 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 9da4dffa8..6654ea25a 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -200,10 +200,39 @@ bookmark_properties_response_cb (GtkDialog *dialog,
}
static void
+update_entry (EphyBookmarkProperties *props, GtkWidget *entry, guint prop)
+{
+ GValue value = { 0, };
+ char *text;
+
+ text = gtk_editable_get_chars (GTK_EDITABLE (entry), 0, -1);
+ g_value_init (&value, G_TYPE_STRING);
+ g_value_set_string (&value, text);
+ ephy_node_set_property (props->priv->bookmark,
+ prop,
+ &value);
+ g_value_unset (&value);
+ g_free (text);
+}
+
+static void
+title_entry_changed_cb (GtkWidget *entry, EphyBookmarkProperties *props)
+{
+ update_entry (props, entry, EPHY_NODE_BMK_PROP_TITLE);
+}
+
+static void
+location_entry_changed_cb (GtkWidget *entry, EphyBookmarkProperties *props)
+{
+ update_entry (props, entry, EPHY_NODE_BMK_PROP_LOCATION);
+}
+
+static void
build_ui (EphyBookmarkProperties *editor)
{
GtkWidget *table, *label, *entry, *topics_selector;
char *str;
+ const char *tmp;
g_signal_connect (G_OBJECT (editor),
"response",
@@ -229,6 +258,11 @@ build_ui (EphyBookmarkProperties *editor)
g_free (str);
gtk_widget_show (label);
entry = gtk_entry_new ();
+ tmp = ephy_node_get_property_string (editor->priv->bookmark,
+ EPHY_NODE_BMK_PROP_TITLE);
+ gtk_entry_set_text (GTK_ENTRY (entry), tmp);
+ g_signal_connect (entry, "changed",
+ G_CALLBACK (title_entry_changed_cb), editor);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
editor->priv->title_entry = entry;
gtk_widget_set_size_request (entry, 200, -1);
@@ -243,6 +277,11 @@ build_ui (EphyBookmarkProperties *editor)
g_free (str);
gtk_widget_show (label);
entry = gtk_entry_new ();
+ tmp = ephy_node_get_property_string (editor->priv->bookmark,
+ EPHY_NODE_BMK_PROP_LOCATION);
+ gtk_entry_set_text (GTK_ENTRY (entry), tmp);
+ g_signal_connect (entry, "changed",
+ G_CALLBACK (location_entry_changed_cb), editor);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
editor->priv->location_entry = entry;
gtk_widget_show (entry);
@@ -255,7 +294,8 @@ build_ui (EphyBookmarkProperties *editor)
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
gtk_widget_show (label);
- topics_selector = ephy_topics_selector_new (editor->priv->bookmarks);
+ topics_selector = ephy_topics_selector_new (editor->priv->bookmarks,
+ editor->priv->bookmark);
gtk_widget_show (topics_selector);
editor->priv->topics_selector = topics_selector;