diff options
author | Dan Winship <danw@src.gnome.org> | 2000-08-11 07:59:41 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-08-11 07:59:41 +0800 |
commit | 5778265e23c39c32412f7dac263c0447b4aefd82 (patch) | |
tree | 0fd88461794b5592a9fe5b084b0134bba2930977 | |
parent | ca25daf7b1461631c6daa4282e4c06e1f5b9f159 (diff) | |
download | gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.tar gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.tar.gz gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.tar.bz2 gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.tar.lz gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.tar.xz gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.tar.zst gsoc2013-evolution-5778265e23c39c32412f7dac263c0447b4aefd82.zip |
add "in string evolution_homedir" to ShellComponent::set_owner's
* Evolution-ShellComponent.idl: add "in string evolution_homedir"
to ShellComponent::set_owner's arguments.
* e-shell.c (e_shell_get_local_directory): Expose local_directory.
* e-component-registry.c (register_component): Pass the shell's
"local_directory" to the component as its evolution_homedir.
* evolution-shell-component.c (impl_ShellComponent_set_owner):
Update to include evolution_homedir.
(class_init): Update signal prototype.
* evolution-shell-component-client.c
(evolution_shell_component_client_set_owner): Update to include
evolution_homedir.
* e-init.c: Remove. This wasn't being used.
svn path=/trunk/; revision=4710
-rw-r--r-- | shell/ChangeLog | 20 | ||||
-rw-r--r-- | shell/Evolution-ShellComponent.idl | 2 | ||||
-rw-r--r-- | shell/e-component-registry.c | 4 | ||||
-rw-r--r-- | shell/e-init.c | 34 | ||||
-rw-r--r-- | shell/e-init.h | 8 | ||||
-rw-r--r-- | shell/e-shell.c | 9 | ||||
-rw-r--r-- | shell/e-shell.h | 1 | ||||
-rw-r--r-- | shell/evolution-shell-component-client.c | 5 | ||||
-rw-r--r-- | shell/evolution-shell-component-client.h | 3 | ||||
-rw-r--r-- | shell/evolution-shell-component.c | 9 | ||||
-rw-r--r-- | shell/evolution-shell-component.h | 3 |
11 files changed, 46 insertions, 52 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 8fc703572b..b7e9b6fdcd 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,23 @@ +2000-08-10 Dan Winship <danw@helixcode.com> + + * Evolution-ShellComponent.idl: add "in string evolution_homedir" + to ShellComponent::set_owner's arguments. + + * e-shell.c (e_shell_get_local_directory): Expose local_directory. + + * e-component-registry.c (register_component): Pass the shell's + "local_directory" to the component as its evolution_homedir. + + * evolution-shell-component.c (impl_ShellComponent_set_owner): + Update to include evolution_homedir. + (class_init): Update signal prototype. + + * evolution-shell-component-client.c + (evolution_shell_component_client_set_owner): Update to include + evolution_homedir. + + * e-init.c: Remove. This wasn't being used. + 2000-08-10 Peter Williams <peterw@helixcode.com> * e-shell-view-menu.c (command_about_box): Add lil' ol' diff --git a/shell/Evolution-ShellComponent.idl b/shell/Evolution-ShellComponent.idl index 90b72fea26..f907cca72b 100644 --- a/shell/Evolution-ShellComponent.idl +++ b/shell/Evolution-ShellComponent.idl @@ -28,7 +28,7 @@ module Evolution { /* FIXME: Can we use an attribute here? */ exception AlreadyOwned {}; - void set_owner (in Shell shell) + void set_owner (in Shell shell, in string evolution_homedir) raises (AlreadyOwned); exception NotOwned {}; diff --git a/shell/e-component-registry.c b/shell/e-component-registry.c index a331a1a551..411fe93d42 100644 --- a/shell/e-component-registry.c +++ b/shell/e-component-registry.c @@ -138,6 +138,7 @@ register_component (EComponentRegistry *component_registry, EvolutionShellComponentClient *client; CORBA_Environment ev; CORBA_unsigned_long i; + const char *local_directory; priv = component_registry->priv; @@ -157,8 +158,9 @@ register_component (EComponentRegistry *component_registry, component_corba_interface = bonobo_object_corba_objref (BONOBO_OBJECT (client)); shell_corba_interface = bonobo_object_corba_objref (BONOBO_OBJECT (priv->shell)); + local_directory = e_shell_get_local_directory (priv->shell); - Evolution_ShellComponent_set_owner (component_corba_interface, shell_corba_interface, &ev); + Evolution_ShellComponent_set_owner (component_corba_interface, shell_corba_interface, local_directory, &ev); if (ev._major != CORBA_NO_EXCEPTION) { bonobo_object_unref (BONOBO_OBJECT (client)); CORBA_exception_free (&ev); diff --git a/shell/e-init.c b/shell/e-init.c deleted file mode 100644 index 34ccdbcfc3..0000000000 --- a/shell/e-init.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * e-init.c: Initializes Evolution for first time users - * - */ -#include <config.h> -#include <gnome.h> -#include "e-init.h" -#include <sys/stat.h> -#include <sys/types.h> -#include <fcntl.h> -#include <unistd.h> -#include "e-util/e-gui-utils.h" - -char *evolution_base_dir; - -static void -e_init_local (void) -{ - evolution_base_dir = g_concat_dir_and_file (g_get_home_dir (), "Evolution"); - - if (g_file_exists (evolution_base_dir)) - return; - - if (-1 == mkdir (evolution_base_dir, 0755)){ - e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("Evolution can not create its local folders")); - exit (0); - } -} - -void -e_init (void) -{ - e_init_local (); -} diff --git a/shell/e-init.h b/shell/e-init.h deleted file mode 100644 index 5684f87b44..0000000000 --- a/shell/e-init.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef E_INIT_H -#define E_INIT_H - -extern char *evolution_base_dir; - -void e_init (void); - -#endif /* E_INIT_H */ diff --git a/shell/e-shell.c b/shell/e-shell.c index 6f00a43584..056ab0923c 100644 --- a/shell/e-shell.c +++ b/shell/e-shell.c @@ -563,6 +563,15 @@ e_shell_new_view (EShell *shell, } +const char * +e_shell_get_local_directory (EShell *shell) +{ + g_return_val_if_fail (shell != NULL, NULL); + g_return_val_if_fail (E_IS_SHELL (shell), NULL); + + return shell->priv->local_directory; +} + EShortcuts * e_shell_get_shortcuts (EShell *shell) { diff --git a/shell/e-shell.h b/shell/e-shell.h index 37c8a879b7..ca63c4776d 100644 --- a/shell/e-shell.h +++ b/shell/e-shell.h @@ -71,6 +71,7 @@ EShell *e_shell_new (const char *local_d GtkWidget *e_shell_new_view (EShell *shell, const char *uri); +const char *e_shell_get_local_directory (EShell *shell); EShortcuts *e_shell_get_shortcuts (EShell *shell); EStorageSet *e_shell_get_storage_set (EShell *shell); EFolderTypeRegistry *e_shell_get_folder_type_registry (EShell *shell); diff --git a/shell/evolution-shell-component-client.c b/shell/evolution-shell-component-client.c index d805686518..c6cb1463dd 100644 --- a/shell/evolution-shell-component-client.c +++ b/shell/evolution-shell-component-client.c @@ -347,7 +347,8 @@ evolution_shell_component_client_new (const char *id) EvolutionShellComponentResult evolution_shell_component_client_set_owner (EvolutionShellComponentClient *shell_component_client, - Evolution_Shell shell) + Evolution_Shell shell, + const char *evolution_homedir) { EvolutionShellComponentResult result; CORBA_Environment ev; @@ -359,7 +360,7 @@ evolution_shell_component_client_set_owner (EvolutionShellComponentClient *shell CORBA_exception_init (&ev); Evolution_ShellComponent_set_owner (bonobo_object_corba_objref (BONOBO_OBJECT (shell_component_client)), - shell, &ev); + shell, evolution_homedir, &ev); result = corba_exception_to_result (&ev); diff --git a/shell/evolution-shell-component-client.h b/shell/evolution-shell-component-client.h index b591997126..fa066cb27d 100644 --- a/shell/evolution-shell-component-client.h +++ b/shell/evolution-shell-component-client.h @@ -68,7 +68,8 @@ EvolutionShellComponentClient *evolution_shell_component_client_new (cons /* Synchronous operations. */ EvolutionShellComponentResult evolution_shell_component_client_set_owner (EvolutionShellComponentClient *shell_component_client, - Evolution_Shell shell); + Evolution_Shell shell, + const char *evolution_homedir); EvolutionShellComponentResult evolution_shell_component_client_unset_owner (EvolutionShellComponentClient *shell_component_client, Evolution_Shell shell); EvolutionShellComponentResult evolution_shell_component_client_create_view (EvolutionShellComponentClient *shell_component_client, diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c index 100160503f..cedcf64b98 100644 --- a/shell/evolution-shell-component.c +++ b/shell/evolution-shell-component.c @@ -123,6 +123,7 @@ impl_ShellComponent__get_supported_types (PortableServer_Servant servant, static void impl_ShellComponent_set_owner (PortableServer_Servant servant, const Evolution_Shell shell, + const CORBA_char *evolution_homedir, CORBA_Environment *ev) { BonoboObject *bonobo_object; @@ -144,7 +145,7 @@ impl_ShellComponent_set_owner (PortableServer_Servant servant, if (ev->_major == CORBA_NO_EXCEPTION) { priv->owner_client = evolution_shell_client_new (shell_duplicate); - gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_SET], priv->owner_client); + gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_SET], priv->owner_client, evolution_homedir); } } @@ -371,9 +372,9 @@ class_init (EvolutionShellComponentClass *klass) GTK_RUN_FIRST, object_class->type, GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_set), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_POINTER); + gtk_marshal_NONE__POINTER_POINTER, + GTK_TYPE_NONE, 2, + GTK_TYPE_POINTER, GTK_TYPE_POINTER); signals[OWNER_UNSET] = gtk_signal_new ("owner_unset", diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h index 095177b56d..6b080e48c3 100644 --- a/shell/evolution-shell-component.h +++ b/shell/evolution-shell-component.h @@ -111,7 +111,8 @@ struct _EvolutionShellComponentClass { /* Signals. */ void (* owner_set) (EvolutionShellComponent *shell_component, - EvolutionShellClient *shell_client); + EvolutionShellClient *shell_client, + const char *evolution_homedir); void (* owner_unset) (EvolutionShellComponent *shell_component); }; |