Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
XCCalendarManipulator: Use frmCalendarSelectMonth instead of XCCalendarMonthSelect...
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 19 Jul 2017 21:50:16 +0000 (22:50 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Wed, 19 Jul 2017 21:50:16 +0000 (22:50 +0100)
source/widgets/XCCalendarManipulator.cpp
source/widgets/XCCalendarManipulator.h

index 95d2045..c71692c 100644 (file)
@@ -88,8 +88,12 @@ XCCalendarManipulator::XCCalendarManipulator(wxWindow* parent, const wxString& t
        // Setup the month selection control.
        
        wxDateTime dtNow = wxDateTime::Now();
-       
+
+#if defined(WIN32)
+       moo = new frmCalendarSelectMonth(this);
+#else
        moo = new XCCalendarMonthSelect(this);
+#endif
        month = ((int)dtNow.GetMonth() + 1);
        year = dtNow.GetYear();
        moo->UpdateDate(month, year);
@@ -123,10 +127,16 @@ void XCCalendarManipulator::DateTextClick(wxCommandEvent &event){
        
        // Bring up a popup control to select the month and year.
        
+       // TODO: Do something different for Win32.
+
        moo->SetPosition(wxPoint(dateButton->GetScreenRect().GetLeft(), dateButton->GetScreenRect().GetBottom()));
        moo->UpdateDate(month, year);
+#if defined(WIN32)
+       moo->ShowModal();
+#else
        moo->Popup();
-       
+#endif
+
 }
 
 void XCCalendarManipulator::ChangeGrid(wxCommandEvent &event){
index a06c726..8f46398 100644 (file)
 #include <wx/mstream.h>
 
 #include "events.h"
+#if defined(WIN32)
+#include "../forms/calendarselectmonth/frmCalendarSelectMonth.h"
+#else
 #include "XCCalendarMonthSelect.h"
+#endif
 #include "XCCalendarList.h"
 #include "../bitmaps.h"
 #include "../libraries/CalendarDataStorage/CalendarDataStorage.h"
@@ -43,7 +47,11 @@ class XCCalendarManipulator: public wxPanel
                wxButton *nextButton = nullptr;
                wxButton *calendarsButton = nullptr;
                wxButton *dateButton = nullptr;
+#if defined(WIN32)
+               frmCalendarSelectMonth *moo = nullptr;
+#else
                XCCalendarMonthSelect *moo = nullptr;
+#endif
                XCCalendarList *calendarList = nullptr;
                CalendarDataStorage *dataStorage = nullptr;
                int month = 0;
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy