aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/alarm-notify/alarm-notify.c
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-05 19:57:30 +0800
commit4ec46cc05fcb94d181fb9c2412984a1446647c85 (patch)
treed16ce30e77dd539c03509237dd4c723d46aea97a /calendar/gui/alarm-notify/alarm-notify.c
parent5ea7e23aef0c239af2600c95419ba0bda0f08b3c (diff)
parent19163c2b71e6128fc9b32287b99b1f4422324c2d (diff)
downloadgsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.gz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.bz2
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.lz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.xz
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.tar.zst
gsoc2013-evolution-4ec46cc05fcb94d181fb9c2412984a1446647c85.zip
Merge from master
Diffstat (limited to 'calendar/gui/alarm-notify/alarm-notify.c')
-rw-r--r--calendar/gui/alarm-notify/alarm-notify.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/calendar/gui/alarm-notify/alarm-notify.c b/calendar/gui/alarm-notify/alarm-notify.c
index 3256e39780..3b5402b4a6 100644
--- a/calendar/gui/alarm-notify/alarm-notify.c
+++ b/calendar/gui/alarm-notify/alarm-notify.c
@@ -39,6 +39,8 @@
#define APPLICATION_ID "org.gnome.EvolutionAlarmNotify"
+#define APPLICATION_ID "org.gnome.EvolutionAlarmNotify"
+
struct _AlarmNotifyPrivate {
/* Mapping from EUri's to LoadedClient structures */
/* FIXME do we need per source type uri hashes? or perhaps we
@@ -55,7 +57,13 @@ typedef struct {
GList *removals;
} ProcessRemovalsData;
-G_DEFINE_TYPE (AlarmNotify, alarm_notify, GTK_TYPE_APPLICATION)
+/* Forward Declarations */
+static void alarm_notify_initable_init (GInitableIface *interface);
+
+G_DEFINE_TYPE_WITH_CODE (
+ AlarmNotify, alarm_notify, GTK_TYPE_APPLICATION,
+ G_IMPLEMENT_INTERFACE (
+ G_TYPE_INITABLE, alarm_notify_initable_init))
static void
process_removal_in_hash (const gchar *uri,
@@ -264,6 +272,15 @@ alarm_notify_activate (GApplication *application)
* if there are no handlers connected to this signal. */
}
+static gboolean
+alarm_notify_initable (GInitable *initable,
+ GCancellable *cancellable,
+ GError **error)
+{
+ /* XXX Just return TRUE for now. We'll have use for this soon. */
+ return TRUE;
+}
+
static void
alarm_notify_class_init (AlarmNotifyClass *class)
{
@@ -281,6 +298,13 @@ alarm_notify_class_init (AlarmNotifyClass *class)
}
static void
+alarm_notify_initable_init (GInitableIface *interface)
+{
+ /* XXX Awkward name since we're missing an 'E' prefix. */
+ interface->init = alarm_notify_initable;
+}
+
+static void
alarm_notify_init (AlarmNotify *an)
{
gint ii;
@@ -317,10 +341,11 @@ alarm_notify_get_selected_calendars (AlarmNotify *an)
* Returns: a newly-created #AlarmNotify
**/
AlarmNotify *
-alarm_notify_new (void)
+alarm_notify_new (GCancellable *cancellable,
+ GError **error)
{
- return g_object_new (
- TYPE_ALARM_NOTIFY,
+ return g_initable_new (
+ TYPE_ALARM_NOTIFY, cancellable, error,
"application-id", APPLICATION_ID, NULL);
}