aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-from-header.h4
-rw-r--r--composer/e-composer-header-table.h5
-rw-r--r--composer/e-composer-header.c48
-rw-r--r--composer/e-composer-header.h2
-rw-r--r--composer/e-composer-name-header.c10
-rw-r--r--composer/e-composer-name-header.h5
-rw-r--r--composer/e-composer-post-header.h2
-rw-r--r--composer/e-composer-private.c5
-rw-r--r--composer/e-composer-text-header.c18
-rw-r--r--composer/e-composer-text-header.h12
-rw-r--r--composer/e-msg-composer.c19
-rw-r--r--composer/e-msg-composer.h2
12 files changed, 69 insertions, 63 deletions
diff --git a/composer/e-composer-from-header.h b/composer/e-composer-from-header.h
index d2603bd664..182a75134b 100644
--- a/composer/e-composer-from-header.h
+++ b/composer/e-composer-from-header.h
@@ -21,13 +21,11 @@
#ifndef E_COMPOSER_FROM_HEADER_H
#define E_COMPOSER_FROM_HEADER_H
-#include "e-composer-common.h"
-
#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>
#include <misc/e-account-combo-box.h>
-#include "e-composer-header.h"
+#include <composer/e-composer-header.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_FROM_HEADER \
diff --git a/composer/e-composer-header-table.h b/composer/e-composer-header-table.h
index 856a8e2158..f7edec0b14 100644
--- a/composer/e-composer-header-table.h
+++ b/composer/e-composer-header-table.h
@@ -18,8 +18,6 @@
#ifndef E_COMPOSER_HEADER_TABLE_H
#define E_COMPOSER_HEADER_TABLE_H
-#include "e-composer-common.h"
-
#include <libedataserver/e-account.h>
#include <libedataserver/e-account-list.h>
#include <libebook/e-destination.h>
@@ -27,8 +25,7 @@
#include <shell/e-shell.h>
#include <e-util/e-signature.h>
#include <e-util/e-signature-list.h>
-
-#include "e-composer-header.h"
+#include <composer/e-composer-header.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_HEADER_TABLE \
diff --git a/composer/e-composer-header.c b/composer/e-composer-header.c
index d6a270a73b..29a9a5c790 100644
--- a/composer/e-composer-header.c
+++ b/composer/e-composer-header.c
@@ -26,21 +26,12 @@
#include "e-composer-header.h"
-#include <glib/gi18n.h>
-
-enum {
- PROP_0,
- PROP_BUTTON,
- PROP_LABEL,
- PROP_SENSITIVE,
- PROP_VISIBLE
-};
+#include <config.h>
+#include <glib/gi18n-lib.h>
-enum {
- CHANGED,
- CLICKED,
- LAST_SIGNAL
-};
+#define E_COMPOSER_HEADER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_HEADER, EComposerHeaderPrivate))
struct _EComposerHeaderPrivate {
gchar *label;
@@ -56,6 +47,20 @@ struct _EComposerHeaderPrivate {
guint visible : 1;
};
+enum {
+ PROP_0,
+ PROP_BUTTON,
+ PROP_LABEL,
+ PROP_SENSITIVE,
+ PROP_VISIBLE
+};
+
+enum {
+ CHANGED,
+ CLICKED,
+ LAST_SIGNAL
+};
+
static guint signal_ids[LAST_SIGNAL];
G_DEFINE_ABSTRACT_TYPE (
@@ -98,7 +103,8 @@ composer_header_constructor (GType type,
label = gtk_bin_get_child (GTK_BIN (widget));
} else {
widget = gtk_label_new_with_mnemonic (header->priv->label);
- gtk_label_set_mnemonic_widget (GTK_LABEL (widget), header->input_widget);
+ gtk_label_set_mnemonic_widget (
+ GTK_LABEL (widget), header->input_widget);
label = widget;
}
@@ -227,7 +233,8 @@ e_composer_header_class_init (EComposerHeaderClass *class)
NULL,
FALSE,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (
object_class,
@@ -238,7 +245,8 @@ e_composer_header_class_init (EComposerHeaderClass *class)
NULL,
NULL,
G_PARAM_READWRITE |
- G_PARAM_CONSTRUCT_ONLY));
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (
object_class,
@@ -248,7 +256,8 @@ e_composer_header_class_init (EComposerHeaderClass *class)
NULL,
NULL,
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
g_object_class_install_property (
object_class,
@@ -258,7 +267,8 @@ e_composer_header_class_init (EComposerHeaderClass *class)
NULL,
NULL,
FALSE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS));
signal_ids[CHANGED] = g_signal_new (
"changed",
diff --git a/composer/e-composer-header.h b/composer/e-composer-header.h
index 971b55968c..08db97a2d4 100644
--- a/composer/e-composer-header.h
+++ b/composer/e-composer-header.h
@@ -18,7 +18,7 @@
#ifndef E_COMPOSER_HEADER_H
#define E_COMPOSER_HEADER_H
-#include "e-composer-common.h"
+#include <composer/e-composer-common.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_HEADER \
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index a99f1cd949..b17cb4a75a 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -276,11 +276,11 @@ e_composer_name_header_new (const gchar *label,
{
g_return_val_if_fail (E_IS_NAME_SELECTOR (name_selector), NULL);
- return g_object_new (E_TYPE_COMPOSER_NAME_HEADER,
- "label", label,
- "button", TRUE,
- "name-selector", name_selector,
- NULL);
+ return g_object_new (
+ E_TYPE_COMPOSER_NAME_HEADER,
+ "label", label, "button", TRUE,
+ "name-selector", name_selector,
+ NULL);
}
ENameSelector *
diff --git a/composer/e-composer-name-header.h b/composer/e-composer-name-header.h
index 785f7d11e8..e2f5e0044c 100644
--- a/composer/e-composer-name-header.h
+++ b/composer/e-composer-name-header.h
@@ -18,12 +18,10 @@
#ifndef E_COMPOSER_NAME_HEADER_H
#define E_COMPOSER_NAME_HEADER_H
-#include "e-composer-common.h"
-
#include <libebook/e-destination.h>
#include <libedataserverui/e-name-selector.h>
-#include "e-composer-header.h"
+#include <composer/e-composer-header.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_NAME_HEADER \
@@ -62,7 +60,6 @@ struct _EComposerNameHeaderClass {
GType e_composer_name_header_get_type (void);
EComposerHeader * e_composer_name_header_new (const gchar *label,
ENameSelector *name_selector);
-
ENameSelector * e_composer_name_header_get_name_selector
(EComposerNameHeader *header);
EDestination ** e_composer_name_header_get_destinations
diff --git a/composer/e-composer-post-header.h b/composer/e-composer-post-header.h
index c38bfe2d17..c6fff3e751 100644
--- a/composer/e-composer-post-header.h
+++ b/composer/e-composer-post-header.h
@@ -23,7 +23,7 @@
#include <libedataserver/e-account.h>
-#include "e-composer-text-header.h"
+#include <composer/e-composer-text-header.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_POST_HEADER \
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 693fd959f5..bd7b46a4ee 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -198,7 +198,8 @@ e_composer_private_constructed (EMsgComposer *composer)
gtk_widget_hide (widget);
#endif
widget = gtkhtml_editor_get_managed_widget (editor, "/main-toolbar");
- gtk_toolbar_set_style (GTK_TOOLBAR (widget), GTK_TOOLBAR_BOTH_HORIZ);
+ gtk_toolbar_set_style (
+ GTK_TOOLBAR (widget), GTK_TOOLBAR_BOTH_HORIZ);
gtk_widget_hide (widget);
}
@@ -318,7 +319,7 @@ e_composer_private_constructed (EMsgComposer *composer)
/* Construct the attachment paned. */
if (small_screen_mode) {
- /* short attachment bar for Anjal */
+ /* Short attachment bar for Anjal. */
e_attachment_paned_set_default_height (75);
e_attachment_icon_view_set_default_icon_size (GTK_ICON_SIZE_BUTTON);
}
diff --git a/composer/e-composer-text-header.c b/composer/e-composer-text-header.c
index 28df51ec87..39279237ab 100644
--- a/composer/e-composer-text-header.c
+++ b/composer/e-composer-text-header.c
@@ -89,19 +89,19 @@ e_composer_text_header_init (EComposerTextHeader *header)
EComposerHeader *
e_composer_text_header_new_label (const gchar *label)
{
- return g_object_new (E_TYPE_COMPOSER_TEXT_HEADER,
- "label", label,
- "button", FALSE,
- NULL);
+ return g_object_new (
+ E_TYPE_COMPOSER_TEXT_HEADER,
+ "label", label, "button", FALSE,
+ NULL);
}
EComposerHeader *
e_composer_text_header_new_button (const gchar *label)
{
- return g_object_new (E_TYPE_COMPOSER_TEXT_HEADER,
- "label", label,
- "button", TRUE,
- NULL);
+ return g_object_new (
+ E_TYPE_COMPOSER_TEXT_HEADER,
+ "label", label, "button", TRUE,
+ NULL);
}
const gchar *
@@ -112,6 +112,7 @@ e_composer_text_header_get_text (EComposerTextHeader *header)
g_return_val_if_fail (E_IS_COMPOSER_TEXT_HEADER (header), NULL);
entry = E_COMPOSER_TEXT_HEADER_GET_ENTRY (header);
+
return gtk_entry_get_text (entry);
}
@@ -124,5 +125,6 @@ e_composer_text_header_set_text (EComposerTextHeader *header,
g_return_if_fail (E_IS_COMPOSER_TEXT_HEADER (header));
entry = E_COMPOSER_TEXT_HEADER_GET_ENTRY (header);
+
gtk_entry_set_text (entry, (text != NULL) ? text : "");
}
diff --git a/composer/e-composer-text-header.h b/composer/e-composer-text-header.h
index 278b2b1116..860fcc3c61 100644
--- a/composer/e-composer-text-header.h
+++ b/composer/e-composer-text-header.h
@@ -21,8 +21,7 @@
#ifndef E_COMPOSER_TEXT_HEADER_H
#define E_COMPOSER_TEXT_HEADER_H
-#include "e-composer-common.h"
-#include "e-composer-header.h"
+#include <composer/e-composer-header.h>
/* Standard GObject macros */
#define E_TYPE_COMPOSER_TEXT_HEADER \
@@ -57,13 +56,12 @@ struct _EComposerTextHeaderClass {
};
GType e_composer_text_header_get_type (void);
-
EComposerHeader *
-e_composer_text_header_new_label (const gchar *label);
-
+ e_composer_text_header_new_label
+ (const gchar *label);
EComposerHeader *
-e_composer_text_header_new_button (const gchar *label);
-
+ e_composer_text_header_new_button
+ (const gchar *label);
const gchar * e_composer_text_header_get_text (EComposerTextHeader *header);
void e_composer_text_header_set_text (EComposerTextHeader *header,
const gchar *text);
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index c41c4019b3..ba7a7a4641 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -522,6 +522,7 @@ build_message_headers (EMsgComposer *composer,
if (account != NULL) {
CamelMedium *medium;
CamelInternetAddress *addr;
+ const gchar *header_name;
const gchar *name = account->id->name;
const gchar *address = account->id->address;
gchar *transport_uid;
@@ -542,18 +543,18 @@ build_message_headers (EMsgComposer *composer,
g_object_unref (addr);
/* X-Evolution-Account */
- camel_medium_set_header (
- medium, "X-Evolution-Account", account->uid);
+ header_name = "X-Evolution-Account";
+ camel_medium_set_header (medium, header_name, account->uid);
/* X-Evolution-Fcc */
- camel_medium_set_header (
- medium, "X-Evolution-Fcc", account->sent_folder_uri);
+ header_name = "X-Evolution-Fcc";
+ camel_medium_set_header (medium, header_name, account->sent_folder_uri);
/* X-Evolution-Transport */
+ header_name = "X-Evolution-Transport";
transport_uid = g_strconcat (
account->uid, "-transport", NULL);
- camel_medium_set_header (
- medium, "X-Evolution-Transport", transport_uid);
+ camel_medium_set_header (medium, header_name, transport_uid);
g_free (transport_uid);
}
@@ -1102,7 +1103,8 @@ composer_build_message (EMsgComposer *composer,
/* Disposition-Notification-To */
if (flags & COMPOSER_FLAG_REQUEST_READ_RECEIPT) {
gchar *mdn_address = account->id->reply_to;
- if (!mdn_address || !*mdn_address)
+
+ if (mdn_address == NULL || *mdn_address == '\0')
mdn_address = account->id->address;
camel_medium_add_header (
@@ -1501,7 +1503,8 @@ is_top_signature (EMsgComposer *composer)
shell = e_msg_composer_get_shell (composer);
shell_settings = e_shell_get_shell_settings (shell);
- return e_shell_settings_get_boolean (shell_settings, "composer-top-signature");
+ return e_shell_settings_get_boolean (
+ shell_settings, "composer-top-signature");
}
static gboolean
diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h
index 296bb35a2f..258d260e3f 100644
--- a/composer/e-msg-composer.h
+++ b/composer/e-msg-composer.h
@@ -33,7 +33,7 @@
#include <misc/e-web-view.h>
#include <shell/e-shell.h>
-#include "e-composer-header-table.h"
+#include <composer/e-composer-header-table.h>
/* Standard GObject macros */
#define E_TYPE_MSG_COMPOSER \