Changeset 224 for trunk/desktop/class_c
- Timestamp:
- Feb 4, 2007, 1:22:24 PM (19 years ago)
- Location:
- trunk/desktop/class_c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpfolder.c
r206 r224 38 38 * And remember, phase 3 is near... 39 39 */ 40 #ifndef NOM_ M_WPFolder_IMPLEMENTATION_FILE41 #define NOM_ M_WPFolder_IMPLEMENTATION_FILE40 #ifndef NOM_WPFolder_IMPLEMENTATION_FILE 41 #define NOM_WPFolder_IMPLEMENTATION_FILE 42 42 #endif 43 43 … … 70 70 #include "wpnotebook.h" 71 71 #include "wpfolderwindow.h" 72 #include "m_wpfolder.h" 72 73 #include "wpfolder.ih" 73 #include "m_wpfolder.h" 74 74 75 #include "wpdatafile.h" 75 76 #include "desktop.h" … … 92 93 COL_DISPLAY_NAME, 93 94 COL_PIXBUF, 94 COL_IS_DIRECTORY,95 95 NUM_COLS 96 96 }; … … 104 104 G_TYPE_STRING, 105 105 G_TYPE_STRING, 106 GDK_TYPE_PIXBUF, 107 G_TYPE_BOOLEAN); 108 g_message("%s: store: %x", __FUNCTION__, (UINT) store); 106 GDK_TYPE_PIXBUF); 107 // g_message("%s: store: %x", __FUNCTION__, (UINT) store); 109 108 return store; 110 109 } … … 115 114 116 115 /***************************************************************/ 117 116 /* 117 The folder is already populated, that means the internal folder list 118 is filled with all the objects in the folder. We traverse that list 119 and fill the store utilisized by the icon view with the objects. 120 */ 118 121 static 119 122 gboolean fillStoreTraverseFunc(gpointer pKey, gpointer pTraverseValue, gpointer pData) … … 123 126 gchar * display_name; 124 127 GtkListStore *store=(GtkListStore *)pData; 125 128 WPObject* wpObject; 129 126 130 // g_message("In %s with %s %x", __FUNCTION__, (char*)pKey, (UINT)pValue->wpObject); 127 131 … … 129 133 display_name=g_strdup(pKey); /* New string necessary? */ 130 134 131 132 if(!strcmp("WPDataFile", pValue->wpObject->mtab->nomClassName)){ 133 WPDataFile* wpDataFile; 134 135 wpDataFile=(WPDataFile*)pValue->wpObject; 136 137 if(nomIsObj(wpDataFile)) 138 { 139 gtk_list_store_append (store, &iter); 140 141 #warning !!!! some problems with icon handling here !!!! 142 //nomPrintf("Icon ptr: %x\n", _wpQueryIcon((WPObject*)wpDataFile, NULLHANDLE)); 143 gtk_list_store_set (store, &iter, 144 COL_OBJECT_PTR, wpDataFile, 145 COL_PATH, "", 146 COL_DISPLAY_NAME, display_name, 147 COL_IS_DIRECTORY, FALSE, 148 COL_PIXBUF, _wpQueryIcon((WPObject*)wpDataFile, NULLHANDLE), //file_pixbuf, 149 -1); 150 } 135 wpObject=pValue->wpObject; 136 137 if(nomIsObj(wpObject)){ 138 #if 0 139 g_message("%d %s : %s, %s", 140 __LINE__, __FUNCTION__, (char*)pKey, 141 NOMPath_queryCString(WPFolder_wpQueryFileName(wpFolder, TRUE, NULLHANDLE), NULLHANDLE)); 142 #endif 143 144 gtk_list_store_append (store, &iter); 145 146 gtk_list_store_set (store, &iter, 147 COL_OBJECT_PTR, wpObject, 148 COL_PATH, "", 149 COL_DISPLAY_NAME, display_name, 150 COL_PIXBUF, _wpQueryIcon(wpObject, NULLHANDLE), 151 -1); 151 152 } 152 else{153 WPFolder* wpFolder;154 155 wpFolder=(WPFolder*)pValue->wpObject;156 157 if(nomIsObj((NOMObject*)wpFolder)){158 #if 0159 g_message("%d %s : %s, %s",160 __LINE__, __FUNCTION__, (char*)pKey,161 NOMPath_queryCString(WPFolder_wpQueryFileName(wpFolder, TRUE, NULLHANDLE), NULLHANDLE));162 #endif163 164 gtk_list_store_append (store, &iter);165 166 gtk_list_store_set (store, &iter,167 COL_OBJECT_PTR, wpFolder,168 COL_PATH, "",169 COL_DISPLAY_NAME, display_name,170 COL_IS_DIRECTORY, TRUE,171 COL_PIXBUF, _wpQueryIcon((WPObject*)wpFolder, NULLHANDLE), //folder_pixbuf ,172 -1);173 }174 }175 176 153 return FALSE; /* Traverse every item */ 177 154 } … … 181 158 { 182 159 WPFolderData* nomThis=WPFolderGetData(nomSelf); 183 184 nomPrintf("In %s: %s\n", __FUNCTION__, gchrPath);185 160 186 161 /* First clear the store */ … … 273 248 wpObject=NULLHANDLE; 274 249 } 250 275 251 if(nomIsObj((PNOMObject)wpObject)) 276 252 { … … 279 255 WPFileSystem_tstSetFullPath((WPFileSystem*)wpObject, gchrCurrentEntry, NULLHANDLE); 280 256 WPFileSystem_wpSetFolder(wpObject, nomSelf, NULLHANDLE); 281 #if 9257 #if 0 282 258 g_message("%d %s : %s (%x) , %s", 283 259 __LINE__, __FUNCTION__, gchrCurrentEntry, (UINT)wpObject, … … 319 295 g_return_val_if_fail(NULLHANDLE!=wpWindow, FALSE); 320 296 321 /* This call will be different when using WPFolderWindow */322 //wpObject=NOMFolderWindow_wpQueryWPFolderObject(wpWindow, NULLHANDLE);323 297 wpObject=pUseItem->wpObject; 324 298 g_return_val_if_fail(NULLHANDLE!=wpObject, FALSE); 325 299 326 300 WPObject_wpSaveDeferred(wpObject, NULLHANDLE); 327 301 /* Remove the open folder view from the inuse list */ 328 302 WPObject_wpDeleteFromObjUseList(wpObject, pUseItem, NULLHANDLE); 329 303 … … 344 318 /* Special parameter representing a double click or "I just don't know" ;-) */ 345 319 if(OPEN_DEFAULT==ulView) 346 ulV=WP Object_wpQueryDefaultView(nomSelf, &nSpaceId, NULLHANDLE);320 ulV=WPFolder_wpQueryDefaultView(nomSelf, &nSpaceId, NULLHANDLE); 347 321 348 322 /* We only handle items with in own name space */ … … 361 335 GtkIconView* gtkIconView; 362 336 363 pszPath=NOMPath_queryCString( WPFolder_wpQueryFileName(nomSelf, TRUE, NULLHANDLE), NULLHANDLE);337 pszPath=NOMPath_queryCString(_wpQueryFileName(nomSelf, TRUE, NULLHANDLE), NULLHANDLE); 364 338 g_message("%d %s, %s", __LINE__, __FUNCTION__, pszPath); 365 339 WPFolder_wpPopulate(nomSelf, 0L, pszPath, FALSE, NULLHANDLE); … … 370 344 371 345 /* Insert it into inuse list */ 372 pui=(PUSEITEM)WPFolder_wpAllocMem(nomSelf, sizeof(USEITEM)+sizeof(VIEWITEM), &ulError, ev);346 pui=(PUSEITEM)WPFolder_wpAllocMem(nomSelf, sizeof(USEITEM)+sizeof(VIEWITEM), &ulError, NULLHANDLE); 373 347 /* Fill the structures */ 374 348 pui->type=(gulong)USAGE_OPENVIEW; … … 379 353 ((VIEWITEM*)pui)->nameSpaceId=WPFolderNomId; 380 354 pui--; 381 #warning !!!!! Folder window must be inserted into inuse list !!!!! 355 382 356 /* Make sure the view item is removed when the window is closed */ 383 357 g_signal_connect(G_OBJECT(NOMWindow_queryWindowHandle((NOMWindow*)wpFldrWindow, NULLHANDLE)),"delete-event", -
trunk/desktop/class_c/wpfolderwindow.c
r206 r224 116 116 PWPFolderWindow pWindow; 117 117 GtkTreePath* treePath; 118 DosBeep(5000, 100);118 //DosBeep(5000, 100); 119 119 pWindow=(WPFolderWindow*)user_data; 120 TST_OBJECT(pWindow);120 //TST_OBJECT(pWindow); 121 121 treePath=gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget), event->x, event->y ); 122 122 if(NULL==treePath) … … 166 166 } 167 167 168 /* orbit-idl-c-stubs.c, cs_output_stub line 347 */169 168 NOM_Scope void NOMLINK impl_WPFolderWindow_nomInit(WPFolderWindow* nomSelf, CORBA_Environment *ev) 170 169 { … … 185 184 /* Folder toplevel window. */ 186 185 window = gtk_window_new (GTK_WINDOW_TOPLEVEL); 187 /* Set title */188 // gtk_window_set_title (GTK_WINDOW (window), "");189 186 190 187 /* FIXME: Set default size of folder frame. Will later use a stored value */ … … 278 275 } 279 276 277 -
trunk/desktop/class_c/wpobject.c
r209 r224 69 69 /***************************************************************/ 70 70 71 /** 72 \brief Function which implements the wpAllocMem() method of WPObject. 73 */ 71 74 NOM_Scope gpointer NOMLINK impl_WPObject_wpAllocMem(WPObject* nomSelf, const gulong cbBytes, 72 75 gulong* prc, CORBA_Environment *ev) … … 99 102 } 100 103 104 /** 105 \brief Function which implements the wpFreeMem() method of WPObject. 106 */ 101 107 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpFreeMem(WPObject* nomSelf, const gpointer pByte, CORBA_Environment *ev) 102 108 { … … 115 121 } 116 122 123 /** 124 \brief Override of nomInit() from NOMObject. 125 */ 117 126 NOM_Scope void NOMLINK impl_WPObject_nomInit(WPObject* nomSelf, CORBA_Environment *ev) 118 127 { … … 146 155 } 147 156 157 /** 158 \brief Function which implements the wpInitData() method of WPObject. 159 */ 148 160 NOM_Scope void NOMLINK impl_WPObject_wpInitData(WPObject* nomSelf, CORBA_Environment *ev) 149 161 { … … 159 171 } 160 172 173 /** 174 \brief Function which implements the wpUnInitData() method of WPObject. 175 */ 161 176 NOM_Scope void NOMLINK impl_WPObject_wpUnInitData(WPObject* nomSelf, CORBA_Environment *ev) 162 177 { … … 189 204 } 190 205 206 /** 207 \brief Function which implements the wpOpen() method of WPObject. 208 */ 191 209 NOM_Scope gpointer NOMLINK impl_WPObject_wpOpen(WPObject* nomSelf, const PWPFolderWindow nomFolder, 192 210 const gulong ulView, const nomId nameSpaceId, … … 250 268 } 251 269 270 /** 271 \brief Function which implements the wpViewObject() method of WPObject. 272 */ 252 273 NOM_Scope gpointer NOMLINK impl_WPObject_wpViewObject(WPObject* nomSelf, const PWPFolderWindow nomFolder, 253 274 const gulong ulView, const nomId nameSpaceId, … … 272 293 } 273 294 295 /** 296 \brief Function which implements the wpSwitchTo() method of WPObject. 297 */ 274 298 NOM_Scope gpointer NOMLINK impl_WPObject_wpSwitchTo(WPObject* nomSelf, const gulong ulView, const nomId nameSpaceId, 275 299 CORBA_Environment *ev) … … 289 313 } 290 314 315 /** 316 \brief Function which implements the wpRegisterView() method of WPObject. 317 */ 291 318 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpRegisterView(WPObject* nomSelf, const PNOMWindow pWindow, 292 319 const PNOMString nomStrViewTitle, CORBA_Environment *ev) … … 298 325 } 299 326 327 /** 328 \brief Function which implements the wpAddToObjUseList() method of WPObject. 329 */ 300 330 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpAddToObjUseList(WPObject* nomSelf, const PUSEITEM pUseItem, 301 331 CORBA_Environment *ev) … … 317 347 } 318 348 349 /** 350 \brief Function which implements the wpDeleteFromObjUseList() method of WPObject. 351 */ 319 352 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpDeleteFromObjUseList(WPObject* nomSelf, const PUSEITEM pUseItem, 320 353 CORBA_Environment *ev)
Note:
See TracChangeset
for help on using the changeset viewer.