aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-selector.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-09-27 13:13:42 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-27 21:31:13 +0800
commite2b6ff7a6c1e1580c26ee0719b349151e8dad6fd (patch)
treed2d2ce8eb509717d412ad3171059e470ff0e7030 /calendar/gui/e-calendar-selector.c
parentc520043a094d81d222aa0c3e23b0035ddb89d0bf (diff)
downloadgsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.gz
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.bz2
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.lz
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.xz
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.zst
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.zip
Miscellaneous cleanups from the account-mgmt branch.
Reducing diff noise so I can see important changes easier when comparing branches. A few API changes, but nothing that affects functionality.
Diffstat (limited to 'calendar/gui/e-calendar-selector.c')
-rw-r--r--calendar/gui/e-calendar-selector.c41
1 files changed, 9 insertions, 32 deletions
diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c
index c71e3b99aa..989391625b 100644
--- a/calendar/gui/e-calendar-selector.c
+++ b/calendar/gui/e-calendar-selector.c
@@ -26,13 +26,17 @@
#include <libecal/e-cal-client.h>
#include <libedataserverui/e-client-utils.h>
+
#include "e-util/e-selection.h"
struct _ECalendarSelectorPrivate {
gint dummy_value;
};
-static gpointer parent_class;
+G_DEFINE_TYPE (
+ ECalendarSelector,
+ e_calendar_selector,
+ E_TYPE_SOURCE_SELECTOR)
static gboolean
calendar_selector_update_single_object (ECalClient *client,
@@ -170,7 +174,8 @@ calendar_selector_data_dropped (ESourceSelector *selector,
icalcomponent_set_uid (icalcomp, uid);
}
- e_client_utils_open_new (destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
+ e_client_utils_open_new (
+ destination, E_CLIENT_SOURCE_TYPE_EVENTS, FALSE, NULL,
e_client_utils_authenticate_handler, NULL,
client_opened_cb, icalcomp);
@@ -187,11 +192,10 @@ exit:
}
static void
-calendar_selector_class_init (ECalendarSelectorClass *class)
+e_calendar_selector_class_init (ECalendarSelectorClass *class)
{
ESourceSelectorClass *source_selector_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (ECalendarSelectorPrivate));
source_selector_class = E_SOURCE_SELECTOR_CLASS (class);
@@ -199,7 +203,7 @@ calendar_selector_class_init (ECalendarSelectorClass *class)
}
static void
-calendar_selector_init (ECalendarSelector *selector)
+e_calendar_selector_init (ECalendarSelector *selector)
{
selector->priv = G_TYPE_INSTANCE_GET_PRIVATE (
selector, E_TYPE_CALENDAR_SELECTOR, ECalendarSelectorPrivate);
@@ -211,33 +215,6 @@ calendar_selector_init (ECalendarSelector *selector)
e_drag_dest_add_calendar_targets (GTK_WIDGET (selector));
}
-GType
-e_calendar_selector_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- const GTypeInfo type_info = {
- sizeof (ECalendarSelectorClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) calendar_selector_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (ECalendarSelector),
- 0, /* n_preallocs */
- (GInstanceInitFunc) calendar_selector_init,
- NULL /* value_table */
- };
-
- type = g_type_register_static (
- E_TYPE_SOURCE_SELECTOR, "ECalendarSelector",
- &type_info, 0);
- }
-
- return type;
-}
-
GtkWidget *
e_calendar_selector_new (ESourceList *source_list)
{