Add method `ShellComponent::handleExternalURI' and an
`external_uri_schemas' attribute. Update the EvolutionShellComponent GTK+ wrapper accordingly. Update all the components to pass a NULL `external_uri_schemas' list when initializing themselves as EvolutionShellComponents. svn path=/trunk/; revision=10548
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2001-06-27 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* gui/component/addressbook-component.c (factory_fn): Pass NULL as
|
||||
the @external_uri_schemas argument to
|
||||
`evolution_shell_component_new()'.
|
||||
|
||||
2001-06-27 Chris Toshok <toshok@ximian.com>
|
||||
|
||||
* gui/contact-list-editor/e-contact-list-model.c
|
||||
|
||||
@ -344,7 +344,8 @@ factory_fn (BonoboGenericFactory *factory,
|
||||
EvolutionShellComponent *shell_component;
|
||||
EvolutionShellComponentDndDestinationFolder *destination_interface;
|
||||
|
||||
shell_component = evolution_shell_component_new (folder_types, create_view, create_folder,
|
||||
shell_component = evolution_shell_component_new (folder_types, NULL,
|
||||
create_view, create_folder,
|
||||
remove_folder, xfer_folder,
|
||||
populate_context_menu,
|
||||
get_dnd_selection,
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
2001-06-27 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* gui/component-factory.c (factory_fn): Pass NULL as the
|
||||
@external_uri_schemas argument to
|
||||
`evolution_shell_component_new()'.
|
||||
|
||||
2001-06-27 Peter Williams <peterw@ximian.com>
|
||||
|
||||
* conduits/*/Makefile.am (INCLUDES): More srcdir != builddir
|
||||
|
||||
@ -310,6 +310,7 @@ factory_fn (BonoboGenericFactory *factory,
|
||||
EvolutionShellComponent *shell_component;
|
||||
|
||||
shell_component = evolution_shell_component_new (folder_types,
|
||||
NULL,
|
||||
create_view,
|
||||
create_folder,
|
||||
remove_folder,
|
||||
|
||||
@ -310,6 +310,7 @@ factory_fn (BonoboGenericFactory *factory,
|
||||
EvolutionShellComponent *shell_component;
|
||||
|
||||
shell_component = evolution_shell_component_new (folder_types,
|
||||
NULL,
|
||||
create_view,
|
||||
create_folder,
|
||||
remove_folder,
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
2001-06-27 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* component-factory.c (component_fn): Pass NULL as the
|
||||
@external_uri_schemas argument to
|
||||
`evolution_shell_component_new()'.
|
||||
|
||||
2001-06-27 Peter Williams <peterw@ximian.com>
|
||||
|
||||
* folder-browser-ui.c: Uncomment EditSelectThread. Yaay!
|
||||
|
||||
@ -578,6 +578,7 @@ component_fn (BonoboGenericFactory *factory, void *closure)
|
||||
MailOfflineHandler *offline_handler;
|
||||
|
||||
shell_component = evolution_shell_component_new (folder_types,
|
||||
NULL,
|
||||
create_view,
|
||||
create_folder,
|
||||
remove_folder,
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
2001-06-27 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* component-factory.c (factory_fn): Pass NULL as the
|
||||
@external_uri_schemas argument to
|
||||
`evolution_shell_component_new()'.
|
||||
|
||||
2001-06-21 Rodrigo Moya <rodrigo@ximian.com>
|
||||
|
||||
* Makefile.am: added libwombat to LDADD
|
||||
|
||||
@ -100,6 +100,7 @@ factory_fn (BonoboGenericFactory *factory,
|
||||
running_objects++;
|
||||
|
||||
shell_component = evolution_shell_component_new (folder_types,
|
||||
NULL,
|
||||
create_view,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
|
||||
@ -1,3 +1,29 @@
|
||||
2001-06-27 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* evolution-test-component.c (factory_fn): Pass NULL as the
|
||||
@external_uri_schemas arg to `evolution_shell_component_new'.
|
||||
|
||||
* evolution-shell-component.c: New enum value
|
||||
`HANDLE_EXTERNAL_URI'. New member `external_uri_schemas' in
|
||||
`EvolutionShellComponentPrivate'.
|
||||
(init): Initialize `external_uri_schemas' to NULL.
|
||||
(destroy): Free it.
|
||||
(destroy):
|
||||
(class_init): Add the "handler_external_uri" signal.
|
||||
(evolution_shell_component_new): Added precondition on
|
||||
@folder_types. New arg @external_uri_schemas.
|
||||
(evolution_shell_component_construct): Added preconditions. New
|
||||
arg @external_uri_schemas. Initialize the `external_uri_schemas'
|
||||
member in the EvolutionShellComponentPrivate part.
|
||||
(impl_ShellComponent__get_external_uri_schemas): New,
|
||||
implementation for reading the `external_uri_schemas' attribute.
|
||||
(class_init): Install it in the EPV.
|
||||
|
||||
* evolution-shell-component.h: New signal `handle_external_uri'.
|
||||
|
||||
* Evolution-ShellComponent.idl: New attribute `extra_uri_schemas'.
|
||||
(handleExternalURI): New method.
|
||||
|
||||
2001-06-26 Ettore Perazzoli <ettore@ximian.com>
|
||||
|
||||
* e-storage-set-view.c (etree_value_at): Don't strdup "My
|
||||
|
||||
@ -21,13 +21,16 @@ module Evolution {
|
||||
sequence<string> accepted_dnd_types;
|
||||
sequence<string> exported_dnd_types;
|
||||
};
|
||||
|
||||
typedef sequence<FolderType> FolderTypeList;
|
||||
|
||||
|
||||
typedef string URISchema;
|
||||
typedef sequence<URISchema> URISchemaList;
|
||||
|
||||
interface ShellComponentListener;
|
||||
|
||||
interface ShellComponent : Bonobo::Unknown {
|
||||
readonly attribute FolderTypeList supported_types;
|
||||
readonly attribute URISchemaList external_uri_schemas;
|
||||
|
||||
/* FIXME: Can we use an attribute here? */
|
||||
exception AlreadyOwned {};
|
||||
@ -51,6 +54,8 @@ module Evolution {
|
||||
in string type)
|
||||
raises (NotFound, UnsupportedType, InternalError);
|
||||
|
||||
void handleExternalURI (in string external_uri);
|
||||
|
||||
exception Busy {};
|
||||
|
||||
void createFolderAsync (in ShellComponentListener listener,
|
||||
|
||||
@ -44,6 +44,7 @@ static GtkObjectClass *parent_class = NULL;
|
||||
|
||||
struct _EvolutionShellComponentPrivate {
|
||||
GList *folder_types; /* EvolutionShellComponentFolderType */
|
||||
GList *external_uri_schemas; /* char * */
|
||||
|
||||
EvolutionShellComponentCreateViewFn create_view_fn;
|
||||
EvolutionShellComponentCreateFolderFn create_folder_fn;
|
||||
@ -61,6 +62,7 @@ enum {
|
||||
OWNER_SET,
|
||||
OWNER_UNSET,
|
||||
DEBUG,
|
||||
HANDLE_EXTERNAL_URI,
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
@ -166,6 +168,46 @@ impl_ShellComponent__get_supported_types (PortableServer_Servant servant,
|
||||
return folder_type_list;
|
||||
}
|
||||
|
||||
static GNOME_Evolution_URISchemaList *
|
||||
impl_ShellComponent__get_external_uri_schemas (PortableServer_Servant servant,
|
||||
CORBA_Environment *ev)
|
||||
{
|
||||
EvolutionShellComponent *shell_component;
|
||||
EvolutionShellComponentPrivate *priv;
|
||||
GNOME_Evolution_URISchemaList *uri_schema_list;
|
||||
GList *p;
|
||||
int i;
|
||||
|
||||
shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object_from_servant (servant));
|
||||
priv = shell_component->priv;
|
||||
|
||||
uri_schema_list = GNOME_Evolution_URISchemaList__alloc ();
|
||||
|
||||
/* FIXME: We could probably keep this to FALSE and avoid
|
||||
CORBA_string_duplicating. */
|
||||
CORBA_sequence_set_release (uri_schema_list, TRUE);
|
||||
|
||||
if (priv->external_uri_schemas == NULL) {
|
||||
uri_schema_list->_length = 0;
|
||||
uri_schema_list->_maximum = 0;
|
||||
uri_schema_list->_buffer = NULL;
|
||||
return uri_schema_list;
|
||||
}
|
||||
|
||||
uri_schema_list->_length = g_list_length (priv->external_uri_schemas);
|
||||
uri_schema_list->_maximum = uri_schema_list->_length;
|
||||
uri_schema_list->_buffer = CORBA_sequence_GNOME_Evolution_URISchema_allocbuf (uri_schema_list->_maximum);
|
||||
|
||||
for (p = priv->external_uri_schemas, i = 0; p != NULL; p = p->next, i++) {
|
||||
const char *schema;
|
||||
|
||||
schema = (const char *) p->data;
|
||||
uri_schema_list->_buffer[i] = CORBA_string_dup (schema);
|
||||
}
|
||||
|
||||
return uri_schema_list;
|
||||
}
|
||||
|
||||
static void
|
||||
impl_ShellComponent_set_owner (PortableServer_Servant servant,
|
||||
const GNOME_Evolution_Shell shell,
|
||||
@ -429,6 +471,8 @@ destroy (GtkObject *object)
|
||||
}
|
||||
g_list_free (priv->folder_types);
|
||||
|
||||
e_free_string_list (priv->external_uri_schemas);
|
||||
|
||||
g_free (priv);
|
||||
|
||||
parent_class->destroy (object);
|
||||
@ -471,11 +515,21 @@ class_init (EvolutionShellComponentClass *klass)
|
||||
gtk_marshal_NONE__NONE,
|
||||
GTK_TYPE_NONE, 0);
|
||||
|
||||
signals[HANDLE_EXTERNAL_URI]
|
||||
= gtk_signal_new ("handle_external_uri",
|
||||
GTK_RUN_FIRST,
|
||||
object_class->type,
|
||||
GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, handle_external_uri),
|
||||
gtk_marshal_NONE__STRING,
|
||||
GTK_TYPE_NONE, 1,
|
||||
GTK_TYPE_STRING);
|
||||
|
||||
gtk_object_class_add_signals (object_class, signals, LAST_SIGNAL);
|
||||
|
||||
parent_class = gtk_type_class (PARENT_TYPE);
|
||||
|
||||
epv->_get_supported_types = impl_ShellComponent__get_supported_types;
|
||||
epv->_get_external_uri_schemas = impl_ShellComponent__get_external_uri_schemas;
|
||||
epv->setOwner = impl_ShellComponent_set_owner;
|
||||
epv->unsetOwner = impl_ShellComponent_unset_owner;
|
||||
epv->debug = impl_ShellComponent_debug;
|
||||
@ -494,6 +548,8 @@ init (EvolutionShellComponent *shell_component)
|
||||
priv = g_new (EvolutionShellComponentPrivate, 1);
|
||||
|
||||
priv->folder_types = NULL;
|
||||
priv->external_uri_schemas = NULL;
|
||||
|
||||
priv->create_view_fn = NULL;
|
||||
priv->create_folder_fn = NULL;
|
||||
priv->remove_folder_fn = NULL;
|
||||
@ -510,6 +566,7 @@ init (EvolutionShellComponent *shell_component)
|
||||
void
|
||||
evolution_shell_component_construct (EvolutionShellComponent *shell_component,
|
||||
const EvolutionShellComponentFolderType folder_types[],
|
||||
const char *external_uri_schemas[],
|
||||
EvolutionShellComponentCreateViewFn create_view_fn,
|
||||
EvolutionShellComponentCreateFolderFn create_folder_fn,
|
||||
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
|
||||
@ -522,6 +579,8 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component,
|
||||
int i;
|
||||
|
||||
g_return_if_fail (shell_component != NULL);
|
||||
g_return_if_fail (EVOLUTION_IS_SHELL_COMPONENT (shell_component));
|
||||
g_return_if_fail (folder_types != NULL);
|
||||
|
||||
priv = shell_component->priv;
|
||||
|
||||
@ -553,10 +612,17 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component,
|
||||
|
||||
if (priv->folder_types == NULL)
|
||||
g_warning ("No valid folder types constructing EShellComponent %p", shell_component);
|
||||
|
||||
if (external_uri_schemas != NULL) {
|
||||
for (i = 0; external_uri_schemas[i] != NULL; i++)
|
||||
priv->external_uri_schemas = g_list_prepend (priv->external_uri_schemas,
|
||||
g_strdup (external_uri_schemas[i]));
|
||||
}
|
||||
}
|
||||
|
||||
EvolutionShellComponent *
|
||||
evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[],
|
||||
const char *external_uri_schemas[],
|
||||
EvolutionShellComponentCreateViewFn create_view_fn,
|
||||
EvolutionShellComponentCreateFolderFn create_folder_fn,
|
||||
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
|
||||
@ -567,10 +633,13 @@ evolution_shell_component_new (const EvolutionShellComponentFolderType folder_ty
|
||||
{
|
||||
EvolutionShellComponent *new;
|
||||
|
||||
g_return_val_if_fail (folder_types != NULL, NULL);
|
||||
|
||||
new = gtk_type_new (evolution_shell_component_get_type ());
|
||||
|
||||
evolution_shell_component_construct (new,
|
||||
folder_types,
|
||||
external_uri_schemas,
|
||||
create_view_fn,
|
||||
create_folder_fn,
|
||||
remove_folder_fn,
|
||||
|
||||
@ -131,12 +131,16 @@ struct _EvolutionShellComponentClass {
|
||||
const char *evolution_homedir);
|
||||
void (* owner_unset) (EvolutionShellComponent *shell_component);
|
||||
void (* debug) (EvolutionShellComponent *shell_component);
|
||||
|
||||
void (* handle_external_uri) (EvolutionShellComponent *shell_component,
|
||||
const char *uri);
|
||||
};
|
||||
|
||||
|
||||
GtkType evolution_shell_component_get_type (void);
|
||||
void evolution_shell_component_construct (EvolutionShellComponent *shell_component,
|
||||
const EvolutionShellComponentFolderType folder_types[],
|
||||
const char *external_uri_schemas[],
|
||||
EvolutionShellComponentCreateViewFn create_view_fn,
|
||||
EvolutionShellComponentCreateFolderFn create_folder_fn,
|
||||
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
|
||||
@ -145,6 +149,7 @@ void evolution_shell_component_construct (EvolutionShellCom
|
||||
EvolutionShellComponentGetDndSelectionFn get_dnd_selection_fn,
|
||||
void *closure);
|
||||
EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[],
|
||||
const char *external_uri_schemas[],
|
||||
EvolutionShellComponentCreateViewFn create_view_fn,
|
||||
EvolutionShellComponentCreateFolderFn create_folder_fn,
|
||||
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
|
||||
|
||||
@ -211,6 +211,7 @@ factory_fn (BonoboGenericFactory *factory,
|
||||
EvolutionShellComponent *shell_component;
|
||||
|
||||
shell_component = evolution_shell_component_new (folder_types,
|
||||
NULL,
|
||||
create_view_fn,
|
||||
NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user