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 /modules/calendar | |
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 'modules/calendar')
-rw-r--r-- | modules/calendar/e-cal-attachment-handler.c | 6 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-backend.c | 9 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-content.c | 15 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-sidebar.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.c | 2 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view-private.h | 4 | ||||
-rw-r--r-- | modules/calendar/e-cal-shell-view.c | 5 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-backend.c | 9 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-sidebar.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-private.h | 4 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view.c | 3 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-backend.c | 9 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-sidebar.c | 17 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-private.h | 4 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view.c | 3 |
17 files changed, 47 insertions, 111 deletions
diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c index dfc8f58c34..25677877fc 100644 --- a/modules/calendar/e-cal-attachment-handler.c +++ b/modules/calendar/e-cal-attachment-handler.c @@ -29,10 +29,6 @@ #include "calendar/common/authentication.h" -#define E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_CAL_ATTACHMENT_HANDLER, ECalAttachmentHandlerPrivate)) - typedef struct _ImportContext ImportContext; struct _ECalAttachmentHandlerPrivate { @@ -492,7 +488,7 @@ cal_attachment_handler_class_init (ECalAttachmentHandlerClass *class) static void cal_attachment_handler_init (ECalAttachmentHandler *handler) { - handler->priv = E_CAL_ATTACHMENT_HANDLER_GET_PRIVATE (handler); + handler->priv = G_TYPE_INSTANCE_GET_PRIVATE (handler, E_TYPE_CAL_ATTACHMENT_HANDLER, ECalAttachmentHandlerPrivate); } GType diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c index 6c80f71965..b9cb894c50 100644 --- a/modules/calendar/e-cal-shell-backend.c +++ b/modules/calendar/e-cal-shell-backend.c @@ -51,10 +51,6 @@ #include "e-calendar-preferences.h" -#define E_CAL_SHELL_BACKEND_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_CAL_SHELL_BACKEND, ECalShellBackendPrivate)) - struct _ECalShellBackendPrivate { ESourceList *source_list; }; @@ -707,7 +703,7 @@ cal_shell_backend_dispose (GObject *object) { ECalShellBackendPrivate *priv; - priv = E_CAL_SHELL_BACKEND_GET_PRIVATE (object); + priv = E_CAL_SHELL_BACKEND (object)->priv; if (priv->source_list != NULL) { g_object_unref (priv->source_list); @@ -800,8 +796,7 @@ cal_shell_backend_init (ECalShellBackend *cal_shell_backend) icalarray *builtin_timezones; gint ii; - cal_shell_backend->priv = - E_CAL_SHELL_BACKEND_GET_PRIVATE (cal_shell_backend); + cal_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_backend, E_TYPE_CAL_SHELL_BACKEND, ECalShellBackendPrivate); /* XXX Pre-load all built-in timezones in libical. * diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index e7a082bc05..1fbedd22b1 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -39,10 +39,6 @@ #include "e-cal-shell-view-private.h" -#define E_CAL_SHELL_CONTENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_CAL_SHELL_CONTENT, ECalShellContentPrivate)) - struct _ECalShellContentPrivate { GtkWidget *hpaned; GtkWidget *notebook; @@ -202,7 +198,7 @@ e_cal_shell_content_save_state (ECalShellContent *cal_shell_content) g_return_if_fail (cal_shell_content != NULL); g_return_if_fail (E_IS_CAL_SHELL_CONTENT (cal_shell_content)); - priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (cal_shell_content); + priv = cal_shell_content->priv; if (priv->task_table != NULL) cal_shell_content_save_table_state ( @@ -261,7 +257,7 @@ cal_shell_content_dispose (GObject *object) { ECalShellContentPrivate *priv; - priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_CAL_SHELL_CONTENT (object)->priv; if (priv->hpaned != NULL) { g_object_unref (priv->hpaned); @@ -339,7 +335,7 @@ cal_shell_content_constructed (GObject *object) gchar *markup; gint ii; - priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_CAL_SHELL_CONTENT (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -545,7 +541,7 @@ cal_shell_content_map (GtkWidget *widget) * callback in GnomeCalendar that requires the date navigator. * Ordinarily we would do this at the end of constructed(), but * that's too soon in this case. (This feels kind of kludgy.) */ - priv = E_CAL_SHELL_CONTENT_GET_PRIVATE (widget); + priv = E_CAL_SHELL_CONTENT (widget)->priv; gal_view_instance_load (priv->view_instance); /* Chain up to parent's map() method. */ @@ -624,8 +620,7 @@ cal_shell_content_class_init (ECalShellContentClass *class) static void cal_shell_content_init (ECalShellContent *cal_shell_content) { - cal_shell_content->priv = - E_CAL_SHELL_CONTENT_GET_PRIVATE (cal_shell_content); + cal_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_content, E_TYPE_CAL_SHELL_CONTENT, ECalShellContentPrivate); /* Postpone widget construction until we have a shell view. */ } diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index 5227df6bcd..be0a3443e2 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -37,10 +37,6 @@ #include "e-cal-shell-backend.h" #include "e-cal-shell-content.h" -#define E_CAL_SHELL_SIDEBAR_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_CAL_SHELL_SIDEBAR, ECalShellSidebarPrivate)) - struct _ECalShellSidebarPrivate { GtkWidget *paned; GtkWidget *selector; @@ -239,7 +235,7 @@ cal_shell_sidebar_default_loaded_cb (ESource *source, ECal *client; GError *error = NULL; - priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); + priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv; shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_content = e_shell_view_get_shell_content (shell_view); @@ -420,7 +416,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window, GObject *object; const gchar *key; - priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); + priv = E_CAL_SHELL_SIDEBAR (shell_sidebar)->priv; shell = e_shell_window_get_shell (shell_window); shell_settings = e_shell_get_shell_settings (shell); @@ -522,7 +518,7 @@ cal_shell_sidebar_dispose (GObject *object) { ECalShellSidebarPrivate *priv; - priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_CAL_SHELL_SIDEBAR (object)->priv; if (priv->paned != NULL) { g_object_unref (priv->paned); @@ -561,7 +557,7 @@ cal_shell_sidebar_finalize (GObject *object) { ECalShellSidebarPrivate *priv; - priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_CAL_SHELL_SIDEBAR (object)->priv; g_hash_table_destroy (priv->client_table); @@ -598,7 +594,7 @@ cal_shell_sidebar_constructed (GObject *object) GtkWidget *widget; AtkObject *a11y; - priv = E_CAL_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_CAL_SHELL_SIDEBAR (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -848,8 +844,7 @@ cal_shell_sidebar_init (ECalShellSidebar *cal_shell_sidebar) (GDestroyNotify) g_free, (GDestroyNotify) g_object_unref); - cal_shell_sidebar->priv = - E_CAL_SHELL_SIDEBAR_GET_PRIVATE (cal_shell_sidebar); + cal_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_sidebar, E_TYPE_CAL_SHELL_SIDEBAR, ECalShellSidebarPrivate); cal_shell_sidebar->priv->client_table = client_table; diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index 0a20ea2000..61aff5aa5c 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -239,7 +239,7 @@ cal_shell_view_popup_event_cb (EShellView *shell_view, const gchar *widget_path; gint n_selected; - priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view); + priv = E_CAL_SHELL_VIEW (shell_view)->priv; calendar = e_cal_shell_content_get_calendar (priv->cal_shell_content); diff --git a/modules/calendar/e-cal-shell-view-private.h b/modules/calendar/e-cal-shell-view-private.h index d6f37ba7bf..0f9235046c 100644 --- a/modules/calendar/e-cal-shell-view-private.h +++ b/modules/calendar/e-cal-shell-view-private.h @@ -63,10 +63,6 @@ #include "e-cal-shell-sidebar.h" #include "e-cal-shell-view-actions.h" -#define E_CAL_SHELL_VIEW_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_CAL_SHELL_VIEW, ECalShellViewPrivate)) - /* Shorthand, requires a variable named "shell_window". */ #define ACTION(name) \ (E_SHELL_WINDOW_ACTION_##name (shell_window)) diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index 1210d2d267..72ce261a6a 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -310,7 +310,7 @@ cal_shell_view_update_actions (EShellView *shell_view) /* Chain up to parent's update_actions() method. */ E_SHELL_VIEW_CLASS (parent_class)->update_actions (shell_view); - priv = E_CAL_SHELL_VIEW_GET_PRIVATE (shell_view); + priv = E_CAL_SHELL_VIEW (shell_view)->priv; shell_window = e_shell_view_get_shell_window (shell_view); shell = e_shell_window_get_shell (shell_window); @@ -517,8 +517,7 @@ static void cal_shell_view_init (ECalShellView *cal_shell_view, EShellViewClass *shell_view_class) { - cal_shell_view->priv = - E_CAL_SHELL_VIEW_GET_PRIVATE (cal_shell_view); + cal_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (cal_shell_view, E_TYPE_CAL_SHELL_VIEW, ECalShellViewPrivate); e_cal_shell_view_private_init (cal_shell_view, shell_view_class); } diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index d60421c49c..5c02cdd98a 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -41,10 +41,6 @@ #include "e-memo-shell-migrate.h" #include "e-memo-shell-view.h" -#define E_MEMO_SHELL_BACKEND_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackendPrivate)) - #define WEB_BASE_URI "webcal://" #define PERSONAL_RELATIVE_URI "system" @@ -489,7 +485,7 @@ memo_shell_backend_dispose (GObject *object) { EMemoShellBackendPrivate *priv; - priv = E_MEMO_SHELL_BACKEND_GET_PRIVATE (object); + priv = E_MEMO_SHELL_BACKEND (object)->priv; if (priv->source_list != NULL) { g_object_unref (priv->source_list); @@ -563,8 +559,7 @@ memo_shell_backend_class_init (EMemoShellBackendClass *class) static void memo_shell_backend_init (EMemoShellBackend *memo_shell_backend) { - memo_shell_backend->priv = - E_MEMO_SHELL_BACKEND_GET_PRIVATE (memo_shell_backend); + memo_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_backend, E_TYPE_MEMO_SHELL_BACKEND, EMemoShellBackendPrivate); } GType diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index a9d299e221..37e96fe47a 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -35,10 +35,6 @@ #include "calendar/gui/e-cal-model-memos.h" #include "calendar/gui/e-memo-table.h" -#define E_MEMO_SHELL_CONTENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate)) - #define E_MEMO_TABLE_DEFAULT_STATE \ "<?xml version=\"1.0\"?>" \ "<ETableState>" \ @@ -277,7 +273,7 @@ memo_shell_content_restore_state_cb (EShellWindow *shell_window, GObject *object; const gchar *key; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; /* Bind GObject properties to GConf keys. */ @@ -367,7 +363,7 @@ memo_shell_content_dispose (GObject *object) { EMemoShellContentPrivate *priv; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MEMO_SHELL_CONTENT (object)->priv; if (priv->paned != NULL) { g_object_unref (priv->paned); @@ -403,7 +399,7 @@ memo_shell_content_finalize (GObject *object) { EMemoShellContentPrivate *priv; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MEMO_SHELL_CONTENT (object)->priv; g_free (priv->current_uid); @@ -428,7 +424,7 @@ memo_shell_content_constructed (GObject *object) GtkWidget *widget; gint n_targets; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_MEMO_SHELL_CONTENT (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -606,7 +602,7 @@ memo_shell_content_focus_search_results (EShellContent *shell_content) { EMemoShellContentPrivate *priv; - priv = E_MEMO_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_MEMO_SHELL_CONTENT (shell_content)->priv; gtk_widget_grab_focus (priv->memo_table); } @@ -659,8 +655,7 @@ memo_shell_content_class_init (EMemoShellContentClass *class) static void memo_shell_content_init (EMemoShellContent *memo_shell_content) { - memo_shell_content->priv = - E_MEMO_SHELL_CONTENT_GET_PRIVATE (memo_shell_content); + memo_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_content, E_TYPE_MEMO_SHELL_CONTENT, EMemoShellContentPrivate); /* Postpone widget construction until we have a shell view. */ } diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c index b7e52a9095..612b83126b 100644 --- a/modules/calendar/e-memo-shell-sidebar.c +++ b/modules/calendar/e-memo-shell-sidebar.c @@ -35,10 +35,6 @@ #include "e-memo-shell-backend.h" #include "e-memo-shell-content.h" -#define E_MEMO_SHELL_SIDEBAR_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_MEMO_SHELL_SIDEBAR, EMemoShellSidebarPrivate)) - struct _EMemoShellSidebarPrivate { GtkWidget *selector; @@ -234,7 +230,7 @@ memo_shell_sidebar_default_loaded_cb (ESource *source, ECal *client; GError *error = NULL; - priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); + priv = E_MEMO_SHELL_SIDEBAR (shell_sidebar)->priv; shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_content = e_shell_view_get_shell_content (shell_view); @@ -412,7 +408,7 @@ memo_shell_sidebar_restore_state_cb (EShellWindow *shell_window, GtkTreeModel *model; GSList *list, *iter; - priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); + priv = E_MEMO_SHELL_SIDEBAR (shell_sidebar)->priv; shell = e_shell_window_get_shell (shell_window); shell_settings = e_shell_get_shell_settings (shell); @@ -499,7 +495,7 @@ memo_shell_sidebar_dispose (GObject *object) { EMemoShellSidebarPrivate *priv; - priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_MEMO_SHELL_SIDEBAR (object)->priv; if (priv->selector != NULL) { g_object_unref (priv->selector); @@ -528,7 +524,7 @@ memo_shell_sidebar_finalize (GObject *object) { EMemoShellSidebarPrivate *priv; - priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_MEMO_SHELL_SIDEBAR (object)->priv; g_hash_table_destroy (priv->client_table); @@ -549,7 +545,7 @@ memo_shell_sidebar_constructed (GObject *object) GtkWidget *widget; AtkObject *a11y; - priv = E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_MEMO_SHELL_SIDEBAR (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -744,8 +740,7 @@ memo_shell_sidebar_init (EMemoShellSidebar *memo_shell_sidebar) (GDestroyNotify) g_free, (GDestroyNotify) g_object_unref); - memo_shell_sidebar->priv = - E_MEMO_SHELL_SIDEBAR_GET_PRIVATE (memo_shell_sidebar); + memo_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_sidebar, E_TYPE_MEMO_SHELL_SIDEBAR, EMemoShellSidebarPrivate); memo_shell_sidebar->priv->client_table = client_table; diff --git a/modules/calendar/e-memo-shell-view-private.h b/modules/calendar/e-memo-shell-view-private.h index 0b8867a5b3..0a6a390004 100644 --- a/modules/calendar/e-memo-shell-view-private.h +++ b/modules/calendar/e-memo-shell-view-private.h @@ -50,10 +50,6 @@ #include "e-memo-shell-sidebar.h" #include "e-memo-shell-view-actions.h" -#define E_MEMO_SHELL_VIEW_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_MEMO_SHELL_VIEW, EMemoShellViewPrivate)) - /* Shorthand, requires a variable named "shell_window". */ #define ACTION(name) \ (E_SHELL_WINDOW_ACTION_##name (shell_window)) diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c index 219497577c..4cef169ae8 100644 --- a/modules/calendar/e-memo-shell-view.c +++ b/modules/calendar/e-memo-shell-view.c @@ -302,8 +302,7 @@ static void memo_shell_view_init (EMemoShellView *memo_shell_view, EShellViewClass *shell_view_class) { - memo_shell_view->priv = - E_MEMO_SHELL_VIEW_GET_PRIVATE (memo_shell_view); + memo_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_shell_view, E_TYPE_MEMO_SHELL_VIEW, EMemoShellViewPrivate); e_memo_shell_view_private_init (memo_shell_view, shell_view_class); } diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c index a55bd75fcc..9d85dc87b8 100644 --- a/modules/calendar/e-task-shell-backend.c +++ b/modules/calendar/e-task-shell-backend.c @@ -43,10 +43,6 @@ #include "e-task-shell-sidebar.h" #include "e-task-shell-view.h" -#define E_TASK_SHELL_BACKEND_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TASK_SHELL_BACKEND, ETaskShellBackendPrivate)) - struct _ETaskShellBackendPrivate { ESourceList *source_list; }; @@ -494,7 +490,7 @@ task_shell_backend_dispose (GObject *object) { ETaskShellBackendPrivate *priv; - priv = E_TASK_SHELL_BACKEND_GET_PRIVATE (object); + priv = E_TASK_SHELL_BACKEND (object)->priv; if (priv->source_list != NULL) { g_object_unref (priv->source_list); @@ -568,8 +564,7 @@ task_shell_backend_class_init (ETaskShellBackendClass *class) static void task_shell_backend_init (ETaskShellBackend *task_shell_backend) { - task_shell_backend->priv = - E_TASK_SHELL_BACKEND_GET_PRIVATE (task_shell_backend); + task_shell_backend->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_backend, E_TYPE_TASK_SHELL_BACKEND, ETaskShellBackendPrivate); } GType diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 9cc924642c..78680bc307 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -34,10 +34,6 @@ #include "calendar/gui/e-cal-component-preview.h" #include "calendar/gui/e-cal-model-tasks.h" -#define E_TASK_SHELL_CONTENT_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate)) - #define E_TASK_TABLE_DEFAULT_STATE \ "<?xml version=\"1.0\"?>" \ "<ETableState>" \ @@ -275,7 +271,7 @@ task_shell_content_restore_state_cb (EShellWindow *shell_window, GObject *object; const gchar *key; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_TASK_SHELL_CONTENT (shell_content)->priv; /* Bind GObject properties to GConf keys. */ @@ -365,7 +361,7 @@ task_shell_content_dispose (GObject *object) { ETaskShellContentPrivate *priv; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_TASK_SHELL_CONTENT (object)->priv; if (priv->paned != NULL) { g_object_unref (priv->paned); @@ -401,7 +397,7 @@ task_shell_content_finalize (GObject *object) { ETaskShellContentPrivate *priv; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_TASK_SHELL_CONTENT (object)->priv; g_free (priv->current_uid); @@ -425,7 +421,7 @@ task_shell_content_constructed (GObject *object) GtkWidget *widget; gint n_targets; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (object); + priv = E_TASK_SHELL_CONTENT (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -627,7 +623,7 @@ task_shell_content_focus_search_results (EShellContent *shell_content) { ETaskShellContentPrivate *priv; - priv = E_TASK_SHELL_CONTENT_GET_PRIVATE (shell_content); + priv = E_TASK_SHELL_CONTENT (shell_content)->priv; gtk_widget_grab_focus (priv->task_table); } @@ -680,8 +676,7 @@ task_shell_content_class_init (ETaskShellContentClass *class) static void task_shell_content_init (ETaskShellContent *task_shell_content) { - task_shell_content->priv = - E_TASK_SHELL_CONTENT_GET_PRIVATE (task_shell_content); + task_shell_content->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_content, E_TYPE_TASK_SHELL_CONTENT, ETaskShellContentPrivate); /* Postpone widget construction until we have a shell view. */ } diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c index 62973d2efc..c6f6e1526d 100644 --- a/modules/calendar/e-task-shell-sidebar.c +++ b/modules/calendar/e-task-shell-sidebar.c @@ -35,10 +35,6 @@ #include "e-task-shell-backend.h" #include "e-task-shell-content.h" -#define E_TASK_SHELL_SIDEBAR_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TASK_SHELL_SIDEBAR, ETaskShellSidebarPrivate)) - struct _ETaskShellSidebarPrivate { GtkWidget *selector; @@ -234,7 +230,7 @@ task_shell_sidebar_default_loaded_cb (ESource *source, ECal *client; GError *error = NULL; - priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); + priv = E_TASK_SHELL_SIDEBAR (shell_sidebar)->priv; shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); shell_content = e_shell_view_get_shell_content (shell_view); @@ -412,7 +408,7 @@ task_shell_sidebar_restore_state_cb (EShellWindow *shell_window, GtkTreeModel *model; GSList *list, *iter; - priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (shell_sidebar); + priv = E_TASK_SHELL_SIDEBAR (shell_sidebar)->priv; shell = e_shell_window_get_shell (shell_window); shell_settings = e_shell_get_shell_settings (shell); @@ -499,7 +495,7 @@ task_shell_sidebar_dispose (GObject *object) { ETaskShellSidebarPrivate *priv; - priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_TASK_SHELL_SIDEBAR (object)->priv; if (priv->selector != NULL) { g_object_unref (priv->selector); @@ -528,7 +524,7 @@ task_shell_sidebar_finalize (GObject *object) { ETaskShellSidebarPrivate *priv; - priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_TASK_SHELL_SIDEBAR (object)->priv; g_hash_table_destroy (priv->client_table); @@ -549,7 +545,7 @@ task_shell_sidebar_constructed (GObject *object) GtkWidget *widget; AtkObject *a11y; - priv = E_TASK_SHELL_SIDEBAR_GET_PRIVATE (object); + priv = E_TASK_SHELL_SIDEBAR (object)->priv; /* Chain up to parent's constructed() method. */ G_OBJECT_CLASS (parent_class)->constructed (object); @@ -744,8 +740,7 @@ task_shell_sidebar_init (ETaskShellSidebar *task_shell_sidebar) (GDestroyNotify) g_free, (GDestroyNotify) g_object_unref); - task_shell_sidebar->priv = - E_TASK_SHELL_SIDEBAR_GET_PRIVATE (task_shell_sidebar); + task_shell_sidebar->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_sidebar, E_TYPE_TASK_SHELL_SIDEBAR, ETaskShellSidebarPrivate); task_shell_sidebar->priv->client_table = client_table; diff --git a/modules/calendar/e-task-shell-view-private.h b/modules/calendar/e-task-shell-view-private.h index b95c0d5e5b..b7dace83b7 100644 --- a/modules/calendar/e-task-shell-view-private.h +++ b/modules/calendar/e-task-shell-view-private.h @@ -54,10 +54,6 @@ #include "e-task-shell-sidebar.h" #include "e-task-shell-view-actions.h" -#define E_TASK_SHELL_VIEW_GET_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE \ - ((obj), E_TYPE_TASK_SHELL_VIEW, ETaskShellViewPrivate)) - /* Shorthand, requires a variable named "shell_window". */ #define ACTION(name) \ (E_SHELL_WINDOW_ACTION_##name (shell_window)) diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c index 7b575f84d4..e4b5e03a5b 100644 --- a/modules/calendar/e-task-shell-view.c +++ b/modules/calendar/e-task-shell-view.c @@ -467,8 +467,7 @@ static void task_shell_view_init (ETaskShellView *task_shell_view, EShellViewClass *shell_view_class) { - task_shell_view->priv = - E_TASK_SHELL_VIEW_GET_PRIVATE (task_shell_view); + task_shell_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_shell_view, E_TYPE_TASK_SHELL_VIEW, ETaskShellViewPrivate); e_task_shell_view_private_init (task_shell_view, shell_view_class); } |