aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-composer-name-header.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-01-01 03:38:29 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-01-01 03:40:06 +0800
commita7abe3ac594dd3324f473b8200641e03cf64f774 (patch)
tree1d6b85f75ba41b08e87f0ccc3d7de4fd43fe7720 /composer/e-composer-name-header.c
parent2c9b8c191d7ccf82c4d0c6df4c5acbe11cfa8701 (diff)
downloadgsoc2013-evolution-a7abe3ac594dd3324f473b8200641e03cf64f774.tar.gz
gsoc2013-evolution-a7abe3ac594dd3324f473b8200641e03cf64f774.tar.zst
gsoc2013-evolution-a7abe3ac594dd3324f473b8200641e03cf64f774.zip
Composer cleanups.
Diffstat (limited to 'composer/e-composer-name-header.c')
-rw-r--r--composer/e-composer-name-header.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c
index b17cb4a75a..740eceef27 100644
--- a/composer/e-composer-name-header.c
+++ b/composer/e-composer-name-header.c
@@ -31,6 +31,10 @@
#include "addressbook/gui/contact-editor/e-contact-editor.h"
#include "addressbook/gui/contact-list-editor/e-contact-list-editor.h"
+#define E_COMPOSER_NAME_HEADER_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_COMPOSER_NAME_HEADER, EComposerNameHeaderPrivate))
+
/* Convenience macro */
#define E_COMPOSER_NAME_HEADER_GET_ENTRY(header) \
(E_NAME_SELECTOR_ENTRY (E_COMPOSER_HEADER (header)->input_widget))
@@ -123,7 +127,7 @@ composer_name_header_constructor (GType type,
e_composer_name_header_parent_class)->constructor (
type, n_construct_properties, construct_properties);
- priv = E_COMPOSER_NAME_HEADER (object)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
g_assert (E_IS_NAME_SELECTOR (priv->name_selector));
model = e_name_selector_peek_model (priv->name_selector);
@@ -171,7 +175,7 @@ composer_name_header_set_property (GObject *object,
{
EComposerNameHeaderPrivate *priv;
- priv = E_COMPOSER_NAME_HEADER (object)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
switch (property_id) {
case PROP_NAME_SELECTOR: /* construct only */
@@ -206,7 +210,7 @@ composer_name_header_dispose (GObject *object)
{
EComposerNameHeaderPrivate *priv;
- priv = E_COMPOSER_NAME_HEADER (object)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (object);
if (priv->name_selector != NULL) {
g_object_unref (priv->name_selector);
@@ -223,12 +227,13 @@ composer_name_header_clicked (EComposerHeader *header)
EComposerNameHeaderPrivate *priv;
ENameSelectorDialog *dialog;
- priv = E_COMPOSER_NAME_HEADER (header)->priv;
+ priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
dialog = e_name_selector_peek_dialog (priv->name_selector);
e_name_selector_dialog_set_destination_index (
dialog, priv->destination_index);
- e_name_selector_show_dialog (priv->name_selector, header->title_widget);
+ e_name_selector_show_dialog (
+ priv->name_selector, header->title_widget);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_hide (GTK_WIDGET (dialog));
}
@@ -265,9 +270,7 @@ e_composer_name_header_class_init (EComposerNameHeaderClass *class)
static void
e_composer_name_header_init (EComposerNameHeader *header)
{
- header->priv = G_TYPE_INSTANCE_GET_PRIVATE (
- header, E_TYPE_COMPOSER_NAME_HEADER,
- EComposerNameHeaderPrivate);
+ header->priv = E_COMPOSER_NAME_HEADER_GET_PRIVATE (header);
}
EComposerHeader *