X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=shell%2Fmain.c;h=3abe4cd2ea37ff7b542e5ab86824e8c575c10d56;hb=f3707525b60fc63e05c76295b3a1ce50584e156f;hp=3c5a83d33b1226c0646aa2f33ec61970e9451062;hpb=13a06349251874bd35d2f03c3fc93217cee749a2;p=evince.git diff --git a/shell/main.c b/shell/main.c index 3c5a83d3..3abe4cd2 100644 --- a/shell/main.c +++ b/shell/main.c @@ -54,7 +54,7 @@ static const GOptionEntry goption_options[] = { "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &fullscren_mode, N_("Run evince in fullscreen mode"), NULL }, { "presentation", 's', 0, G_OPTION_ARG_NONE, &presentation_mode, N_("Run evince in presentation mode"), NULL }, { "preview", 'w', 0, G_OPTION_ARG_NONE, &preview_mode, N_("Run evince as a previewer"), NULL }, - { "unlink-temp-file", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL }, + { "unlink-tempfile", 'u', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &unlink_temp_file, NULL, NULL }, { G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &file_arguments, NULL, N_("[FILE...]") }, { NULL } }; @@ -180,7 +180,6 @@ load_files (const char **files, } #ifdef ENABLE_DBUS - static gboolean load_files_remote (const char **files, GHashTable *args) @@ -189,9 +188,6 @@ load_files_remote (const char **files, GError *error = NULL; DBusGConnection *connection; gboolean result = FALSE; -#if DBUS_VERSION < 35 - DBusGPendingCall *call; -#endif DBusGProxy *remote_object; GdkDisplay *display; guint32 timestamp; @@ -212,31 +208,6 @@ load_files_remote (const char **files, "/org/gnome/evince/Evince", "org.gnome.evince.Application"); if (!files) { -#if DBUS_VERSION <= 33 - call = dbus_g_proxy_begin_call (remote_object, "OpenWindow", - DBUS_TYPE_UINT32, ×tamp, - DBUS_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_object_unref (remote_object); - dbus_g_connection_unref (connection); - return FALSE; - } -#elif DBUS_VERSION == 34 - call = dbus_g_proxy_begin_call (remote_object, "OpenWindow", - G_TYPE_UINT, timestamp, - G_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_object_unref (remote_object); - dbus_g_connection_unref (connection); - return FALSE; - } -#else if (!dbus_g_proxy_call (remote_object, "OpenWindow", &error, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), args, G_TYPE_UINT, timestamp, @@ -248,7 +219,7 @@ load_files_remote (const char **files, dbus_g_connection_unref (connection); return FALSE; } -#endif + g_object_unref (remote_object); dbus_g_connection_unref (connection); @@ -261,33 +232,7 @@ load_files_remote (const char **files, uri = gnome_vfs_make_uri_from_shell_arg (files[i]); page_label = ev_page_label ? ev_page_label : ""; -#if DBUS_VERSION <= 33 - call = dbus_g_proxy_begin_call (remote_object, "OpenURI", - DBUS_TYPE_STRING, &uri, - DBUS_TYPE_STRING, &page_label, - DBUS_TYPE_UINT32, ×tamp, - DBUS_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_free (uri); - continue; - } -#elif DBUS_VERSION == 34 - call = dbus_g_proxy_begin_call (remote_object, "OpenURI", - G_TYPE_STRING, uri, - G_TYPE_STRING, page_label, - G_TYPE_UINT, timestamp, - G_TYPE_INVALID); - - if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) { - g_warning (error->message); - g_clear_error (&error); - g_free (uri); - continue; - } -#else + if (!dbus_g_proxy_call (remote_object, "OpenURI", &error, G_TYPE_STRING, uri, dbus_g_type_get_map ("GHashTable", G_TYPE_STRING, G_TYPE_VALUE), args, @@ -299,7 +244,7 @@ load_files_remote (const char **files, g_free (uri); continue; } -#endif + g_free (uri); result = TRUE; } @@ -355,7 +300,6 @@ main (int argc, char *argv[]) } #endif - gdk_threads_init (); gnome_authentication_manager_init (); if (enable_metadata) {