aboutsummaryrefslogtreecommitdiff
path: root/libindicate/indicator-message.c
diff options
context:
space:
mode:
authorTed Gould <ted@canonical.com>2009-01-21 16:02:04 -0600
committerTed Gould <ted@canonical.com>2009-01-21 16:02:04 -0600
commit48697b95718bbfb3100cff9721baa26d6c504552 (patch)
treeecc00c100a45f1e93a7064c7c4cfb081b5d67e07 /libindicate/indicator-message.c
parent58a667b5863ee92c64629afc4014b24aeb6ff6d5 (diff)
downloadlibayatana-indicator-48697b95718bbfb3100cff9721baa26d6c504552.tar.gz
libayatana-indicator-48697b95718bbfb3100cff9721baa26d6c504552.tar.bz2
libayatana-indicator-48697b95718bbfb3100cff9721baa26d6c504552.zip
Adding in a type for indicators that are messages
Diffstat (limited to 'libindicate/indicator-message.c')
-rw-r--r--libindicate/indicator-message.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/libindicate/indicator-message.c b/libindicate/indicator-message.c
new file mode 100644
index 0000000..3df7b4e
--- /dev/null
+++ b/libindicate/indicator-message.c
@@ -0,0 +1,62 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "indicator-message.h"
+
+typedef struct _IndicateIndicatorMessagePrivate IndicateIndicatorMessagePrivate;
+
+struct _IndicateIndicatorMessagePrivate
+{
+};
+
+#define INDICATE_INDICATOR_MESSAGE_GET_PRIVATE(o) \
+(G_TYPE_INSTANCE_GET_PRIVATE ((o), INDICATE_INDICATOR_MESSAGE_TYPE, IndicateIndicatorMessagePrivate))
+
+static void indicate_indicator_message_class_init (IndicateIndicatorMessageClass *klass);
+static void indicate_indicator_message_init (IndicateIndicatorMessage *self);
+static void indicate_indicator_message_dispose (GObject *object);
+static void indicate_indicator_message_finalize (GObject *object);
+static const gchar * get_indicator_type (IndicateIndicator * indicator);
+
+G_DEFINE_TYPE (IndicateIndicatorMessage, indicate_indicator_message, INDICATE_TYPE_INDICATOR);
+
+static void
+indicate_indicator_message_class_init (IndicateIndicatorMessageClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ g_type_class_add_private (klass, sizeof (IndicateIndicatorMessagePrivate));
+
+ object_class->dispose = indicate_indicator_message_dispose;
+ object_class->finalize = indicate_indicator_message_finalize;
+
+ IndicateIndicatorClass * indicator_class = INDICATE_INDICATOR_CLASS(klass);
+
+ indicator_class->get_type = get_indicator_type;
+
+ return;
+}
+
+static void
+indicate_indicator_message_init (IndicateIndicatorMessage *self)
+{
+}
+
+static void
+indicate_indicator_message_dispose (GObject *object)
+{
+G_OBJECT_CLASS (indicate_indicator_message_parent_class)->dispose (object);
+}
+
+static void
+indicate_indicator_message_finalize (GObject *object)
+{
+G_OBJECT_CLASS (indicate_indicator_message_parent_class)->finalize (object);
+}
+
+static const gchar *
+get_indicator_type (IndicateIndicator * indicator)
+{
+ return "message";
+}