Update of /cvsroot/mahogany/M/include/gui
In directory usw-pr-cvs1:/tmp/cvs-serv19119/include/gui

Modified Files:
        wxMDialogs.h wxMainFrame.h 
Log Message:
implemented searching in multiple folders, it compiles and seems to work for
single folder searches but dies horribly when searching in more than one
folder for now


Index: wxMDialogs.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/gui/wxMDialogs.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -b -u -2 -r1.102 -r1.103
--- wxMDialogs.h        22 Jul 2002 00:02:29 -0000      1.102
+++ wxMDialogs.h        23 Jul 2002 18:47:11 -0000      1.103
@@ -347,13 +347,29 @@
 MDialog_FolderProfile(const wxWindow *parent, const String& folderName);
 
-/** choose a folder from the list of all folders, returns NULL if cancelled
+/// the flags for MDialog_FolderChoose
+enum
+{
+   /// propose to choose file to save to
+   MDlg_Folder_Save = 0,
+
+   /// propose to choose file to open
+   MDlg_Folder_Open = 1,
+
+   /// don't propose choosing a file at all
+   MDlg_Folder_NoFiles = 2
+};
+
+/**
+  Choose a folder from the list of all folders (also allows to choose a file to
+  use as a folder), returns NULL if cancelled
 
   @param parent the parent window for the dialog
   @param folder the default folder to use
-  @param open true if the folder is going to be opened (used for file dialog)
+  @param flags the dialog option flags, combination of MDlg_Folder_XXX values
+  @return the folder selected by user (must be DecRef()'d) or NULL if cancelled
  */
 MFolder *MDialog_FolderChoose(const wxWindow *parent,
                               MFolder *folder = NULL,
-                              bool open = false);
+                              int flags = MDlg_Folder_Save);
 
 /// choose a folder and open a view on it

Index: wxMainFrame.h
===================================================================
RCS file: /cvsroot/mahogany/M/include/gui/wxMainFrame.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -b -u -2 -r1.39 -r1.40
--- wxMainFrame.h       4 Mar 2002 17:00:46 -0000       1.39
+++ wxMainFrame.h       23 Jul 2002 18:47:11 -0000      1.40
@@ -21,10 +21,16 @@
 #include "gui/wxMFrame.h"
 
+#include "MEvent.h"
+
 class MFolder;
 class wxFolderView;
 class wxFolderTree;
+
+class GlobalSearchData;
+
+class WXDLLEXPORT wxMenu;
 class WXDLLEXPORT wxSplitterWindow;
 
-class wxMainFrame : public wxMFrame
+class wxMainFrame : public wxMFrame, public MEventReceiver
 {
 public:
@@ -58,4 +64,7 @@
    void OnAbout(wxCommandEvent &) { OnMenuCommand(WXMENU_HELP_ABOUT);}
 
+   /// Mahogany event processing
+   virtual bool OnMEvent(MEventData& event);
+
    /// Appends the menu for a module to the menubar
    virtual void AddModulesMenu(const char *name,
@@ -82,4 +91,7 @@
 
 protected:
+   /// handler for the "Folder|Search" menu command
+   void DoFolderSearch();
+
    /// the splitter window holding the treectrl and folder view
    wxSplitterWindow *m_splitter;
@@ -95,8 +107,18 @@
 
    /// the module extension menu if it is set
-   class wxMenu *m_ModulesMenu;
+   wxMenu *m_ModulesMenu;
+
+   /// the async search data
+   GlobalSearchData *m_searchData;
+
+   /// the MEventManager cookie for ASFolder events
+   void *m_cookieASMf;
 
 private:
+   /// create and initialize the modules menu
    void MakeModulesMenu(void);
+
+   /// initialize m_searchData and m_cookieASMf if necessary
+   void InitSearchData();
 
    DECLARE_EVENT_TABLE()



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to