Changeset 183 for trunk/desktop/src
- Timestamp:
- Jan 7, 2007, 10:36:52 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/src/vdesktop.c
r166 r183 38 38 #define INCL_DOSERRORS 39 39 #define INCL_PM 40 40 41 #include <os2.h> 41 42 #include <stdio.h> 42 43 #include <stdlib.h> 43 44 #include <string.h> 45 44 46 #include <gtk/gtk.h> 45 47 #include "debug_window.h" … … 50 52 #include "nomgc.h" 51 53 #include "nomguitk.h" 54 #include "nomwindow.h" 55 #include "desktoptypes.h" 56 52 57 #include "nomfolderwindow.h" 53 58 #include "wpobject.h" 54 59 #include "wpfolder.h" 55 #include "desktoptypes.h" 60 #include "nomfilepath.h" 61 56 62 57 63 int createQuitWindow(void); … … 68 74 return FALSE; 69 75 } 76 77 WPFolder* wpRootFolder; 70 78 71 79 /* … … 85 93 /* Desktop folder */ 86 94 WPFolder *wpDesktop; 87 95 WPFolder *wpTempFolder; 96 PNOMPath nomPath; 97 PNOMPath np; 98 88 99 hReg=nomBeginRegisterDLLWithGC(); 89 100 if(NULLHANDLE==hReg) … … 117 128 /* Query current dir */ 118 129 g_strlcpy(desktopDir, g_get_current_dir(), sizeof(desktopDir)); 119 dbgPrintf("Desktop: %s", desktopDir);130 g_message("Desktop: %s", desktopDir); 120 131 121 132 /* … … 133 144 NOMClassMgrObject=nomEnvironmentNew(); 134 145 //dbgPrintf( "NOMClassMgrObject: %x", NOMClassMgrObject); 135 146 147 nomPath=NOMPathNew(); 148 NOMPath_assignCString(nomPath, desktopDir, NULLHANDLE); 149 /* Make sure there's no '/' at the end */ 150 nomPath=NOMPath_stripSeparator(nomPath, NULLHANDLE); 151 152 /* Create root folder */ 153 wpRootFolder=WPFolderNew(); 154 WPFolder_tstSetFullPath(wpRootFolder, NOMPath_queryCString(NOMPath_queryRoot(nomPath, NULLHANDLE),NULLHANDLE), 155 NULLHANDLE); 156 wpTempFolder=wpRootFolder; 157 158 nomPath=NOMPath_erasePathBegin(nomPath, NULLHANDLE); 159 160 /* Now create all folders up the chain */ 161 while(NOMPath_length(nomPath, NULLHANDLE)>0) 162 { 163 NOMPath* np; 164 WPFolder* wpFolder; 165 np=NOMPath_queryPathBegin(nomPath, NULLHANDLE); 166 167 wpFolder=WPFolderNew(); 168 WPFolder_tstSetFullPath(wpFolder, NOMPath_queryCString(np,NULLHANDLE), 169 NULLHANDLE); 170 WPFolder_wpSetFolder(wpFolder, wpTempFolder, NULLHANDLE); 171 wpTempFolder=wpFolder; 172 nomPath=NOMPath_erasePathBegin(nomPath, NULLHANDLE); 173 WPFolder_wpQueryFileName(wpFolder, TRUE, NULLHANDLE); 174 //g_message(" path: %s", NOMPath_queryCString(WPFolder_wpQueryFileName(wpFolder, TRUE, NULLHANDLE), 175 // NULLHANDLE)); 176 }; 177 178 g_message(" --> Desktop dir: %s", NOMPath_queryCString(WPFolder_wpQueryFileName(wpTempFolder, TRUE, NULLHANDLE), 179 NULLHANDLE)); 180 136 181 /* Create desktop folder */ 137 wpDesktop=WPFolderNew(); 138 139 dbgPrintf( "Created desktop object: %x", wpDesktop); 140 WPFolder_tstSetFullPath(wpDesktop, desktopDir, NULLHANDLE); 141 182 wpDesktop=wpTempFolder;//WPFolderNew(); 183 184 //WPFolder_tstSetFullPath(wpDesktop, desktopDir, NULLHANDLE); 185 //WPFolder_tstSetFullPath(wpDesktop, "r:", NULLHANDLE); 142 186 WPFolder_wpOpen(wpDesktop, NULL, OPEN_DEFAULT, NULL, NULL); 143 187 /* WPFolder_wpPopulate(wpObject, 0,"blabla 2", 0, NULL); */
Note:
See TracChangeset
for help on using the changeset viewer.