Changeset 224 for trunk/desktop/class_c


Ignore:
Timestamp:
Feb 4, 2007, 1:22:24 PM (19 years ago)
Author:
cinc
Message:

Added doxygen documentation.

Location:
trunk/desktop/class_c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/class_c/wpfolder.c

    r206 r224  
    3838 * And remember, phase 3 is near...
    3939 */
    40 #ifndef NOM_M_WPFolder_IMPLEMENTATION_FILE
    41 #define NOM_M_WPFolder_IMPLEMENTATION_FILE
     40#ifndef NOM_WPFolder_IMPLEMENTATION_FILE
     41#define NOM_WPFolder_IMPLEMENTATION_FILE
    4242#endif
    4343
     
    7070#include "wpnotebook.h"
    7171#include "wpfolderwindow.h"
     72#include "m_wpfolder.h"
    7273#include "wpfolder.ih"
    73 #include "m_wpfolder.h"
     74
    7475#include "wpdatafile.h"
    7576#include "desktop.h"
     
    9293  COL_DISPLAY_NAME,
    9394  COL_PIXBUF,
    94   COL_IS_DIRECTORY,
    9595  NUM_COLS
    9696};
     
    104104                              G_TYPE_STRING,
    105105                              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);
    109108  return store;
    110109}
     
    115114
    116115/***************************************************************/
    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 */
    118121static
    119122gboolean fillStoreTraverseFunc(gpointer pKey, gpointer pTraverseValue, gpointer pData)
     
    123126  gchar * display_name;
    124127  GtkListStore *store=(GtkListStore *)pData;
    125 
     128  WPObject* wpObject;
     129   
    126130  //  g_message("In %s with %s %x", __FUNCTION__, (char*)pKey, (UINT)pValue->wpObject);
    127131
     
    129133  display_name=g_strdup(pKey); /* New string necessary? */ 
    130134
    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);
    151152  }
    152   else{
    153     WPFolder* wpFolder;
    154 
    155     wpFolder=(WPFolder*)pValue->wpObject;
    156 
    157     if(nomIsObj((NOMObject*)wpFolder)){
    158 #if 0
    159       g_message("%d %s : %s, %s",
    160                 __LINE__, __FUNCTION__, (char*)pKey,
    161                 NOMPath_queryCString(WPFolder_wpQueryFileName(wpFolder, TRUE, NULLHANDLE), NULLHANDLE));
    162 #endif
    163 
    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 
    176153  return FALSE; /* Traverse every item */
    177154}
     
    181158{
    182159  WPFolderData* nomThis=WPFolderGetData(nomSelf);
    183 
    184   nomPrintf("In %s:  %s\n", __FUNCTION__, gchrPath);         
    185160
    186161  /* First clear the store */
     
    273248              wpObject=NULLHANDLE;
    274249          }
     250
    275251          if(nomIsObj((PNOMObject)wpObject))
    276252            {
     
    279255              WPFileSystem_tstSetFullPath((WPFileSystem*)wpObject, gchrCurrentEntry, NULLHANDLE);
    280256              WPFileSystem_wpSetFolder(wpObject, nomSelf, NULLHANDLE);
    281 #if 9
     257#if 0
    282258              g_message("%d %s : %s (%x) , %s",
    283259                        __LINE__, __FUNCTION__, gchrCurrentEntry, (UINT)wpObject,
     
    319295  g_return_val_if_fail(NULLHANDLE!=wpWindow, FALSE);
    320296
    321   /* This call will be different when using WPFolderWindow */
    322   //wpObject=NOMFolderWindow_wpQueryWPFolderObject(wpWindow, NULLHANDLE);
    323297  wpObject=pUseItem->wpObject;
    324298  g_return_val_if_fail(NULLHANDLE!=wpObject, FALSE);
    325299
    326300  WPObject_wpSaveDeferred(wpObject, NULLHANDLE);
    327 
     301  /* Remove the open folder view from the inuse list */
    328302  WPObject_wpDeleteFromObjUseList(wpObject, pUseItem, NULLHANDLE);
    329303
     
    344318  /* Special parameter representing a double click or "I just don't know" ;-) */
    345319  if(OPEN_DEFAULT==ulView)
    346     ulV=WPObject_wpQueryDefaultView(nomSelf, &nSpaceId, NULLHANDLE);
     320    ulV=WPFolder_wpQueryDefaultView(nomSelf, &nSpaceId, NULLHANDLE);
    347321
    348322  /* We only handle items with in own name space */
     
    361335            GtkIconView*  gtkIconView;
    362336
    363             pszPath=NOMPath_queryCString(WPFolder_wpQueryFileName(nomSelf, TRUE, NULLHANDLE), NULLHANDLE);
     337            pszPath=NOMPath_queryCString(_wpQueryFileName(nomSelf, TRUE, NULLHANDLE), NULLHANDLE);
    364338            g_message("%d %s, %s", __LINE__, __FUNCTION__, pszPath);
    365339            WPFolder_wpPopulate(nomSelf, 0L, pszPath, FALSE,  NULLHANDLE);
     
    370344           
    371345            /* 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);
    373347            /* Fill the structures */
    374348            pui->type=(gulong)USAGE_OPENVIEW;
     
    379353            ((VIEWITEM*)pui)->nameSpaceId=WPFolderNomId;
    380354            pui--;
    381 #warning !!!!! Folder window must be inserted into inuse list !!!!!
     355
    382356            /* Make sure the view item is removed when the window is closed */
    383357            g_signal_connect(G_OBJECT(NOMWindow_queryWindowHandle((NOMWindow*)wpFldrWindow, NULLHANDLE)),"delete-event",
  • trunk/desktop/class_c/wpfolderwindow.c

    r206 r224  
    116116        PWPFolderWindow pWindow;
    117117        GtkTreePath* treePath;
    118         DosBeep(5000, 100);
     118        //DosBeep(5000, 100);
    119119        pWindow=(WPFolderWindow*)user_data;
    120         TST_OBJECT(pWindow);
     120        //TST_OBJECT(pWindow);
    121121        treePath=gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget), event->x, event->y );
    122122        if(NULL==treePath)
     
    166166}
    167167
    168 /* orbit-idl-c-stubs.c, cs_output_stub line 347 */
    169168NOM_Scope void NOMLINK impl_WPFolderWindow_nomInit(WPFolderWindow* nomSelf, CORBA_Environment *ev)
    170169{
     
    185184  /* Folder toplevel window. */
    186185  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
    187   /* Set title */
    188   //  gtk_window_set_title (GTK_WINDOW (window), "");
    189186
    190187  /* FIXME: Set default size of folder frame. Will later use a stored value */
     
    278275}
    279276
     277
  • trunk/desktop/class_c/wpobject.c

    r209 r224  
    6969/***************************************************************/
    7070
     71/**
     72   \brief Function which implements the wpAllocMem() method of WPObject.
     73 */
    7174NOM_Scope gpointer NOMLINK impl_WPObject_wpAllocMem(WPObject* nomSelf, const gulong cbBytes,
    7275                                                    gulong* prc, CORBA_Environment *ev)
     
    99102}
    100103
     104/**
     105   \brief Function which implements the wpFreeMem() method of WPObject.
     106 */
    101107NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpFreeMem(WPObject* nomSelf, const gpointer pByte, CORBA_Environment *ev)
    102108{
     
    115121}
    116122
     123/**
     124   \brief Override of nomInit() from NOMObject.
     125 */
    117126NOM_Scope void NOMLINK impl_WPObject_nomInit(WPObject* nomSelf, CORBA_Environment *ev)
    118127{
     
    146155}
    147156
     157/**
     158   \brief Function which implements the wpInitData() method of WPObject.
     159 */
    148160NOM_Scope void NOMLINK impl_WPObject_wpInitData(WPObject* nomSelf, CORBA_Environment *ev)
    149161{
     
    159171}
    160172
     173/**
     174   \brief Function which implements the wpUnInitData() method of WPObject.
     175 */
    161176NOM_Scope void NOMLINK impl_WPObject_wpUnInitData(WPObject* nomSelf, CORBA_Environment *ev)
    162177{
     
    189204}
    190205
     206/**
     207   \brief Function which implements the wpOpen() method of WPObject.
     208 */
    191209NOM_Scope gpointer NOMLINK impl_WPObject_wpOpen(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    192210                                                const gulong ulView, const nomId nameSpaceId,
     
    250268}
    251269
     270/**
     271   \brief Function which implements the wpViewObject() method of WPObject.
     272 */
    252273NOM_Scope gpointer NOMLINK impl_WPObject_wpViewObject(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    253274                                                      const gulong ulView, const nomId nameSpaceId,
     
    272293}
    273294
     295/**
     296   \brief Function which implements the wpSwitchTo() method of WPObject.
     297 */
    274298NOM_Scope gpointer NOMLINK impl_WPObject_wpSwitchTo(WPObject* nomSelf, const gulong ulView, const nomId nameSpaceId,
    275299                                                    CORBA_Environment *ev)
     
    289313}
    290314
     315/**
     316   \brief Function which implements the wpRegisterView() method of WPObject.
     317 */
    291318NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpRegisterView(WPObject* nomSelf, const PNOMWindow pWindow,
    292319                                                             const PNOMString nomStrViewTitle, CORBA_Environment *ev)
     
    298325}
    299326
     327/**
     328   \brief Function which implements the wpAddToObjUseList() method of WPObject.
     329 */
    300330NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpAddToObjUseList(WPObject* nomSelf, const PUSEITEM pUseItem,
    301331                                                                CORBA_Environment *ev)
     
    317347}
    318348
     349/**
     350   \brief Function which implements the wpDeleteFromObjUseList() method of WPObject.
     351 */
    319352NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpDeleteFromObjUseList(WPObject* nomSelf, const PUSEITEM pUseItem,
    320353                                                                     CORBA_Environment *ev)
Note: See TracChangeset for help on using the changeset viewer.