aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog10
-rw-r--r--composer/e-msg-composer.c41
2 files changed, 20 insertions, 31 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 6622aec517..d1fa8ef034 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,13 @@
+2008-05-08 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #525241 (EPluginUI)
+
+ * e-msg-composer.c (msg_composer_destroy), (msg_composer_init):
+ Rip out the EMenu logic.
+
+ * e-msg-composer.c (msg_composer_init):
+ Register the GtkUIManager with EPluginUI.
+
2008-05-06 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #424744
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 2aaffba0d4..2dbfcc92d4 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -69,6 +69,7 @@
#include "misc/e-charset-picker.h"
#include "misc/e-expander.h"
#include "e-util/e-error.h"
+#include "e-util/e-plugin-ui.h"
#include "e-util/e-util-private.h"
#include "e-util/e-util.h"
#include <mail/em-event.h>
@@ -2183,14 +2184,6 @@ msg_composer_destroy (GtkObject *object)
all_composers = g_slist_remove (all_composers, object);
-#if 0 /* GTKHTML-EDITOR */
- if (composer->priv->menu) {
- e_menu_update_target ((EMenu *)composer->priv->menu, NULL);
- g_object_unref (composer->priv->menu);
- composer->priv->menu = NULL;
- }
-#endif
-
if (composer->priv->address_dialog != NULL) {
gtk_widget_destroy (composer->priv->address_dialog);
composer->priv->address_dialog = NULL;
@@ -2724,17 +2717,18 @@ static void
msg_composer_init (EMsgComposer *composer)
{
EComposerHeaderTable *table;
-#if 0 /* GTKHTML-EDITOR */
- EMMenuTargetWidget *target;
-#endif
+ GtkUIManager *manager;
+ GtkhtmlEditor *editor;
GtkHTML *html;
composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
e_composer_private_init (composer);
+ editor = GTKHTML_EDITOR (composer);
+ html = gtkhtml_editor_get_html (editor);
+ manager = gtkhtml_editor_get_ui_manager (editor);
all_composers = g_slist_prepend (all_composers, composer);
- html = gtkhtml_editor_get_html (GTKHTML_EDITOR (composer));
table = E_COMPOSER_HEADER_TABLE (composer->priv->header_table);
gtk_window_set_title (GTK_WINDOW (composer), _("Compose Message"));
@@ -2751,24 +2745,6 @@ msg_composer_init (EMsgComposer *composer)
html, "drag-data-received",
G_CALLBACK (msg_composer_drag_data_received), NULL);
- /* Plugin Support */
-
-#if 0 /* GTKHTML-EDITOR */
- /** @HookPoint-EMMenu: Main Mail Menu
- * @Id: org.gnome.evolution.mail.composer
- * @Class: org.gnome.evolution.mail.bonobomenu:1.0
- * @Target: EMMenuTargetWidget
- *
- * The main menu of the composer window. The widget of the
- * target will point to the EMsgComposer object.
- */
- composer->priv->menu = em_menu_new ("org.gnome.evolution.mail.composer");
- target = em_menu_target_new_widget (p->menu, (GtkWidget *)composer);
- e_menu_update_target ((EMenu *)p->menu, target);
- e_menu_activate ((EMenu *)p->menu, p->uic, TRUE);
-
-#endif
-
/* Configure Headers */
e_composer_header_table_set_account_list (
@@ -2824,7 +2800,10 @@ msg_composer_init (EMsgComposer *composer)
e_composer_autosave_register (composer);
/* Initialization may have tripped the "changed" state. */
- gtkhtml_editor_set_changed (GTKHTML_EDITOR (composer), FALSE);
+ gtkhtml_editor_set_changed (editor, FALSE);
+
+ e_plugin_ui_register_manager (
+ "org.gnome.evolution.composer", manager, composer);
}
GType