Require eel 2.2.0 or higher.

2003-03-18  Federico Mena Quintero  <federico@ximian.com>

	* configure.in: Require eel 2.2.0 or higher.

	* shell/main.c (make_canonical_uri): Use
	eel_make_uri_from_shell_arg().
This commit is contained in:
Federico Mena Quintero 2003-03-19 03:28:15 +00:00 committed by Federico Mena Quintero
parent 163bd71193
commit 812cfce418
3 changed files with 17 additions and 43 deletions

View file

@ -1,3 +1,10 @@
2003-03-18 Federico Mena Quintero <federico@ximian.com>
* configure.in: Require eel 2.2.0 or higher.
* shell/main.c (make_canonical_uri): Use
eel_make_uri_from_shell_arg().
2003-03-16 Jens Finke <jens@triq.net>
* configure.in: Removed librsvg compile dependency. If you want

View file

@ -17,6 +17,7 @@ BONOBO_ACTIVATION_REQUIRED=1.0.3
LIBGLADE_REQUIRED=2.0.1
GDKPIXBUF_REQUIRED=2.2.1
LIBEXIF_REQUIRED=0.5.9
EEL_REQUIRED=2.2.0
dnl ===============================================================================
@ -46,7 +47,7 @@ AC_SUBST(LDFLAGS)
dnl ================= gnome libs check ====================================
EOG_MODULES="gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED"
EOG_MODULES="gdk-pixbuf-2.0 >= $GDKPIXBUF_REQUIRED gnome-vfs-2.0 >= $GNOME_VFS_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED libbonoboui-2.0 >= $LIBBONOBOUI_REQUIRED bonobo-activation-2.0 >= $BONOBO_ACTIVATION_REQUIRED libglade-2.0 >= $LIBGLADE_REQUIRED eel-2.0 >= $EEL_REQUIRED"
dnl ============== optional exif support ====================

View file

@ -9,6 +9,7 @@
#include <gconf/gconf-client.h>
#include <bonobo.h>
#include <bonobo/bonobo-ui-main.h>
#include <eel/eel-vfs-extensions.h>
#include "eog-hig-dialog.h"
#include "eog-window.h"
#include "session.h"
@ -133,51 +134,16 @@ create_empty_window (gpointer data)
static GnomeVFSURI*
make_canonical_uri (const char *path)
{
GnomeVFSURI *uri = NULL;
char *uri_str;
GnomeVFSURI *uri;
g_return_val_if_fail (path != NULL, NULL);
uri_str = eel_make_uri_from_shell_arg (path);
/* check if it's some kind of URI */
if (g_strrstr (path, ":/") != NULL) {
/* an URI should be encoded/escaped already properly */
uri = gnome_vfs_uri_new (path);
}
else {
/* we assume that it's an local file path */
/* apply some encoding/escaping magic */
GError *error = NULL;
char *fullpath;
char *escape;
char *utf;
uri = NULL;
if (g_path_is_absolute (path)) {
fullpath = g_strdup (path);
}
else {
char *current_dir;
current_dir = g_get_current_dir ();
fullpath = g_build_filename (current_dir, path, NULL);
g_free (current_dir);
}
escape = gnome_vfs_escape_path_string (fullpath);
g_free (fullpath);
if (g_utf8_validate (escape, -1, NULL)) {
utf = g_strdup (escape);
}
else {
utf = g_filename_to_utf8 (escape, -1, NULL, NULL, &error);
}
g_free (escape);
if (utf == NULL) {
g_error ("Couldn't utf encode path: %s", error != NULL ? error->message : "unknown error");
}
else {
uri = gnome_vfs_uri_new (utf);
g_free (utf);
}
if (uri_str) {
uri = gnome_vfs_uri_new (uri_str);
g_free (uri_str);
}
return uri;