Changeset 146
- Timestamp:
- Dec 3, 2006, 9:54:12 PM (19 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/Makefile
r141 r146 18 18 19 19 TKIDLDIR = $(NOMPATH)/idl # The object TK lives here 20 IDLINC = --include=$(FOUNDATIONPATH)/idl 20 IDLINC = -include=$(FOUNDATIONPATH)/idl -include=$(TKIDLDIR) \ 21 -include=$(GUITKPATH)/idl 21 22 22 #INC = ./include -I $(NOMPATH)/include -I $(NOMPATH)/class_h 23 INC = ./include -I ./class_h -I $(NOMPATH)/class_h -I $(NOMPATH)/include \ 23 INC = ./include -I ./class_h -I $(NOMPATH)/class_h -I $(NOMPATH)/include\ 24 24 -I $(GUITKPATH)/class_h -I $(GUITKPATH)/include -I $(FOUNDATIONPATH)/class_h \ 25 25 -I $(FOUNDATIONPATH)/include … … 68 68 ################################### 69 69 70 BASE_NOMCOMPILEH = $(IDLCOMP) -include=$(TKIDLDIR)$(IDLINC) --showcpperrors --header --output-dir=$(CLASSINC) $<71 BASE_NOMCOMPILEIH = $(IDLCOMP) -include=$(TKIDLDIR)$(IDLINC) --showcpperrors --ihfile --output-dir=$(CLASSINC) $<72 BASE_NOMCOMPILEC = $(IDLCOMP) -include=$(TKIDLDIR)$(IDLINC) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $<70 BASE_NOMCOMPILEH = $(IDLCOMP) $(IDLINC) --showcpperrors --header --output-dir=$(CLASSINC) $< 71 BASE_NOMCOMPILEIH = $(IDLCOMP) $(IDLINC) --showcpperrors --ihfile --output-dir=$(CLASSINC) $< 72 BASE_NOMCOMPILEC = $(IDLCOMP) $(IDLINC) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $< 73 73 74 74 -
trunk/desktop/class_c/wpfilesystem.c
r141 r146 45 45 #include "wpfilesystem.ih" 46 46 47 NOM_Scope void NOMLINK impl_WPFileSystem_tstSetFullPath(WPFileSystem* nomSelf, const CORBA_char * fullPath, CORBA_Environment *ev) 47 NOM_Scope void NOMLINK impl_WPFileSystem_tstSetFullPath(WPFileSystem* nomSelf, const CORBA_char * fullPath, 48 CORBA_Environment *ev) 48 49 { 49 /* WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf); */ 50 WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf); 50 51 51 52 nomPrintf("thePath: ---> %s \n", fullPath); 53 _pszFullPath=fullPath; 52 54 } 53 55 56 NOM_Scope PNOMPath NOMLINK impl_WPFileSystem_wpQueryRealName(WPFileSystem* nomSelf, const CORBA_boolean bFullPath, 57 CORBA_Environment *ev) 58 { 59 WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf); 60 PNOMPath nomRetval=NOMPathNew(); 61 62 NOMPath_assignCString(nomRetval, _pszFullPath, ev); 63 64 return nomRetval; 65 } 66 -
trunk/desktop/class_c/wpfolder.c
r141 r146 57 57 }PRIVFOLDERDATA, *PPRIVFOLDERDATA; 58 58 59 /* Gui stuff */ 60 #include "nomguitk.h" 61 #include "nomfolderwindow.h" 62 59 63 #include "wpfolder.ih" 60 64 #include "wpdatafile.h" … … 63 67 #include "desktoptypes.h" 64 68 65 /* Gui stuff */66 #include "nomguitk.h"67 #include "nomfolderwindow.h"68 69 69 70 /* Enum for the folder store */ 70 71 enum 71 72 { 73 COL_OBJECT_PTR, 72 74 COL_PATH, 73 75 COL_DISPLAY_NAME, … … 82 84 83 85 store = gtk_list_store_new (NUM_COLS, 84 G_TYPE_STRING, 85 G_TYPE_STRING, 86 GDK_TYPE_PIXBUF, 87 G_TYPE_BOOLEAN); 88 86 G_TYPE_POINTER, 87 G_TYPE_STRING, 88 G_TYPE_STRING, 89 GDK_TYPE_PIXBUF, 90 G_TYPE_BOOLEAN); 91 g_message("%s: store: %x", __FUNCTION__, store); 89 92 return store; 90 93 } … … 131 134 132 135 gtk_list_store_set (store, &iter, 136 COL_OBJECT_PTR, wpFolder, 133 137 COL_PATH, path, 134 138 COL_DISPLAY_NAME, display_name, … … 153 157 nomPrintf("Icon ptr: %x\n", _wpQueryIcon((WPObject*)wpDataFile, NULLHANDLE)); 154 158 gtk_list_store_set (store, &iter, 159 COL_OBJECT_PTR, wpDataFile, 155 160 COL_PATH, path, 156 161 COL_DISPLAY_NAME, display_name, … … 185 190 g_log("WPFolder", G_LOG_LEVEL_DEBUG, "%s: Populating %s\n", __FUNCTION__, pszPath); 186 191 187 #warning !!!!! Window creation must be done elsewhere !!!!!188 _wpCreateFolderWindow(nomSelf, NULLHANDLE);189 192 190 193 #if 0 … … 215 218 gtk_icon_view_set_model(GTK_ICON_VIEW (priv->gtkIconView), GTK_TREE_MODEL (priv->gstoreFldContents)); 216 219 217 /* We now set which model columns that correspon tto the text220 /* We now set which model columns that correspond to the text 218 221 * and pixbuf of each item 219 222 */ … … 228 231 } 229 232 230 231 NOM_Scope void NOMLINK impl_WPFolder_wpInitData(WPFolder* nomSelf, CORBA_Environment *ev)232 {233 gulong ulErr;234 WPFolderData* nomThis=WPFolderGetData(nomSelf);235 236 /* orbit-idl-c-stubs.c, VoyagerWriteProtoForParentCall line 84 */237 WPFolder_wpInitData_parent((WPObject*)nomSelf, ev);238 239 nomPrintf(" Entering %s with nomSelf: 0x%x. nomSelf is: %s.\n",240 __FUNCTION__, nomSelf , nomSelf->mtab->nomClassName);241 _privFolderData=_wpAllocMem((WPObject*)nomSelf, sizeof(PRIVFOLDERDATA), (CORBA_unsigned_long*)&ulErr, NULLHANDLE);242 }243 244 233 NOM_Scope gpointer NOMLINK impl_WPFolder_wpOpen(WPFolder* nomSelf, const gpointer ptrReserved, 245 234 const CORBA_unsigned_long ulView, const gpointer ptrParams, … … 253 242 case OPEN_DEFAULT: 254 243 { 255 WPFolder_wpCreateFolderWindow(nomSelf, ev); 244 NOMFolderWindow * nomFldrWindow; 245 246 #warning !!!!! Folder window must be inserted into inuse list !!!!! 247 nomFldrWindow=WPFolder_wpCreateFolderWindow(nomSelf, ev); 248 NOMFolderWindow_setWPFolderObject(nomFldrWindow, nomSelf, ev); 249 250 #warning !!!!! Path taken from a test location !!!!! 251 WPFolder_wpPopulate(nomSelf, 0L, NOMPath_getCString(WPFolder_wpQueryRealName(nomSelf, TRUE, ev) , ev), FALSE, ev); 252 break; 253 256 254 #if 0 257 255 char path[CCHMAXPATH]; … … 271 269 if(!hwndFolder) 272 270 return NULLHANDLE; 273 274 somPrintf("somSelf: %x, hwndFolder: %x\n", somSelf, hwndFolder);275 /* Set object pointer */276 /* dw_window_set_data(hwndFolder, "thisObject", somSelf);277 msg("somSelf 2: %x, hwnd: %x", dw_window_get_data(hwndFolder, "thisObject"), hwndFolder); */278 271 279 272 /* populate the folder */ … … 316 309 models and stuff. 317 310 */ 318 NOM_Scope gpointerNOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev)311 NOM_Scope PNOMFolderWindow NOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev) 319 312 { 320 313 NOMFolderWindow * nomFldrWindow; … … 329 322 priv->gtkIconView=NOMFolderWindow_getContainerHandle(nomFldrWindow, ev); 330 323 324 /* Show the new window */ 331 325 NOMFolderWindow_show(nomFldrWindow, ev); 332 326 333 return NOMFolderWindow_getWindowHandle(nomFldrWindow, ev);; 334 } 335 336 337 NOM_Scope void NOMLINK impl_WPFolder_tstSetFolderPath(WPFolder* nomSelf, const CORBA_char * thePath, CORBA_Environment *ev) 338 { 339 /* WPFolderData* nomThis=WPFolderGetData(nomSelf); */ 340 341 342 } 343 344 345 346 327 return nomFldrWindow; 328 } 329 330 NOM_Scope void NOMLINK impl_WPFolder_wpInitData(WPFolder* nomSelf, CORBA_Environment *ev) 331 { 332 gulong ulErr; 333 WPFolderData* nomThis=WPFolderGetData(nomSelf); 334 335 WPFolder_wpInitData_parent((WPObject*)nomSelf, ev); 336 337 nomPrintf(" Entering %s with nomSelf: 0x%x. nomSelf is: %s.\n", 338 __FUNCTION__, nomSelf , nomSelf->mtab->nomClassName); 339 _privFolderData=_wpAllocMem((WPObject*)nomSelf, sizeof(PRIVFOLDERDATA), (CORBA_unsigned_long*)&ulErr, NULLHANDLE); 340 } 341 342 343 -
trunk/desktop/idl/wpfilesystem.idl
r98 r146 37 37 38 38 #include "wpobject.idl" 39 #include "nomfilepath.idl" 39 40 40 41 interface WPFileSystem : WPObject … … 44 45 45 46 void tstSetFullPath(in string fullPath); 47 PNOMPath wpQueryRealName(in boolean bFullPath); 46 48 47 49 #if 0 48 50 ULONG cbEASize; 49 51 #endif 50 51 52 NOMINSTANCEVAR(string pszFullPath); /* ONLY FOR TESTING!!! */ 53 NOMINSTANCEVAR(string pszType); 52 54 }; 53 55 -
trunk/desktop/idl/wpfolder.idl
r141 r146 38 38 #include "wpfilesystem.idl" 39 39 #include "nomfilepath.idl" 40 /*#include "nomfolderwindow.idl"*/ 41 42 native PNOMFolderWindow; 40 43 41 44 NOMCLASSNAME(WPFolder); … … 46 49 47 50 boolean wpPopulate(in unsigned long ulReserved, 48 in string pszPath,49 in boolean fFoldersOnly);50 gpointerwpCreateFolderWindow();51 void tstSetFolderPath(in string thePath); /* Only for testing */ 51 in string pszPath, 52 in boolean fFoldersOnly); 53 PNOMFolderWindow wpCreateFolderWindow(); 54 52 55 #if 0 53 56 WPObject wpQueryContent(in WPObject Object, … … 62 65 63 66 NOMINSTANCEVAR(PPRIVFOLDERDATA privFolderData); 64 NOMINSTANCEVAR(PNOMPath pnomPath );67 NOMINSTANCEVAR(PNOMPath pnomPath_); 65 68 }; 66 69 -
trunk/foundation/class_c/nomfilepath.c
r129 r146 1 /* ***** BEGIN LICENSE BLOCK ***** 2 * Version: CDDL 1.0/LGPL 2.1 3 * 4 * The contents of this file are subject to the COMMON DEVELOPMENT AND 5 * DISTRIBUTION LICENSE (CDDL) Version 1.0 (the "License"); you may not use 6 * this file except in compliance with the License. You may obtain a copy of 7 * the License at http://www.sun.com/cddl/ 8 * 9 * Software distributed under the License is distributed on an "AS IS" basis, 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 11 * for the specific language governing rights and limitations under the 12 * License. 13 * 14 * The Original Code is "NOM" Netlabs Object Model 15 * 16 * The Initial Developer of the Original Code is 17 * netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>. 18 * Portions created by the Initial Developer are Copyright (C) 2006 19 * the Initial Developer. All Rights Reserved. 20 * 21 * Contributor(s): 22 * 23 * Alternatively, the contents of this file may be used under the terms of 24 * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which 25 * case the provisions of the LGPL are applicable instead of those above. If 26 * you wish to allow use of your version of this file only under the terms of 27 * the LGPL, and not to allow others to use your version of this file under 28 * the terms of the CDDL, indicate your decision by deleting the provisions 29 * above and replace them with the notice and other provisions required by the 30 * LGPL. If you do not delete the provisions above, a recipient may use your 31 * version of this file under the terms of any one of the CDDL or the LGPL. 32 * 33 * ***** END LICENSE BLOCK ***** */ 1 34 /* 2 * This file was generated by orbit-idl-2 for Voyager - DO NOT EDIT!3 *4 *5 35 * And remember, phase 3 is near... 6 36 */ -
trunk/foundation/class_c/nomstring.c
r142 r146 16 16 * The Initial Developer of the Original Code is 17 17 * netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>. 18 * Portions created by the Initial Developer are Copyright (C) 200 5-200618 * Portions created by the Initial Developer are Copyright (C) 2006 19 19 * the Initial Developer. All Rights Reserved. 20 20 * -
trunk/foundation/exports.def
r122 r146 9 9 NOMStringNewClass 10 10 11 _NOMPathClassData 12 _NOMPathCClassData 13 NOMPathNewClass -
trunk/gui/Makefile
r126 r146 17 17 IDLDIR = ./idl 18 18 19 TKIDLDIR = $(NOMPATH)/idl # The object TK lives here 20 21 INC = ./include -I ./class_h -I $(NOMPATH)/class_h -I $(NOMPATH)/include 19 # The object TK lives here 20 TKIDLDIR = $(NOMPATH)/idl 21 IDLINC = -include=$(TKIDLDIR) -include=$(DESKTOPPATH)/idl -include=$(FOUNDATIONPATH)/idl 22 23 INC = ./include -I ./class_h \ 24 -I $(NOMPATH)/class_h -I $(NOMPATH)/include \ 25 -I $(DESKTOPPATH)/class_h -I $(DESKTOPPATH)/include \ 26 -I $(FOUNDATIONPATH)/class_h -I $(FOUNDATIONPATH)/include 22 27 23 28 ADDLIBS = -l$(OBJDIR)/nobjtk … … 49 54 ################################### 50 55 51 BASE_NOMCOMPILEH = $(IDLCOMP) -include=$(TKIDLDIR) --showcpperrors --header --output-dir=$(CLASSINC) $<52 BASE_NOMCOMPILEIH = $(IDLCOMP) -include=$(TKIDLDIR) --showcpperrors --ihfile --output-dir=$(CLASSINC) $<53 BASE_NOMCOMPILEC = $(IDLCOMP) -include=$(TKIDLDIR) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $<56 BASE_NOMCOMPILEH = $(IDLCOMP) $(IDLINC) --showcpperrors --header --output-dir=$(CLASSINC) $< 57 BASE_NOMCOMPILEIH = $(IDLCOMP) $(IDLINC) --showcpperrors --ihfile --output-dir=$(CLASSINC) $< 58 BASE_NOMCOMPILEC = $(IDLCOMP) $(IDLINC) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $< 54 59 55 60 -
trunk/gui/class_c/nomfolderwindow.c
r127 r146 46 46 #include "nomfolderwindow.ih" 47 47 48 #warning !!!!! nomIsObj() must be globaly defined !!!!! 49 #define nomIsObj(a) ((a)!= 0) 50 51 48 52 NOM_Scope PGtkWidget NOMLINK impl_NOMFolderWindow_getContainerHandle(NOMFolderWindow* nomSelf, CORBA_Environment *ev) 49 53 { 50 54 NOMFolderWindowData* nomThis=NOMFolderWindowGetData(nomSelf); 51 55 52 return _pgContainerHandle;56 return (PGtkWidget) g_atomic_pointer_get(&_pgContainerHandle); 53 57 } 54 58 … … 61 65 } 62 66 67 NOM_Scope void NOMLINK impl_NOMFolderWindow_setWPFolderObject(NOMFolderWindow* nomSelf, const PWPFolder pWPFolderObject, 68 CORBA_Environment *ev) 69 { 70 NOMFolderWindowData* nomThis=NOMFolderWindowGetData(nomSelf); 71 72 if(!nomIsObj(pWPFolderObject)) 73 return; 74 75 _pWPFolderObj=pWPFolderObject; 76 } 77 78 NOM_Scope PWPFolder NOMLINK impl_NOMFolderWindow_getWPFolderObject(NOMFolderWindow* nomSelf, CORBA_Environment *ev) 79 { 80 NOMFolderWindowData* nomThis=NOMFolderWindowGetData(nomSelf); 81 82 return _pWPFolderObj; 83 } 63 84 64 85 static void … … 104 125 if(fldr_checkContextButton(event)) 105 126 { 127 PNOMFolderWindow pWindow; 128 GtkTreePath* treePath; 129 106 130 DosBeep(5000, 100); 131 pWindow=(NOMFolderWindow*)user_data; 132 133 treePath=gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget), event->x, event->y ); 134 if(NULL==treePath) 135 { 136 /* Click on white space */ 137 WPFolder* wpFolder; 138 wpFolder=NOMFolderWindow_getWPFolderObject(pWindow, NULLHANDLE); 139 g_message("%s: %s", __FUNCTION__, wpFolder->mtab->nomClassName); 140 } 141 else 142 { 143 GtkTreeIter iter; 144 GtkTreeModel* model; 145 WPObject *wpObject; 146 /* Click on an icon */ 147 148 g_message("%s: %s", __FUNCTION__, gtk_tree_path_to_string(treePath)); 149 150 model=gtk_icon_view_get_model(GTK_ICON_VIEW(widget)); 151 g_message("%s: model: %x", __FUNCTION__, model); 152 153 gtk_tree_model_get_iter(model , &iter, treePath); 154 155 gtk_tree_model_get(model, &iter, 156 0, &wpObject, 157 -1); 158 g_message("%s: %s", __FUNCTION__, wpObject->mtab->nomClassName); 159 160 } 161 107 162 #if 0 108 163 /* This is the folder object not the object on which a click occured */ … … 208 263 } 209 264 265 266 267 268 269 270 271 272 273 -
trunk/gui/class_c/nomwindow.c
r127 r146 53 53 NOMWindowData* nomThis=NOMWindowGetData(nomSelf); 54 54 55 56 return _pgWindowHandle; 55 return (PGtkWidget) g_atomic_pointer_get(&_pgWindowHandle); 57 56 } 58 57 -
trunk/gui/idl/nomfolderwindow.idl
r127 r146 37 37 38 38 #include "nomwindow.idl" 39 #include "wpfolder.idl" 39 40 40 41 interface NOMFolderWindow : NOMWindow … … 44 45 PGtkWidget getContainerHandle(); 45 46 void setContainerHandle(in PGtkWidget pgWidget); 47 void setWPFolderObject(in PWPFolder pWPFolderObject); 48 PWPFolder getWPFolderObject(); 46 49 47 50 NOMOVERRIDE(nomInit); 48 51 49 NOMINSTANCEVAR(PGtkWidget _pgContainerHandle); 52 NOMINSTANCEVAR(PGtkWidget pgContainerHandle); 53 NOMINSTANCEVAR(PWPFolder pWPFolderObj); 54 50 55 }; 51 56
Note:
See TracChangeset
for help on using the changeset viewer.