[gtk/wip/baedert/for-master: 78/89] calendar: Remove month-changed signal



commit 1babfa6f0de84bf9a1655265886903c80f0bdd47
Author: Timm Bäder <mail baedert org>
Date:   Wed Feb 5 09:23:45 2020 +0100

    calendar: Remove month-changed signal
    
    Listen to notify::month instead.

 gtk/gtkcalendar.c    | 18 ------------------
 tests/testcalendar.c | 12 ------------
 2 files changed, 30 deletions(-)
---
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index e1b1114b14..a3a9954576 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -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.
diff --git a/tests/testcalendar.c b/tests/testcalendar.c
index b78c91fb2f..605177ef49 100644
--- a/tests/testcalendar.c
+++ b/tests/testcalendar.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]