diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-01-24 06:08:10 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-01-24 06:08:10 +0800 |
commit | 4c65f49d942e219d04afa1a8728fa60915618e9f (patch) | |
tree | 18be609f2ef19724cda9623746a440d644ccbf62 /src/ephy-main.c | |
parent | 3c094d65a71666e40b14cb8edc8bbb255b09b8cf (diff) | |
download | gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.tar gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.tar.gz gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.tar.bz2 gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.tar.lz gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.tar.xz gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.tar.zst gsoc2013-epiphany-4c65f49d942e219d04afa1a8728fa60915618e9f.zip |
Removed add-bookmark and import-bookmarks functions, and changed load-url
2006-01-23 Christian Persch <chpe@cvs.gnome.org>
* data/epiphany-service.xml:
* src/ephy-activation.c: (ephy_activation_load_url),
(ephy_activation_open_bookmarks_editor):
* src/ephy-activation.h:
Removed add-bookmark and import-bookmarks functions,
and changed load-url to use an options string instead of
loads of booleans.
* src/ephy-main.c: (unref_proxy_reply_cb), (open_urls),
(call_dbus_proxy):
Adapt to changed dbus call signatures.
Fixes open-in-new-tab/window from cmd line.
Diffstat (limited to 'src/ephy-main.c')
-rw-r--r-- | src/ephy-main.c | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/src/ephy-main.c b/src/ephy-main.c index 88444dae0..7f861f20f 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -337,23 +337,46 @@ path_from_command_line_arg (const char *arg) } #endif +static void +unref_proxy_reply_cb (DBusGProxy *proxy, + GError *error, + gpointer user_data) +{ + if (error != NULL) + { + g_warning ("An error occured while calling remote method: %s", error->message); + g_error_free (error); + } + + g_object_unref (proxy); +} + static gboolean 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) + { + options = "new-window"; + } + else if (open_in_new_tab) + { + options = "new-tab"; + } + if (remaining_arguments == NULL) { /* Homepage or resume */ org_gnome_Epiphany_load_url_async - (proxy, "", FALSE, !open_in_new_tab, - open_in_new_tab, user_time, - ephy_activation_general_purpose_reply, NULL /* FIXME! */); + (proxy, "", options, user_time, + unref_proxy_reply_cb, NULL /* FIXME! */); } else { @@ -365,9 +388,8 @@ open_urls (DBusGProxy *proxy, //path = path_from_command_line_arg (args[i]); org_gnome_Epiphany_load_url_async - (proxy, path, FALSE, !open_in_new_tab, - open_in_new_tab, user_time, - ephy_activation_general_purpose_reply, NULL /* FIXME */); + (proxy, path, options, user_time, + unref_proxy_reply_cb, NULL /* FIXME */); //g_free (path); } @@ -392,28 +414,14 @@ call_dbus_proxy (DBusGProxy *proxy, { org_gnome_Epiphany_open_bookmarks_editor_async (proxy, user_time, - ephy_activation_general_purpose_reply, shell); + unref_proxy_reply_cb, shell); } else if (session_filename != NULL) { org_gnome_Epiphany_load_session_async (proxy, session_filename, user_time, - ephy_activation_general_purpose_reply, shell); + unref_proxy_reply_cb, shell); } -#if 0 - else if (flags & EPHY_SHELL_STARTUP_IMPORT_BOOKMARKS) - { - org_gnome_Epiphany_import_bookmarks_async - (proxy, string_arg, - ephy_activation_general_purpose_reply, shell); - } - else if (flags & EPHY_SHELL_STARTUP_ADD_BOOKMARK) - { - org_gnome_Epiphany_add_bookmark_async - (proxy, string_arg, - ephy_activation_general_purpose_reply, shell); - } -#endif else { /* no need to open the homepage if autoresume returns TRUE; |