gboolean eex_ui_composer_actions (GtkUIManager *manager, EMsgComposer *composer) { static GtkActionEntry entries[] = { { "eex-send-options", NULL, N_("_Send Options"), NULL, N_("Insert Send options"), G_CALLBACK (action_send_options_cb) } }; GtkhtmlEditor *editor; EComposerHeaderTable *headers; EComposerHeader *header; editor = GTKHTML_EDITOR (composer); /* Add actions to the "composer" action group. */ e_action_group_add_actions_localized ( gtkhtml_editor_get_action_group (editor, "composer"), GETTEXT_PACKAGE, entries, G_N_ELEMENTS (entries), composer); headers = e_msg_composer_get_header_table (composer); header = e_composer_header_table_get_header (headers, E_COMPOSER_HEADER_FROM); from_changed_cb (E_COMPOSER_FROM_HEADER (header), composer); g_signal_connect (G_OBJECT (header), "changed", G_CALLBACK (from_changed_cb), composer); return TRUE; }
static void setup_source_actions (EShellView *shell_view, GtkActionEntry *entries) { EShellWindow *shell_window; const gchar *group; g_return_if_fail (shell_view != NULL); g_return_if_fail (entries != NULL); if (strstr (entries->name, "calendar")) group = "calendar"; else if (strstr (entries->name, "tasks")) group = "tasks"; else group = "contacts"; shell_window = e_shell_view_get_shell_window (shell_view); e_action_group_add_actions_localized ( e_shell_window_get_action_group (shell_window, group), GETTEXT_PACKAGE, entries, NUM_ENTRIES, shell_view); g_signal_connect (shell_view, "update-actions", G_CALLBACK (update_source_entries_cb), entries); }
gboolean eex_ui_mail_init (GtkUIManager *ui_manager, EShellView *shell_view) { EShellWindow *shell_window; shell_window = e_shell_view_get_shell_window (shell_view); e_action_group_add_actions_localized ( e_shell_window_get_action_group (shell_window, "mail"), GETTEXT_PACKAGE, mail_entries, G_N_ELEMENTS (mail_entries), shell_view); g_signal_connect (shell_view, "update-actions", G_CALLBACK (update_mail_entries_cb), NULL); return TRUE; }
gboolean gw_ui_calendar_event_popup (GtkUIManager *ui_manager, EShellView *shell_view) { EShellWindow *shell_window; GtkActionGroup *action_group; shell_window = e_shell_view_get_shell_window (shell_view); action_group = e_shell_window_get_action_group (shell_window, "calendar"); e_action_group_add_actions_localized ( action_group, GETTEXT_PACKAGE, cal_entries, G_N_ELEMENTS (cal_entries), shell_view); g_signal_connect (shell_view, "update-actions", G_CALLBACK (update_cal_entries_cb), NULL); return TRUE; }