Develop and Download Open Source Software
Login
Create Account
Help
MY OSDN
Find Software
Magazine
Develop
Pastebin
Software
People
PersonalForge
Magazine
Wiki
OSDN
>
Find Software
>
MalonNote
MalonNote
Summary
Project Summary
Developer Dashboard
Project Reviews
Web Page
Developers
List of RSS Feeds
Statistics
History
Image Gallery
Search Keywords
News
Listed News
Help
Downloads
List of Releases
Help
Source Code
Guide
Browse CVS
Help
Docs
List Docs
Help
Forums
List of Forums
Open Discussion (1)
Help (1)
Help
Mailing Lists
list of ML
Help
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Help
Browse CVS Repository
/
[OSDN]
/
malonnote
/
main.cpp
Diff of /malonnote/main.cpp
Parent Directory
|
Revision Log
|
Revision Graph
|
Patch
revision
1.5
by
maloninc
, Tue Oct 4 12:45:02 2005 UTC
revision
1.8
by
maloninc
, Mon Jan 23 13:37:10 2006 UTC
#
Line 26
IMPLEMENT_APP(mnApp)
Line 26
IMPLEMENT_APP(mnApp)
26
27
bool mnApp::OnInit()
bool mnApp::OnInit()
28
{
{
29
wxString* dirName = new wxString();
30
wxString gotDirName;
31
wxDirDialog* dlg;
32
wxString confKey;
33
34
const wxString appName = wxString::Format(wxT(MN_APP_NAME) wxT("-%s"), wxGetUserId().c_str());
const wxString appName = wxString::Format(wxT(MN_APP_NAME) wxT("-%s"), wxGetUserId().c_str());
35
#
Line 48
bool mnApp::OnInit()
Line 52
bool mnApp::OnInit()
52
53
SetTopWindow(mainFrame);
SetTopWindow(mainFrame);
54
mainFrame->Show();
mainFrame->Show();
55
56
/* add note panel */
57
wxConfig* config = new wxConfig(wxT(CONF_APP_NAME));
58
if(config->Read(wxT(CONF_WIKI_DIR), dirName) == FALSE) {
59
delete dirName;
60
dlg = new wxDirDialog(mainFrame);
61
if(dlg->ShowModal() == wxID_OK) {
62
gotDirName = dlg->GetPath();
63
wxLogMessage(wxT("gotDirName:[%s]"), gotDirName.c_str());
64
//config->Write(wxT(CONF_WIKI_DIR), gotDirName.c_str());
65
//mainFrame->addNotePanel(&gotDirName);
66
}
67
else {
68
mainFrame->Close();
69
}
70
}
71
else {
72
mainFrame->addNotePanel(dirName);
73
74
for(int i = 1; ;i++) {
75
confKey.sprintf(wxT(CONF_WIKI_DIR) "%d", i);
76
if(config->Read(confKey.c_str(), dirName) == FALSE) break;
77
mainFrame->addNotePanel(dirName);
78
}
79
mainFrame->getNotebook()->SetSelection(0);
80
}
81
82
delete config;
83
84
mainFrame->setFocusToSearchTextCtrl();
85
return true;
return true;
86
}
}
87
Colored Diff
Long Colored Diff
Full Colored Diff
Unidiff
Context Diff
Side by Side
Legend:
Removed from v.1.5
changed lines
Added in v.1.8
Back to OSDN
">
Back to OSDN
ViewVC Help
Powered by
ViewVC 1.1.26