Changeset 188 for trunk/desktop/class_c


Ignore:
Timestamp:
Jan 13, 2007, 11:54:02 PM (19 years ago)
Author:
cinc
Message:

Created WPFolderWindow class. NOMFolderClass deleted.

Location:
trunk/desktop/class_c
Files:
1 added
2 edited

Legend:

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

    r186 r188  
    6565#include "desktoptypes.h"
    6666
    67 #include "nomfolderwindow.h"
     67#ifndef WPFolder
     68typedef struct WPFolder_struct {
     69  struct nomMethodTabStruct  *mtab;
     70  gulong body[1];
     71} WPFolderObj;
     72#define WPFolder WPFolderObj
     73typedef WPFolder *PWPFolder;
     74#endif
     75
     76#include "wpfolderwindow.h"
    6877
    6978#include "wpfolder.ih"
     
    242251  return FALSE;
    243252}
    244 /* Insert an object into the folders object list */
    245 void tst_insertObject(WPFolder* nomSelf, WPObject* wpObject, gchar* chrName)
    246 {
    247   WPFolderData* nomThis=WPFolderGetData(nomSelf);
    248 
    249   g_tree_insert(_fldrObjects, chrName, wpObject);
    250 }
    251253#endif
    252254
     
    270272    wpDataFile=(WPDataFile*)pValue->wpObject;
    271273
    272     if(nomIsObj((PNOMObject)wpDataFile))
     274    if(nomIsObj(wpDataFile))
    273275      {
    274276        gtk_list_store_append (store, &iter);
     
    443445{
    444446  WPObject* wpObject;
    445   NOMFolderWindow* wpWindow;
     447  WPFolderWindow* wpWindow;
    446448
    447449  PUSEITEM pUseItem=(PUSEITEM) pData;
    448450
    449451  /* This is also in the use item */
    450   wpWindow=(NOMFolderWindow*)g_object_get_data(G_OBJECT(gtkWidget), NOMOBJECT_KEY_STRING);
     452  wpWindow=(WPFolderWindow*)g_object_get_data(G_OBJECT(gtkWidget), NOMOBJECT_KEY_STRING);
    451453
    452454  g_return_val_if_fail(NULLHANDLE!=wpWindow, FALSE);
     
    465467
    466468
    467 NOM_Scope gpointer NOMLINK impl_WPFolder_wpOpen(WPFolder* nomSelf, const PNOMFolderWindow nomFolder,
     469NOM_Scope gpointer NOMLINK impl_WPFolder_wpOpen(WPFolder* nomSelf, const PWPFolderWindow nomFolder,
    468470                                                const gulong ulView, const gpointer pParam,
    469471                                                CORBA_Environment *ev)
     
    478480        PUSEITEM pui;
    479481        ULONG ulError;
    480         NOMFolderWindow * nomFldrWindow;
     482        WPFolderWindow * wpFldrWindow;
    481483        gchar* pszPath;
    482484        PPRIVFOLDERDATA priv;
     
    488490
    489491
    490         nomFldrWindow=WPFolder_wpCreateFolderWindow(nomSelf, ev);
    491 #warning !!!!! There is WPWindow now. Use that for any WPS windows, Then this call must be changed
    492         NOMFolderWindow_setWPFolderObject(nomFldrWindow, nomSelf, NULLHANDLE);
     492        wpFldrWindow=WPFolder_wpCreateFolderWindow(nomSelf, NULLHANDLE);
     493        WPFolderWindow_wpSetWPObject(wpFldrWindow, (WPObject*)nomSelf, NULLHANDLE);
    493494
    494495        /* Insert it into inuse list */
     
    499500        pui++;
    500501        ((VIEWITEM*)pui)->ulView=VIEW_CONTENTS;
    501         ((VIEWITEM*)pui)->nomWindow=(NOMWindow*)nomFldrWindow;
     502        ((VIEWITEM*)pui)->nomWindow=(NOMWindow*)wpFldrWindow;
    502503        pui--;
    503504#warning !!!!! Folder window must be inserted into inuse list !!!!!
    504505        /* Make sure the view item is removed when the window is closed */
    505         g_signal_connect(G_OBJECT(NOMWindow_queryWindowHandle((NOMWindow*)nomFldrWindow, NULLHANDLE)),"delete-event",
     506        g_signal_connect(G_OBJECT(NOMWindow_queryWindowHandle((NOMWindow*)wpFldrWindow, NULLHANDLE)),"delete-event",
    506507                         G_CALLBACK(tempWPWindowDeleteHandler), (gpointer) pui);
    507508        WPFolder_wpAddToObjUseList(nomSelf, pui, NULLHANDLE);
     
    536537        g_object_unref (gStore);
    537538       
    538         return nomFldrWindow;
     539        return wpFldrWindow;
    539540      }/* default */
    540541    default:
     
    572573                gpointer     user_data)
    573574{
    574   PNOMFolderWindow pWindow;
    575 
    576   pWindow=(NOMFolderWindow*)user_data;
     575  PWPFolderWindow pWindow;
     576
     577  pWindow=(WPFolderWindow*)user_data;
    577578
    578579  if(NULL!=treePath)
     
    598599  models and stuff.
    599600*/
    600 NOM_Scope PNOMFolderWindow NOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev)
    601 {
    602   NOMFolderWindow * nomFldrWindow;
     601NOM_Scope PWPFolderWindow NOMLINK impl_WPFolder_wpCreateFolderWindow(WPFolder* nomSelf, CORBA_Environment *ev)
     602{
     603  WPFolderWindow * wpFldrWindow;
    603604  PPRIVFOLDERDATA priv;
    604605  WPFolderData *nomThis = WPFolderGetData(nomSelf);
     
    606607  priv=(PPRIVFOLDERDATA)_privFolderData;
    607608
    608   nomFldrWindow=NOMFolderWindowNew();
     609  wpFldrWindow=WPFolderWindowNew();
    609610
    610611#warning !!!!! This is only for testing !!!!!
    611   priv->gtkIconView=NOMFolderWindow_queryContainerHandle(nomFldrWindow, ev);
     612  priv->gtkIconView=WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, ev);
    612613
    613614  /* Connect to the "item_activated" signal */
     
    615616                    G_CALLBACK (itemActivated), nomSelf);
    616617
    617   gtk_window_set_title (GTK_WINDOW (NOMFolderWindow_queryWindowHandle(nomFldrWindow, NULLHANDLE)),
     618  gtk_window_set_title (GTK_WINDOW (WPFolderWindow_queryWindowHandle(wpFldrWindow, NULLHANDLE)),
    618619                        NOMString_queryCString(WPFolder_wpQueryTitle(nomSelf, NULLHANDLE), NULLHANDLE));
    619620  /* Show the new window */
    620   NOMFolderWindow_show(nomFldrWindow, ev);
    621 
    622   return nomFldrWindow;
     621  WPFolderWindow_show(wpFldrWindow, ev);
     622
     623  return wpFldrWindow;
    623624}
    624625
  • trunk/desktop/class_c/wpobject.c

    r186 r188  
    5252/* We have to declare this here to make PNOMFolderWindow known
    5353   to wpDisplayMenu(). */
    54 #ifndef NOMFolderWindow
    55 typedef struct NOMFolderWindow_struct {
     54#ifndef WPFolderWindow
     55typedef struct WPFolderWindow_struct {
    5656  struct nomMethodTabStruct  *mtab;
    5757  gulong body[1];
    58 } NOMFolderWindowObj;
    59 #define NOMFolderWindow NOMFolderWindowObj
    60 typedef NOMFolderWindow *PNOMFolderWindow;
     58} WPFolderWindowObj;
     59#define WPFolderWindow WPFolderWindowObj
     60typedef WPFolderWindow *PWPFolderWindow;
    6161#endif
    6262
     
    7474
    7575#include "wpobject.ih"
    76 #include "nomfolderwindow.h"
     76#include "wpfolderwindow.h"
    7777#include "wpnotebook.h"
    7878
     
    205205}
    206206
    207 NOM_Scope gpointer NOMLINK impl_WPObject_wpOpen(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     207NOM_Scope gpointer NOMLINK impl_WPObject_wpOpen(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    208208                                                const gulong ulView, const gpointer pParam, CORBA_Environment *ev)
    209209{
     
    249249}
    250250
    251 NOM_Scope gpointer NOMLINK impl_WPObject_wpViewObject(WPObject* nomSelf, const PNOMFolderWindow nomFolder, const gulong ulView, const gpointer pParam, CORBA_Environment *ev)
     251NOM_Scope gpointer NOMLINK impl_WPObject_wpViewObject(WPObject* nomSelf, const PWPFolderWindow nomFolder,
     252                                                      const gulong ulView, const gpointer pParam,
     253                                                      CORBA_Environment *ev)
    252254{
    253255/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     
    590592
    591593
    592 NOM_Scope PNOMMenu NOMLINK impl_WPObject_wpDisplayMenu(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     594NOM_Scope PNOMMenu NOMLINK impl_WPObject_wpDisplayMenu(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    593595                                                       const gpointer gReserved, const CORBA_unsigned_long ulMenuType,
    594596                                                       const CORBA_unsigned_long ulReserved, CORBA_Environment *ev)
     
    610612}
    611613
    612 NOM_Scope void NOMLINK impl_WPObject_wpModifyMenu(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     614NOM_Scope void NOMLINK impl_WPObject_wpModifyMenu(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    613615                                                  const PNOMMenu nomMenu, const CORBA_unsigned_long ulMenuType,
    614616                                                  CORBA_Environment *ev)
     
    627629}
    628630
    629 NOM_Scope void NOMLINK impl_WPObject_wpFilterMenu(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     631NOM_Scope void NOMLINK impl_WPObject_wpFilterMenu(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    630632                                                  const PNOMMenu nomMenu, const CORBA_unsigned_long ulMenuType,
    631633                                                  const CORBA_unsigned_long ulFlags, CORBA_Environment *ev)
     
    635637}
    636638
    637 NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpMenuItemSelected(WPObject* nomSelf, const PNOMFolderWindow nomFolder,
     639NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpMenuItemSelected(WPObject* nomSelf, const PWPFolderWindow nomFolder,
    638640                                                                 const PNOMMenuItem nomMenuItem,
    639641                                                                 CORBA_Environment *ev)
Note: See TracChangeset for help on using the changeset viewer.