Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
main.cpp: Added subroutines to create default settings
[xestiacalendar/.git] / source / main.cpp
index 849a52c..b4be0fd 100644 (file)
@@ -27,7 +27,9 @@
 #include <curl/curl.h>
 
 #include "version.h"
+#include "bitmaps.h"
 #include "forms/main/frmMain.h"
+#include "defaults.h"
 
 class XestiaCALApp: public wxApp
 {
@@ -39,6 +41,8 @@ IMPLEMENT_APP(XestiaCALApp);
 bool XestiaCALApp::OnInit()
 {
 
+       wxInitAllImageHandlers();
+       
        static const wxCmdLineEntryDesc g_cmdLineDesc [] =
        {
                { wxCMD_LINE_SWITCH, "h", "help", "Displays help on command line parameters",
@@ -56,6 +60,14 @@ bool XestiaCALApp::OnInit()
        wxCmdLineParser XCALArgs (g_cmdLineDesc, argc, argv);
        XCALArgs.Parse();
        
+       if (XCALArgs.Found(wxT("h"))){
+    
+               // Print out the list of help commands.
+    
+               return false;
+    
+       }
+       
        if (XCALArgs.Found(wxT("v"))){
     
                // Print out the version number.    
@@ -65,7 +77,22 @@ bool XestiaCALApp::OnInit()
     
        }
        
+       // Setup the default accounts.
+       
+       SetupDirectories();
+       SetupDefaultSettings();
+       SetupDefaultCalendar();
+       
        frmMain *frame = new frmMain( NULL );
+       
+       wxMemoryInputStream istream(bigimgs_appicon48_png, sizeof(bigimgs_appicon48_png));
+       wxImage bigimgs_appicon48i(istream, wxBITMAP_TYPE_PNG);
+       wxBitmap appiconbmp(bigimgs_appicon48i, -1);    
+       wxIcon appicon;
+    
+       appicon.CopyFromBitmap(appiconbmp);
+       
+       frame->SetIcon(appicon);
        frame->Show(true);
        
        SetTopWindow(frame);
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