aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-notebook-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-20 01:32:26 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-20 01:41:14 +0800
commitd305e8ff1052c9ec109a0d220c05c669e2180662 (patch)
treee4bfa16c9165be5159b0a07f5d0e006f20f30019 /mail/e-mail-notebook-view.c
parent689bb1148d8494b71036f9dcce8a9f79b53cbfe6 (diff)
downloadgsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.gz
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.bz2
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.lz
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.xz
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.tar.zst
gsoc2013-evolution-d305e8ff1052c9ec109a0d220c05c669e2180662.zip
Reduce GConf usage in em-composer-utils.c.
To reduce GConf usage in em-composer-utils.c: - Relevant functions in em-composer-utils.c now take arguments for reply and forward styles. - Redundant forwarding functions were removed: em_utils_forward_attached() em_utils_forward_inline() em_utils_forward_quoted() - EMailReader now has "forward-style" and "reply-style" properties, which get bound to the appropriate EShellSettings properties in modules/mail/e-mail-config-reader.c. These same EShellSettings properties are bound to the combo boxes in Composer Preferences.
Diffstat (limited to 'mail/e-mail-notebook-view.c')
-rw-r--r--mail/e-mail-notebook-view.c51
1 files changed, 49 insertions, 2 deletions
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c
index 9b0d36076b..1fd9c73a23 100644
--- a/mail/e-mail-notebook-view.c
+++ b/mail/e-mail-notebook-view.c
@@ -64,7 +64,9 @@ struct _EMailNotebookViewPrivate {
enum {
PROP_0,
+ PROP_FORWARD_STYLE,
PROP_GROUP_BY_THREADS,
+ PROP_REPLY_STYLE
};
#define E_SHELL_WINDOW_ACTION_GROUP_MAIL(window) \
@@ -573,12 +575,28 @@ mail_notebook_view_set_property (GObject *object,
const GValue *value,
GParamSpec *pspec)
{
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (object);
+
switch (property_id) {
+ case PROP_FORWARD_STYLE:
+ e_mail_reader_set_forward_style (
+ E_MAIL_READER (priv->current_view),
+ g_value_get_enum (value));
+ return;
+
case PROP_GROUP_BY_THREADS:
e_mail_reader_set_group_by_threads (
- E_MAIL_READER (E_MAIL_NOTEBOOK_VIEW (object)->priv->current_view),
+ E_MAIL_READER (priv->current_view),
g_value_get_boolean (value));
return;
+
+ case PROP_REPLY_STYLE:
+ e_mail_reader_set_reply_style (
+ E_MAIL_READER (priv->current_view),
+ g_value_get_enum (value));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -590,14 +608,31 @@ mail_notebook_view_get_property (GObject *object,
GValue *value,
GParamSpec *pspec)
{
+ EMailNotebookViewPrivate *priv;
+
+ priv = E_MAIL_NOTEBOOK_VIEW_GET_PRIVATE (object);
+
switch (property_id) {
+ case PROP_FORWARD_STYLE:
+ g_value_set_enum (
+ value,
+ e_mail_reader_get_forward_style (
+ E_MAIL_READER (priv->current_view)));
+ return;
+
case PROP_GROUP_BY_THREADS:
g_value_set_boolean (
value,
e_mail_reader_get_group_by_threads (
- E_MAIL_READER (E_MAIL_NOTEBOOK_VIEW (object)->priv->current_view)));
+ E_MAIL_READER (priv->current_view)));
return;
+ case PROP_REPLY_STYLE:
+ g_value_set_enum (
+ value,
+ e_mail_reader_get_reply_style (
+ E_MAIL_READER (priv->current_view)));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -1255,8 +1290,20 @@ e_mail_notebook_view_class_init (EMailNotebookViewClass *class)
/* Inherited from EMailReader */
g_object_class_override_property (
object_class,
+ PROP_FORWARD_STYLE,
+ "forward-style");
+
+ /* Inherited from EMailReader */
+ g_object_class_override_property (
+ object_class,
PROP_GROUP_BY_THREADS,
"group-by-threads");
+
+ /* Inherited from EMailReader */
+ g_object_class_override_property (
+ object_class,
+ PROP_REPLY_STYLE,
+ "reply-style");
}
static void