forked from AuroraMiddleware/gtk
calendar: Remove month-changed signal
Listen to notify::month instead.
This commit is contained in:
parent
093eac9441
commit
8ef9009bde
@ -156,7 +156,6 @@ enum {
|
||||
};
|
||||
|
||||
enum {
|
||||
MONTH_CHANGED_SIGNAL,
|
||||
DAY_SELECTED_SIGNAL,
|
||||
DAY_SELECTED_DOUBLE_CLICK_SIGNAL,
|
||||
PREV_MONTH_SIGNAL,
|
||||
@ -191,7 +190,6 @@ struct _GtkCalendarClass
|
||||
{
|
||||
GtkWidgetClass parent_class;
|
||||
|
||||
void (* month_changed) (GtkCalendar *calendar);
|
||||
void (* day_selected) (GtkCalendar *calendar);
|
||||
void (* day_selected_double_click) (GtkCalendar *calendar);
|
||||
void (* prev_month) (GtkCalendar *calendar);
|
||||
@ -417,22 +415,6 @@ gtk_calendar_class_init (GtkCalendarClass *class)
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY));
|
||||
|
||||
/**
|
||||
* GtkCalendar::month-changed:
|
||||
* @calendar: the object which received the signal.
|
||||
*
|
||||
* Emitted when the user clicks a button to change the selected month on a
|
||||
* calendar.
|
||||
*/
|
||||
gtk_calendar_signals[MONTH_CHANGED_SIGNAL] =
|
||||
g_signal_new (I_("month-changed"),
|
||||
G_OBJECT_CLASS_TYPE (gobject_class),
|
||||
G_SIGNAL_RUN_FIRST,
|
||||
G_STRUCT_OFFSET (GtkCalendarClass, month_changed),
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 0);
|
||||
|
||||
/**
|
||||
* GtkCalendar::day-selected:
|
||||
* @calendar: the object which received the signal.
|
||||
|
@ -77,15 +77,6 @@ calendar_set_signal_strings (char *sig_str,
|
||||
gtk_label_set_text (GTK_LABEL (data->last_sig), sig_str);
|
||||
}
|
||||
|
||||
static void
|
||||
calendar_month_changed (GtkWidget *widget,
|
||||
CalendarData *data)
|
||||
{
|
||||
char *str = calendar_date_to_string (data, "month-changed: %c");
|
||||
calendar_set_signal_strings (str, data);
|
||||
g_free (str);
|
||||
}
|
||||
|
||||
static void
|
||||
calendar_day_selected (GtkWidget *widget,
|
||||
CalendarData *data)
|
||||
@ -228,9 +219,6 @@ create_calendar(void)
|
||||
|
||||
gtk_calendar_mark_day (GTK_CALENDAR (calendar), 19);
|
||||
|
||||
g_signal_connect (calendar, "month-changed",
|
||||
G_CALLBACK (calendar_month_changed),
|
||||
&calendar_data);
|
||||
g_signal_connect (calendar, "day-selected",
|
||||
G_CALLBACK (calendar_day_selected),
|
||||
&calendar_data);
|
||||
|
Loading…
Reference in New Issue
Block a user