X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..726cc8697cd44a41b43257f05ca8cdd42b71a711:/src/gtk/calctrl.cpp diff --git a/src/gtk/calctrl.cpp b/src/gtk/calctrl.cpp index 3672664b25..24b1d73347 100644 --- a/src/gtk/calctrl.cpp +++ b/src/gtk/calctrl.cpp @@ -142,6 +142,8 @@ bool wxGtkCalendarCtrl::SetDate(const wxDateTime& date) { g_signal_handlers_block_by_func(m_widget, (gpointer) gtk_day_selected_callback, this); + g_signal_handlers_block_by_func(m_widget, + (gpointer) gtk_month_changed_callback, this); m_selectedDate = date; int year = date.GetYear(); @@ -150,6 +152,8 @@ bool wxGtkCalendarCtrl::SetDate(const wxDateTime& date) gtk_calendar_select_month(GTK_CALENDAR(m_widget), month, year); gtk_calendar_select_day(GTK_CALENDAR(m_widget), day); + g_signal_handlers_unblock_by_func( m_widget, + (gpointer) gtk_month_changed_callback, this); g_signal_handlers_unblock_by_func( m_widget, (gpointer) gtk_day_selected_callback, this); @@ -171,7 +175,4 @@ void wxGtkCalendarCtrl::Mark(size_t day, bool mark) gtk_calendar_unmark_day(GTK_CALENDAR(m_widget), day); } -IMPLEMENT_DYNAMIC_CLASS(wxGtkCalendarCtrl, wxControl) - - #endif // wxUSE_CALENDARCTRL