Changeset 183 for trunk/desktop
- Timestamp:
- Jan 7, 2007, 10:36:52 PM (19 years ago)
- Location:
- trunk/desktop
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/Makefile
r178 r183 25 25 -I $(FOUNDATIONPATH)/include 26 26 27 ADDLIBS = -l$(OBJDIR)/nobjtk -l$(OBJDIR)/voy wp27 ADDLIBS = -l$(OBJDIR)/nobjtk -l$(OBJDIR)/voyfcls -l$(OBJDIR)/voywp 28 28 CLASSDLLLIBS = -l$(OBJDIR)/nobjtk -l$(OBJDIR)/voyguitk -l$(OBJDIR)/voyfcls 29 29 GCLIB = -l$(OBJDIR)/gc -
trunk/desktop/class_c/wpfilesystem.c
r146 r183 43 43 44 44 #include <string.h> 45 #include "gtk/gtk.h" 46 /* Gui stuff */ 47 #include "nomguitk.h" 48 #include "nomwindow.h" 49 #include "desktoptypes.h" 50 51 #include "nomfolderwindow.h" 52 53 45 54 #include "wpfilesystem.ih" 46 55 … … 54 63 } 55 64 56 NOM_Scope PNOMPath NOMLINK impl_WPFileSystem_wpQuery RealName(WPFileSystem* nomSelf, const CORBA_boolean bFullPath,65 NOM_Scope PNOMPath NOMLINK impl_WPFileSystem_wpQueryFileName(WPFileSystem* nomSelf, const CORBA_boolean bFullPath, 57 66 CORBA_Environment *ev) 58 67 { 59 68 WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf); 60 PNOMPath nomRetval =NOMPathNew();61 62 NOMPath_assignCString(nomRetval, _pszFullPath, ev);69 PNOMPath nomRetval; 70 PNOMPath nomPath; 71 PWPFolder wpParent; 63 72 64 return nomRetval; 73 if(!bFullPath){ 74 nomRetval=NOMPathNew(); 75 return (PNOMPath) NOMPath_assignCString(nomRetval, _pszFullPath, ev); 76 } 77 78 /* we are interested in the full path */ 79 80 /* Get parent folder */ 81 wpParent=WPFileSystem_wpQueryFolder(nomSelf, NULLHANDLE); 82 83 if(NULLHANDLE==wpParent) 84 { 85 /* We are root folder */ 86 nomRetval=NOMPathNew(); 87 return (PNOMPath) NOMPath_assignCString(nomRetval, _pszFullPath, ev); 88 } 89 90 /* We area folder somwhere in the chain */ 91 nomRetval=WPFileSystem_wpQueryFileName((WPFileSystem*)wpParent, bFullPath, NULLHANDLE); 92 nomPath=NOMPathNew(); 93 nomPath= (PNOMPath) NOMPath_assignCString(nomPath, _pszFullPath, ev); 94 95 return (PNOMPath)NOMPath_appendPath(nomRetval, nomPath, NULLHANDLE); 65 96 } 66 97 -
trunk/desktop/class_c/wpfolder.c
r172 r183 59 59 /* Gui stuff */ 60 60 #include "nomguitk.h" 61 #include "nomwindow.h" 62 #include "desktoptypes.h" 63 61 64 #include "nomfolderwindow.h" 62 65 … … 65 68 #include "desktop.h" 66 69 #include "helper.h" 67 #include "desktoptypes.h" 70 68 71 69 72 … … 249 252 250 253 #warning !!!!! Path taken from a test location !!!!! 251 WPFolder_wpPopulate(nomSelf, 0L, NOMPath_ getCString(WPFolder_wpQueryRealName(nomSelf, TRUE, ev) , ev), FALSE, ev);254 WPFolder_wpPopulate(nomSelf, 0L, NOMPath_queryCString(WPFolder_wpQueryFileName(nomSelf, TRUE, ev) , ev), FALSE, ev); 252 255 break; 253 256 -
trunk/desktop/class_c/wpobject.c
r176 r183 61 61 #endif 62 62 63 #ifndef WPFolder 64 typedef struct WPFolder_struct { 65 struct nomMethodTabStruct *mtab; 66 gulong body[1]; 67 } WPFolderObj; 68 #define WPFolder WPFolderObj 69 typedef WPFolder *PWPFolder; 70 #endif 71 63 72 #include "nomwindow.h" 64 73 #include "desktoptypes.h" … … 186 195 187 196 g_return_val_if_fail(NULLHANDLE!=wpObject, FALSE); 197 198 WPObject_wpSaveDeferred(wpObject, NULLHANDLE); 188 199 189 200 WPObject_wpDeleteFromObjUseList(wpObject, pUseItem, NULLHANDLE); … … 445 456 446 457 /* Create a new title */ 447 NOMString_assign String(tmpString, pnomStrNewTitle, ev);458 NOMString_assign(tmpString, pnomStrNewTitle, ev); 448 459 449 460 /* It may happen that someone changed the title from another thread. We may either … … 472 483 tmpPtr=g_atomic_pointer_get(&_pnomStringTitle); 473 484 474 return NOMString_copy String(tmpPtr, ev);485 return NOMString_copy(tmpPtr, ev); 475 486 } 476 487 … … 656 667 } 657 668 658 659 660 669 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpSaveDeferred(WPObject* nomSelf, CORBA_Environment *ev) 670 { 671 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 672 673 g_message("%s not implemented", __FUNCTION__); 674 675 return TRUE; 676 } 677 678 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpSaveImmediate(WPObject* nomSelf, CORBA_Environment *ev) 679 { 680 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */ 681 682 g_message("%s not implemented", __FUNCTION__); 683 684 return TRUE; 685 } 686 687 NOM_Scope void NOMLINK impl_WPObject_wpSetFolder(WPObject* nomSelf, const PWPFolder wpParentFolder, 688 CORBA_Environment *ev) 689 { 690 WPObjectData* nomThis=WPObjectGetData(nomSelf); 691 692 _wpParentFldr=wpParentFolder; 693 } 694 695 NOM_Scope PWPFolder NOMLINK impl_WPObject_wpQueryFolder(WPObject* nomSelf, CORBA_Environment *ev) 696 { 697 WPObjectData* nomThis=WPObjectGetData(nomSelf); 698 699 return _wpParentFldr; 700 } 701 -
trunk/desktop/idl/wpfilesystem.idl
r146 r183 36 36 #define wpfsys_idl 37 37 38 #include "nombase.idl" 39 40 NOMCLASSNAME(WPFileSystem); 41 38 42 #include "wpobject.idl" 39 43 #include "nomfilepath.idl" … … 45 49 46 50 void tstSetFullPath(in string fullPath); 47 PNOMPath wpQuery RealName(in boolean bFullPath);51 PNOMPath wpQueryFileName(in boolean bFullPath); 48 52 49 53 #if 0 -
trunk/desktop/idl/wpfolder.idl
r166 r183 36 36 #define WPFOLDER_IDL_INCLUDED 37 37 38 #include "nombase.idl" 39 40 NOMCLASSNAME(WPFolder); 41 38 42 #include "wpfilesystem.idl" 39 43 #include "nomfilepath.idl" … … 45 49 #endif 46 50 47 NOMCLASSNAME(WPFolder);51 //NOMCLASSNAME(WPFolder); 48 52 49 53 interface WPFolder : WPFileSystem -
trunk/desktop/idl/wpobject.idl
r176 r183 38 38 #include <nomobj.idl> 39 39 40 NOMCLASSNAME(WPObject); 41 40 42 #include "wpnativetypes.idl" 41 43 #include "nomstring.idl" … … 49 51 #endif 50 52 51 NOMCLASSNAME(WPObject); 53 #if 0 54 #ifndef WPFolder_defined 55 #define WPFolder_defined 56 native PWPFolder; 57 #endif 58 #endif 59 60 #ifndef WPFOLDER_IDL_INCLUDED 61 native PWPFolder; 62 #endif 63 64 //NOMCLASSNAME(WPObject); 52 65 53 66 #include "wpnotebook.idl" … … 70 83 unsigned long wpRequestObjectMutexSem(in unsigned long ulReserved); 71 84 unsigned long wpReleaseObjectMutexSem(); 72 /* boolean wpSetFolder(in WPFolder wpParentFolder); */73 85 74 86 PNOMString wpSetTitle(in PNOMString pnomStrNewTitle); … … 98 110 PVIEWITEM wpFindViewItem(in gulong flViews,in PVIEWITEM pCurrentItem); 99 111 112 boolean wpSaveDeferred(); 113 boolean wpSaveImmediate(); 114 115 void wpSetFolder(in PWPFolder wpParentFolder); 116 PWPFolder wpQueryFolder(); 117 100 118 /* Methods overriden by this class */ 101 119 NOMOVERRIDE(nomInit); … … 108 126 NOMINSTANCEVAR(PGSList glstObjectInUse); 109 127 NOMINSTANCEVAR(PNOMString pnomStringTitle); 110 128 NOMINSTANCEVAR(PWPFolder wpParentFldr); 111 129 }; 112 130 -
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.