2 * Copyright © 2005 Gustavo Gama
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * $Id: ephy-activation.c 6952 2007-03-11 19:42:02Z chpe $
23 #include "ephy-activation.h"
25 #include "ephy-shell.h"
26 #include "ephy-session.h"
27 #include "ephy-prefs.h"
28 #include "eel-gconf-extensions.h"
29 #include "ephy-debug.h"
32 session_queue_command (EphySessionCommand command
,
41 shell
= ephy_shell_get_default ();
45 g_quark_from_static_string ("ephy-activation-error"),
47 "Shutting down." /* FIXME i18n & better string */);
51 session
= EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default()));
52 g_assert (session
!= NULL
);
54 ephy_session_queue_command (session
, command
, arg
, args
,
55 (guint32
) startup_id
, FALSE
);
61 ephy_activation_load_uri_list (EphyDbus
*ephy_dbus
,
67 return session_queue_command (EPHY_SESSION_CMD_OPEN_URIS
,
68 options
, uris
, startup_id
, error
);
72 ephy_activation_load_session (EphyDbus
*ephy_dbus
,
77 return session_queue_command (EPHY_SESSION_CMD_LOAD_SESSION
,
78 session_name
, NULL
, startup_id
, error
);
82 ephy_activation_open_bookmarks_editor (EphyDbus
*ephy_dbus
,
86 if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING
))
89 g_quark_from_static_string ("ephy-activation-error"),
91 "Bookmarks editing is locked down.");
96 return session_queue_command (EPHY_SESSION_CMD_OPEN_BOOKMARKS_EDITOR
,
97 NULL
, NULL
, startup_id
, error
);