* evolution-folder-selector-button.c: New widget for a button that displays a folder selection in a standard form, and when clicked lets the user select a new folder. * Evolution-Shell.idl (FolderSelectionListener:notifySelected): Make this take an Evolution:Folder instead of a pair of uris. (Shell:getIconByType): New method to get the icon for a type from the folder type registry. * Evolution-common.idl (Folder): add "evolutionUri" to the folder structure. * Evolution-Storage.idl (StorageRegistry:getFolderByUri): get an Evolution:Folder for a given uri. * evolution-shell-client.c (evolution_shell_client_user_select_folder): Update this to reflect the IDL change: return a GNOME_Evolution_Folder instead of a pair of URIs. Make sure it always sets *@folder_return to %NULL if it fails (even if it's a g_return_if_fail). (evolution_shell_client_get_storage_registry_interface): New. (evolution_shell_client_get_pixbuf_for_type): New. Uses Shell_getIconByType, but caches results. * e-shell.c (folder_selection_dialog_folder_selected_cb): Update for API change. (Return a GNOME_Evolution_Folder.) (impl_Shell_getIconByType): Implement. * e-corba-storage-registry.c (impl_StorageRegistry_getFolderByUri): Implement. * evolution-storage.c (evolution_storage_new_folder): Add a (dummy) evolutionUri to the folder. * Makefile.am (libeshell_la_SOURCES): add evolution-folder-selector-button.c (eshellinclude_HEADERS): and .h svn path=/trunk/; revision=16352
140 lines
3.8 KiB
Plaintext
140 lines
3.8 KiB
Plaintext
/* -*- Mode: IDL; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
/*
|
|
* Interface for the Evolution shell.
|
|
*
|
|
* Authors:
|
|
* Ettore Perazzoli <ettore@ximian.com>
|
|
*
|
|
* Copyright (C) 2000, 2001 Ximian, Inc.
|
|
*/
|
|
|
|
#include <Bonobo.idl>
|
|
|
|
module GNOME {
|
|
module Evolution {
|
|
interface ShellComponent;
|
|
|
|
interface FolderSelectionListener;
|
|
|
|
interface Shell : Bonobo::Unknown {
|
|
exception NotReady {};
|
|
exception NotFound {};
|
|
exception UnsupportedSchema {};
|
|
exception InvalidURI {};
|
|
exception InternalError {};
|
|
exception Busy {};
|
|
|
|
typedef sequence<string> FolderTypeNameList;
|
|
|
|
/* The X display name. */
|
|
readonly attribute string displayName;
|
|
|
|
/**
|
|
* getComponentByType:
|
|
* @type: name of a valid folder type
|
|
*
|
|
* Get the shell component associated with a specific folder type.
|
|
*
|
|
* Return value: the Evolution::ShellComponent interface for the component that
|
|
* handles @type.
|
|
*/
|
|
ShellComponent getComponentByType (in string type)
|
|
raises (NotReady, NotFound);
|
|
|
|
/**
|
|
* getIconByType:
|
|
* @type: name of a valid folder type
|
|
* @mini: whether or not to get a mini (16x16) icon
|
|
*
|
|
* Get an icon associated with a specific folder type.
|
|
*
|
|
* Return value: an Evolution::Icon interface for the
|
|
* component that handles @type.
|
|
*/
|
|
Icon getIconByType (in string type,
|
|
in boolean mini)
|
|
raises (NotReady, NotFound);
|
|
|
|
/**
|
|
* createNewView:
|
|
* @uri: URI for the view to open
|
|
*
|
|
* Return value: the new view.
|
|
*/
|
|
ShellView createNewView (in string uri)
|
|
raises (NotReady, NotFound, UnsupportedSchema, InvalidURI, InternalError);
|
|
|
|
/**
|
|
* handleURI:
|
|
* @uri: URI to handle
|
|
*
|
|
* This handles the specified URI. It is different from
|
|
* `::createNewView' as it doesn't necessarily imply creating a
|
|
* new ShellView. (For example, a `mailto:' URI will invoke
|
|
* the message composer.)
|
|
*/
|
|
void handleURI (in string uri)
|
|
raises (NotReady, NotFound, UnsupportedSchema, InvalidURI, InternalError);
|
|
|
|
/**
|
|
* selectUserFolder:
|
|
* @parent_xid: XID for the parent window (or zero if no parent window).
|
|
* @listener: a listener interface to report the answer of the user.
|
|
* @title: title for the folder selector dialog
|
|
* @default_folder: physical or `evolution:' URI for the folder that must be
|
|
* selected by default, when the dialog is popped up
|
|
* @possible_types: list of the names of the types of folders that are allowed
|
|
*
|
|
* Pop up a folder selection dialog from which the user can select a folder.
|
|
* Initially, the @default_folder is selected. The user can also create a new
|
|
* folder by using the "New..." button. The dialog only lets the user choose
|
|
* a folder whose type is listed in @possible_types.
|
|
*/
|
|
void selectUserFolder (in long long parent_xid,
|
|
in FolderSelectionListener listener,
|
|
in string title,
|
|
in string default_folder,
|
|
in FolderTypeNameList possible_types,
|
|
in string default_type)
|
|
raises (NotReady, Busy);
|
|
|
|
/**
|
|
* getLocalStorage:
|
|
*
|
|
* Get the interface to the local storage.
|
|
*
|
|
* FIXME: Probably we just want to be able to request this to
|
|
* the StorageRegistry. This is an ugly kludge.
|
|
*
|
|
* Return value: the `Evolution::LocalStorage' interface for
|
|
* the local storage. */
|
|
Storage getLocalStorage ()
|
|
raises (NotReady);
|
|
|
|
/**
|
|
* createStorageSetView:
|
|
*
|
|
* Create a control for the storage set view. This control
|
|
* will also implement the `Evolution::StorageSetView' interface.
|
|
*
|
|
* Return value: the newly created control.
|
|
*/
|
|
Bonobo::Control createStorageSetView ()
|
|
raises (NotReady);
|
|
|
|
/**
|
|
* setLineStatus:
|
|
*
|
|
* Set the shell into on-line or off-line mode.
|
|
*/
|
|
void setLineStatus (in boolean online)
|
|
raises (NotReady);
|
|
};
|
|
|
|
interface FolderSelectionListener {
|
|
void notifySelected (in Folder folder);
|
|
void notifyCanceled ();
|
|
};
|
|
};
|
|
};
|