[gnome-shell] calendar: Launch the calendar server with DBus autostart
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] calendar: Launch the calendar server with DBus autostart
- Date: Mon, 3 Sep 2012 21:20:13 +0000 (UTC)
commit cb9062f81891d78ba9011542f378edd2e5cd16f4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Sep 2 20:44:42 2012 -0300
calendar: Launch the calendar server with DBus autostart
The supposed reason for launching the calendar server in a peculiar
way was so that the process would be killed when the Shell was killed,
but that didn't actually work. Launch the calendar server through auto-start,
and persist all throughout the session.
https://bugzilla.gnome.org/show_bug.cgi?id=683156
js/ui/calendar.js | 11 ++++-----
js/ui/main.js | 4 ---
src/shell-global.c | 54 ----------------------------------------------------
src/shell-global.h | 2 -
4 files changed, 5 insertions(+), 66 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index 33e327e..149bf1a 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -204,12 +204,11 @@ const CalendarServerInfo = Gio.DBusInterfaceInfo.new_for_xml(CalendarServerIfac
function CalendarServer() {
var self = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
- g_interface_name: CalendarServerInfo.name,
- g_interface_info: CalendarServerInfo,
- g_name: 'org.gnome.Shell.CalendarServer',
- g_object_path: '/org/gnome/Shell/CalendarServer',
- g_flags: (Gio.DBusProxyFlags.DO_NOT_AUTO_START |
- Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
+ g_interface_name: CalendarServerInfo.name,
+ g_interface_info: CalendarServerInfo,
+ g_name: 'org.gnome.Shell.CalendarServer',
+ g_object_path: '/org/gnome/Shell/CalendarServer',
+ g_flags: Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES });
self.init(null);
return self;
diff --git a/js/ui/main.js b/js/ui/main.js
index 3dff971..b8b891c 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -80,10 +80,6 @@ let _overridesSettings = null;
let background = null;
function createUserSession() {
- // Load the calendar server. Note that we are careful about
- // not loading any events until the user presses the clock
- global.launch_calendar_server();
-
telepathyClient = new TelepathyClient.Client();
automountManager = new AutomountManager.AutomountManager();
autorunManager = new AutorunManager.AutorunManager();
diff --git a/src/shell-global.c b/src/shell-global.c
index 28127ab..c95f078 100644
--- a/src/shell-global.c
+++ b/src/shell-global.c
@@ -1686,60 +1686,6 @@ gboolean _shell_global_check_xdnd_event (ShellGlobal *global,
return FALSE;
}
-/**
- * shell_global_launch_calendar_server:
- * @global: The #ShellGlobal.
- *
- * Launch the gnome-shell-calendar-server helper.
- */
-void
-shell_global_launch_calendar_server (ShellGlobal *global)
-{
- const gchar *bin_dir;
- gchar *calendar_server_exe;
- GError *error;
- gchar *argv[2];
- gint child_standard_input;
-
- /* launch calendar-server */
- bin_dir = g_getenv ("GNOME_SHELL_BINDIR");
- if (bin_dir != NULL)
- calendar_server_exe = g_strdup_printf ("%s/gnome-shell-calendar-server", bin_dir);
- else
- calendar_server_exe = g_strdup_printf (GNOME_SHELL_LIBEXECDIR "/gnome-shell-calendar-server");
-
- argv[0] = calendar_server_exe;
- argv[1] = NULL;
- error = NULL;
- if (!g_spawn_async_with_pipes (NULL, /* working_directory */
- argv,
- NULL, /* envp */
- 0, /* GSpawnFlags */
- NULL, /* child_setup */
- NULL, /* user_data */
- NULL, /* GPid *child_pid */
- &child_standard_input,
- NULL, /* gint *stdout */
- NULL, /* gint *stderr */
- &error))
- {
- g_warning ("Error launching `%s': %s (%s %d)",
- calendar_server_exe,
- error->message,
- g_quark_to_string (error->domain),
- error->code);
- g_error_free (error);
- }
- /* Note that gnome-shell-calendar-server exits whenever its stdin
- * file descriptor is HUP'ed. This means that whenever the the shell
- * process exits or is being replaced, the calendar server is also
- * exits...and if the shell is being replaced, a new copy of the
- * calendar server is launched...
- */
-
- g_free (calendar_server_exe);
-}
-
const char *
shell_global_get_session_mode (ShellGlobal *global)
{
diff --git a/src/shell-global.h b/src/shell-global.h
index b731838..95c18e0 100644
--- a/src/shell-global.h
+++ b/src/shell-global.h
@@ -134,8 +134,6 @@ void shell_global_init_xdnd (ShellGlobal *global);
void shell_global_reexec_self (ShellGlobal *global);
-void shell_global_launch_calendar_server (ShellGlobal *global);
-
const char * shell_global_get_session_mode (ShellGlobal *global);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]