diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2008-05-09 02:11:40 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-05-09 02:11:40 +0800 |
commit | 116ed5dcc7bc07fc9a2e78aef4231bfe25fa9d0a (patch) | |
tree | 49a7516e812c322167681a65bfdca0285b336733 /composer | |
parent | 3986fb032adb5b40ae86624f209524b3273d0148 (diff) | |
download | gsoc2013-evolution-116ed5dcc7bc07fc9a2e78aef4231bfe25fa9d0a.tar.gz gsoc2013-evolution-116ed5dcc7bc07fc9a2e78aef4231bfe25fa9d0a.tar.zst gsoc2013-evolution-116ed5dcc7bc07fc9a2e78aef4231bfe25fa9d0a.zip |
** Fixes bug #525241 (EPluginUI)
2008-05-08 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #525241 (EPluginUI)
* e-util/Makefile.am:
Add e-plugin-ui.[ch].
* e-util/e-plugin.h (EPluginClass):
Add a "get_symbol" method for extracting arbitrary symbols
from an EPlugin. Implementation of the method is optional.
* e-util/e-plugin.c (e_plugin_get_symbol):
New function invokes the new "get_symbol" EPlugin method.
* e-util/e-plugin.c (epl_get_symbol):
New function implements the new "get_symbol" EPlugin method.
It extracts the given symbol name from the GModule.
* e-util/e-plugin-ui.[ch]:
New EPluginHook subclass that allows plugins to extend menus,
toolbars, and popups that are managed by GtkUIManager instead
of BonoboUI. Should eventually replace EMenu/EPopup.
* shell/main.c (main): Register the EPluginUIHook type.
* composer/e-msg-composer.c (msg_composer_destroy),
(msg_composer_init): Rip out the EMenu logic.
* composer/e-msg-composer.c (msg_composer_init):
Register the GtkUIManager with EPluginUI.
* plugins/face/Makefile.am:
* plugins/face/org-gnome-face-ui.xml:
Remove org-gnome-face-ui.xml (obsolete).
* plugins/face/face.c (e_plugin_ui_init):
Initialization callback for EPluginUI. Adds a "face" action to
the EMsgComposer instance's "composer" action group.
* plugins/face/org-gnome-face.eplug.xml:
Replace the "bonobomenu" hook definition with a new one for
EPluginUI. Include the UI definition inline.
svn path=/trunk/; revision=35485
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 10 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 41 |
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 |