aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--embed/ephy-embed.c5
-rw-r--r--embed/ephy-embed.h3
-rw-r--r--embed/mozilla/mozilla-embed.cpp11
-rw-r--r--src/ephy-tab.c6
-rw-r--r--src/window-commands.c13
6 files changed, 42 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index a44f00be7..30c165903 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2003-06-27 Marco Pesenti Gritti <marco@it.gnome.org>
+
+ * embed/ephy-embed.c: (ephy_embed_base_init):
+ * embed/ephy-embed.h:
+ * embed/mozilla/mozilla-embed.cpp:
+ * src/ephy-tab.c: (ephy_tab_address_cb):
+
+ Actually return the toplevel url on get_location.
+ Add an url argument to location_changed and use it in tab.
+
+ * src/window-commands.c: (window_cmd_file_open):
+
+ Escape/unescape uri when passing it to gnome-vfs.
+
+ * src/bookmarks/ephy-bookmarks-export.c: (add_topics_list),
+ (ephy_bookmarks_export_rdf):
+
+ Fix some issues in the format.
+
2003-06-26 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmark-action.c: (connect_proxy),
diff --git a/embed/ephy-embed.c b/embed/ephy-embed.c
index f8e9cadc1..ead39fde1 100644
--- a/embed/ephy-embed.c
+++ b/embed/ephy-embed.c
@@ -144,9 +144,10 @@ ephy_embed_base_init (gpointer g_class)
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (EphyEmbedClass, location),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ ephy_marshal_VOID__STRING,
G_TYPE_NONE,
- 0);
+ 1,
+ G_TYPE_STRING);
ephy_embed_signals[TITLE] =
g_signal_new ("ge_title",
EPHY_EMBED_TYPE,
diff --git a/embed/ephy-embed.h b/embed/ephy-embed.h
index 1564d0b35..376213c0e 100644
--- a/embed/ephy-embed.h
+++ b/embed/ephy-embed.h
@@ -172,7 +172,8 @@ struct EphyEmbedClass
const char *link);
void (* js_status) (EphyEmbed *embed,
const char *status);
- void (* location) (EphyEmbed *embed);
+ void (* location) (EphyEmbed *embed,
+ const char *location);
void (* title) (EphyEmbed *embed);
void (* progress) (EphyEmbed *embed,
const char *uri,
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 831e9d059..941698dfe 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -704,8 +704,9 @@ impl_get_location (EphyEmbed *embed,
if (toplevel)
{
- l = gtk_moz_embed_get_location
- (GTK_MOZ_EMBED(embed));
+ rv = wrapper->GetMainDocumentUrl (url);
+ l = (NS_SUCCEEDED (rv) && !url.IsEmpty()) ?
+ g_strdup (url.get()) : NULL;
}
else
{
@@ -1187,7 +1188,11 @@ mozilla_embed_location_changed_cb (GtkMozEmbed *embed,
* to know about it. */
if (membed->priv->no_page != 0)
{
- g_signal_emit_by_name (membed, "ge_location");
+ char *location;
+
+ location = gtk_moz_embed_get_location (embed);
+ g_signal_emit_by_name (membed, "ge_location", location);
+ g_free (location);
}
membed->priv->no_page = -1;
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 978074394..2db9f5871 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -562,15 +562,11 @@ ephy_tab_link_message_cb (EphyEmbed *embed,
}
static void
-ephy_tab_address_cb (EphyEmbed *embed, EphyTab *tab)
+ephy_tab_address_cb (EphyEmbed *embed, char *address, EphyTab *tab)
{
if (tab->priv->address_expire == TAB_ADDRESS_EXPIRE_NOW)
{
- char *address;
-
- ephy_embed_get_location (embed, TRUE, &address);
ephy_tab_set_location (tab, address, TAB_ADDRESS_EXPIRE_NOW);
- g_free (address);
}
ephy_tab_set_link_message (tab, NULL);
diff --git a/src/window-commands.c b/src/window-commands.c
index 10e154293..5c2fefa98 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -304,8 +304,7 @@ void
window_cmd_file_open (EggAction *action,
EphyWindow *window)
{
- gchar *dir, *retDir;
- gchar *file;
+ char *dir, *retDir, *file, *uri_spec;
GnomeVFSURI *uri;
GtkWidget *wmain;
EphyEmbedShell *embed_shell;
@@ -328,15 +327,20 @@ window_cmd_file_open (EggAction *action,
dir, NULL, modeOpen,
&file, NULL, NULL);
- uri = gnome_vfs_uri_new (file);
+ uri_spec = gnome_vfs_make_uri_from_input (file);
+ uri = gnome_vfs_uri_new (uri_spec);
if (uri)
{
+ char *unescaped_dir;
+
retDir = gnome_vfs_uri_extract_dirname (uri);
+ unescaped_dir = gnome_vfs_unescape_string (retDir, "/");
/* set default open dir */
eel_gconf_set_string (CONF_STATE_OPEN_DIR,
- retDir);
+ unescaped_dir);
+ g_free (unescaped_dir);
g_free (retDir);
gnome_vfs_uri_unref (uri);
@@ -346,6 +350,7 @@ window_cmd_file_open (EggAction *action,
}
}
+ g_free (uri_spec);
g_free (file);
g_free (dir);
}