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 /widgets/misc/e-account-tree-view.c | |
parent | f55aaa5e00a40a137f403a8d5c68dd508059b0b4 (diff) | |
download | gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.gz gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.tar.zst gsoc2013-evolution-c003c99a75587ba39a45d164272760c33f9666b5.zip |
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'widgets/misc/e-account-tree-view.c')
-rw-r--r-- | widgets/misc/e-account-tree-view.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/widgets/misc/e-account-tree-view.c b/widgets/misc/e-account-tree-view.c index 923f395f0f..5a0ace2403 100644 --- a/widgets/misc/e-account-tree-view.c +++ b/widgets/misc/e-account-tree-view.c @@ -24,10 +24,6 @@ #include <glib/gi18n.h> #include <camel/camel.h> -#define E_ACCOUNT_TREE_VIEW_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_ACCOUNT_TREE_VIEW, EAccountTreeViewPrivate)) - enum { COLUMN_ACCOUNT, COLUMN_DEFAULT, @@ -337,7 +333,7 @@ account_tree_view_dispose (GObject *object) { EAccountTreeViewPrivate *priv; - priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (object); + priv = E_ACCOUNT_TREE_VIEW (object)->priv; if (priv->account_list != NULL) { g_signal_handlers_disconnect_by_func ( @@ -358,7 +354,7 @@ account_tree_view_finalize (GObject *object) { EAccountTreeViewPrivate *priv; - priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (object); + priv = E_ACCOUNT_TREE_VIEW (object)->priv; g_hash_table_destroy (priv->index); @@ -482,7 +478,7 @@ e_account_tree_view_init (EAccountTreeView *tree_view) (GDestroyNotify) g_object_unref, (GDestroyNotify) gtk_tree_row_reference_free); - tree_view->priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (tree_view); + tree_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (tree_view, E_TYPE_ACCOUNT_TREE_VIEW, EAccountTreeViewPrivate); tree_view->priv->index = index; selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view)); @@ -534,7 +530,7 @@ e_account_tree_view_set_account_list (EAccountTreeView *tree_view, if (account_list != NULL) g_return_if_fail (E_IS_ACCOUNT_LIST (account_list)); - priv = E_ACCOUNT_TREE_VIEW_GET_PRIVATE (tree_view); + priv = tree_view->priv; if (priv->account_list != NULL) { g_signal_handlers_disconnect_by_func ( |