aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barth <david.barth@canonical.com>2011-02-28 10:33:01 +0100
committerDavid Barth <david.barth@canonical.com>2011-02-28 10:33:01 +0100
commit8264fbe27989e17e82f785cddd2da59efcf0a29d (patch)
tree030d49bc7b0334f20126a8ee882b55c9d5d0e423
parent3072fd1740dca237612b7cf94ac19aadb1d4a3e6 (diff)
parent400488354b37ad16467c9e251b8b20c3bf3d2a83 (diff)
downloadayatana-ido-8264fbe27989e17e82f785cddd2da59efcf0a29d.tar.gz
ayatana-ido-8264fbe27989e17e82f785cddd2da59efcf0a29d.tar.bz2
ayatana-ido-8264fbe27989e17e82f785cddd2da59efcf0a29d.zip
integrating Karl & mterry's API for exposing calendar display options
-rw-r--r--src/idocalendarmenuitem.c21
-rw-r--r--src/idocalendarmenuitem.h1
-rw-r--r--src/libido.h1
3 files changed, 21 insertions, 2 deletions
diff --git a/src/idocalendarmenuitem.c b/src/idocalendarmenuitem.c
index 3e326e0..e004841 100644
--- a/src/idocalendarmenuitem.c
+++ b/src/idocalendarmenuitem.c
@@ -280,32 +280,49 @@ ido_calendar_menu_item_new (void)
gboolean
ido_calendar_menu_item_mark_day (IdoCalendarMenuItem *menuitem, guint day)
{
+ g_return_val_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem), FALSE);
+
return gtk_calendar_mark_day(GTK_CALENDAR (menuitem->priv->calendar), day);
}
gboolean
ido_calendar_menu_item_unmark_day (IdoCalendarMenuItem *menuitem, guint day)
{
+ g_return_val_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem), FALSE);
+
return gtk_calendar_unmark_day(GTK_CALENDAR (menuitem->priv->calendar), day);
}
void
ido_calendar_menu_item_clear_marks (IdoCalendarMenuItem *menuitem)
{
+ g_return_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem));
+
gtk_calendar_clear_marks(GTK_CALENDAR (menuitem->priv->calendar));
}
void
ido_calendar_menu_item_set_display_options (IdoCalendarMenuItem *menuitem, GtkCalendarDisplayOptions flags)
{
+ g_return_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem));
+
gtk_calendar_set_display_options (GTK_CALENDAR (menuitem->priv->calendar), flags);
}
+GtkCalendarDisplayOptions
+ido_calendar_menu_item_get_display_options (IdoCalendarMenuItem *menuitem)
+{
+ g_return_val_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem), 0);
+
+ return gtk_calendar_get_display_options (GTK_CALENDAR (menuitem->priv->calendar));
+}
+
void
ido_calendar_menu_item_get_date (IdoCalendarMenuItem *menuitem,
guint *year,
guint *month,
guint *day) {
-
- gtk_calendar_get_date (GTK_CALENDAR (menuitem->priv->calendar), year, month, day);
+
+ g_return_if_fail(IDO_IS_CALENDAR_MENU_ITEM(menuitem));
+ gtk_calendar_get_date (GTK_CALENDAR (menuitem->priv->calendar), year, month, day);
}
diff --git a/src/idocalendarmenuitem.h b/src/idocalendarmenuitem.h
index accb6cb..cecab16 100644
--- a/src/idocalendarmenuitem.h
+++ b/src/idocalendarmenuitem.h
@@ -60,6 +60,7 @@ gboolean ido_calendar_menu_item_mark_day (IdoCalendarMenuItem *menu
gboolean ido_calendar_menu_item_unmark_day (IdoCalendarMenuItem *menuitem, guint day);
void ido_calendar_menu_item_clear_marks (IdoCalendarMenuItem *menuitem);
void ido_calendar_menu_item_set_display_options (IdoCalendarMenuItem *menuitem, GtkCalendarDisplayOptions flags);
+GtkCalendarDisplayOptions ido_calendar_menu_item_get_display_options (IdoCalendarMenuItem *menuitem);
void ido_calendar_menu_item_get_date (IdoCalendarMenuItem *menuitem,
guint *year,
guint *month,
diff --git a/src/libido.h b/src/libido.h
index ef0b8b3..4c4f68b 100644
--- a/src/libido.h
+++ b/src/libido.h
@@ -26,6 +26,7 @@
#ifndef __IDO__
#define __IDO__
+#include <libido/idocalendarmenuitem.h>
#include <libido/idoscalemenuitem.h>
#include <libido/idoentrymenuitem.h>
#include <libido/idomessagedialog.h>