[evolution-patches] Multiple Display Support for Shell



The following patch changes the shell to register with the display
information, so that multiple logins to the same machine with different
displays, will work properly. Everything seems to work. I tried
switching between folders, opening the settings dialog and going through
the different pages, and composing mail. They all seem to work fine.

-- dobey


Index: shell/e-shell.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell.c,v
retrieving revision 1.215
diff -u -r1.215 e-shell.c
--- shell/e-shell.c	15 May 2003 18:19:16 -0000	1.215
+++ shell/e-shell.c	24 Sep 2003 17:49:15 -0000
@@ -1260,6 +1260,7 @@
 	CORBA_Object corba_object;
 	gchar *shortcut_path;
 	gboolean start_online;
+	const gchar *display_name;
 
 	g_return_val_if_fail (shell != NULL, E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
 	g_return_val_if_fail (E_IS_SHELL (shell), E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
@@ -1269,10 +1270,12 @@
 			      || startup_line_mode == E_SHELL_STARTUP_LINE_MODE_ONLINE
 			      || startup_line_mode == E_SHELL_STARTUP_LINE_MODE_OFFLINE,
 			      E_SHELL_CONSTRUCT_RESULT_INVALIDARG);
-	
+
+	display_name = gdk_display_get_name (gdk_display_get_default ());
+
 	priv = shell->priv;
 
-	priv->iid                  = g_strdup (iid);
+	priv->iid = bonobo_activation_make_registration_id (iid, display_name);
 	priv->local_directory      = g_strdup (local_directory);
 	priv->folder_type_registry = e_folder_type_registry_new ();
 	priv->uri_schema_registry  = e_uri_schema_registry_new ();
@@ -1300,10 +1303,8 @@
 	
 	/* Now we can register into OAF.  Notice that we shouldn't be
 	   registering into OAF until we are sure we can complete.  */
-	
-	/* FIXME: Multi-display stuff.  */
 	corba_object = bonobo_object_corba_objref (BONOBO_OBJECT (shell));
-	if (bonobo_activation_active_server_register (iid, corba_object) != Bonobo_ACTIVATION_REG_SUCCESS)
+	if (bonobo_activation_active_server_register (priv->iid, corba_object) != Bonobo_ACTIVATION_REG_SUCCESS)
 		return E_SHELL_CONSTRUCT_RESULT_CANNOTREGISTER;
 
 	if (show_splash

Attachment: signature.asc
Description: Questa parte del messaggio =?ISO-8859-1?Q?=E8?= firmata



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]