]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/calctrl.cpp
Explicitly set "C" locale for the tests using decimal point.
[wxWidgets.git] / src / gtk / calctrl.cpp
index 313a3e3dc6091498fc390fdfca6070d4e74990cb..488926dec41b94c606befe432b7cc10d66a9032b 100644 (file)
@@ -88,6 +88,7 @@ bool wxGtkCalendarCtrl::Create(wxWindow *parent,
     }
 
     m_widget = gtk_calendar_new();
+    g_object_ref(m_widget);
     SetDate(date.IsValid() ? date : wxDateTime::Today());
 
     if (style & wxCAL_NO_MONTH_CHANGE)
@@ -141,17 +142,17 @@ bool wxGtkCalendarCtrl::SetDate(const wxDateTime& date)
 {
     g_signal_handlers_block_by_func(m_widget,
         (gpointer) gtk_day_selected_callback, this);
-        
+
     m_selectedDate = date;
     int year = date.GetYear();
     int month = date.GetMonth();
     int day = date.GetDay();
     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_day_selected_callback, this);
-    
+
     return true;
 }
 
@@ -170,7 +171,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