epiphany r7888 - in trunk: embed/mozilla embed/xulrunner/components lib src
- From: cosimoc svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r7888 - in trunk: embed/mozilla embed/xulrunner/components lib src
- Date: Thu, 24 Jan 2008 19:14:16 +0000 (GMT)
Author: cosimoc
Date: Thu Jan 24 19:14:16 2008
New Revision: 7888
URL: http://svn.gnome.org/viewvc/epiphany?rev=7888&view=rev
Log:
Better fix for bug #511759.
Modified:
trunk/embed/mozilla/MozDownload.cpp
trunk/embed/xulrunner/components/MozDownload.cpp
trunk/lib/ephy-file-helpers.c
trunk/lib/ephy-file-helpers.h
trunk/src/popup-commands.c
Modified: trunk/embed/mozilla/MozDownload.cpp
==============================================================================
--- trunk/embed/mozilla/MozDownload.cpp (original)
+++ trunk/embed/mozilla/MozDownload.cpp Thu Jan 24 19:14:16 2008
@@ -404,8 +404,11 @@
rv = mDestination->GetSpec (aDest);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
- ephy_file_browse_to (aDest.get (), user_time);
+ GFile *dest;
+ dest = g_file_new_for_uri (aDest.get ());
+ ephy_file_browse_to (dest, user_time);
+ g_object_unref (dest);
g_strfreev (str);
}
#endif /* HAVE_GECKO_1_9 */
Modified: trunk/embed/xulrunner/components/MozDownload.cpp
==============================================================================
--- trunk/embed/xulrunner/components/MozDownload.cpp (original)
+++ trunk/embed/xulrunner/components/MozDownload.cpp Thu Jan 24 19:14:16 2008
@@ -400,8 +400,12 @@
rv = mDestination->GetSpec (aDest);
NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
- ephy_file_browse_to (aDest.get (), user_time);
+ GFile *dest;
+ dest = g_file_new_for_uri (dest);
+ ephy_file_browse_to (dest, user_time);
+
+ g_object_unref (dest);
g_strfreev (str);
}
#endif /* HAVE_GECKO_1_9 */
Modified: trunk/lib/ephy-file-helpers.c
==============================================================================
--- trunk/lib/ephy-file-helpers.c (original)
+++ trunk/lib/ephy-file-helpers.c Thu Jan 24 19:14:16 2008
@@ -702,14 +702,13 @@
}
gboolean
-ephy_file_browse_to (const char *parameter,
+ephy_file_browse_to (GFile *file,
guint32 user_time)
{
- GFile *file, *parent, *desktop;
+ GFile *parent, *desktop;
char *desktop_dir;
gboolean ret;
- file = g_file_new_for_uri (parameter);
desktop_dir = ephy_file_desktop_dir ();
desktop = g_file_new_for_path (desktop_dir);
@@ -728,7 +727,6 @@
}
g_free (desktop_dir);
- g_object_unref (file);
return ret;
}
Modified: trunk/lib/ephy-file-helpers.h
==============================================================================
--- trunk/lib/ephy-file-helpers.h (original)
+++ trunk/lib/ephy-file-helpers.h Thu Jan 24 19:14:16 2008
@@ -92,7 +92,7 @@
GFile *file,
guint32 user_time);
-gboolean ephy_file_browse_to (const char *parameter,
+gboolean ephy_file_browse_to (GFile *file,
guint32 user_time);
void ephy_file_delete_directory (const char *path);
Modified: trunk/src/popup-commands.c
==============================================================================
--- trunk/src/popup-commands.c (original)
+++ trunk/src/popup-commands.c Thu Jan 24 19:14:16 2008
@@ -174,6 +174,7 @@
EPHY_EMBED_PERSIST_ASK_DESTINATION))
{
const char *dest;
+ GFile *dest_file;
guint32 user_time;
user_time = ephy_embed_persist_get_user_time (persist);
@@ -181,9 +182,13 @@
g_return_if_fail (dest != NULL);
+ dest_file = g_file_new_for_path (dest);
+
+ g_return_if_fail (dest_file != NULL);
/* If save location is the desktop, nautilus will not open */
- ephy_file_browse_to (dest, user_time);
-
+ ephy_file_browse_to (dest_file, user_time);
+
+ g_object_unref (dest_file);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]