Changeset 241 for trunk/desktop/class_c


Ignore:
Timestamp:
Mar 6, 2007, 8:47:20 PM (18 years ago)
Author:
cinc
Message:

WC2007 patches for drag and drop implementation.

Location:
trunk/desktop/class_c
Files:
3 edited

Legend:

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

    r240 r241  
    3333* ***** END LICENSE BLOCK ***** */
    3434/*
    35  * This file was generated by orbit-idl-2 for Voyager
    36  *
    37  *
    3835 * And remember, phase 3 is near...
    3936 */
     
    7774#include "helper.h"
    7875#include "exception.h"
     76
     77#include "nomdraginfo.h"
    7978
    8079typedef struct _FLDRGTREEVALUE
     
    111110/*************** Local vars ************************************/
    112111
     112/* This ID is used as a namespace */
    113113static nomId WPFolderNomId;
    114114
     
    520520  WPFolderWindow_wpSetWindowTitle(wpFldrWindow, WPFolder_wpQueryTitle(nomSelf, NULLHANDLE), NULLHANDLE);
    521521
    522 
    523522  /* Show the new window */
    524523  WPFolderWindow_show(wpFldrWindow, ev);
     
    527526}
    528527
     528
    529529NOM_Scope gulong NOMLINK impl_WPFolder_wpQueryFldrFlags(WPFolder* nomSelf, CORBA_Environment *ev)
    530530{
     
    533533  return g_atomic_int_get(&_ulFldrFlags);
    534534}
     535
    535536
    536537NOM_Scope CORBA_boolean NOMLINK impl_WPFolder_wpSetFldrFlags(WPFolder* nomSelf, const gulong ulFlags,
     
    547548  return TRUE;
    548549}
     550
     551
     552/* FIXME: type and name of containerHandle is wrong */
     553NOM_Scope gulong NOMLINK impl_WPFolder_wpDragOver(WPFolder* nomSelf, const gpointer containerHandle,
     554                                                  const gpointer pDragInfo, CORBA_Environment *ev)
     555{
     556  /* WPFolderData* nomThis=WPFolderGetData(nomSelf); */
     557  gulong ulNumItems, ulLoop;
     558  NOMDragInfo* nomDragInfo=(NOMDragInfo*)pDragInfo;
     559
     560  if(!nomIsObj(nomDragInfo))
     561    return DOR_NODROP;
     562
     563  ulNumItems=NOMDragInfo_queryNumDragItems(nomDragInfo, NULLHANDLE);
     564
     565  /* No items? */
     566  if(0==ulNumItems)
     567    return DOR_NODROP;
     568
     569  for(ulLoop=0; ulLoop<ulNumItems; ulLoop++)
     570    {
     571      /* We only accept desktop objects for now */
     572      if(!NOMDragInfo_queryIsItemWPObject(nomDragInfo, ulLoop, NULLHANDLE))
     573        return DOR_NODROP;
     574      /* No dropping on the source folder for now */
     575      if(nomSelf==(WPFolder*)
     576         NOMDragInfo_querySourceWPObject(nomDragInfo, ulLoop, NULLHANDLE))
     577        return DOR_NODROP;
     578      /* No dropping on itself */
     579      if(nomSelf==(WPFolder*)
     580         NOMDragInfo_queryWPObjectFromItemList(nomDragInfo, ulLoop, NULLHANDLE))
     581        return DOR_NODROP;
     582    }
     583
     584  return GDK_ACTION_MOVE;
     585 
     586#if 0
     587  WPFolder_wpDragOver_parent(nomSelf,  ev);
     588#endif
     589}
     590
    549591
    550592#if 0
     
    580622}
    581623
     624
    582625NOM_Scope void NOMLINK impl_WPFolder_wpInitData(WPFolder* nomSelf, CORBA_Environment *ev)
    583626{
     
    599642     which may be searched using the name of the file/directory */
    600643  //_fldrObjects=g_tree_new((GCompareFunc)strcmp);
    601   _fldrObjects=g_tree_new_full((GCompareFunc)strcmp, nomSelf, NULL, (GDestroyNotify) fldrCatchDuplicates);
    602 }
    603 
    604 
    605 /* orbit-idl-c-stubs.c, cs_output_stub line 347 */
    606 NOM_Scope gulong NOMLINK impl_WPFolder_wpDragOver(WPFolder* nomSelf, const gpointer containerHandle,
    607                                                   const gpointer pDragInfo, CORBA_Environment *ev)
     644  _fldrObjects=g_tree_new_full((GCompareFunc)strcmp, nomSelf, NULL,
     645                               (GDestroyNotify) fldrCatchDuplicates);
     646}
     647
     648NOM_Scope gulong NOMLINK impl_WPFolder_wpDrop(WPFolder* nomSelf,
     649                                              const gpointer containerHandle,
     650                                              const gpointer pDragInfo,
     651                                              CORBA_Environment *ev)
    608652{
    609653/* WPFolderData* nomThis=WPFolderGetData(nomSelf); */
    610 
    611   return GDK_ACTION_COPY;
    612  
     654  gulong ulNumItems, ulLoop;
     655  GdkDragAction gda;
     656
     657  NOMDragInfo* nomDragInfo=(NOMDragInfo*)pDragInfo;
     658
     659  g_message("%s", __FUNCTION__);
     660
     661  if(!nomIsObj(nomDragInfo))
     662    return 0;
     663
     664  ulNumItems=NOMDragInfo_queryNumDragItems(nomDragInfo, NULLHANDLE);
     665
     666  /* No items? */
     667  if(0==ulNumItems)
     668    return 0;
     669
     670  gda=NOMDragInfo_queryChosenDropAction(nomDragInfo, NULLHANDLE);
     671
     672  for(ulLoop=0; ulLoop<ulNumItems; ulLoop++)
     673    {
     674      WPObject* wpObject;
     675
     676      wpObject=NOMDragInfo_querySourceWPObject(nomDragInfo, ulLoop, NULLHANDLE);
     677      g_message("Source folder is: %s",
     678                NOMPath_queryCString(WPFolder_wpQueryFileName(wpObject, TRUE, NULLHANDLE),
     679                                     NULLHANDLE));
     680      wpObject=NOMDragInfo_queryWPObjectFromItemList(nomDragInfo, ulLoop, NULLHANDLE);
     681      g_message("Dropped object is: %s",
     682                NOMPath_queryCString(WPFolder_wpQueryFileName(wpObject, TRUE, NULLHANDLE),
     683                                     NULLHANDLE));
     684
     685      g_message("%s: drop action: %d", __FUNCTION__, gda);
     686
     687      wpObject=NOMDragInfo_queryWPObjectFromItemList(nomDragInfo, ulLoop, NULLHANDLE);
     688      switch(gda)
     689        {
     690        case GDK_ACTION_MOVE:
     691          {
     692            WPObject_wpMoveObject(wpObject, nomSelf, NULLHANDLE);
     693            break;
     694          }
     695        default:
     696          {
     697            WPObject_wpCopyObject(wpObject, nomSelf, FALSE, NULLHANDLE);
     698            break;
     699          }
     700        }
     701    }
     702
     703
     704
    613705#if 0
    614   /* orbit-idl-c-stubs.c, VoyagerWriteProtoForParentCall line 119 */
    615   WPFolder_wpDragOver_parent(nomSelf,  ev);
    616 #endif
    617 }
    618 
    619 
     706  WPFolder_wpDrop_parent(nomSelf,  ev);
     707#endif
     708  return 0;
     709}
     710
     711
     712
     713
     714
     715
     716
  • trunk/desktop/class_c/wpfolderwindow.c

    r240 r241  
    6262#include "exception.h"
    6363
     64#include "nomdragwindow.h"
     65#include "nomdraginfo.h"
     66
    6467NOM_Scope PGtkWidget NOMLINK impl_WPFolderWindow_wpQueryContainerHandle(WPFolderWindow* nomSelf, CORBA_Environment *ev)
    6568{
     
    7073
    7174NOM_Scope void NOMLINK impl_WPFolderWindow_wpSetContainerHandle(WPFolderWindow* nomSelf, const PGtkWidget pgWidget,
    72                                                               CORBA_Environment *ev)
     75                                                                CORBA_Environment *ev)
    7376{
    7477  WPFolderWindowData* nomThis=WPFolderWindowGetData(nomSelf);
     
    116119        PWPFolderWindow pWindow;
    117120        GtkTreePath* treePath;
    118         //DosBeep(5000, 100);
     121
    119122        pWindow=(WPFolderWindow*)user_data;
    120123        //TST_OBJECT(pWindow);
     
    182185};
    183186
     187static NOMDragWindow *nomDragWindow=NULL;
     188static NOMDragInfo   *nomDragInfo=NULL;
    184189
    185190/*
    186191  This callback handles the drop of an item on an object.
    187192 */
    188 static gboolean fldrWindowHandleDragDrop(GtkWidget * wgtThis, GdkDragContext* dragContext, gint x, gint y,
     193static gboolean fldrWindowHandleDragDrop(GtkWidget * wgtThis, GdkDragContext* dragContext,
     194                                         gint x, gint y,
    189195                         guint t, gpointer ptrUserData)
    190196{
    191   DosBeep(500, 10);
    192   g_message("%s", __FUNCTION__);
    193   g_message("  action: %d", dragContext->action );
    194 
     197  GtkTreePath* treePath;
     198  PWPFolderWindow pWindow;
     199  gulong rc=0;
     200  WPObject *wpObject;
     201
     202  //g_message("   %s", __FUNCTION__);
     203  //g_message("   action: %d", dragContext->action );
     204
     205  /* Find the object beneath the pointer */
     206  treePath=gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(wgtThis), x, y );
     207  if(NULL==treePath)
     208    {     
     209
     210      /* White space, so ask the folder */
     211     
     212      pWindow=(WPFolderWindow*)ptrUserData;
     213      if(!nomIsObj(pWindow))
     214        return FALSE;
     215
     216      wpObject=WPFolderWindow_wpQueryWPObject(pWindow, NULLHANDLE);     
     217
     218      if(!nomIsObj(wpObject))
     219        return FALSE;
     220    }
     221  else
     222    {
     223      GtkTreeIter iter;
     224      GtkTreeModel* model;
     225
     226      /* Over an icon */
     227     
     228      model=gtk_icon_view_get_model(GTK_ICON_VIEW(wgtThis));           
     229      gtk_tree_model_get_iter(model , &iter, treePath);           
     230      gtk_tree_model_get(model, &iter, 0, &wpObject, -1);
     231
     232      //TST_OBJECT(wpObject);
     233
     234      if(!nomIsObj(wpObject))
     235        return FALSE;
     236    }
     237  rc=WPObject_wpDragOver(wpObject, wgtThis, nomDragInfo, NULL);
     238  g_message("rc: %d", rc);
    195239  if(dragContext->targets)
    196240    {
    197241      GdkAtom targetType;
    198242      targetType=GDK_POINTER_TO_ATOM(g_list_nth_data(dragContext->targets, WPOBJECT_TARGET_OBJECT));
    199       g_message("  calling gtk_drag_get_data()..." );
     243      //    g_message("  calling gtk_drag_get_data()..." );
    200244      gtk_drag_get_data(wgtThis, dragContext, targetType, t);
     245
     246      /* FIXME:
     247         We don't use the returned data for now but use our own draginfo stuff. This is
     248         broken.
     249         The following may be moved to dragDataReceived later. */
     250      if(rc) {
     251        //        g_message("Now call wpDrop() actions: %d action: %d sugg %d", dragContext->action,
     252        //        dragContext->action, dragContext->suggested_action);
     253
     254        WPObject_wpDrop( wpObject, wgtThis, nomDragInfo, NULLHANDLE);
     255       
     256        gtk_drag_finish(dragContext, TRUE, FALSE, t);
     257        return TRUE;
     258      }
     259
    201260    }
    202261  return FALSE;
     
    208267{
    209268  GdkPixmap *pixMapDrag;
    210  
    211269  gdk_pixbuf_render_pixmap_and_mask(pixBufStop, &pixMapDrag, NULL, 128);
    212270  gdk_window_set_back_pixmap(wgtDrag->window, pixMapDrag, FALSE);
    213271  g_object_unref(pixMapDrag);
    214272  gtk_widget_queue_draw(wgtDrag);
    215 
    216   g_message("%s", __FUNCTION__);
    217 
    218   return;
    219 }
    220 #endif
    221 
    222 static GtkWidget *wgtDrag=NULL;
    223 
    224 static GdkPixmap *pixMapDrag=NULL;
    225 static GdkPixmap *pixMapStop=NULL;
    226 
    227 /*
    228   Callback which loads a pixmap into the drag widget as soon as it's realized.
    229  */
    230 static void fldrWidgetRealize(GtkWidget * wgtDrag, gpointer ptrUserData)
    231 {
    232   gdk_window_set_back_pixmap(wgtDrag->window, pixMapDrag, FALSE);
    233 
    234273  g_message("%s", __FUNCTION__);
    235274  return;
    236275}
     276#endif
     277
    237278/**
    238279   Callback for the drag-begin signal.
    239280 */
    240281static void fldrWindowHandleDragBegin(GtkWidget * widget, GdkDragContext* dragContext,
    241                     gpointer ptrUserData)
    242 {
    243   if(NULLHANDLE==wgtDrag)
    244     {
    245       GdkPixbuf *pixBufDrag;
    246       GdkPixbuf *pixBufStop;
    247 
    248       wgtDrag=gtk_window_new(GTK_WINDOW_POPUP);
    249 
    250       /*
    251         FIXME:
    252         In GTK 2.8 use *_HINT_DND instead.
    253        */
    254 #warning move this somewhere else. Maybe into WPClassMgr
    255       gtk_window_set_type_hint(GTK_WINDOW(wgtDrag), GDK_WINDOW_TYPE_HINT_MENU);
    256       gtk_widget_set_app_paintable(GTK_WIDGET(wgtDrag), TRUE);
    257 
    258       pixBufDrag=gtk_widget_render_icon(wgtDrag, GTK_STOCK_DND, GTK_ICON_SIZE_DND, NULL);
    259       gdk_pixbuf_render_pixmap_and_mask(pixBufDrag, &pixMapDrag, NULL, 128);
    260 
    261       gtk_widget_set_size_request(wgtDrag, gdk_pixbuf_get_width(pixBufDrag), gdk_pixbuf_get_height(pixBufDrag));
    262 
    263       g_object_unref(pixBufDrag);
    264 
    265       pixBufStop=gtk_widget_render_icon(wgtDrag, GTK_STOCK_STOP, GTK_ICON_SIZE_DND, NULL);
    266       gdk_pixbuf_render_pixmap_and_mask(pixBufStop, &pixMapStop, NULL, 128);
    267       g_object_unref(pixBufStop);
    268 
    269       if(!pixMapDrag)
    270         g_warning("Cannot load pixbuf");
    271       if(!pixMapStop)
    272         g_warning("Cannot load stop pixbuf");
    273 
    274       //      gdk_pixbuf_render_pixmap_and_mask(pixBufDrag, &pixMapDrag, NULL, 128);
    275       //    gdk_window_set_back_pixmap(wgtDrag->window, pixMapDrag, FALSE);
    276       //      g_object_unref(pixMapDrag);
    277       g_signal_connect_after(GTK_WIDGET(wgtDrag), "realize", G_CALLBACK(fldrWidgetRealize), NULL);
    278     }
    279   DosBeep(1000, 10);
    280   g_message("%s", __FUNCTION__);
    281   //  if(wgtDrag->window)
    282   //gdk_window_set_back_pixmap(wgtDrag->window, pixMapDrag, FALSE);
    283 
    284   gtk_drag_set_icon_widget(dragContext, wgtDrag, 0, 0);
    285 
     282                                      gpointer ptrUserData)
     283{
     284  GtkTreePath* treePath;
     285  gint x, y;
     286
     287  /* Create the drag window displayed to the user */
     288  if(NULLHANDLE==nomDragWindow)
     289    {
     290      nomDragWindow=NOMDragWindowNew();
     291    }
     292
     293  if(NULLHANDLE==nomDragInfo)
     294    {
     295      nomDragInfo=NOMDragInfoNew();
     296    }
     297
     298  if(!dragContext)
     299    return;
     300
     301  /* Make sure we have no leftovers... */
     302  NOMDragInfo_deleteAllDragItems(nomDragInfo, NULLHANDLE);
     303  NOMDragInfo_setGdkDragContextPointer(nomDragInfo, dragContext, NULLHANDLE);
     304
     305  /* Get the object beneath the pointer if any */
     306  gtk_widget_get_pointer(widget, &x, &y);
     307  treePath=gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget), x, y );
     308
     309  if(NULL==treePath)
     310    {
     311      /* Click on white space */
     312      //    NOMDragWindow_hide(nomDragWindow, NULLHANDLE);
     313      g_message("%d %s: White space!", __LINE__, __FUNCTION__);
     314    }
     315  else
     316    {
     317      GtkTreeIter iter;
     318      GtkTreeModel* model;
     319      WPObject *wpObject;
     320      WPFolderWindow *wpFolderWindow=(WPFolderWindow*)ptrUserData;
     321
     322      /* Click on an icon occurred */
     323
     324      if(!nomIsObj(wpFolderWindow))
     325        return; //Oops...
     326     
     327      g_message("%s: %s", __FUNCTION__, gtk_tree_path_to_string(treePath));
     328     
     329      /* Get the object belonging to the tree path */
     330      model=gtk_icon_view_get_model(GTK_ICON_VIEW(widget));
     331      gtk_tree_model_get_iter(model , &iter, treePath);           
     332      gtk_tree_model_get(model, &iter, 0, &wpObject, -1);
     333     
     334      //  TST_OBJECT(wpObject);
     335     
     336      if(nomIsObj(wpObject)){
     337        g_message("%s: %s begin DnD", __FUNCTION__, wpObject->mtab->nomClassName);
     338
     339        /* Add the object to the list of items for this drag */
     340        NOMDragInfo_addWPObjectToItemList(nomDragInfo, wpObject,
     341                                       (PWPFolder)WPFolderWindow_wpQueryWPObject(wpFolderWindow, NULLHANDLE),
     342                                       widget, NULLHANDLE);
     343      }
     344      else
     345        g_message("%d %s: WPDataFile object not valid!", __LINE__, __FUNCTION__);
     346 
     347     NOMDragWindow_show(nomDragWindow, NULLHANDLE);
     348    }
     349
     350
     351  /* Tell GTK to use our drag window as an 'icon' while dragging. */
     352  gtk_drag_set_icon_widget(dragContext,
     353                           NOMDragWindow_queryWindowHandle(nomDragWindow, NULLHANDLE), 0, 0);   
     354
     355  // gdk_drag_status(dragContext, GDK_ACTION_MOVE, t);
     356  //NOMDragWindow_hide(nomDragWindow, NULLHANDLE);
    286357  return;
    287358}
     
    293364  GtkTreePath* treePath;
    294365  PWPFolderWindow pWindow;
     366  WPObject *wpObject;
    295367  gulong rc=0;
    296   static gulong oldRc=0;
     368  static gulong oldRc=0xff;/* Make sure we at last one time have an rc!=oldRc so the icon is
     369                              set properly below */
    297370
    298371  if(dragContext==NULL)
     
    303376
    304377  /* This does not work for some reason */
    305   gtk_drag_highlight(wgtThis);
    306   gtk_widget_queue_draw(wgtThis);
     378  //  gtk_drag_highlight(wgtThis);
     379  //gtk_widget_queue_draw(wgtThis);
     380
    307381
    308382  if(dragContext)
    309383    {
    310       g_message("  Actions: %x %x" , dragContext->actions, dragContext->suggested_action);
     384      //        g_message("  Actions: %x %x" , dragContext->actions, dragContext->suggested_action);
    311385    }
    312386
     
    323397#endif
    324398
     399  /* Find the object beneath the pointer */
    325400  treePath=gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(wgtThis), x, y );
    326 
    327401  if(NULL==treePath)
    328402    {     
    329       PWPFolder wpFolder;
    330       /* White space */
     403      /* White space, so ask the folder */
    331404
    332405      pWindow=(WPFolderWindow*)ptrUserData;
     
    334407        return FALSE;
    335408
    336       wpFolder=(WPFolder*)WPFolderWindow_wpQueryWPObject(pWindow, NULLHANDLE);     
    337 
    338       if(!nomIsObj(wpFolder))
     409      wpObject=WPFolderWindow_wpQueryWPObject(pWindow, NULLHANDLE);     
     410
     411      if(!nomIsObj(wpObject))
    339412        return FALSE;
    340 
    341       rc=WPObject_wpDragOver((WPObject*)wpFolder, wgtThis, dragContext, NULL);
    342413    }
    343414  else
     
    345416      GtkTreeIter iter;
    346417      GtkTreeModel* model;
    347       WPObject *wpObject;
     418
    348419      /* Over an icon */
    349420     
    350       //   g_message("%s: %s", __FUNCTION__, gtk_tree_path_to_string(treePath));
    351       //    gtk_icon_view_item_activated(GTK_ICON_VIEW(wgtThis), treePath);
    352 
    353421      model=gtk_icon_view_get_model(GTK_ICON_VIEW(wgtThis));
    354422           
     
    358426      //TST_OBJECT(wpObject);
    359427
    360       //if(nomIsObj(wpObject))
    361       rc=WPObject_wpDragOver((WPObject*)wpObject, wgtThis, dragContext, NULL);
    362     }
    363 
     428      if(!nomIsObj(wpObject))
     429        return FALSE;
     430      //g_message("Over an icon");
     431    }
     432  rc=WPObject_wpDragOver(wpObject, wgtThis, nomDragInfo, NULL);
     433  //g_message("rc: %d oldRc %d", rc, oldRc);
     434
     435  /* Change the drag icon if necesary. Note that this will not change the
     436     cursor. */
    364437  if(oldRc!=rc)
    365438    {
     
    367440      switch(rc)
    368441        {
    369         case 0:
     442        case DOR_NODROP:
    370443          {
    371444            /* Don't drop */   
    372             gdk_window_set_back_pixmap(wgtDrag->window, pixMapStop, FALSE);
     445            NOMDragWindow_displayStopImage(nomDragWindow, NULLHANDLE);
     446            //     gdk_drag_status(dragContext, 0, t);
    373447            break;
    374448          }
    375449        default:
    376450          {
    377             gdk_window_set_back_pixmap(wgtDrag->window, pixMapDrag, FALSE);
     451            NOMDragWindow_displayDragImage(nomDragWindow, NULLHANDLE);
     452            //  gdk_drag_status(dragContext, GDK_ACTION_MOVE, t);
     453           break;
     454          }
     455        }
     456      /* Tell GTK to redraw the drag window */
     457      gtk_widget_queue_draw(NOMDragWindow_queryWindowHandle(nomDragWindow, NULLHANDLE));
     458    }
     459  oldRc=rc;
     460
     461  switch(dragContext->actions)
     462    { 
     463    case GDK_ACTION_COPY:
     464      {
     465        gdk_drag_status(dragContext, GDK_ACTION_COPY, t);
     466        break;
     467      }
     468    case GDK_ACTION_MOVE:
     469      {
     470        gdk_drag_status(dragContext, GDK_ACTION_MOVE, t);
     471        break;
     472      }
     473    case GDK_ACTION_LINK:
     474      {
     475        gdk_drag_status(dragContext, GDK_ACTION_LINK, t);
     476        break;
     477      }
     478    default:
     479      {
     480        if(dragContext->actions & GDK_ACTION_MOVE) //FIXME
     481          gdk_drag_status(dragContext, GDK_ACTION_MOVE, t);       
     482        break;
     483      }
     484    }
     485#if 0
     486  /* Now change the cursor */
     487  switch(rc & DOR_ALLFLAGS)
     488    {
     489    case DOR_NODROP:
     490      {
     491        /* Don't drop */   
     492        gdk_drag_status(dragContext, 0, t);
     493        break;
     494      }
     495    default:
     496      {
     497        switch(rc & DO_ALLFLAGS)
     498          {
     499          case DO_MOVE:
     500            {
     501              gdk_drag_status(dragContext, GDK_ACTION_MOVE, t);
     502              break;
     503            }
     504          case DO_COPY:
     505            {
     506              gdk_drag_status(dragContext, GDK_ACTION_COPY, t);
     507              break;
     508            }
     509          case DO_LINK:
     510            {
     511              gdk_drag_status(dragContext, GDK_ACTION_LINK, t);
     512              break;
     513            }
     514
     515          default:
     516            if(dragContext->actions & GDK_ACTION_MOVE) //FIXME
     517              gdk_drag_status(dragContext, GDK_ACTION_MOVE, t);
    378518            break;
    379519          }
    380         }
    381       gtk_widget_queue_draw(wgtDrag);
    382     }
    383   oldRc=rc;
    384 
     520        break;
     521      }
     522    }/* switch() */
     523#endif
     524 
    385525  return FALSE;
    386526}
     
    390530                          guint info, guint uiTime, gpointer ptrUserData)
    391531{
    392   DosBeep(5000, 100);
    393532  g_message("%s", __FUNCTION__);
    394533  //  gdk_drag_status(dragContext, GDK_ACTION_COPY, uiTime);
     
    397536
    398537
    399 
    400538/*
    401539
     
    424562      break;
    425563    };
    426   // 
     564
    427565  return;
    428566}
     
    525663                   G_CALLBACK(fldrWindowHandleDragDrop), nomSelf);
    526664  g_signal_connect(GTK_WIDGET(icon_view), "drag_data_received",
    527                    G_CALLBACK(fldrWindowHandleDragDataReceived), NULL);
     665                   G_CALLBACK(fldrWindowHandleDragDataReceived), nomSelf);
    528666  g_signal_connect(GTK_WIDGET(icon_view), "drag_data_get",
    529                    G_CALLBACK(fldrWindowHandleDragDataGet), NULL);
     667                   G_CALLBACK(fldrWindowHandleDragDataGet), nomSelf);
    530668
    531669  /* Prepare drag and drop */
    532670  gtk_drag_source_set(GTK_WIDGET(icon_view), GDK_BUTTON3_MASK, targetEntries,
    533                       G_N_ELEMENTS(targetEntries) ,
    534                       GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE);
    535   gtk_drag_dest_set(GTK_WIDGET(icon_view), GTK_DEST_DEFAULT_ALL, targetEntries, 1 ,
    536                       GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE);
     671                      G_N_ELEMENTS(targetEntries),
     672                      GDK_ACTION_DEFAULT|GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE);
     673  gtk_drag_dest_set(GTK_WIDGET(icon_view), GTK_DEST_DEFAULT_ALL, targetEntries, 1,
     674                      GDK_ACTION_DEFAULT|GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE);
    537675
    538676#if 0
  • trunk/desktop/class_c/wpobject.c

    r237 r241  
    3333* ***** END LICENSE BLOCK ***** */
    3434/*
    35  * This file was generated by orbit-idl-2 for Voyager
    36  *
    37  *
    3835 * And remember, phase 3 is near...
    3936 */
     
    801798                                                  const gpointer pDragInfo, CORBA_Environment *ev)
    802799{
    803 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     800  /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
    804801
    805802  return 0; /* Don't allow drop */
     
    809806                                              const gpointer pDragInfo, CORBA_Environment *ev)
    810807{
    811 /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
    812 
    813   DosBeep(500, 100);
     808  /* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     809  g_message("Calling %s", __FUNCTION__);
    814810  return 0;
    815811}
    816812
    817 
     813NOM_Scope CORBA_boolean NOMLINK impl_WPObject_wpMoveObject(WPObject* nomSelf,
     814                                                           const PWPFolder wpTargetFolder,
     815                                                           CORBA_Environment *ev)
     816{
     817/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     818  g_message("Calling %s, not implemented yet", __FUNCTION__);
     819
     820  return FALSE;
     821}
     822
     823NOM_Scope PWPObject NOMLINK impl_WPObject_wpCopyObject(WPObject* nomSelf,
     824                                                       const PWPFolder wpTargetFolder,
     825                                                       const CORBA_boolean fLock,
     826                                                       CORBA_Environment *ev)
     827{
     828/* WPObjectData* nomThis=WPObjectGetData(nomSelf); */
     829
     830  g_message("Calling %s, not implmnted yet", __FUNCTION__);
     831  return FALSE;
     832}
     833
Note: See TracChangeset for help on using the changeset viewer.