aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-11-13 19:55:12 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-11-13 19:55:12 +0800
commit54dd1725f9db3c57275a222607899b0c4ac94ea4 (patch)
treea48577a47e5afae6f3bc860b1f77b5ca003ecec2 /mail
parent92d3c8fd83fde93e105019deeef9d52b7f876a8e (diff)
downloadgsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.tar
gsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.tar.gz
gsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.tar.bz2
gsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.tar.lz
gsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.tar.xz
gsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.tar.zst
gsoc2013-evolution-54dd1725f9db3c57275a222607899b0c4ac94ea4.zip
(impl__get_userCreatableItems): New,
implementation for the Component.userCreatableItems attribute. (impl_requestCreateItem): New, implementation for the Component.requestCreateItem() method. (mail_component_class_init): Install. svn path=/trunk/; revision=23321
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/mail-component.c41
2 files changed, 48 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ee17da9db2..0413bf7094 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2003-11-13 Ettore Perazzoli <ettore@ximian.com>
+
+ * mail-component.c (impl__get_userCreatableItems): New,
+ implementation for the Component.userCreatableItems attribute.
+ (impl_requestCreateItem): New, implementation for the
+ Component.requestCreateItem() method.
+ (mail_component_class_init): Install.
+
2003-11-13 Radek Doulik <rodo@ximian.com>
* em-junk-filter.c (em_junk_sa_is_available): new helper function,
diff --git a/mail/mail-component.c b/mail/mail-component.c
index ea20dae624..12cc03ca78 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -972,6 +972,43 @@ impl_createControls (PortableServer_Servant servant,
}
+static GNOME_Evolution_CreatableItemTypeList *
+impl__get_userCreatableItems (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ GNOME_Evolution_CreatableItemTypeList *list = GNOME_Evolution_CreatableItemTypeList__alloc ();
+
+ list->_length = 1;
+ list->_maximum = list->_length;
+ list->_buffer = GNOME_Evolution_CreatableItemTypeList_allocbuf (list->_length);
+
+ CORBA_sequence_set_release (list, FALSE);
+
+ list->_buffer[0].id = "message";
+ list->_buffer[0].description = _("New Mail Message");
+ list->_buffer[0].menuDescription = _("_Mail Message");
+ list->_buffer[0].tooltip = _("Compose a new mail message");
+ list->_buffer[0].menuShortcut = 'm';
+ list->_buffer[0].iconName = "new-message.xpm";
+
+ return list;
+}
+
+static void
+impl_requestCreateItem (PortableServer_Servant servant,
+ const CORBA_char *item_type_name,
+ CORBA_Environment *ev)
+{
+ if (strcmp (item_type_name, "message") != 0) {
+ CORBA_exception_set (ev, CORBA_USER_EXCEPTION,
+ ex_GNOME_Evolution_Component_UnknownType, NULL);
+ return;
+ }
+
+ em_utils_compose_new_message ();
+}
+
+
/* Initialization. */
static void
@@ -985,7 +1022,9 @@ mail_component_class_init (MailComponentClass *class)
object_class->dispose = impl_dispose;
object_class->finalize = impl_finalize;
- epv->createControls = impl_createControls;
+ epv->createControls = impl_createControls;
+ epv->_get_userCreatableItems = impl__get_userCreatableItems;
+ epv->requestCreateItem = impl_requestCreateItem;
}
static void