aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
commit1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch)
tree8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /calendar
parent1a4be6c521d674c4a60e54203521e2721b81b921 (diff)
downloadgsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c8
-rw-r--r--calendar/gui/dialogs/comp-editor-page.c8
-rw-r--r--calendar/gui/dialogs/comp-editor.c14
-rw-r--r--calendar/gui/dialogs/event-editor.c30
-rw-r--r--calendar/gui/dialogs/event-page.c14
-rw-r--r--calendar/gui/dialogs/memo-editor.c12
-rw-r--r--calendar/gui/dialogs/memo-page.c14
-rw-r--r--calendar/gui/dialogs/recurrence-page.c14
-rw-r--r--calendar/gui/dialogs/schedule-page.c8
-rw-r--r--calendar/gui/dialogs/task-details-page.c8
-rw-r--r--calendar/gui/dialogs/task-editor.c28
-rw-r--r--calendar/gui/dialogs/task-page.c10
-rw-r--r--calendar/gui/e-cal-component-preview.c6
-rw-r--r--calendar/gui/e-cal-config.c9
-rw-r--r--calendar/gui/e-cal-config.h6
-rw-r--r--calendar/gui/e-cal-model-tasks.c8
-rw-r--r--calendar/gui/e-cal-model.c14
-rw-r--r--calendar/gui/e-calendar-selector.c6
-rw-r--r--calendar/gui/e-calendar-view.c10
-rw-r--r--calendar/gui/e-cell-date-edit-text.c6
-rw-r--r--calendar/gui/e-day-view-main-item.c8
-rw-r--r--calendar/gui/e-day-view-time-item.c8
-rw-r--r--calendar/gui/e-day-view-top-item.c8
-rw-r--r--calendar/gui/e-meeting-store.c8
-rw-r--r--calendar/gui/e-meeting-time-sel.c6
-rw-r--r--calendar/gui/e-memo-list-selector.c6
-rw-r--r--calendar/gui/e-memo-table.c8
-rw-r--r--calendar/gui/e-month-view.c6
-rw-r--r--calendar/gui/e-task-list-selector.c6
-rw-r--r--calendar/gui/e-task-table.c8
-rw-r--r--calendar/gui/e-timezone-entry.c10
-rw-r--r--calendar/gui/e-week-view-event-item.c6
-rw-r--r--calendar/gui/e-week-view-main-item.c8
-rw-r--r--calendar/gui/e-week-view-titles-item.c8
34 files changed, 105 insertions, 232 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 7f39f484fe..1a990a18b8 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -34,10 +34,6 @@
#include "config-data.h"
#include "common/authentication.h"
-#define ALARM_NOTIFY_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_ALARM_NOTIFY, AlarmNotifyPrivate))
-
struct _AlarmNotifyPrivate {
/* Mapping from EUri's to LoadedClient structures */
/* FIXME do we need per source type uri hashes? or perhaps we
@@ -208,7 +204,7 @@ alarm_notify_finalize (GObject *object)
AlarmNotifyPrivate *priv;
gint ii;
- priv = ALARM_NOTIFY_GET_PRIVATE (object);
+ priv = ALARM_NOTIFY (object)->priv;
for (ii = 0; ii < E_CAL_SOURCE_TYPE_LAST; ii++) {
g_hash_table_foreach (
@@ -242,7 +238,7 @@ alarm_notify_init (AlarmNotify *an)
{
gint ii;
- an->priv = ALARM_NOTIFY_GET_PRIVATE (an);
+ an->priv = G_TYPE_INSTANCE_GET_PRIVATE (an, TYPE_ALARM_NOTIFY, AlarmNotifyPrivate);
an->priv->mutex = g_mutex_new ();
an->priv->selected_calendars = config_data_get_calendars (
"/apps/evolution/calendar/sources");
diff --git a/calendar/gui/dialogs/comp-editor-page.c b/calendar/gui/dialogs/comp-editor-page.c
index 2281e5d0fc..657243d31b 100644
--- a/calendar/gui/dialogs/comp-editor-page.c
+++ b/calendar/gui/dialogs/comp-editor-page.c
@@ -31,10 +31,6 @@
#include "comp-editor.h"
#include "comp-editor-page.h"
-#define COMP_EDITOR_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_COMP_EDITOR_PAGE, CompEditorPagePrivate))
-
struct _CompEditorPagePrivate {
CompEditor *editor; /* not referenced */
gboolean updating;
@@ -62,7 +58,7 @@ comp_editor_page_set_property (GObject *object,
{
CompEditorPagePrivate *priv;
- priv = COMP_EDITOR_PAGE_GET_PRIVATE (object);
+ priv = COMP_EDITOR_PAGE (object)->priv;
switch (property_id) {
case PROP_EDITOR:
@@ -176,7 +172,7 @@ comp_editor_page_class_init (CompEditorPageClass *class)
static void
comp_editor_page_init (CompEditorPage *page)
{
- page->priv = COMP_EDITOR_PAGE_GET_PRIVATE (page);
+ page->priv = G_TYPE_INSTANCE_GET_PRIVATE (page, TYPE_COMP_EDITOR_PAGE, CompEditorPagePrivate);
page->accel_group = NULL;
}
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 2bb258b0e7..2d0f524c10 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -60,10 +60,6 @@
#include "e-util/e-alert-dialog.h"
#include "e-util/e-ui-manager.h"
-#define COMP_EDITOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_COMP_EDITOR, CompEditorPrivate))
-
#define d(x)
/* Private part of the CompEditor structure */
@@ -1443,7 +1439,7 @@ comp_editor_dispose (GObject *object)
{
CompEditorPrivate *priv;
- priv = COMP_EDITOR_GET_PRIVATE (object);
+ priv = COMP_EDITOR (object)->priv;
if (priv->shell != NULL) {
g_object_remove_weak_pointer (
@@ -1507,7 +1503,7 @@ comp_editor_finalize (GObject *object)
{
CompEditorPrivate *priv;
- priv = COMP_EDITOR_GET_PRIVATE (object);
+ priv = COMP_EDITOR (object)->priv;
g_free (priv->summary);
@@ -1608,7 +1604,7 @@ comp_editor_drag_motion (GtkWidget *widget,
CompEditorPrivate *priv;
EAttachmentView *view;
- priv = COMP_EDITOR_GET_PRIVATE (widget);
+ priv = COMP_EDITOR (widget)->priv;
view = E_ATTACHMENT_VIEW (priv->attachment_view);
return e_attachment_view_drag_motion (view, context, x, y, time);
@@ -1626,7 +1622,7 @@ comp_editor_drag_data_received (GtkWidget *widget,
CompEditorPrivate *priv;
EAttachmentView *view;
- priv = COMP_EDITOR_GET_PRIVATE (widget);
+ priv = COMP_EDITOR (widget)->priv;
view = E_ATTACHMENT_VIEW (priv->attachment_view);
/* Forward the data to the attachment view. Note that calling
@@ -1835,7 +1831,7 @@ comp_editor_init (CompEditor *editor)
express_mode = e_shell_get_express_mode (shell);
meego_mode = e_shell_get_meego_mode (shell);
- editor->priv = priv = COMP_EDITOR_GET_PRIVATE (editor);
+ editor->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (editor, TYPE_COMP_EDITOR, CompEditorPrivate);
g_object_weak_ref (
G_OBJECT (editor), (GWeakNotify)
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 7ee860f457..055fc229c0 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -43,10 +43,6 @@
#include "cancel-comp.h"
#include "event-editor.h"
-#define EVENT_EDITOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_EVENT_EDITOR, EventEditorPrivate))
-
struct _EventEditorPrivate {
EventPage *event_page;
RecurrencePage *recur_page;
@@ -121,7 +117,7 @@ create_schedule_page (CompEditor *editor)
CompEditorPage *page;
GtkWidget *content_area;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
priv->sched_window = gtk_dialog_new_with_buttons (
_("Free/Busy"), GTK_WINDOW (editor), GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -300,7 +296,7 @@ event_editor_constructor (GType type,
type, n_construct_properties, construct_properties);
editor = COMP_EDITOR (object);
- priv = EVENT_EDITOR_GET_PRIVATE (object);
+ priv = EVENT_EDITOR (object)->priv;
shell = comp_editor_get_shell (editor);
@@ -398,7 +394,7 @@ event_editor_dispose (GObject *object)
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (object);
+ priv = EVENT_EDITOR (object)->priv;
if (priv->event_page) {
g_object_unref (priv->event_page);
@@ -431,7 +427,7 @@ event_editor_constructed (GObject *object)
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (object);
+ priv = EVENT_EDITOR (object)->priv;
g_object_bind_property (
object, "client",
@@ -448,7 +444,7 @@ event_editor_show_categories (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_show_categories (priv->event_page, visible);
}
@@ -459,7 +455,7 @@ event_editor_show_role (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_role (priv->event_page, visible);
}
@@ -470,7 +466,7 @@ event_editor_show_rsvp (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_rsvp (priv->event_page, visible);
}
@@ -481,7 +477,7 @@ event_editor_show_status (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_status (priv->event_page, visible);
}
@@ -492,7 +488,7 @@ event_editor_show_time_zone (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_show_timezone (priv->event_page, visible);
}
@@ -503,7 +499,7 @@ event_editor_show_type (CompEditor *editor,
{
EventEditorPrivate *priv;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
event_page_set_view_type (priv->event_page, visible);
}
@@ -543,7 +539,7 @@ event_editor_init (EventEditor *ee)
const gchar *id;
GError *error = NULL;
- ee->priv = EVENT_EDITOR_GET_PRIVATE (ee);
+ ee->priv = G_TYPE_INSTANCE_GET_PRIVATE (ee, TYPE_EVENT_EDITOR, EventEditorPrivate);
ee->priv->model = E_MEETING_STORE (e_meeting_store_new ());
ee->priv->meeting_shown = TRUE;
ee->priv->updating = FALSE;
@@ -609,7 +605,7 @@ event_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECal *client;
GSList *attendees = NULL;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
priv->updating = TRUE;
delegate = (comp_editor_get_flags (COMP_EDITOR (editor)) & COMP_EDITOR_DELEGATE);
@@ -722,7 +718,7 @@ event_editor_send_comp (CompEditor *editor,
EventEditorPrivate *priv;
ECalComponent *comp = NULL;
- priv = EVENT_EDITOR_GET_PRIVATE (editor);
+ priv = EVENT_EDITOR (editor)->priv;
/* Don't cancel more than once or when just publishing */
if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 7d7e1d4859..e4459a4779 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -58,10 +58,6 @@
#include "event-page.h"
#include "e-send-options-utils.h"
-#define EVENT_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_EVENT_PAGE, EventPagePrivate))
-
enum {
ALARM_NONE,
ALARM_15_MINUTES,
@@ -215,7 +211,7 @@ event_page_dispose (GObject *object)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (object);
+ priv = EVENT_PAGE (object)->priv;
if (priv->comp != NULL) {
g_object_unref (priv->comp);
@@ -251,7 +247,7 @@ event_page_finalize (GObject *object)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (object);
+ priv = EVENT_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -293,7 +289,7 @@ event_page_class_init (EventPageClass *class)
static void
event_page_init (EventPage *epage)
{
- epage->priv = EVENT_PAGE_GET_PRIVATE (epage);
+ epage->priv = G_TYPE_INSTANCE_GET_PRIVATE (epage, TYPE_EVENT_PAGE, EventPagePrivate);
epage->priv->deleted_attendees = g_ptr_array_new ();
epage->priv->alarm_interval = -1;
epage->priv->alarm_map = alarm_map_with_user_time;
@@ -338,7 +334,7 @@ event_page_get_widget (CompEditorPage *page)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (page);
+ priv = EVENT_PAGE (page)->priv;
return priv->main;
}
@@ -349,7 +345,7 @@ event_page_focus_main_widget (CompEditorPage *page)
{
EventPagePrivate *priv;
- priv = EVENT_PAGE_GET_PRIVATE (page);
+ priv = EVENT_PAGE (page)->priv;
gtk_widget_grab_focus (priv->summary);
}
diff --git a/calendar/gui/dialogs/memo-editor.c b/calendar/gui/dialogs/memo-editor.c
index 0e3cfc5dcf..50f862aa7a 100644
--- a/calendar/gui/dialogs/memo-editor.c
+++ b/calendar/gui/dialogs/memo-editor.c
@@ -38,10 +38,6 @@
#include "cancel-comp.h"
#include "memo-editor.h"
-#define MEMO_EDITOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_MEMO_EDITOR, MemoEditorPrivate))
-
struct _MemoEditorPrivate {
MemoPage *memo_page;
@@ -73,7 +69,7 @@ memo_editor_show_categories (CompEditor *editor,
{
MemoEditorPrivate *priv;
- priv = MEMO_EDITOR_GET_PRIVATE (editor);
+ priv = MEMO_EDITOR (editor)->priv;
memo_page_set_show_categories (priv->memo_page, visible);
}
@@ -83,7 +79,7 @@ memo_editor_dispose (GObject *object)
{
MemoEditorPrivate *priv;
- priv = MEMO_EDITOR_GET_PRIVATE (object);
+ priv = MEMO_EDITOR (object)->priv;
if (priv->memo_page) {
g_object_unref (priv->memo_page);
@@ -100,7 +96,7 @@ memo_editor_constructed (GObject *object)
MemoEditorPrivate *priv;
CompEditor *editor;
- priv = MEMO_EDITOR_GET_PRIVATE (object);
+ priv = MEMO_EDITOR (object)->priv;
editor = COMP_EDITOR (object);
priv->memo_page = memo_page_new (editor);
@@ -140,7 +136,7 @@ memo_editor_init (MemoEditor *me)
const gchar *id;
GError *error = NULL;
- me->priv = MEMO_EDITOR_GET_PRIVATE (me);
+ me->priv = G_TYPE_INSTANCE_GET_PRIVATE (me, TYPE_MEMO_EDITOR, MemoEditorPrivate);
me->priv->updating = FALSE;
ui_manager = comp_editor_get_ui_manager (editor);
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 03cf7e7b95..45b18a5982 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -54,10 +54,6 @@
#include "e-send-options-utils.h"
#include "memo-page.h"
-#define MEMO_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_MEMO_PAGE, MemoPagePrivate))
-
/* Private part of the MemoPage structure */
struct _MemoPagePrivate {
GtkBuilder *builder;
@@ -140,7 +136,7 @@ memo_page_dispose (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE_GET_PRIVATE (object);
+ priv = MEMO_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -154,7 +150,7 @@ memo_page_finalize (GObject *object)
{
MemoPagePrivate *priv;
- priv = MEMO_PAGE_GET_PRIVATE (object);
+ priv = MEMO_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -175,7 +171,7 @@ memo_page_finalize (GObject *object)
static GtkWidget *
memo_page_get_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
+ MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
return priv->main;
}
@@ -183,7 +179,7 @@ memo_page_get_widget (CompEditorPage *page)
static void
memo_page_focus_main_widget (CompEditorPage *page)
{
- MemoPagePrivate *priv = MEMO_PAGE_GET_PRIVATE (page);
+ MemoPagePrivate *priv = MEMO_PAGE (page)->priv;
gtk_widget_grab_focus (priv->summary_entry);
}
@@ -319,7 +315,7 @@ memo_page_class_init (MemoPageClass *class)
static void
memo_page_init (MemoPage *mpage)
{
- mpage->priv = MEMO_PAGE_GET_PRIVATE (mpage);
+ mpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (mpage, TYPE_MEMO_PAGE, MemoPagePrivate);
}
/* returns whether changed info text */
diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c
index e8deefae36..3fd4811b16 100644
--- a/calendar/gui/dialogs/recurrence-page.c
+++ b/calendar/gui/dialogs/recurrence-page.c
@@ -46,10 +46,6 @@
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-util-private.h"
-#define RECURRENCE_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_RECURRENCE_PAGE, RecurrencePagePrivate))
-
enum month_num_options {
MONTH_NUM_FIRST,
MONTH_NUM_SECOND,
@@ -301,7 +297,7 @@ recurrence_page_dispose (GObject *object)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (object);
+ priv = RECURRENCE_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -337,7 +333,7 @@ recurrence_page_finalize (GObject *object)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (object);
+ priv = RECURRENCE_PAGE (object)->priv;
g_signal_handlers_disconnect_matched (
E_CALENDAR (priv->preview_calendar)->calitem,
@@ -381,7 +377,7 @@ recurrence_page_class_init (RecurrencePageClass *class)
static void
recurrence_page_init (RecurrencePage *rpage)
{
- rpage->priv = RECURRENCE_PAGE_GET_PRIVATE (rpage);
+ rpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (rpage, TYPE_RECURRENCE_PAGE, RecurrencePagePrivate);
}
/* get_widget handler for the recurrence page */
@@ -390,7 +386,7 @@ recurrence_page_get_widget (CompEditorPage *page)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (page);
+ priv = RECURRENCE_PAGE (page)->priv;
return priv->main;
}
@@ -401,7 +397,7 @@ recurrence_page_focus_main_widget (CompEditorPage *page)
{
RecurrencePagePrivate *priv;
- priv = RECURRENCE_PAGE_GET_PRIVATE (page);
+ priv = RECURRENCE_PAGE (page)->priv;
gtk_widget_grab_focus (priv->recurs);
}
diff --git a/calendar/gui/dialogs/schedule-page.c b/calendar/gui/dialogs/schedule-page.c
index 4d234880b4..50fc7d1865 100644
--- a/calendar/gui/dialogs/schedule-page.c
+++ b/calendar/gui/dialogs/schedule-page.c
@@ -40,10 +40,6 @@
#include "e-delegate-dialog.h"
#include "schedule-page.h"
-#define SCHEDULE_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_SCHEDULE_PAGE, SchedulePagePrivate))
-
/* Private part of the SchedulePage structure */
struct _SchedulePagePrivate {
GtkBuilder *builder;
@@ -163,7 +159,7 @@ schedule_page_dispose (GObject *object)
{
SchedulePagePrivate *priv;
- priv = SCHEDULE_PAGE_GET_PRIVATE (object);
+ priv = SCHEDULE_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -275,7 +271,7 @@ schedule_page_class_init (SchedulePageClass *class)
static void
schedule_page_init (SchedulePage *spage)
{
- spage->priv = SCHEDULE_PAGE_GET_PRIVATE (spage);
+ spage->priv = G_TYPE_INSTANCE_GET_PRIVATE (spage, TYPE_SCHEDULE_PAGE, SchedulePagePrivate);
}
/* Gets the widgets from the XML file and returns if they are all available. */
diff --git a/calendar/gui/dialogs/task-details-page.c b/calendar/gui/dialogs/task-details-page.c
index 43f38a20a5..16f986c5aa 100644
--- a/calendar/gui/dialogs/task-details-page.c
+++ b/calendar/gui/dialogs/task-details-page.c
@@ -41,10 +41,6 @@
#include "e-util/e-dialog-widgets.h"
#include "e-util/e-util-private.h"
-#define TASK_DETAILS_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_TASK_DETAILS_PAGE, TaskDetailsPagePrivate))
-
struct _TaskDetailsPagePrivate {
GtkBuilder *builder;
@@ -177,7 +173,7 @@ task_details_page_dispose (GObject *object)
{
TaskDetailsPagePrivate *priv;
- priv = TASK_DETAILS_PAGE_GET_PRIVATE (object);
+ priv = TASK_DETAILS_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -440,7 +436,7 @@ task_details_page_class_init (TaskDetailsPageClass *class)
static void
task_details_page_init (TaskDetailsPage *tdpage)
{
- tdpage->priv = TASK_DETAILS_PAGE_GET_PRIVATE (tdpage);
+ tdpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (tdpage, TYPE_TASK_DETAILS_PAGE, TaskDetailsPagePrivate);
}
/* Gets the widgets from the XML file and returns if they are all available. */
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 933299feb0..1d8bec3ea7 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -40,10 +40,6 @@
#include "cancel-comp.h"
#include "task-editor.h"
-#define TASK_EDITOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_TASK_EDITOR, TaskEditorPrivate))
-
struct _TaskEditorPrivate {
TaskPage *task_page;
TaskDetailsPage *task_details_page;
@@ -156,7 +152,7 @@ task_editor_constructor (GType type,
type, n_construct_properties, construct_properties);
editor = COMP_EDITOR (object);
- priv = TASK_EDITOR_GET_PRIVATE (object);
+ priv = TASK_EDITOR (object)->priv;
client = comp_editor_get_client (editor);
flags = comp_editor_get_flags (editor);
@@ -181,7 +177,7 @@ task_editor_dispose (GObject *object)
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (object);
+ priv = TASK_EDITOR (object)->priv;
if (priv->task_page) {
g_object_unref (priv->task_page);
@@ -207,7 +203,7 @@ task_editor_constructed (GObject *object)
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (object);
+ priv = TASK_EDITOR (object)->priv;
g_object_bind_property (
object, "client",
@@ -224,7 +220,7 @@ task_editor_show_categories (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_show_categories (priv->task_page, visible);
}
@@ -235,7 +231,7 @@ task_editor_show_role (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_role (priv->task_page, visible);
}
@@ -246,7 +242,7 @@ task_editor_show_rsvp (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_rsvp (priv->task_page, visible);
}
@@ -257,7 +253,7 @@ task_editor_show_status (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_status (priv->task_page, visible);
}
@@ -268,7 +264,7 @@ task_editor_show_time_zone (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_show_timezone (priv->task_page, visible);
}
@@ -279,7 +275,7 @@ task_editor_show_type (CompEditor *editor,
{
TaskEditorPrivate *priv;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
task_page_set_view_type (priv->task_page, visible);
}
@@ -320,7 +316,7 @@ task_editor_init (TaskEditor *te)
const gchar *id;
GError *error = NULL;
- te->priv = TASK_EDITOR_GET_PRIVATE (te);
+ te->priv = G_TYPE_INSTANCE_GET_PRIVATE (te, TYPE_TASK_EDITOR, TaskEditorPrivate);
te->priv->model = E_MEETING_STORE (e_meeting_store_new ());
te->priv->assignment_shown = TRUE;
te->priv->updating = FALSE;
@@ -394,7 +390,7 @@ task_editor_edit_comp (CompEditor *editor, ECalComponent *comp)
ECal *client;
GSList *attendees = NULL;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
priv->updating = TRUE;
@@ -477,7 +473,7 @@ task_editor_send_comp (CompEditor *editor,
TaskEditorPrivate *priv;
ECalComponent *comp = NULL;
- priv = TASK_EDITOR_GET_PRIVATE (editor);
+ priv = TASK_EDITOR (editor)->priv;
/* Don't cancel more than once or when just publishing */
if (method == E_CAL_COMPONENT_METHOD_PUBLISH ||
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 6df7afc9aa..8555afdcc9 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -54,10 +54,6 @@
#include "../e-meeting-store.h"
#include "../e-meeting-list-view.h"
-#define TASK_PAGE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), TYPE_TASK_PAGE, TaskPagePrivate))
-
/* Private part of the TaskPage structure */
struct _TaskPagePrivate {
GtkBuilder *builder;
@@ -152,7 +148,7 @@ task_page_dispose (GObject *object)
{
TaskPagePrivate *priv;
- priv = TASK_PAGE_GET_PRIVATE (object);
+ priv = TASK_PAGE (object)->priv;
if (priv->main != NULL) {
g_object_unref (priv->main);
@@ -183,7 +179,7 @@ task_page_finalize (GObject *object)
{
TaskPagePrivate *priv;
- priv = TASK_PAGE_GET_PRIVATE (object);
+ priv = TASK_PAGE (object)->priv;
g_list_foreach (priv->address_strings, (GFunc) g_free, NULL);
g_list_free (priv->address_strings);
@@ -221,7 +217,7 @@ task_page_class_init (TaskPageClass *class)
static void
task_page_init (TaskPage *tpage)
{
- tpage->priv = TASK_PAGE_GET_PRIVATE (tpage);
+ tpage->priv = G_TYPE_INSTANCE_GET_PRIVATE (tpage, TYPE_TASK_PAGE, TaskPagePrivate);
tpage->priv->deleted_attendees = g_ptr_array_new ();
}
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index 636e734d82..b9cb7f3eea 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -34,10 +34,6 @@
#include <e-util/e-util.h>
#include <e-util/e-categories-config.h>
-#define E_CAL_COMPONENT_PREVIEW_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewPrivate))
-
struct _ECalComponentPreviewPrivate {
/* information about currently showing component in a preview;
if it didn't change then the preview is not updated */
@@ -404,7 +400,7 @@ cal_component_preview_class_init (ECalComponentPreviewClass *class)
static void
cal_component_preview_init (ECalComponentPreview *preview)
{
- preview->priv = E_CAL_COMPONENT_PREVIEW_GET_PRIVATE (preview);
+ preview->priv = G_TYPE_INSTANCE_GET_PRIVATE (preview, E_TYPE_CAL_COMPONENT_PREVIEW, ECalComponentPreviewPrivate);
}
GType
diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c
index 10dc316ffa..213041bf30 100644
--- a/calendar/gui/e-cal-config.c
+++ b/calendar/gui/e-cal-config.c
@@ -33,17 +33,16 @@ struct _ECalConfigPrivate {
guint source_changed_id;
};
-#define _PRIVATE(o) (g_type_instance_get_private ((GTypeInstance *)o, e_cal_config_get_type ()))
-
static void
-ecp_init (GObject *o)
+ecp_init (ECalConfig *cfg)
{
+ cfg->priv = G_TYPE_INSTANCE_GET_PRIVATE (cfg, E_TYPE_CAL_CONFIG, ECalConfigPrivate);
}
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _ECalConfigPrivate *p = _PRIVATE (ec);
+ struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
if (ec->target == t) {
switch (t->type) {
@@ -85,7 +84,7 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _ECalConfigPrivate *p = _PRIVATE (ec);
+ struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv;
((EConfigClass *)ecp_parent_class)->set_target (ec, t);
diff --git a/calendar/gui/e-cal-config.h b/calendar/gui/e-cal-config.h
index 73514ec220..828bcf4cb4 100644
--- a/calendar/gui/e-cal-config.h
+++ b/calendar/gui/e-cal-config.h
@@ -29,13 +29,19 @@
#include <libecal/e-cal.h>
#include "e-util/e-config.h"
+#define E_TYPE_CAL_CONFIG (e_cal_config_get_type())
+#define E_CAL_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_CAL_CONFIG, ECalConfig))
+
G_BEGIN_DECLS
typedef struct _ECalConfig ECalConfig;
typedef struct _ECalConfigClass ECalConfigClass;
+typedef struct _ECalConfigPrivate ECalConfigPrivate;
struct _ECalConfig {
EConfig config;
+
+ ECalConfigPrivate *priv;
};
struct _ECalConfigClass {
diff --git a/calendar/gui/e-cal-model-tasks.c b/calendar/gui/e-cal-model-tasks.c
index 30e57f9a81..c4690e3fca 100644
--- a/calendar/gui/e-cal-model-tasks.c
+++ b/calendar/gui/e-cal-model-tasks.c
@@ -37,10 +37,6 @@
#include "e-cell-date-edit-text.h"
#include "misc.h"
-#define E_CAL_MODEL_TASKS_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CAL_MODEL_TASKS, ECalModelTasksPrivate))
-
struct _ECalModelTasksPrivate {
gchar *color_due_today;
gchar *color_overdue;
@@ -122,7 +118,7 @@ cal_model_tasks_finalize (GObject *object)
{
ECalModelTasksPrivate *priv;
- priv = E_CAL_MODEL_TASKS_GET_PRIVATE (object);
+ priv = E_CAL_MODEL_TASKS (object)->priv;
g_free (priv->color_due_today);
g_free (priv->color_overdue);
@@ -184,7 +180,7 @@ e_cal_model_tasks_class_init (ECalModelTasksClass *class)
static void
e_cal_model_tasks_init (ECalModelTasks *model)
{
- model->priv = E_CAL_MODEL_TASKS_GET_PRIVATE (model);
+ model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_CAL_MODEL_TASKS, ECalModelTasksPrivate);
e_cal_model_set_component_kind (
E_CAL_MODEL (model), ICAL_VTODO_COMPONENT);
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index d0b0c988d3..c9f92b626d 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -40,14 +40,6 @@
#include "e-util/e-extensible.h"
#include "e-util/e-util-enumtypes.h"
-#define E_CAL_MODEL_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CAL_MODEL, ECalModelPrivate))
-
-#define E_CAL_MODEL_COMPONENT_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponentPrivate))
-
typedef struct {
ECal *client;
ECalView *query;
@@ -385,7 +377,7 @@ cal_model_dispose (GObject *object)
{
ECalModelPrivate *priv;
- priv = E_CAL_MODEL_GET_PRIVATE (object);
+ priv = E_CAL_MODEL (object)->priv;
if (priv->clients) {
while (priv->clients != NULL) {
@@ -419,7 +411,7 @@ cal_model_finalize (GObject *object)
ECalModelPrivate *priv;
gint ii;
- priv = E_CAL_MODEL_GET_PRIVATE (object);
+ priv = E_CAL_MODEL (object)->priv;
g_free (priv->search_sexp);
g_free (priv->full_sexp);
@@ -698,7 +690,7 @@ e_cal_model_class_init (ECalModelClass *class)
static void
e_cal_model_init (ECalModel *model)
{
- model->priv = E_CAL_MODEL_GET_PRIVATE (model);
+ model->priv = G_TYPE_INSTANCE_GET_PRIVATE (model, E_TYPE_CAL_MODEL, ECalModelPrivate);
/* match none by default */
model->priv->start = -1;
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index 915c970871..a920554352 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -24,10 +24,6 @@
#include "e-util/e-selection.h"
#include "common/authentication.h"
-#define E_CALENDAR_SELECTOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate))
-
struct _ECalendarSelectorPrivate {
gint dummy_value;
};
@@ -162,7 +158,7 @@ calendar_selector_class_init (ECalendarSelectorClass *class)
static void
calendar_selector_init (ECalendarSelector *selector)
{
- selector->priv = E_CALENDAR_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c
index d7aa3d8716..60371ae036 100644
--- a/calendar/gui/e-calendar-view.c
+++ b/calendar/gui/e-calendar-view.c
@@ -61,10 +61,6 @@
#include "goto.h"
#include "misc.h"
-#define E_CALENDAR_VIEW_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CALENDAR_VIEW, ECalendarViewPrivate))
-
struct _ECalendarViewPrivate {
/* The GnomeCalendar we are associated to */
GnomeCalendar *calendar;
@@ -322,7 +318,7 @@ calendar_view_dispose (GObject *object)
{
ECalendarViewPrivate *priv;
- priv = E_CALENDAR_VIEW_GET_PRIVATE (object);
+ priv = E_CALENDAR_VIEW (object)->priv;
if (priv->model != NULL) {
g_signal_handlers_disconnect_matched (
@@ -351,7 +347,7 @@ calendar_view_finalize (GObject *object)
{
ECalendarViewPrivate *priv;
- priv = E_CALENDAR_VIEW_GET_PRIVATE (object);
+ priv = E_CALENDAR_VIEW (object)->priv;
g_free (priv->default_category);
@@ -917,7 +913,7 @@ e_calendar_view_init (ECalendarView *calendar_view)
{
GtkTargetList *target_list;
- calendar_view->priv = E_CALENDAR_VIEW_GET_PRIVATE (calendar_view);
+ calendar_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (calendar_view, E_TYPE_CALENDAR_VIEW, ECalendarViewPrivate);
/* Set this early to avoid a divide-by-zero during init. */
calendar_view->priv->time_divisions = 30;
diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c
index 724e154648..fc56271bc4 100644
--- a/calendar/gui/e-cell-date-edit-text.c
+++ b/calendar/gui/e-cell-date-edit-text.c
@@ -38,10 +38,6 @@
#include "e-cell-date-edit-text.h"
-#define E_CELL_DATE_EDIT_TEXT_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_CELL_DATE_EDIT_TEXT, ECellDateEditTextPrivate))
-
struct _ECellDateEditTextPrivate {
/* The timezone to display the date in. */
@@ -270,7 +266,7 @@ cell_date_edit_text_class_init (ECellDateEditTextClass *class)
static void
cell_date_edit_text_init (ECellDateEditText *ecd)
{
- ecd->priv = E_CELL_DATE_EDIT_TEXT_GET_PRIVATE (ecd);
+ ecd->priv = G_TYPE_INSTANCE_GET_PRIVATE (ecd, E_TYPE_CELL_DATE_EDIT_TEXT, ECellDateEditTextPrivate);
ecd->priv->timezone = icaltimezone_get_utc_timezone ();
ecd->priv->use_24_hour_format = TRUE;
diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c
index 838295c6d6..da5296c0f5 100644
--- a/calendar/gui/e-day-view-main-item.c
+++ b/calendar/gui/e-day-view-main-item.c
@@ -40,10 +40,6 @@
#include "e-calendar-view.h"
#include "comp-util.h"
-#define E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_DAY_VIEW_MAIN_ITEM, EDayViewMainItemPrivate))
-
struct _EDayViewMainItemPrivate {
EDayView *day_view;
};
@@ -935,7 +931,7 @@ day_view_main_item_dispose (GObject *object)
{
EDayViewMainItemPrivate *priv;
- priv = E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE (object);
+ priv = E_DAY_VIEW_MAIN_ITEM (object)->priv;
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -1261,7 +1257,7 @@ day_view_main_item_class_init (EDayViewMainItemClass *class)
static void
day_view_main_item_init (EDayViewMainItem *main_item)
{
- main_item->priv = E_DAY_VIEW_MAIN_ITEM_GET_PRIVATE (main_item);
+ main_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (main_item, E_TYPE_DAY_VIEW_MAIN_ITEM, EDayViewMainItemPrivate);
}
GType
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index cfe808f806..6cf379f6a9 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -54,10 +54,6 @@
#define E_DVTMI_LARGE_HOUR_Y_PAD 1
#define E_DVTMI_SMALL_FONT_Y_PAD 1
-#define E_DAY_VIEW_TIME_ITEM_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_DAY_VIEW_TIME_ITEM, EDayViewTimeItemPrivate))
-
struct _EDayViewTimeItemPrivate {
/* The parent EDayView widget. */
EDayView *day_view;
@@ -149,7 +145,7 @@ day_view_time_item_dispose (GObject *object)
{
EDayViewTimeItemPrivate *priv;
- priv = E_DAY_VIEW_TIME_ITEM_GET_PRIVATE (object);
+ priv = E_DAY_VIEW_TIME_ITEM (object)->priv;
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -212,7 +208,7 @@ day_view_time_item_init (EDayViewTimeItem *time_item)
{
gchar *last;
- time_item->priv = E_DAY_VIEW_TIME_ITEM_GET_PRIVATE (time_item);
+ time_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (time_item, E_TYPE_DAY_VIEW_TIME_ITEM, EDayViewTimeItemPrivate);
time_item->priv->dragging_selection = FALSE;
time_item->priv->second_zone = NULL;
diff --git a/calendar/gui/e-day-view-top-item.c b/calendar/gui/e-day-view-top-item.c
index d6faa6151c..12b1bc41fa 100644
--- a/calendar/gui/e-day-view-top-item.c
+++ b/calendar/gui/e-day-view-top-item.c
@@ -37,10 +37,6 @@
#include "e-calendar-view.h"
#include "e-day-view-top-item.h"
-#define E_DAY_VIEW_TOP_ITEM_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_DAY_VIEW_TOP_ITEM, EDayViewTopItemPrivate))
-
struct _EDayViewTopItemPrivate {
/* The parent EDayView widget. */
EDayView *day_view;
@@ -523,7 +519,7 @@ day_view_top_item_dispose (GObject *object)
{
EDayViewTopItemPrivate *priv;
- priv = E_DAY_VIEW_TOP_ITEM_GET_PRIVATE (object);
+ priv = E_DAY_VIEW_TOP_ITEM (object)->priv;
if (priv->day_view != NULL) {
g_object_unref (priv->day_view);
@@ -788,7 +784,7 @@ day_view_top_item_class_init (EDayViewTopItemClass *class)
static void
day_view_top_item_init (EDayViewTopItem *top_item)
{
- top_item->priv = E_DAY_VIEW_TOP_ITEM_GET_PRIVATE (top_item);
+ top_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (top_item, E_TYPE_DAY_VIEW_TOP_ITEM, EDayViewTopItemPrivate);
}
GType
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index ccf8fe255b..71806dd1d8 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -44,10 +44,6 @@
#define ROW_VALID(store, row) \
(row >= 0 && row < store->priv->attendees->len)
-#define E_MEETING_STORE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MEETING_STORE, EMeetingStorePrivate))
-
struct _EMeetingStorePrivate {
GPtrArray *attendees;
gint stamp;
@@ -715,7 +711,7 @@ meeting_store_finalize (GObject *object)
EMeetingStorePrivate *priv;
gint i;
- priv = E_MEETING_STORE_GET_PRIVATE (object);
+ priv = E_MEETING_STORE (object)->priv;
for (i = 0; i < priv->attendees->len; i++)
g_object_unref (g_ptr_array_index (priv->attendees, i));
@@ -822,7 +818,7 @@ e_meeting_store_class_init (EMeetingStoreClass *class)
static void
e_meeting_store_init (EMeetingStore *store)
{
- store->priv = E_MEETING_STORE_GET_PRIVATE (store);
+ store->priv = G_TYPE_INSTANCE_GET_PRIVATE (store, E_TYPE_MEETING_STORE, EMeetingStorePrivate);
store->priv->attendees = g_ptr_array_new ();
store->priv->refresh_queue = g_ptr_array_new ();
diff --git a/calendar/gui/e-meeting-time-sel.c b/calendar/gui/e-meeting-time-sel.c
index 1e9ddf97b6..ce7587049d 100644
--- a/calendar/gui/e-meeting-time-sel.c
+++ b/calendar/gui/e-meeting-time-sel.c
@@ -46,10 +46,6 @@
#include "e-meeting-list-view.h"
#include "e-meeting-time-sel-item.h"
-#define E_MEETING_TIME_SELECTOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MEETING_TIME_SELECTOR, EMeetingTimeSelectorPrivate))
-
struct _EMeetingTimeSelectorPrivate {
gint week_start_day;
guint show_week_numbers : 1;
@@ -365,7 +361,7 @@ e_meeting_time_selector_class_init (EMeetingTimeSelectorClass * class)
static void
e_meeting_time_selector_init (EMeetingTimeSelector * mts)
{
- mts->priv = E_MEETING_TIME_SELECTOR_GET_PRIVATE (mts);
+ mts->priv = G_TYPE_INSTANCE_GET_PRIVATE (mts, E_TYPE_MEETING_TIME_SELECTOR, EMeetingTimeSelectorPrivate);
/* The shadow is drawn in the border so it must be >= 2 pixels. */
gtk_container_set_border_width (GTK_CONTAINER (mts), 2);
diff --git a/calendar/gui/e-memo-list-selector.c b/calendar/gui/e-memo-list-selector.c
index 8e0ae7c203..e518ec3148 100644
--- a/calendar/gui/e-memo-list-selector.c
+++ b/calendar/gui/e-memo-list-selector.c
@@ -26,10 +26,6 @@
#include "calendar/common/authentication.h"
#include "calendar/gui/comp-util.h"
-#define E_MEMO_LIST_SELECTOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate))
-
struct _EMemoListSelectorPrivate {
gint dummy_value;
};
@@ -233,7 +229,7 @@ memo_list_selector_class_init (EMemoListSelectorClass *class)
static void
memo_list_selector_init (EMemoListSelector *selector)
{
- selector->priv = E_MEMO_LIST_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_MEMO_LIST_SELECTOR, EMemoListSelectorPrivate);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 9260c65411..1482d25d26 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -60,10 +60,6 @@
#include <e-util/e-icon-factory.h>
#include "misc.h"
-#define E_MEMO_TABLE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MEMO_TABLE, EMemoTablePrivate))
-
struct _EMemoTablePrivate {
gpointer shell_view; /* weak pointer */
ECalModel *model;
@@ -297,7 +293,7 @@ memo_table_dispose (GObject *object)
{
EMemoTablePrivate *priv;
- priv = E_MEMO_TABLE_GET_PRIVATE (object);
+ priv = E_MEMO_TABLE (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -1129,7 +1125,7 @@ memo_table_init (EMemoTable *memo_table)
{
GtkTargetList *target_list;
- memo_table->priv = E_MEMO_TABLE_GET_PRIVATE (memo_table);
+ memo_table->priv = G_TYPE_INSTANCE_GET_PRIVATE (memo_table, E_TYPE_MEMO_TABLE, EMemoTablePrivate);
target_list = gtk_target_list_new (NULL, 0);
e_target_list_add_calendar_targets (target_list, 0);
diff --git a/calendar/gui/e-month-view.c b/calendar/gui/e-month-view.c
index 238492c92c..bc82048b11 100644
--- a/calendar/gui/e-month-view.c
+++ b/calendar/gui/e-month-view.c
@@ -23,10 +23,6 @@
#include <libecal/e-cal-time-util.h>
-#define E_MONTH_VIEW_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MONTH_VIEW, EMonthViewPrivate))
-
struct _EMonthViewPrivate {
gint placeholder;
};
@@ -175,7 +171,7 @@ month_view_class_init (EMonthViewClass *class)
static void
month_view_init (EMonthView *month_view)
{
- month_view->priv = E_MONTH_VIEW_GET_PRIVATE (month_view);
+ month_view->priv = G_TYPE_INSTANCE_GET_PRIVATE (month_view, E_TYPE_MONTH_VIEW, EMonthViewPrivate);
}
GType
diff --git a/calendar/gui/e-task-list-selector.c b/calendar/gui/e-task-list-selector.c
index 317d7cae37..58096e295f 100644
--- a/calendar/gui/e-task-list-selector.c
+++ b/calendar/gui/e-task-list-selector.c
@@ -26,10 +26,6 @@
#include "calendar/common/authentication.h"
#include "calendar/gui/comp-util.h"
-#define E_TASK_LIST_SELECTOR_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate))
-
struct _ETaskListSelectorPrivate {
gint dummy_value;
};
@@ -234,7 +230,7 @@ task_list_selector_class_init (ETaskListSelectorClass *class)
static void
task_list_selector_init (ETaskListSelector *selector)
{
- selector->priv = E_TASK_LIST_SELECTOR_GET_PRIVATE (selector);
+ selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (selector, E_TYPE_TASK_LIST_SELECTOR, ETaskListSelectorPrivate);
gtk_drag_dest_set (
GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL,
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index 1af19e0ce6..8fbd4d986c 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -63,10 +63,6 @@
#include <e-util/e-icon-factory.h>
#include "misc.h"
-#define E_TASK_TABLE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_TASK_TABLE, ETaskTablePrivate))
-
struct _ETaskTablePrivate {
gpointer shell_view; /* weak pointer */
ECalModel *model;
@@ -375,7 +371,7 @@ task_table_dispose (GObject *object)
{
ETaskTablePrivate *priv;
- priv = E_TASK_TABLE_GET_PRIVATE (object);
+ priv = E_TASK_TABLE (object)->priv;
if (priv->shell_view != NULL) {
g_object_remove_weak_pointer (
@@ -1431,7 +1427,7 @@ task_table_init (ETaskTable *task_table)
{
GtkTargetList *target_list;
- task_table->priv = E_TASK_TABLE_GET_PRIVATE (task_table);
+ task_table->priv = G_TYPE_INSTANCE_GET_PRIVATE (task_table, E_TYPE_TASK_TABLE, ETaskTablePrivate);
target_list = gtk_target_list_new (NULL, 0);
e_target_list_add_calendar_targets (target_list, 0);
diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c
index c281a4aedf..56872ea870 100644
--- a/calendar/gui/e-timezone-entry.c
+++ b/calendar/gui/e-timezone-entry.c
@@ -33,10 +33,6 @@
#include <glib/gi18n.h>
#include "e-timezone-entry.h"
-#define E_TIMEZONE_ENTRY_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate))
-
struct _ETimezoneEntryPrivate {
/* The current timezone, set in e_timezone_entry_set_timezone()
or from the timezone dialog. Note that we don't copy it or
@@ -217,7 +213,7 @@ timezone_entry_mnemonic_activate (GtkWidget *widget,
{
ETimezoneEntryPrivate *priv;
- priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
+ priv = E_TIMEZONE_ENTRY (widget)->priv;
if (gtk_widget_get_can_focus (widget)) {
if (priv->button != NULL)
@@ -233,7 +229,7 @@ timezone_entry_focus (GtkWidget *widget,
{
ETimezoneEntryPrivate *priv;
- priv = E_TIMEZONE_ENTRY_GET_PRIVATE (widget);
+ priv = E_TIMEZONE_ENTRY (widget)->priv;
if (direction == GTK_DIR_TAB_FORWARD) {
if (gtk_widget_has_focus (priv->entry))
@@ -302,7 +298,7 @@ e_timezone_entry_init (ETimezoneEntry *timezone_entry)
AtkObject *a11y;
GtkWidget *widget;
- timezone_entry->priv = E_TIMEZONE_ENTRY_GET_PRIVATE (timezone_entry);
+ timezone_entry->priv = G_TYPE_INSTANCE_GET_PRIVATE (timezone_entry, E_TYPE_TIMEZONE_ENTRY, ETimezoneEntryPrivate);
gtk_widget_set_can_focus (GTK_WIDGET (timezone_entry), TRUE);
diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c
index 84615760c3..7f1807ecbd 100644
--- a/calendar/gui/e-week-view-event-item.c
+++ b/calendar/gui/e-week-view-event-item.c
@@ -39,10 +39,6 @@
#include <text/e-text.h>
-#define E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate))
-
struct _EWeekViewEventItemPrivate {
/* The event index in the EWeekView events array. */
gint event_num;
@@ -1157,7 +1153,7 @@ week_view_event_item_class_init (EWeekViewEventItemClass *class)
static void
week_view_event_item_init (EWeekViewEventItem *event_item)
{
- event_item->priv = E_WEEK_VIEW_EVENT_ITEM_GET_PRIVATE (event_item);
+ event_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (event_item, E_TYPE_WEEK_VIEW_EVENT_ITEM, EWeekViewEventItemPrivate);
event_item->priv->event_num = -1;
event_item->priv->span_num = -1;
diff --git a/calendar/gui/e-week-view-main-item.c b/calendar/gui/e-week-view-main-item.c
index ae4316ca50..13ce34bbde 100644
--- a/calendar/gui/e-week-view-main-item.c
+++ b/calendar/gui/e-week-view-main-item.c
@@ -33,10 +33,6 @@
#include "ea-calendar.h"
#include "calendar-config.h"
-#define E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_WEEK_VIEW_MAIN_ITEM, EWeekViewMainItemPrivate))
-
struct _EWeekViewMainItemPrivate {
EWeekView *week_view;
};
@@ -334,7 +330,7 @@ week_view_main_item_dispose (GObject *object)
{
EWeekViewMainItemPrivate *priv;
- priv = E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE (object);
+ priv = E_WEEK_VIEW_MAIN_ITEM (object)->priv;
if (priv->week_view != NULL) {
g_object_unref (priv->week_view);
@@ -449,7 +445,7 @@ week_view_main_item_class_init (EWeekViewMainItemClass *class)
static void
week_view_main_item_init (EWeekViewMainItem *main_item)
{
- main_item->priv = E_WEEK_VIEW_MAIN_ITEM_GET_PRIVATE (main_item);
+ main_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (main_item, E_TYPE_WEEK_VIEW_MAIN_ITEM, EWeekViewMainItemPrivate);
}
GType
diff --git a/calendar/gui/e-week-view-titles-item.c b/calendar/gui/e-week-view-titles-item.c
index fab2007954..2b9a040bb4 100644
--- a/calendar/gui/e-week-view-titles-item.c
+++ b/calendar/gui/e-week-view-titles-item.c
@@ -29,10 +29,6 @@
#include <e-util/e-util.h>
#include "e-week-view-titles-item.h"
-#define E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_WEEK_VIEW_TITLES_ITEM, EWeekViewTitlesItemPrivate))
-
struct _EWeekViewTitlesItemPrivate {
EWeekView *week_view;
};
@@ -84,7 +80,7 @@ week_view_titles_item_dispose (GObject *object)
{
EWeekViewTitlesItemPrivate *priv;
- priv = E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE (object);
+ priv = E_WEEK_VIEW_TITLES_ITEM (object)->priv;
if (priv->week_view != NULL) {
g_object_unref (priv->week_view);
@@ -279,7 +275,7 @@ week_view_titles_item_class_init (EWeekViewTitlesItemClass *class)
static void
week_view_titles_item_init (EWeekViewTitlesItem *titles_item)
{
- titles_item->priv = E_WEEK_VIEW_TITLES_ITEM_GET_PRIVATE (titles_item);
+ titles_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (titles_item, E_TYPE_WEEK_VIEW_TITLES_ITEM, EWeekViewTitlesItemPrivate);
}
GType