Exemplo n.º 1
0
/* Defrosts a calendar; all the changes made since
 * the last gtk_calendar_freeze() are displayed. */
int
clip_GTK_CALENDARTHAW(ClipMachine * ClipMachineMemory)
{
   C_widget *ccal = _fetch_cw_arg(ClipMachineMemory);

   CHECKCWID(ccal, GTK_IS_CALENDAR);
   gtk_calendar_thaw(GTK_CALENDAR(ccal->widget));
   return 0;
 err:
   return 1;
}
Exemplo n.º 2
0
static void
popcalendar_set_marks(GtkCalendar *cal, guint32 marks) {
	int day;

	gtk_calendar_freeze(cal);
	gtk_calendar_clear_marks(cal);
	for (day = 0; day < 31; day++) {
		if (marks & (1L << day)) {
			gtk_calendar_mark_day(cal, day);
		}
	}
	gtk_calendar_thaw(cal);
}
Exemplo n.º 3
0
static void
on_calendar_entry_activated(GtkWidget *widget, GtkWidget *calendar)
{
    GDate *date;
    const gchar *text;

    date = g_date_new();

    text = gtk_entry_get_text(GTK_ENTRY(widget));
    g_date_set_parse(date, text);

    if (g_date_valid(date)) {
	gtk_calendar_freeze(GTK_CALENDAR(calendar));
	gtk_calendar_select_month(GTK_CALENDAR(calendar),
				  g_date_get_month(date) - 1,
				  g_date_get_year(date));
	gtk_calendar_select_day(GTK_CALENDAR(calendar),
				g_date_get_day(date));
	gtk_calendar_thaw(GTK_CALENDAR(calendar));
    }
    g_date_free(date);
}
Exemplo n.º 4
0
static VALUE
rg_thaw(VALUE self)
{
    gtk_calendar_thaw(_SELF(self));
    return self;
}