]> www.fi.muni.cz Git - evince.git/commitdiff
Convert relative path to absolute path for evince-previewer
authorMarek Kasik <mkasik@redhat.com>
Wed, 12 May 2010 12:47:07 +0000 (14:47 +0200)
committerMarek Kasik <mkasik@redhat.com>
Wed, 12 May 2010 12:47:07 +0000 (14:47 +0200)
Add ability to open documents specified by relative path in
evince-previewer.

previewer/ev-previewer.c

index 0331766f179f254c6ce4f3b391dfc1c58cf58df5..990a003cecf4f35594b5eed489e95c8f36dcce73 100644 (file)
@@ -86,8 +86,12 @@ ev_previewer_load_document (const gchar     *filename,
 {
        EvJob *job;
        gchar *uri;
+       GFile  *file;
+
+       file = g_file_new_for_commandline_arg (filename);
+       uri = g_file_get_uri (file);
+       g_object_unref (file);
 
-       uri = g_filename_to_uri (filename, NULL, NULL);
        job = ev_job_load_new (uri);
        g_signal_connect (job, "finished",
                          G_CALLBACK (ev_previewer_load_job_finished),