aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-start-here.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-02-28 10:46:31 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-02-28 10:46:31 +0800
commit9f7e8afa6de9c9a643d727f791160ce11cff7044 (patch)
treec09146bfb54db198e0823cfeb6297b1f6828ff84 /lib/ephy-start-here.c
parentea7657cbc7b0a294305716fa0ed3660ccdb15f43 (diff)
downloadgsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.tar
gsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.tar.gz
gsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.tar.bz2
gsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.tar.lz
gsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.tar.xz
gsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.tar.zst
gsoc2013-epiphany-9f7e8afa6de9c9a643d727f791160ce11cff7044.zip
cleaner xml dump code.
2003-02-28 Marco Pesenti Gritti <marco@it.gnome.org> * lib/ephy-start-here.c: (ephy_start_here_get_page): cleaner xml dump code. * lib/widgets/ephy-autocompletion-window.c: (ephy_autocompletion_window_key_press_hack): * lib/widgets/ephy-location-entry.c: (ephy_location_entry_init), (ephy_location_entry_finalize_impl), (ephy_location_entry_autocompletion_show_alternatives_to), (ephy_location_entry_key_press_event_cb), (ephy_location_entry_autocompletion_window_url_selected_cb): Do not overwrite search text when going on an action, make Esc get back the location content before the completion.
Diffstat (limited to 'lib/ephy-start-here.c')
-rw-r--r--lib/ephy-start-here.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/lib/ephy-start-here.c b/lib/ephy-start-here.c
index 3de8dffa3..834d890da 100644
--- a/lib/ephy-start-here.c
+++ b/lib/ephy-start-here.c
@@ -378,12 +378,11 @@ build_content (EphyStartHere *sh, xmlNodePtr node)
char *
ephy_start_here_get_page (EphyStartHere *sh, const char *id)
{
- xmlNodePtr child;
- xmlNodePtr root;
- xmlBufferPtr buf;
+ xmlNodePtr root;
const char *xml_filepath;
char *xml_filename;
- char *content;
+ xmlChar *content;
+ int size;
xml_filename = g_strconcat ("starthere/", id, ".xml", NULL);
xml_filepath = ephy_file (xml_filename);
@@ -392,20 +391,12 @@ ephy_start_here_get_page (EphyStartHere *sh, const char *id)
sh->priv->doc = xmlParseFile (xml_filepath);
root = xmlDocGetRootElement (sh->priv->doc);
- buf = xmlBufferCreate ();
select_language (sh, root);
build_content (sh, root);
- child = sh->priv->doc->children;
- while (child)
- {
- xmlNodeDump (buf, sh->priv->doc, child, 1, 1);
- child = child->next;
- }
+ xmlDocDumpMemory (sh->priv->doc, &content, &size);
- content = g_strdup (xmlBufferContent (buf));
- xmlBufferFree (buf);
xmlFreeDoc (sh->priv->doc);
return content;