* @short_description: CalendarPopup allows choosing a date from a popup calendar.
* @see_also: #HildonDateEditor, #HildonTimeEditor
*
- * HildonCalendarPopup is a dialog which contains a GtkCalendar. It
+ * HildonCalendarPopup is a dialog which contains a HildonCalendar. It
* also contains arrow buttons for changing the month/year. If an
* entered date is invalid, an information message will be shown.
*
#endif
#include "hildon-calendar-popup.h"
+#include "hildon-calendar.h"
#include <gtk/gtk.h>
-#include <gtk/gtkcalendar.h>
#include <gdk/gdk.h>
#include <gdk/gdkkeysyms.h>
#include <langinfo.h>
init_dmy (year, month, day, &dtmp, &mtmp, &ytmp);
/* Remove all visual markers */
- gtk_calendar_clear_marks (GTK_CALENDAR (priv->cal));
+ hildon_calendar_clear_marks (HILDON_CALENDAR (priv->cal));
/* Set a new date */
- gtk_calendar_select_month (GTK_CALENDAR (priv->cal), mtmp - 1, ytmp);
- gtk_calendar_select_day (GTK_CALENDAR (priv->cal), dtmp);
+ hildon_calendar_select_month (HILDON_CALENDAR (priv->cal), mtmp - 1, ytmp);
+ hildon_calendar_select_day (HILDON_CALENDAR (priv->cal), dtmp);
}
/**
priv = HILDON_CALENDAR_POPUP_GET_PRIVATE (cal);
g_assert (priv);
- gtk_calendar_get_date (GTK_CALENDAR (priv->cal), year, month, day);
+ hildon_calendar_get_date (HILDON_CALENDAR (priv->cal), year, month, day);
if (month != NULL)
*month = *month + 1;
g_param_spec_uint ("min-year",
"Minimum valid year",
"Minimum valid year",
- 1, 2100,
+ 1, 10000,
1970,
G_PARAM_WRITABLE));
g_param_spec_uint ("max-year",
"Maximum valid year",
"Maximum valid year",
- 1, 2100,
+ 1, 10000,
2037,
G_PARAM_WRITABLE));
set_domain = 0;
}
- priv->cal = gtk_calendar_new ();
+ priv->cal = hildon_calendar_new ();
/* dialog options and packing */
- gtk_calendar_set_display_options (GTK_CALENDAR (priv->cal),
- GTK_CALENDAR_SHOW_HEADING |
- GTK_CALENDAR_SHOW_DAY_NAMES |
- GTK_CALENDAR_SHOW_WEEK_NUMBERS);
+ hildon_calendar_set_display_options (HILDON_CALENDAR (priv->cal),
+ HILDON_CALENDAR_SHOW_HEADING |
+ HILDON_CALENDAR_SHOW_DAY_NAMES |
+ HILDON_CALENDAR_SHOW_WEEK_NUMBERS);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (cal)->vbox), priv->cal,
TRUE, TRUE, 0);
}
/*
- * Exits the dialog when "selected_date" signal is emmited. The
- * "selected_date" signal is a Hildon addition to GtkCalendar and is
- * emitted on button-release.
- */
+ * Exits the dialog when "selected_date" signal is emmited. */
static void
hildon_calendar_selected_date (GtkWidget *self,
gpointer cal_popup)