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.11 by maloninc, Fri Aug 26 11:17:51 2005 UTC revision 1.16 by maloninc, Tue Sep 13 11:17:03 2005 UTC
# Line 19  BEGIN_EVENT_TABLE(mnController, wxEvtHan Line 19  BEGIN_EVENT_TABLE(mnController, wxEvtHan
19          EVT_MENU(ID_MenuFileEdit, mnController::handleEditButton)          EVT_MENU(ID_MenuFileEdit, mnController::handleEditButton)
20          EVT_MENU(ID_MenuFileExit, mnController::handleExit)          EVT_MENU(ID_MenuFileExit, mnController::handleExit)
21          EVT_MENU(ID_MenuFileConfig, mnController::handleConfig)          EVT_MENU(ID_MenuFileConfig, mnController::handleConfig)
22            EVT_MENU(ID_MenuFileGroup, mnController::handleGroup)
23          EVT_MENU(wxID_ABOUT, mnController::handleAbout)          EVT_MENU(wxID_ABOUT, mnController::handleAbout)
24          EVT_CLOSE(mnController::handleClose)          EVT_CLOSE(mnController::handleClose)
25          EVT_COMMAND(ID_HtmlTextCtrl, mnEVT_LINK_CLICK, mnController::handleLinkClick)          EVT_COMMAND(ID_HtmlTextCtrl, mnEVT_LINK_CLICK, mnController::handleLinkClick)
# Line 98  void mnController::handleSearch(wxComman Line 99  void mnController::handleSearch(wxComman
99          frame->showSearchResult(wiki);          frame->showSearchResult(wiki);
100  }  }
101    
102    void mnController::handleGroup(wxCommandEvent& event)
103    {
104            wiki->group();
105            frame->showSearchResult(wiki, false);
106    }
107    
108    
109  void mnController::handleNewButton(wxCommandEvent& event)  void mnController::handleNewButton(wxCommandEvent& event)
110  {  {
111          int             ans;          int             ans;
# Line 130  void mnController::handleRemoveButton(wx Line 138  void mnController::handleRemoveButton(wx
138          wxTreeItemData* item = frame->getSelectedItem();          wxTreeItemData* item = frame->getSelectedItem();
139    
140          if(item){          if(item){
141                  ((WikiData*)(item))->removeDataFile();                  if(wxMessageBox(wxT("Do you realy remove this memo?\n") + frame->getSelectedLabel(), wxT("Realy?"), wxYES_NO|wxICON_QUESTION) == wxYES){
142                            ((WikiData*)(item))->removeDataFile();
143                    }
144          }          }
145          else {          else {
146                  wiki->removeSearchStr(frame->getSelectedLabel());                  wiki->removeSearchStr(frame->getSelectedLabel());
# Line 269  void mnController::openUrl(wxString& url Line 279  void mnController::openUrl(wxString& url
279  #endif  #endif
280    
281  #ifdef __WXGTK__  #ifdef __WXGTK__
282          wxLogMessage(wxT("Ooops!, I don't know how to launch %s"), url.c_str());          cmd.sprintf(wxT("gnome-open %s"), url.c_str());
         return;  
283  #endif  #endif
284    
285          //wxExecute(argv);          //wxExecute(argv);
# Line 294  void mnController::openDoc(wxString& doc Line 303  void mnController::openDoc(wxString& doc
303  #endif  #endif
304    
305  #ifdef __WXGTK__  #ifdef __WXGTK__
306          wxLogMessage(wxT("Ooops!, I don't know how to launch %s"), doc.c_str());          cmd.sprintf(wxT("gnome-open %s"), doc.c_str());
         return;  
307  #endif  #endif
308    
         //wxExecute(argv);  
309          wxExecute(cmd);          wxExecute(cmd);
310  }  }

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.16

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