Changeset 146 for trunk/desktop


Ignore:
Timestamp:
Dec 3, 2006, 9:54:12 PM (19 years ago)
Author:
cinc
Message:

Improvements to WPFolder and fixes to related classes.

Location:
trunk/desktop
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/desktop/Makefile

    r141 r146  
    1818
    1919TKIDLDIR        =       $(NOMPATH)/idl  # The object TK lives here
    20 IDLINC          =       --include=$(FOUNDATIONPATH)/idl
     20IDLINC          =       -include=$(FOUNDATIONPATH)/idl -include=$(TKIDLDIR) \
     21                        -include=$(GUITKPATH)/idl
    2122
    22 #INC            =       ./include -I $(NOMPATH)/include -I $(NOMPATH)/class_h
    23 INC             =       ./include -I ./class_h -I $(NOMPATH)/class_h -I $(NOMPATH)/include \
     23INC             =       ./include -I ./class_h -I $(NOMPATH)/class_h -I $(NOMPATH)/include\
    2424                        -I $(GUITKPATH)/class_h -I $(GUITKPATH)/include -I $(FOUNDATIONPATH)/class_h \
    2525                        -I $(FOUNDATIONPATH)/include
     
    6868###################################
    6969
    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) $<
     70BASE_NOMCOMPILEH        =       $(IDLCOMP) $(IDLINC) --showcpperrors --header --output-dir=$(CLASSINC) $<
     71BASE_NOMCOMPILEIH       =       $(IDLCOMP) $(IDLINC) --showcpperrors --ihfile --output-dir=$(CLASSINC) $<
     72BASE_NOMCOMPILEC        =       $(IDLCOMP) $(IDLINC) --showcpperrors --c-template --output-dir=$(CLASSTEMPLATEDIR) $<
    7373
    7474
  • trunk/desktop/class_c/wpfilesystem.c

    r141 r146  
    4545#include "wpfilesystem.ih"
    4646
    47 NOM_Scope void NOMLINK impl_WPFileSystem_tstSetFullPath(WPFileSystem* nomSelf, const CORBA_char * fullPath, CORBA_Environment *ev)
     47NOM_Scope void NOMLINK impl_WPFileSystem_tstSetFullPath(WPFileSystem* nomSelf, const CORBA_char * fullPath,
     48                                                        CORBA_Environment *ev)
    4849{
    49 /* WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf); */
     50  WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf);
    5051
    5152  nomPrintf("thePath: ---> %s \n", fullPath);
     53  _pszFullPath=fullPath;
    5254}
    5355
     56NOM_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  
    5757}PRIVFOLDERDATA, *PPRIVFOLDERDATA;
    5858
     59/* Gui stuff */
     60#include "nomguitk.h"
     61#include "nomfolderwindow.h"
     62
    5963#include "wpfolder.ih"
    6064#include "wpdatafile.h"
     
    6367#include "desktoptypes.h"
    6468
    65 /* Gui stuff */
    66 #include "nomguitk.h"
    67 #include "nomfolderwindow.h"
    6869
    6970/* Enum for the folder store */
    7071enum
    7172{
     73  COL_OBJECT_PTR,
    7274  COL_PATH,
    7375  COL_DISPLAY_NAME,
     
    8284
    8385  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);
    8992  return store;
    9093}
     
    131134
    132135                  gtk_list_store_set (store, &iter,
     136                                      COL_OBJECT_PTR, wpFolder,
    133137                                      COL_PATH, path,
    134138                                      COL_DISPLAY_NAME, display_name,
     
    153157                  nomPrintf("Icon ptr: %x\n", _wpQueryIcon((WPObject*)wpDataFile, NULLHANDLE));
    154158                  gtk_list_store_set (store, &iter,
     159                                      COL_OBJECT_PTR, wpDataFile,
    155160                                      COL_PATH, path,
    156161                                      COL_DISPLAY_NAME, display_name,
     
    185190  g_log("WPFolder", G_LOG_LEVEL_DEBUG, "%s: Populating %s\n", __FUNCTION__, pszPath);
    186191
    187 #warning !!!!! Window creation must be done elsewhere !!!!!
    188   _wpCreateFolderWindow(nomSelf, NULLHANDLE);
    189192
    190193#if 0
     
    215218  gtk_icon_view_set_model(GTK_ICON_VIEW (priv->gtkIconView), GTK_TREE_MODEL (priv->gstoreFldContents));
    216219
    217   /* We now set which model columns that correspont to the text
     220  /* We now set which model columns that correspond to the text
    218221   * and pixbuf of each item
    219222   */
     
    228231}
    229232
    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 
    244233NOM_Scope gpointer NOMLINK impl_WPFolder_wpOpen(WPFolder* nomSelf, const gpointer ptrReserved,
    245234                                                const CORBA_unsigned_long ulView, const gpointer ptrParams,
     
    253242    case OPEN_DEFAULT:
    254243      {
    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
    256254#if 0
    257255        char path[CCHMAXPATH];
     
    271269        if(!hwndFolder)
    272270          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); */
    278271
    279272        /* populate the folder */
     
    316309  models and stuff.
    317310*/
    318 NOM_Scope gpointer NOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev)
     311NOM_Scope PNOMFolderWindow NOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev)
    319312{
    320313  NOMFolderWindow * nomFldrWindow;
     
    329322  priv->gtkIconView=NOMFolderWindow_getContainerHandle(nomFldrWindow, ev);
    330323
     324  /* Show the new window */
    331325  NOMFolderWindow_show(nomFldrWindow, ev);
    332326
    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
     330NOM_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  
    3737
    3838#include "wpobject.idl"
     39#include "nomfilepath.idl"
    3940
    4041interface WPFileSystem : WPObject
     
    4445
    4546  void tstSetFullPath(in string fullPath);   
     47  PNOMPath wpQueryRealName(in boolean bFullPath);
    4648
    4749#if 0
    48     ULONG cbEASize;
     50  ULONG cbEASize;
    4951#endif
    50     NOMINSTANCEVAR(string pszFullPath);  /* ONLY FOR TESTING!!! */ 
    51     NOMINSTANCEVAR(string pszType);
     52  NOMINSTANCEVAR(string pszFullPath);  /* ONLY FOR TESTING!!! */ 
     53  NOMINSTANCEVAR(string pszType);
    5254};
    5355
  • trunk/desktop/idl/wpfolder.idl

    r141 r146  
    3838#include "wpfilesystem.idl"
    3939#include "nomfilepath.idl"
     40/*#include "nomfolderwindow.idl"*/
     41
     42native PNOMFolderWindow;
    4043
    4144NOMCLASSNAME(WPFolder);
     
    4649
    4750  boolean wpPopulate(in unsigned long ulReserved,
    48                   in string pszPath,
    49                   in boolean fFoldersOnly);
    50   gpointer wpCreateFolderWindow();
    51   void tstSetFolderPath(in string thePath); /* Only for testing */
     51                     in string pszPath,
     52                     in boolean fFoldersOnly);
     53  PNOMFolderWindow wpCreateFolderWindow();
     54
    5255#if 0
    5356  WPObject wpQueryContent(in WPObject Object,
     
    6265
    6366  NOMINSTANCEVAR(PPRIVFOLDERDATA privFolderData);
    64   NOMINSTANCEVAR(PNOMPath pnomPath);
     67  NOMINSTANCEVAR(PNOMPath pnomPath_);
    6568};
    6669
Note: See TracChangeset for help on using the changeset viewer.