From bd1f703edbe882894fb5901d5f8d206dec5e3079 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Wed, 14 May 2003 18:40:01 +0000 Subject: fix up protos 2003-05-14 JP Rosevear * e-summary.h: fix up protos * e-summary.c (e_summary_get_control): accessor (e_summary_set_control): ditto (retrieve_shell_view_interface): util to get the shell view (e_summary_change_current_view): use it (e_summary_set_message): ditto (e_summary_unset_message): ditto * e-summary-mail.h: add proto * e-summary-mail.c (e_summary_mail_get_info): use the objref of the listener (e_summary_folder_unregister_storage): clean up a registered storage (e_summary_folder_register_storages): store the listener directly (folder_info_pb_changed): unref the listener once we are notified (lazy_register_storages): release and unref the property bag, event and listener (e_summary_folder_init_folder_store): track the listener (e_summary_folder_clear_folder_store): cleanup the folder store * e-summary-factory.c (control_activate_cb): we don't get the shell view here any more (e_summary_factory_new_control): don't pass in the shell, set the control on the summary * component-factory.c (owner_unset_cb): clear the folder store on destruction svn path=/trunk/; revision=21177 --- my-evolution/e-summary-factory.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'my-evolution/e-summary-factory.c') diff --git a/my-evolution/e-summary-factory.c b/my-evolution/e-summary-factory.c index 43f7fe5467..6ebaf06e4f 100644 --- a/my-evolution/e-summary-factory.c +++ b/my-evolution/e-summary-factory.c @@ -87,25 +87,6 @@ control_activate_cb (BonoboControl *control, 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, NULL); - 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); @@ -129,7 +110,7 @@ e_summary_factory_new_control (const char *uri, BonoboControl *control; GtkWidget *summary; - summary = e_summary_new (shell, global_preferences); + summary = e_summary_new (global_preferences); if (summary == NULL) { return NULL; } @@ -144,6 +125,8 @@ e_summary_factory_new_control (const char *uri, return NULL; } + e_summary_set_control (summary, control); + g_signal_connect (control, "activate", G_CALLBACK (control_activate_cb), summary); g_signal_connect (control, "destroy", G_CALLBACK (control_destroy_cb), summary); -- cgit v1.2.3