Add GTK_CALENDAR_SHOW_DETAILS display flag, which chooses if details are shown within the widget, or jst as tooltip.

* gtk/gtkcalendar.c, gtk/gtkcalendar.h: Add "show-details" property
aka. GTK_CALENDAR_SHOW_DETAILS, and use it.
* tests/testcalendar.c: Test GTK_CALENDAR_SHOW_DETAILS. Reduce padding
in flags vbox.

svn path=/trunk/; revision=19267
This commit is contained in:
Mathias Hasselmann
2007-12-28 09:39:34 +00:00
parent 6fda2b46a7
commit c32421418a
6 changed files with 85 additions and 29 deletions

View File

@ -51,13 +51,28 @@ typedef struct _GtkCalendarClass GtkCalendarClass;
typedef struct _GtkCalendarPrivate GtkCalendarPrivate;
/**
* GtkCalendarDisplayOptions:
* @GTK_CALENDAR_SHOW_HEADING: Specifies that the month and year should be displayed.
* @GTK_CALENDAR_SHOW_DAY_NAMES: Specifies that three letter day descriptions should be present.
* @GTK_CALENDAR_NO_MONTH_CHANGE: Prevents the user from switching months with the calendar.
* @GTK_CALENDAR_SHOW_WEEK_NUMBERS: Displays each week numbers of the current year, down the
* left side of the calendar.
* @GTK_CALENDAR_WEEK_START_MONDAY: Since GTK+ 2.4, this option is deprecated and ignored by GTK+.
* The information on which day the calendar week starts is derived from the locale.
* @GTK_CALENDAR_SHOW_DETAILS: Just show an indicator, not the full details
* text when details are provided. See gtk_calendar_set_detail_func().
*
* These options can be used to influence the display and behaviour of a #GtkCalendar.
*/
typedef enum
{
GTK_CALENDAR_SHOW_HEADING = 1 << 0,
GTK_CALENDAR_SHOW_DAY_NAMES = 1 << 1,
GTK_CALENDAR_NO_MONTH_CHANGE = 1 << 2,
GTK_CALENDAR_SHOW_WEEK_NUMBERS = 1 << 3,
GTK_CALENDAR_WEEK_START_MONDAY = 1 << 4
GTK_CALENDAR_WEEK_START_MONDAY = 1 << 4,
GTK_CALENDAR_SHOW_DETAILS = 1 << 5,
} GtkCalendarDisplayOptions;
/**