aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@novell.com>2010-05-01 04:30:58 +0800
committerFederico Mena Quintero <federico@novell.com>2010-05-01 06:38:28 +0800
commitabd1b7ef77b5dc8ff7ff1c6c405aaf448828c1b9 (patch)
tree53c0ca0b20c1b9cee8412da9382f1f59b1292257
parentdbbeab8bd0417702a182764386f727d27194774b (diff)
downloadgsoc2013-evolution-abd1b7ef77b5dc8ff7ff1c6c405aaf448828c1b9.tar.gz
gsoc2013-evolution-abd1b7ef77b5dc8ff7ff1c6c405aaf448828c1b9.tar.zst
gsoc2013-evolution-abd1b7ef77b5dc8ff7ff1c6c405aaf448828c1b9.zip
Use e_msg_composer_get_lite() instead of a global variable or struct fields
This will also make 'grep' easier when we remove the lite stuff by refactoring. Signed-off-by: Federico Mena Quintero <federico@novell.com>
-rw-r--r--composer/e-composer-header-table.c17
-rw-r--r--composer/e-composer-private.c8
-rw-r--r--composer/e-msg-composer.c1
-rw-r--r--composer/e-msg-composer.h1
4 files changed, 12 insertions, 15 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index f62dc376fd..bb2c9e714f 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -26,14 +26,13 @@
#include "e-util/gconf-bridge.h"
#include "widgets/misc/e-signature-combo-box.h"
+#include "e-msg-composer.h"
#include "e-composer-private.h"
#include "e-composer-from-header.h"
#include "e-composer-name-header.h"
#include "e-composer-post-header.h"
#include "e-composer-text-header.h"
-extern gboolean composer_lite;
-
#define E_COMPOSER_HEADER_TABLE_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_COMPOSER_HEADER_TABLE, EComposerHeaderTablePrivate))
@@ -159,7 +158,7 @@ composer_header_table_notify_header (EComposerHeader *header,
{
GtkWidget *parent;
- if (composer_lite && strcmp (property_name, "destinations-to") == 0)
+ if (e_msg_composer_get_lite () && strcmp (property_name, "destinations-to") == 0)
parent = g_object_get_data (
G_OBJECT (header->input_widget), "parent");
else
@@ -174,7 +173,7 @@ composer_header_table_notify_widget (GtkWidget *widget,
{
GtkWidget *parent;
- if (composer_lite) {
+ if (e_msg_composer_get_lite ()) {
parent = gtk_widget_get_parent (widget);
parent = g_object_get_data (G_OBJECT (parent), "pdata");
} else
@@ -509,7 +508,7 @@ composer_header_table_constructor (GType type,
gtk_table_attach (
GTK_TABLE (object), priv->headers[ii]->title_widget,
0, 1, ii, ii + 1, GTK_FILL, GTK_FILL, 0, 3);
- if (composer_lite && ii == E_COMPOSER_HEADER_TO) {
+ if (e_msg_composer_get_lite () && ii == E_COMPOSER_HEADER_TO) {
GtkWidget *box = gtk_hbox_new (FALSE, 0);
g_object_set_data (
G_OBJECT (priv->headers[ii]->input_widget),
@@ -532,7 +531,7 @@ composer_header_table_constructor (GType type,
priv->headers[ii]->input_widget, 1, 4,
ii, ii + 1, GTK_FILL | GTK_EXPAND, 0, 0, 3);
}
- if (composer_lite && priv->headers[ii]->action_widget) {
+ if (e_msg_composer_get_lite () && priv->headers[ii]->action_widget) {
/* Pack the widgets to the end. Helps formatting
* when hiding the From field. */
gtk_box_pack_end (
@@ -542,7 +541,7 @@ composer_header_table_constructor (GType type,
}
}
- if (composer_lite)
+ if (e_msg_composer_get_lite ())
gtk_widget_show_all ((GtkWidget *)priv->actions_container);
ii = E_COMPOSER_HEADER_FROM;
@@ -561,13 +560,13 @@ composer_header_table_constructor (GType type,
priv->signature_combo_box, "visible");
/* Now add the signature stuff. */
- if (!composer_lite) {
+ if (!e_msg_composer_get_lite ()) {
gtk_table_attach (
GTK_TABLE (object), priv->signature_label,
2, 3, ii, ii + 1, 0, 0, 0, 3);
gtk_table_attach (
GTK_TABLE (object), priv->signature_combo_box,
- 3, 4, ii, ii + 1, composer_lite ? GTK_FILL: 0, 0, 0, 3);
+ 3, 4, ii, ii + 1, e_msg_composer_get_lite () ? GTK_FILL: 0, 0, 0, 3);
} else {
GtkWidget *box = gtk_hbox_new (FALSE, 0);
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index b48f9b6cdf..ba022f3972 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -145,7 +145,7 @@ e_composer_private_constructed (EMsgComposer *composer)
html = gtkhtml_editor_get_html (editor);
ui_manager = gtkhtml_editor_get_ui_manager (editor);
- if (composer->lite) {
+ if (e_msg_composer_get_lite ()) {
widget = gtkhtml_editor_get_managed_widget (editor, "/main-menu");
gtk_widget_hide (widget);
widget = gtkhtml_editor_get_managed_widget (editor, "/main-toolbar");
@@ -243,7 +243,7 @@ e_composer_private_constructed (EMsgComposer *composer)
widget = e_composer_header_table_new ();
gtk_container_set_border_width (GTK_CONTAINER (widget), 6);
gtk_box_pack_start (GTK_BOX (editor->vbox), widget, FALSE, FALSE, 0);
- if (composer->lite)
+ if (e_msg_composer_get_lite ())
gtk_box_reorder_child (GTK_BOX (editor->vbox), widget, 0);
else
gtk_box_reorder_child (GTK_BOX (editor->vbox), widget, 2);
@@ -253,7 +253,7 @@ e_composer_private_constructed (EMsgComposer *composer)
/* Construct the attachment paned. */
- if (composer->lite) {
+ if (e_msg_composer_get_lite ()) {
e_attachment_paned_set_default_height (75); /* short attachment bar for Anjal */
e_attachment_icon_view_set_default_icon_size (GTK_ICON_SIZE_BUTTON);
}
@@ -262,7 +262,7 @@ e_composer_private_constructed (EMsgComposer *composer)
priv->attachment_paned = g_object_ref (widget);
gtk_widget_show (widget);
- if (composer->lite) {
+ if (e_msg_composer_get_lite ()) {
GtkWidget *tmp, *tmp1, *tmp_box, *container;
GtkWidget *combo;
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 308d7e8294..ca8e487223 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -2145,7 +2145,6 @@ msg_composer_class_init (EMsgComposerClass *class)
static void
msg_composer_init (EMsgComposer *composer)
{
- composer->lite = composer_lite;
composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
}
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index c55237ce52..19f21b7df2 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -63,7 +63,6 @@ typedef struct _EMsgComposerPrivate EMsgComposerPrivate;
struct _EMsgComposer {
GtkhtmlEditor parent;
EMsgComposerPrivate *priv;
- gboolean lite;
};
struct _EMsgComposerClass {