From 935bc4be0779919b5611f64bf01675901a3b6f1d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 27 Aug 2010 15:44:25 -0400 Subject: Bug 628141 - Duplicate signal connections in EMailReader EMailShellContent implements the EMailReader interface but acts as a proxy for EMailPanedView, from which it obtains MessageList and EWebView widgets. The problem was both classes call e_mail_reader_init_private() which connects to signals emitted from the MessageList and EWebView widgets. But since EMailShellContent is a proxy for EMailPanedView, the signals were being connected twice. This commit does away with e_mail_reader_init_private(), instead adding options to e_mail_reader_init() to control what parts of initialization to run. It's an ugly and temporary hack. I'm beginning to realize EMailReader is too bloated and needs rethought. EMailReader should just manage actions. EMailView should own and manage the widgets, and EMailReader should just have a get_mail_view() method so it has access to those widgets. That way the EMailView subclasses won't have to implement EMailReader themselves and wind up allocating a bunch of duplicate, unused actions. It's too close to a stable release to rip these interfaces apart and reorganize them. I'll try to do that for 2.33 to help make the design more intuitive. --- mail/e-mail-browser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mail/e-mail-browser.c') diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c index 2ace9e4dd6..34b4313a6f 100644 --- a/mail/e-mail-browser.c +++ b/mail/e-mail-browser.c @@ -543,7 +543,7 @@ mail_browser_constructed (GObject *object) web_view, "status-message", G_CALLBACK (mail_browser_status_message_cb), object); - e_mail_reader_init (reader); + e_mail_reader_init (reader, TRUE, TRUE); action_group = priv->action_group; gtk_action_group_set_translation_domain (action_group, domain); -- cgit v1.2.3