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

New methods and additions all over the place.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.