Develop and Download Open Source Software

Browse CVS Repository

Diff of /malonnote/mnController.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.21 by maloninc, Thu Sep 29 04:15:30 2005 UTC revision 1.24 by maloninc, Fri Sep 30 11:44:59 2005 UTC
# Line 21  BEGIN_EVENT_TABLE(mnController, wxEvtHan Line 21  BEGIN_EVENT_TABLE(mnController, wxEvtHan
21          EVT_MENU(XRCID("Quit"), mnController::handleExit)          EVT_MENU(XRCID("Quit"), mnController::handleExit)
22          EVT_MENU(XRCID("Configure"), mnController::handleConfig)          EVT_MENU(XRCID("Configure"), mnController::handleConfig)
23          EVT_MENU(XRCID("Group"), mnController::handleGroup)          EVT_MENU(XRCID("Group"), mnController::handleGroup)
24            EVT_MENU(XRCID("OpenDocsDir"), mnController::handleOpenDocsDir)
25          EVT_MENU(XRCID("Expand"), mnController::handleTreeExpand)          EVT_MENU(XRCID("Expand"), mnController::handleTreeExpand)
26          EVT_MENU(XRCID("Collapse"), mnController::handleTreeCollapse)          EVT_MENU(XRCID("Collapse"), mnController::handleTreeCollapse)
27          EVT_MENU(XRCID("Clear"), mnController::handleTreeClear)          EVT_MENU(XRCID("Clear"), mnController::handleTreeClear)
28          EVT_MENU(XRCID("About"), mnController::handleAbout)          EVT_MENU(wxID_ABOUT, mnController::handleAbout)
29          EVT_CLOSE(mnController::handleClose)          EVT_CLOSE(mnController::handleClose)
30          EVT_COMMAND(XRCID("wikiHtmlTextCtrl"), mnEVT_LINK_CLICK, mnController::handleLinkClick)          EVT_COMMAND(XRCID("wikiHtmlTextCtrl"), mnEVT_LINK_CLICK, mnController::handleLinkClick)
31  END_EVENT_TABLE()  END_EVENT_TABLE()
# Line 134  void mnController::handleNewButton(wxCom Line 135  void mnController::handleNewButton(wxCom
135          WikiData* wikiData = wiki->newWikiData();          WikiData* wikiData = wiki->newWikiData();
136          wxString        plainTextStr;          wxString        plainTextStr;
137          wxString        newSubjectStr;          wxString        newSubjectStr;
138          mnWikiDataEntryDialog* dlg = new mnWikiDataEntryDialog(frame, -1, wxT("Malon Note"));          mnWikiDataEntryDialog* dlg = new mnWikiDataEntryDialog(frame);
139          const wxString* wikiText = wikiData->getText();          const wxString* wikiText = wikiData->getText();
140          const wxString* subject  = wikiData->getSubject();          const wxString* subject  = wikiData->getSubject();
141    
# Line 257  void mnController::handleEditButton(wxCo Line 258  void mnController::handleEditButton(wxCo
258          wxString        newSubjectStr;          wxString        newSubjectStr;
259          wxTreeItemData* itemData = frame->getSelectedItem();          wxTreeItemData* itemData = frame->getSelectedItem();
260          wxString        subject  = frame->getSelectedLabel();          wxString        subject  = frame->getSelectedLabel();
261          mnWikiDataEntryDialog* dlg = new mnWikiDataEntryDialog(frame, -1, wxT("Malon Note"));          mnWikiDataEntryDialog* dlg = new mnWikiDataEntryDialog(frame);
262          int             ans;          int             ans;
263    
264          if(!frame->isEditableTreeLabel(frame->getSelection())) return; /* selection is not memo data */          if(!frame->isEditableTreeLabel(frame->getSelection())) return; /* selection is not memo data */
# Line 333  void mnController::handleLinkClick(wxCom Line 334  void mnController::handleLinkClick(wxCom
334          }          }
335  }  }
336    
337    void mnController::handleOpenDocsDir(wxCommandEvent &event)
338    {
339            const wxString* wikiDataDir;
340            wxString cmd;
341            wxString docDir;
342    
343            wikiDataDir = wiki->getWikiDataDir();
344            docDir = *wikiDataDir + wxT("/docs/");
345    
346            /* create docs directory, anyway */
347            cmd.sprintf(wxT("mkdir "), docDir.c_str());
348            wxExecute(cmd);
349    
350            /* open docs directory */
351            openDoc(docDir);
352    }
353    
354  void mnController::openUrl(wxString& url)  void mnController::openUrl(wxString& url)
355  {  {
356          wxString cmd;          wxString cmd;

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.24

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26