evolution r35315 - branches/gnome-2-22/composer
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35315 - branches/gnome-2-22/composer
- Date: Thu, 3 Apr 2008 14:39:28 +0100 (BST)
Author: mcrha
Date: Thu Apr 3 14:39:28 2008
New Revision: 35315
URL: http://svn.gnome.org/viewvc/evolution?rev=35315&view=rev
Log:
2008-04-03 Michel Danzer <daenzer debian org>
** Fix for bug #525522
* e-msg-composer-hdrs.c: (hdrs_changed), (from_changed),
(subject_changed), (msg_composer_hdrs_init):
Hook signals to notice changes in headers and subject line.
Modified:
branches/gnome-2-22/composer/ChangeLog
branches/gnome-2-22/composer/e-msg-composer-hdrs.c
Modified: branches/gnome-2-22/composer/e-msg-composer-hdrs.c
==============================================================================
--- branches/gnome-2-22/composer/e-msg-composer-hdrs.c (original)
+++ branches/gnome-2-22/composer/e-msg-composer-hdrs.c Thu Apr 3 14:39:28 2008
@@ -87,6 +87,12 @@
static guint signal_ids[LAST_SIGNAL];
static void
+hdrs_changed (EMsgComposerHdrs *hdrs)
+{
+ g_signal_emit (hdrs, signal_ids[HDRS_CHANGED], 0);
+}
+
+static void
from_changed (EComposerFromHeader *from_header, EMsgComposerHdrs *hdrs)
{
EComposerHeader *header;
@@ -105,6 +111,7 @@
E_COMPOSER_TEXT_HEADER (header), account->id->reply_to);
g_signal_emit (hdrs, signal_ids[FROM_CHANGED], 0);
+ hdrs_changed (hdrs);
}
static void
@@ -114,6 +121,14 @@
}
static void
+subject_changed (EMsgComposerHdrs *hdrs)
+{
+ g_signal_emit (hdrs, signal_ids[SUBJECT_CHANGED], 0,
+ e_msg_composer_hdrs_get_subject (hdrs));
+ hdrs_changed (hdrs);
+}
+
+static void
headers_set_visibility (EMsgComposerHdrs *h, int visible_flags)
{
EMsgComposerHdrsPrivate *p = h->priv;
@@ -330,17 +345,26 @@
hdrs->priv->headers[HEADER_FROM] = header;
header = e_composer_text_header_new_label (_("_Reply-To:"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_REPLY_TO] = header;
header = e_composer_name_header_new (_("_To:"), name_selector);
e_composer_header_set_input_tooltip (
header, _("Enter the recipients of the message"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_TO] = header;
header = e_composer_name_header_new (_("_Cc:"), name_selector);
e_composer_header_set_input_tooltip (
header, _("Enter the addresses that will receive a "
"carbon copy of the message"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_CC] = header;
header = e_composer_name_header_new (_("_Bcc:"), name_selector);
@@ -348,12 +372,21 @@
header, _("Enter the addresses that will receive a "
"carbon copy of the message without appearing in the "
"recipient list of the message"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_BCC] = header;
header = e_composer_post_header_new (_("_Post To:"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (hdrs_changed), hdrs);
hdrs->priv->headers[HEADER_POST_TO] = header;
header = e_composer_text_header_new_label (_("S_ubject:"));
+ g_signal_connect_swapped (
+ header, "changed",
+ G_CALLBACK (subject_changed), hdrs);
hdrs->priv->headers[HEADER_SUBJECT] = header;
/* Do this after all the headers are initialized. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]