Beispiel #1
0
void calendar_day_selected( GtkWidget    *widget,
                            CalendarData *data )
{
  char buffer[256] = "day_selected: ";

  calendar_date_to_string (data, buffer+14, 256-14);
  calendar_set_signal_strings (buffer, data);
}
Beispiel #2
0
void calendar_month_changed( GtkWidget    *widget,
                             CalendarData *data )
{
  char buffer[256] = "month_changed: ";

  calendar_date_to_string (data, buffer+15, 256-15);
  calendar_set_signal_strings (buffer, data);
}
Beispiel #3
0
void calendar_next_year( GtkWidget    *widget,
                            CalendarData *data )
{
  char buffer[256] = "next_year: ";

  calendar_date_to_string (data, buffer+11, 256-11);
  calendar_set_signal_strings (buffer, data);
}
Beispiel #4
0
void calendar_next_month( GtkWidget    *widget,
                            CalendarData *data )
{
  char buffer[256] = "next_month: ";

  calendar_date_to_string (data, buffer+12, 256-12);
  calendar_set_signal_strings (buffer, data);
}
Beispiel #5
0
static void
calendar_day_selected_double_click (GtkWidget    *widget,
                                         CalendarData *data)
{
  char buffer[256] = "day_selected_double_click: ";
  guint day;

  calendar_date_to_string (data, buffer+27, 256-27);
  calendar_set_signal_strings (buffer, data);
  gtk_calendar_get_date (GTK_CALENDAR (data->window),
                         NULL, NULL, &day);

  if (gtk_calendar_get_day_is_marked (GTK_CALENDAR (data->window), day))
    gtk_calendar_unmark_day (GTK_CALENDAR (data->window), day);
  else
    gtk_calendar_mark_day (GTK_CALENDAR (data->window), day);
}
Beispiel #6
0
void calendar_day_selected_double_click( GtkWidget    *widget,
                                         CalendarData *data )
{
  struct tm tm;
  char buffer[256] = "day_selected_double_click: ";

  calendar_date_to_string (data, buffer+27, 256-27);
  calendar_set_signal_strings (buffer, data);

  memset (&tm, 0, sizeof (tm));
  gtk_calendar_get_date (GTK_CALENDAR(data->window),
			 &tm.tm_year, &tm.tm_mon, &tm.tm_mday);
  tm.tm_year -= TM_YEAR_BASE;

  if(GTK_CALENDAR(data->window)->marked_date[tm.tm_mday-1] == 0) {
    gtk_calendar_mark_day(GTK_CALENDAR(data->window),tm.tm_mday);
  } else { 
    gtk_calendar_unmark_day(GTK_CALENDAR(data->window),tm.tm_mday);
  }
}