Add an ::asyncCopyFolder method to the ShellComponent interface. Move

all the message hiding options to the View menu.

svn path=/trunk/; revision=7456
This commit is contained in:
Ettore Perazzoli
2001-01-12 21:00:21 +00:00
parent 9c6f86a43d
commit 936a6d77dd
16 changed files with 139 additions and 62 deletions

View File

@ -1,3 +1,8 @@
2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
* gui/component/addressbook-component.c (factory_fn): Pass NULL as
the @copy_folder_fn arg to `evolution_shell_component_new'.
2001-01-12 Miguel de Icaza <miguel@ximian.com>
* gui/widgets/e-addressbook-view.c: added i18n for etable.

View File

@ -111,7 +111,7 @@ factory_fn (BonoboGenericFactory *factory,
{
EvolutionShellComponent *shell_component;
shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL, NULL);
shell_component = evolution_shell_component_new (folder_types, create_view, NULL, NULL, NULL, NULL, NULL);
gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
GTK_SIGNAL_FUNC (owner_set_cb), NULL);

View File

@ -1,3 +1,8 @@
2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
* gui/component-factory.c (factory_fn): Pass NULL as the
@copy_folder_fn arg to `evolution_shell_component_new()'.
2001-01-12 Miguel de Icaza <miguel@ximian.com>
* gui/e-calendar-table.c: Add translation strings.

View File

@ -128,7 +128,12 @@ factory_fn (BonoboGenericFactory *factory,
EvolutionShellComponent *shell_component;
shell_component = evolution_shell_component_new (folder_types,
create_view, create_folder, NULL, NULL, NULL);
create_view,
create_folder,
NULL, /* remove_folder_fn */
NULL, /* copy_folder_fn */
NULL, /* populate_folder_context_menu_fn */
NULL /* closure */);
gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
GTK_SIGNAL_FUNC (owner_set_cb), NULL);

View File

@ -128,7 +128,12 @@ factory_fn (BonoboGenericFactory *factory,
EvolutionShellComponent *shell_component;
shell_component = evolution_shell_component_new (folder_types,
create_view, create_folder, NULL, NULL, NULL);
create_view,
create_folder,
NULL, /* remove_folder_fn */
NULL, /* copy_folder_fn */
NULL, /* populate_folder_context_menu_fn */
NULL /* closure */);
gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
GTK_SIGNAL_FUNC (owner_set_cb), NULL);

View File

@ -1,3 +1,11 @@
2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
* component/component-factory.c (factory_fn): Pass NULL as the
@copy_folder_fn arg to `evolution_shell_component_new()'.
* evolution-services/executive-summary-component.c
(executive_summary_component_destroy): Remove unused variable.
2001-01-12 Iain Holmes <iain@ximian.com>
* component/e-summary-util.c (e_summary_rm_dir): If base == NULL return;

View File

@ -126,9 +126,7 @@ factory_fn (BonoboGenericFactory *factory,
shell_component = evolution_shell_component_new (folder_types,
create_view,
NULL,
NULL,
NULL,
NULL, NULL, NULL, NULL,
NULL);
gtk_signal_connect (GTK_OBJECT (shell_component), "destroy",
GTK_SIGNAL_FUNC (factory_destroy), NULL);

View File

@ -83,7 +83,6 @@ executive_summary_component_destroy (GtkObject *object)
{
ExecutiveSummaryComponent *component;
ExecutiveSummaryComponentPrivate *priv;
CORBA_Environment ev;
component = EXECUTIVE_SUMMARY_COMPONENT (object);
priv = component->private;

View File

@ -1,3 +1,11 @@
2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
* component-factory.c (component_fn): Pass NULL as the
@copy_folder_fn arg to `evolution_shell_component_new()'.
* folder-browser.c (on_right_click): Removed hide menu. It
belongs to the view menu now.
2001-01-12 Miguel de Icaza <miguel@ximian.com>
* message-list.c: Add strings for localization

View File

