]> www.fi.muni.cz Git - evince.git/blobdiff - shell/main.c
Updated Translation
[evince.git] / shell / main.c
index 8aac27afa1b85e13b779754d4a1c757678e545b7..91a62d258b5299519f59bf293c45bf281151233c 100644 (file)
@@ -137,7 +137,7 @@ load_files_remote (const char **files)
        /* Fake it for GTK+2.6 */
        timestamp = get_startup_time ();
 #endif
        /* Fake it for GTK+2.6 */
        timestamp = get_startup_time ();
 #endif
-       connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+       connection = dbus_g_bus_get (DBUS_BUS_STARTER, &error);
        if (connection == NULL) {
                g_warning (error->message);
                g_error_free (error);   
        if (connection == NULL) {
                g_warning (error->message);
                g_error_free (error);   
@@ -158,6 +158,8 @@ load_files_remote (const char **files)
                if (!dbus_g_proxy_end_call (remote_object, call, &error, DBUS_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
                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
                        return FALSE;
                }
 #elif DBUS_VERSION == 34
@@ -168,6 +170,8 @@ load_files_remote (const char **files)
                if (!dbus_g_proxy_end_call (remote_object, call, &error, G_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
                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
                        return FALSE;
                }
 #else
@@ -177,9 +181,14 @@ load_files_remote (const char **files)
                                        G_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
                                        G_TYPE_INVALID)) {
                        g_warning (error->message);
                        g_clear_error (&error);
+                       g_object_unref (remote_object);
+                       dbus_g_connection_unref (connection);
                        return FALSE;
                }
 #endif
                        return FALSE;
                }
 #endif
+               g_object_unref (remote_object);
+               dbus_g_connection_unref (connection);
+               
                return TRUE;
        }
 
                return TRUE;
        }
 
@@ -188,7 +197,7 @@ load_files_remote (const char **files)
                char *uri;
 
                uri = gnome_vfs_make_uri_from_shell_arg (files[i]);
                char *uri;
 
                uri = gnome_vfs_make_uri_from_shell_arg (files[i]);
-               page_label = ev_page_label ? ev_page_label : ""; 
+               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,
 #if DBUS_VERSION <= 33
                call = dbus_g_proxy_begin_call (remote_object, "OpenURI",
                                                DBUS_TYPE_STRING, &uri,
@@ -232,6 +241,9 @@ load_files_remote (const char **files)
                result = TRUE;
         }
 
                result = TRUE;
         }
 
+       g_object_unref (remote_object);
+       dbus_g_connection_unref (connection);
+
        gdk_notify_startup_complete ();
 
        return result;
        gdk_notify_startup_complete ();
 
        return result;
@@ -288,7 +300,7 @@ main (int argc, char *argv[])
        ev_file_helpers_init ();
        ev_debug_init ();
        ev_stock_icons_init ();
        ev_file_helpers_init ();
        ev_debug_init ();
        ev_stock_icons_init ();
-       gtk_window_set_default_icon_name ("postscript-viewer");
+       gtk_window_set_default_icon_name ("evince");
 
        load_files (poptGetArgs (context));
 
 
        load_files (poptGetArgs (context));