aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2004-04-09 23:47:38 +0800
committerDan Winship <danw@src.gnome.org>2004-04-09 23:47:38 +0800
commitd084ec18e84d91c36dc68d4c336511577d816a7a (patch)
treec7d54a9e925111ed5fbcbc503e71dc4470b7adc7 /mail
parent7f2badb024128819fbb1d2656057c5e476100cd8 (diff)
downloadgsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.tar
gsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.tar.gz
gsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.tar.bz2
gsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.tar.lz
gsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.tar.xz
gsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.tar.zst
gsoc2013-evolution-d084ec18e84d91c36dc68d4c336511577d816a7a.zip
Create an EUserCreatableItemsHandler for the view. (emfv_finalise): Unref
* em-folder-view.c (emfv_init): Create an EUserCreatableItemsHandler for the view. (emfv_finalise): Unref it. (emfv_activate): Activate it * mail-component.c (impl__get_userCreatableItems): add object/folder flags to the items svn path=/trunk/; revision=25380
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/em-folder-view.c10
-rw-r--r--mail/mail-component.c2
3 files changed, 22 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index e44abda8e2..82b977a53a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2004-04-09 Dan Winship <danw@ximian.com>
+
+ * em-folder-view.c (emfv_init): Create an
+ EUserCreatableItemsHandler for the view.
+ (emfv_finalise): Unref it.
+ (emfv_activate): Activate it
+
+ * mail-component.c (impl__get_userCreatableItems): add
+ object/folder flags to the items
+
2004-04-08 Jeffrey Stedfast <fejj@ximian.com>
* em-migrate.c (cp_r): Now takes a pattern argument to limit files
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 0d041d0117..c45c4f8cc2 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -55,6 +55,7 @@
#include <bonobo/bonobo-ui-util.h>
#include "widgets/misc/e-charset-picker.h"
+#include "shell/e-user-creatable-items-handler.h"
#include <e-util/e-dialog-utils.h>
@@ -117,6 +118,8 @@ struct _EMFolderViewPrivate {
GtkWidget *invisible;
char *selection_uri;
+
+ EUserCreatableItemsHandler *creatable_items_handler;
};
static GtkVBoxClass *emfv_parent;
@@ -173,6 +176,8 @@ emfv_init(GObject *o)
emfv->async = mail_async_event_new();
+ p->creatable_items_handler = e_user_creatable_items_handler_new ("mail");
+
emfv_setting_setup(emfv);
}
@@ -192,6 +197,9 @@ emfv_finalise(GObject *o)
g_free(emfv->folder_uri);
}
+ if (p->creatable_items_handler)
+ g_object_unref (p->creatable_items_handler);
+
g_slist_free(emfv->ui_files);
g_slist_free(emfv->enable_map);
@@ -1647,6 +1655,8 @@ emfv_activate(EMFolderView *emfv, BonoboUIComponent *uic, int act)
emfv_enable_menus(emfv);
if (emfv->statusbar_active)
bonobo_ui_component_set_translate (uic, "/", "<status><item name=\"main\"/></status>", NULL);
+
+ e_user_creatable_items_handler_activate (emfv->priv->creatable_items_handler, uic);
} else {
const BonoboUIVerb *v;
diff --git a/mail/mail-component.c b/mail/mail-component.c
index ee1bfccc74..58648a9cbd 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -622,6 +622,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment
list->_buffer[0].tooltip = _("Compose a new mail message");
list->_buffer[0].menuShortcut = 'm';
list->_buffer[0].iconName = "new-message.xpm";
+ list->_buffer[0].type = GNOME_Evolution_CREATABLE_OBJECT;
list->_buffer[1].id = "folder";
list->_buffer[1].description = _("New Mail Folder");
@@ -629,6 +630,7 @@ impl__get_userCreatableItems (PortableServer_Servant servant, CORBA_Environment
list->_buffer[1].tooltip = _("Create a new mail folder");
list->_buffer[1].menuShortcut = 'f';
list->_buffer[1].iconName = "folder-mini.png";
+ list->_buffer[1].type = GNOME_Evolution_CREATABLE_FOLDER;
return list;
}