Changeset 183 for trunk/desktop/class_c


Ignore:
Timestamp:
Jan 7, 2007, 10:36:52 PM (19 years ago)
Author:
cinc
Message:

New methods and additions all over the place.

Location:
trunk/desktop/class_c
Files:
3 edited

Legend:

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

    r146 r183  
    4343
    4444#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
    4554#include "wpfilesystem.ih"
    4655
     
    5463}
    5564
    56 NOM_Scope PNOMPath NOMLINK impl_WPFileSystem_wpQueryRealName(WPFileSystem* nomSelf, const CORBA_boolean bFullPath,
     65NOM_Scope PNOMPath NOMLINK impl_WPFileSystem_wpQueryFileName(WPFileSystem* nomSelf, const CORBA_boolean bFullPath,
    5766                                                             CORBA_Environment *ev)
    5867{
    5968  WPFileSystemData* nomThis=WPFileSystemGetData(nomSelf);
    60   PNOMPath nomRetval=NOMPathNew();
    61  
    62   NOMPath_assignCString(nomRetval, _pszFullPath, ev);
     69  PNOMPath nomRetval;
     70  PNOMPath nomPath;
     71  PWPFolder wpParent;
    6372
    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);
    6596}
    6697
  • trunk/desktop/class_c/wpfolder.c

    r172 r183  
    5959/* Gui stuff */
    6060#include "nomguitk.h"
     61#include "nomwindow.h"
     62#include "desktoptypes.h"
     63
    6164#include "nomfolderwindow.h"
    6265
     
    6568#include "desktop.h"
    6669#include "helper.h"
    67 #include "desktoptypes.h"
     70
    6871
    6972
     
    249252
    250253#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);
    252255        break;
    253256
  • trunk/desktop/class_c/wpobject.c

    r176 r183  
    6161#endif
    6262
     63#ifndef WPFolder
     64typedef struct WPFolder_struct {
     65  struct nomMethodTabStruct  *mtab;
     66  gulong body[1];
     67} WPFolderObj;
     68#define WPFolder WPFolderObj
     69typedef WPFolder *PWPFolder;
     70#endif
     71
    6372#include "nomwindow.h"
    6473#include "desktoptypes.h"
     
    186195
    187196  g_return_val_if_fail(NULLHANDLE!=wpObject, FALSE);
     197
     198  WPObject_wpSaveDeferred(wpObject, NULLHANDLE);
    188199
    189200  WPObject_wpDeleteFromObjUseList(wpObject, pUseItem, NULLHANDLE);
     
    445456
    446457  /* Create a new title */
    447   NOMString_assignString(tmpString, pnomStrNewTitle, ev);
     458  NOMString_assign(tmpString, pnomStrNewTitle, ev);
    448459
    449460  /* It may happen that someone changed the title from another thread. We may either
     
    472483  tmpPtr=g_atomic_pointer_get(&_pnomStringTitle);
    473484
    474   return NOMString_copyString(tmpPtr, ev);
     485  return NOMString_copy(tmpPtr, ev);
    475486}
    476487
     
    656667}
    657668
    658 
    659 
    660 
     669NOM_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
     678NOM_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
     687NOM_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
     695NOM_Scope PWPFolder NOMLINK impl_WPObject_wpQueryFolder(WPObject* nomSelf, CORBA_Environment *ev)
     696{
     697  WPObjectData* nomThis=WPObjectGetData(nomSelf);
     698
     699  return _wpParentFldr;
     700}
     701
Note: See TracChangeset for help on using the changeset viewer.