]> www.fi.muni.cz Git - evince.git/blobdiff - previewer/ev-previewer.c
Remove some code duplication
[evince.git] / previewer / ev-previewer.c
index 7a83eee07be11e347938b7ed6cc63aa11496dc71..2b8dea364d5468486c236cd86d3146844da21bd3 100644 (file)
@@ -15,7 +15,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #include <config.h>
@@ -33,7 +33,9 @@
 #endif
 #include <io.h>
 #include <conio.h>
-#define _WIN32_WINNT 0x0500
+#if !(_WIN32_WINNT >= 0x0500)
+#error "_WIN32_WINNT must be defined >= 0x0500"
+#endif
 #include <windows.h>
 #endif
 
@@ -84,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),
@@ -133,7 +139,7 @@ main (gint argc, gchar **argv)
 
 #ifdef ENABLE_NLS
        /* Initialize the i18n stuff */
-       bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+       bindtextdomain (GETTEXT_PACKAGE, ev_get_locale_dir());
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
        textdomain (GETTEXT_PACKAGE);
 #endif