From 6bf566c5b05b4a8adf46cb19b7e939772ea9e001 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Mon, 30 Jan 2006 21:58:56 +0000 Subject: Idle unref the dbus proxy in case we didn't call any remote methods; and 2006-01-30 Christian Persch * src/ephy-main.c: (open_urls), (call_dbus_proxy): Idle unref the dbus proxy in case we didn't call any remote methods; and ref the dbus proxy for each call + one idle unref for each URL remoted. --- src/ephy-main.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/ephy-main.c') diff --git a/src/ephy-main.c b/src/ephy-main.c index 881d58b9c..7ee41baae 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -370,11 +370,8 @@ open_urls (DBusGProxy *proxy, guint32 user_time, GError **error) { - EphyShell *shell; const char *options = "new-window"; int i; - - shell = ephy_shell_get_default (); if (open_in_new_window) { @@ -399,17 +396,21 @@ open_urls (DBusGProxy *proxy, char *path; path = remaining_arguments[i]; - //path = path_from_command_line_arg (args[i]); + /* path = path_from_command_line_arg (args[i]); */ + + g_object_ref (proxy); org_gnome_Epiphany_load_url_async (proxy, path, options, user_time, unref_proxy_reply_cb, NULL /* FIXME */); - //g_free (path); + /* g_free (path); */ } g_strfreev (remaining_arguments); remaining_arguments = NULL; + + ephy_object_idle_unref (proxy); } return TRUE; @@ -448,6 +449,10 @@ call_dbus_proxy (DBusGProxy *proxy, { retval = open_urls (proxy, user_time, error); } + else + { + ephy_object_idle_unref (proxy); + } } /* FIXME why? */ -- cgit v1.2.3