diff options
author | Milan Crha <mcrha@redhat.com> | 2011-02-25 23:20:41 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:39 +0800 |
commit | c003c99a75587ba39a45d164272760c33f9666b5 (patch) | |
tree | ad6d0583fa9e8f078fb1c118f994371d2f1f79d8 /capplet/settings | |
parent | f55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff) | |
download | gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.bz2 gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.lz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.xz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'capplet/settings')
-rw-r--r-- | capplet/settings/mail-decoration.c | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/capplet/settings/mail-decoration.c b/capplet/settings/mail-decoration.c index 51a71d11ef..ab63ce293b 100644 --- a/capplet/settings/mail-decoration.c +++ b/capplet/settings/mail-decoration.c @@ -29,8 +29,6 @@ #include <gdk/gdkkeysyms.h> #include <gconf/gconf-client.h> -#define MAIL_DECORATION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), MAIL_DECORATION_TYPE, MailDecorationPrivate)) - struct _MailDecorationPrivate { GdkCursor *cursors[8]; @@ -339,25 +337,22 @@ mail_decoration_class_init (MailDecorationClass *klass) static void mail_decoration_init (MailDecoration *md) { - MailDecorationPrivate *priv; - - priv = MAIL_DECORATION_GET_PRIVATE (md); - md->priv = priv; - - priv->cursors[0]= gdk_cursor_new (GDK_TOP_LEFT_CORNER); - priv->cursors[1]= gdk_cursor_new (GDK_TOP_SIDE); - priv->cursors[2]= gdk_cursor_new (GDK_TOP_RIGHT_CORNER); - priv->cursors[3]= gdk_cursor_new (GDK_LEFT_SIDE); - priv->cursors[4]= gdk_cursor_new (GDK_RIGHT_SIDE); - priv->cursors[5]= gdk_cursor_new (GDK_BOTTOM_LEFT_CORNER); - priv->cursors[6]= gdk_cursor_new (GDK_BOTTOM_SIDE); - priv->cursors[7]= gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER); - - priv->default_cursor = TRUE; - priv->resizing = FALSE; - priv->resize_width = 4; - priv->top_height = 54; - priv->check_window = TRUE; - priv->can_resize = TRUE; - priv->full_screen = TRUE; + md->priv = G_TYPE_INSTANCE_GET_PRIVATE (md, MAIL_DECORATION_TYPE, MailDecorationPrivate); + + md->priv->cursors[0]= gdk_cursor_new (GDK_TOP_LEFT_CORNER); + md->priv->cursors[1]= gdk_cursor_new (GDK_TOP_SIDE); + md->priv->cursors[2]= gdk_cursor_new (GDK_TOP_RIGHT_CORNER); + md->priv->cursors[3]= gdk_cursor_new (GDK_LEFT_SIDE); + md->priv->cursors[4]= gdk_cursor_new (GDK_RIGHT_SIDE); + md->priv->cursors[5]= gdk_cursor_new (GDK_BOTTOM_LEFT_CORNER); + md->priv->cursors[6]= gdk_cursor_new (GDK_BOTTOM_SIDE); + md->priv->cursors[7]= gdk_cursor_new (GDK_BOTTOM_RIGHT_CORNER); + + md->priv->default_cursor = TRUE; + md->priv->resizing = FALSE; + md->priv->resize_width = 4; + md->priv->top_height = 54; + md->priv->check_window = TRUE; + md->priv->can_resize = TRUE; + md->priv->full_screen = TRUE; } |