@ -248,9 +248,13 @@ component_fn (BonoboGenericFactory *factory, void *closure)
{
EvolutionShellComponent *shell_component;
shell_component = evolution_shell_component_new (
folder_types, create_view, create_folder,
NULL, NULL, NULL);
shell_component = evolution_shell_component_new (folder_types,
create_view,
create_folder,
NULL, /* remove_folder_fn */
NULL, /* copy_folder_fn */
NULL, /* populate_folder_context_menu */
NULL);
gtk_signal_connect (GTK_OBJECT (shell_component), "owner_set",
GTK_SIGNAL_FUNC (owner_set_cb), NULL);

View File

@ -653,20 +653,6 @@ on_right_click (ETable *table, gint row, gint col, GdkEvent *event, FolderBrowse
{ NULL, NULL, NULL, NULL, 0 }
};
EPopupMenu hide_menu[] = {
{ _("Show all hidden"), NULL, GTK_SIGNAL_FUNC (hide_none), NULL, 128 },
{ "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
{ _("Hide selected"), NULL, GTK_SIGNAL_FUNC (hide_selected), NULL, 2 },
{ "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
/* could use another mask, but not enough api do to it */
{ _("Hide read"), NULL, GTK_SIGNAL_FUNC (hide_read), NULL, 0 },
{ _("Hide deleted"), NULL, GTK_SIGNAL_FUNC (hide_deleted), NULL, 0 },
#define HIDE_SUBJECT (6)
{ _("Hide Subject"), NULL, GTK_SIGNAL_FUNC (hide_subject), NULL, 2 },
#define HIDE_SENDER (7)
{ _("Hide from Sender"), NULL, GTK_SIGNAL_FUNC (hide_sender), NULL, 2 },
{ NULL, NULL, NULL, NULL, 0 }
};
EPopupMenu menu[] = {
{ _("Open"), NULL, GTK_SIGNAL_FUNC (view_msg), NULL, 0 },
@ -692,7 +678,6 @@ on_right_click (ETable *table, gint row, gint col, GdkEvent *event, FolderBrowse
{ _("Apply Filters"), NULL, GTK_SIGNAL_FUNC (apply_filters), NULL, 0 },
{ "", NULL, GTK_SIGNAL_FUNC (NULL), NULL, 0 },
{ _("Create Rule From Message"), NULL, GTK_SIGNAL_FUNC (NULL), filter_menu, 2 },
{ _("Hide Messages"), NULL, GTK_SIGNAL_FUNC (NULL), hide_menu, 0 },
{ NULL, NULL, NULL, NULL, 0 }
};
@ -785,27 +770,9 @@ display_menu:
g_free(mailing_list_name);
}
if (subject_match != NULL) {
hide_menu[HIDE_SUBJECT].name = g_strdup_printf(_("Hide Subject \"%s\""), subject_match);
g_free(subject_match);
} else
hide_menu[HIDE_SUBJECT].name = g_strdup(_("Hide Subject"));
if (from_match != NULL) {
hide_menu[HIDE_SENDER].name = g_strdup_printf(_("Hide from Sender <%s>"), from_match);
g_free(from_match);
} else
hide_menu[HIDE_SENDER].name = g_strdup(_("Hide from Sender"));
/* TODO: should probably be a function to say if anything is hidden ... but this is accurate */
if (fb->message_list->hidden == NULL)
enable_mask |= 128;
e_popup_menu_run (menu, (GdkEventButton *)event, enable_mask, 0, fb);
g_free(filter_menu[last_item].name);
g_free(hide_menu[HIDE_SUBJECT].name);
g_free(hide_menu[HIDE_SENDER].name);
return TRUE;
}

View File

@ -1,9 +1,28 @@
2001-01-12 Ettore Perazzoli <ettore@ximian.com>
* evolution-shell-component.c: Add member `copy_folder_fn' to
`EvolutionShellComponentPrivate'.
(init): Init to NULL.
(impl_ShellComponent_async_copy_folder): New function,
implementation for `::asyncCopyFolder'.
(evolution_shell_component_construct): New arg @copy_folder_fn.
Set the corresponding member in `EvolutionShellComponentPrivate'.
(evolution_shell_component_new): New arg @copy_folder_fn. Pass it
to `evolution_shell_component_construct'.
* evolution-shell-component.h: New type
`EvolutionShellComponentCopyFolderFn'.
2001-01-12 Miguel de Icaza <miguel@gnu.org>
* e-splash.c (e_splash_construct): Remove nice toplevel window.
2001-01-12 Ettore Perazzoli <ettore@helixcode.com>
* Evolution-ShellComponent.idl: Add method `::removeFolderAsync'.
2001-01-12 Ettore Perazzoli <ettore@ximian.com>
* evolution-shell-component.c (corba_class_init):
s/addFolderAsync/createFolderAsync/.

View File

@ -57,6 +57,12 @@ module Evolution {
in string physical_uri)
raises (Busy);
void copyFolderAsync (in ShellComponentListener listener,
in string source_physical_uri,
in string destination_physical_uri,
in boolean remove_source)
raises (Busy);
void populateFolderContextMenu (in Bonobo::UIContainer uih,
in string physical_uri,
in string type);

View File

@ -43,6 +43,7 @@ struct _EvolutionShellComponentPrivate {
EvolutionShellComponentCreateViewFn create_view_fn;
EvolutionShellComponentCreateFolderFn create_folder_fn;
EvolutionShellComponentRemoveFolderFn remove_folder_fn;
EvolutionShellComponentCopyFolderFn copy_folder_fn;
EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn;
EvolutionShellClient *owner_client;
@ -266,6 +267,37 @@ impl_ShellComponent_async_remove_folder (PortableServer_Servant servant,
(* priv->remove_folder_fn) (shell_component, physical_uri, listener, priv->closure);
}
static void
impl_ShellComponent_async_copy_folder (PortableServer_Servant servant,
const GNOME_Evolution_ShellComponentListener listener,
const CORBA_char *source_physical_uri,
const CORBA_char *destination_physical_uri,
const CORBA_boolean remove_source,
CORBA_Environment *ev)
{
BonoboObject *bonobo_object;
EvolutionShellComponent *shell_component;
EvolutionShellComponentPrivate *priv;
bonobo_object = bonobo_object_from_servant (servant);
shell_component = EVOLUTION_SHELL_COMPONENT (bonobo_object);
priv = shell_component->priv;
if (priv->copy_folder_fn == NULL) {
GNOME_Evolution_ShellComponentListener_notifyResult (listener,
GNOME_Evolution_ShellComponentListener_UNSUPPORTED_OPERATION,
ev);
return;
}
(* priv->copy_folder_fn) (shell_component,
source_physical_uri,
destination_physical_uri,
remove_source,
listener,
priv->closure);
}
static void
impl_ShellComponent_populate_folder_context_menu (PortableServer_Servant servant,
const Bonobo_UIContainer corba_uih,
@ -405,6 +437,7 @@ init (EvolutionShellComponent *shell_component)
priv->create_view_fn = NULL;
priv->create_folder_fn = NULL;
priv->remove_folder_fn = NULL;
priv->copy_folder_fn = NULL;
priv->populate_folder_context_menu_fn = NULL;
priv->owner_client = NULL;
@ -421,6 +454,7 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component,
EvolutionShellComponentCreateViewFn create_view_fn,
EvolutionShellComponentCreateFolderFn create_folder_fn,
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
EvolutionShellComponentCopyFolderFn copy_folder_fn,
EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn,
void *closure)
{
@ -437,6 +471,7 @@ evolution_shell_component_construct (EvolutionShellComponent *shell_component,
priv->create_view_fn = create_view_fn;
priv->create_folder_fn = create_folder_fn;
priv->remove_folder_fn = remove_folder_fn;
priv->copy_folder_fn = copy_folder_fn;
priv->populate_folder_context_menu_fn = populate_folder_context_menu_fn;
priv->closure = closure;
@ -465,6 +500,7 @@ evolution_shell_component_new (const EvolutionShellComponentFolderType folder_ty
EvolutionShellComponentCreateViewFn create_view_fn,
EvolutionShellComponentCreateFolderFn create_folder_fn,
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
EvolutionShellComponentCopyFolderFn copy_folder_fn,
EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn,
void *closure)
{
@ -479,8 +515,13 @@ evolution_shell_component_new (const EvolutionShellComponentFolderType folder_ty
new = gtk_type_new (evolution_shell_component_get_type ());
corba_object = bonobo_object_activate_servant (BONOBO_OBJECT (new), servant);
evolution_shell_component_construct (new, folder_types, corba_object,
create_view_fn, create_folder_fn, remove_folder_fn,
evolution_shell_component_construct (new,
folder_types,
corba_object,
create_view_fn,
create_folder_fn,
remove_folder_fn,
copy_folder_fn,
populate_folder_context_menu_fn,
closure);

View File

@ -87,6 +87,12 @@ typedef void (* EvolutionShellComponentRemoveFolderFn) (EvolutionShellComponent
const char *physical_uri,
const GNOME_Evolution_ShellComponentListener listener,
void *closure);
typedef void (* EvolutionShellComponentCopyFolderFn) (EvolutionShellComponent *shell_component,
const char *source_physical_uri,
const char *destination_physical_uri,
gboolean remove_source,
const GNOME_Evolution_ShellComponentListener listener,
void *closure);
typedef void (* EvolutionShellComponentPopulateFolderContextMenu) (EvolutionShellComponent *shell_component,
BonoboUIComponent *uic,
const char *physical_uri,
@ -124,12 +130,14 @@ void evolution_shell_component_construct (EvolutionShellCom
EvolutionShellComponentCreateViewFn create_view_fn,
EvolutionShellComponentCreateFolderFn create_folder_fn,
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
EvolutionShellComponentCopyFolderFn copy_folder_fn,
EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn,
void *closure);
EvolutionShellComponent *evolution_shell_component_new (const EvolutionShellComponentFolderType folder_types[],
EvolutionShellComponentCreateViewFn create_view_fn,
EvolutionShellComponentCreateFolderFn create_folder_fn,
EvolutionShellComponentRemoveFolderFn remove_folder_fn,
EvolutionShellComponentCopyFolderFn copy_folder_fn,
EvolutionShellComponentPopulateFolderContextMenu populate_folder_context_menu_fn,
void *closure);
EvolutionShellClient *evolution_shell_component_get_owner (EvolutionShellComponent *shell_component);

View File

@ -6,7 +6,7 @@
_label="_Threaded" _tip="Threaded Message list" type="toggle" />
<cmd name="ViewSource"
_label="_Source" _tip="View Raw Message Source" type="toggle" />
_label="S_ource" _tip="View Raw Message Source" type="toggle" />
</commands>
@ -52,6 +52,16 @@
<menuitem name="Source" verb="ViewSource" accel=""/>
<separator/>
<menuitem name="MessageHideClear" verb="" _label="Show _All Messages"/>
<separator/>
<menuitem name="MessageHideSelected" verb="" _label="Hide S_elected Messages"/>
<menuitem name="MessageHideRead" verb="" _label="Hide _Read messages"/>
<menuitem name="MessageHideDeleted" verb="" _label="Hide _Deleted Messages"/>
</submenu>
<submenu name="Settings">
@ -141,7 +151,7 @@
<separator/>
<submenu name="MessageCreateRuleFromMessage" _label="Create Rule From Message">
<submenu name="MessageCreateRuleFromMessage" _label="Create Rule">
<menuitem name="MessageVFolderSubj" verb=""
_label="_VFolder on Subject"
@ -171,17 +181,6 @@
</submenu>
<submenu name="MessageHide" _label="Hide Messages">
<menuitem name="MessageHideClear" verb="" _label="Show _All messages"/>
<separator/>
<menuitem name="MessageHideSelected" verb="" _label="Hide _Selected messages"/>
<separator/>
<menuitem name="MessageHideRead" verb="" _label="Hide _Read messages"/>
<menuitem name="MessageHideDeleted" verb="" _label="Hide _Deleted messages"/>
</submenu>
</submenu>
<submenu name="Folder" _label="F_older">