/* * e-summary-factory.c: Executive Summary Factory. * * Copyright (C) 2001 Ximian, Inc. * * Authors: Iain Holmes */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "e-util/e-gui-utils.h" #include "e-summary.h" #include "e-summary-factory.h" #include "e-summary-offline-handler.h" #include "e-summary-preferences.h" #include "evolution-shell-component-utils.h" /* For E_PIXMAP */ BonoboUIVerb verbs[] = { BONOBO_UI_VERB ("PrintMyEvolution", e_summary_print), BONOBO_UI_VERB ("ToolsSettings", e_summary_configure), BONOBO_UI_VERB_END }; static EPixmap pixmaps [] = { E_PIXMAP ("/commands/PrintMyEvolution", "print.xpm"), E_PIXMAP ("/commands/ToolsSettings", "configure_16_mail.xpm"), E_PIXMAP ("/Toolbar/PrintMyEvolution", "buttons/print.png"), E_PIXMAP_END }; static void control_activate (BonoboControl *control, BonoboUIComponent *ui_component, ESummary *summary) { Bonobo_UIContainer container; container = bonobo_control_get_remote_ui_container (control); bonobo_ui_component_set_container (ui_component, container); bonobo_object_release_unref (container, NULL); bonobo_ui_component_add_verb_list_with_data (ui_component, verbs, summary); bonobo_ui_component_freeze (ui_component, NULL); bonobo_ui_util_set_ui (ui_component, EVOLUTION_DATADIR, "my-evolution.xml", "my-evolution"); e_pixmaps_update (ui_component, pixmaps); bonobo_ui_component_thaw (ui_component, NULL); } static void control_deactivate (BonoboControl *control, BonoboUIComponent *ui_component, ESummary *summary) { bonobo_ui_component_unset_container (ui_component); } static void control_activate_cb (BonoboControl *control, gboolean activate, ESummary *summary) { BonoboUIComponent *ui_component; ui_component = bonobo_control_get_ui_component (control); if (summary->shell_view_interface == NULL) { Bonobo_ControlFrame control_frame; CORBA_Environment ev; control_frame = bonobo_control_get_control_frame (control); if (control_frame == NULL) { goto out; } CORBA_exception_init (&ev); summary->shell_view_interface = Bonobo_Unknown_queryInterface (control_frame, "IDL:GNOME/Evolution/ShellView:1.0", &ev); if (BONOBO_EX (&ev)) { g_warning ("Error getting ShellView. %s", CORBA_exception_id (&ev)); summary->shell_view_interface = CORBA_OBJECT_NIL; } CORBA_exception_free (&ev); } out: if (activate) control_activate (control, ui_component, summary); else control_deactivate (control, ui_component, summary); } static void control_destroy_cb (BonoboControl *control, ESummary *summary) { gtk_object_destroy (GTK_OBJECT (summary)); } BonoboControl * e_summary_factory_new_control (const char *uri, const GNOME_Evolution_Shell shell, ESummaryOfflineHandler *handler) { BonoboControl *control; GtkWidget *summary; summary = e_summary_new (shell); if (summary == NULL) { return NULL; } e_summary_offline_handler_set_summary (handler, E_SUMMARY (summary)); gtk_widget_show (summary); control = bonobo_control_new (summary); if (control == NULL) { gtk_object_destroy (GTK_OBJECT (summary)); return NULL; } gtk_signal_connect (GTK_OBJECT (control), "activate", control_activate_cb, summary); gtk_signal_connect (GTK_OBJECT (control), "destroy", control_destroy_cb, summary); return control; } n value='dependabot/npm_and_yarn/luxon-1.28.1'>dependabot/npm_and_yarn/luxon-1.28.1 Tangerine fork of MetaMask browser extension (https://github.com/tangerine-network/tangerine-wallet-browser)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Add support for async/awaitDan Finlay2017-05-131-1/+1
* Add mocha and chai plugins eslintThomas Huang2017-05-051-1/+4
* Add debug logging to ui routing logic.Dan Finlay2017-02-211-0/+1
* lint -ignore extra spaces before values in obj expressionkumavis2017-01-271-1/+1
* Merge branch 'i328-MultiVault-v1' into i715-AddImportMenuDan Finlay2017-01-181-0/+1
|\
| * Develop import subviewsDan Finlay2016-11-051-0/+1
* | lint - warn on unhandled errkumavis2017-01-121-2/+2
* | Fix lint rules for ternary operator placement.Kevin Serrano2016-11-121-1/+1
|/
* Linted & added salting to vaultDan Finlay2016-10-211-1/+1
* soften lint warningskumavis2016-09-161-2/+2
* Fix extension testsDan Finlay2016-07-261-1/+1
* Implement some cross-browser practices (#473)Dan Finlay2016-07-221-1/+0
* stop pedantic lintingkumavis2016-06-241-4/+4
* Auto lintedDan Finlay2016-06-221-1/+0
* Turn spaces back onDan Finlay2016-06-221-2/+2
* Some manual fixesDan Finlay2016-06-221-3/+3