Changeset 237 for trunk/desktop/class_c/wpfolder.c
- Timestamp:
- Feb 11, 2007, 4:52:34 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/desktop/class_c/wpfolder.c
r224 r237 16 16 * The Initial Developer of the Original Code is 17 17 * netlabs.org: Chris Wohlgemuth <cinc-ml@netlabs.org>. 18 * Portions created by the Initial Developer are Copyright (C) 2005-200 618 * Portions created by the Initial Developer are Copyright (C) 2005-2007 19 19 * the Initial Developer. All Rights Reserved. 20 20 * … … 341 341 342 342 wpFldrWindow=WPFolder_wpCreateFolderWindow(nomSelf, NULLHANDLE); 343 WPFolderWindow_wpSetWPObject(wpFldrWindow, (WPObject*)nomSelf, NULLHANDLE);344 343 345 344 /* Insert it into inuse list */ … … 470 469 } 471 470 472 /* 471 enum{ 472 WPOBJECT_TARGET_PATH, 473 WPOBJECT_TARGET_OBJECT, 474 WPOBJECT_TARGET_STRING 475 }; 476 477 static GtkTargetEntry targetEntries[]= 478 { 479 {"WPObject-path", 0, WPOBJECT_TARGET_PATH}, 480 {"WPObject", 0, WPOBJECT_TARGET_OBJECT}, 481 {"STRING", 0, WPOBJECT_TARGET_STRING}, 482 }; 483 484 static void fldrDragDataReceived(GtkWidget * widget, GdkDragContext* dragContext, int x, int y, GtkSelectionData *seldata, 485 guint info, guint uiTime, gpointer ptrUserData) 486 { 487 DosBeep(5000, 100); 488 g_message("%s", __FUNCTION__); 489 return; 490 } 491 492 493 494 495 static void fldrDragDataGet(GtkWidget * widget, GdkDragContext* dragContext, GtkSelectionData *seldata, 496 guint uiInfo, guint t, gpointer ptrUserData) 497 { 498 DosBeep(100, 100); 499 g_message("%s", __FUNCTION__); 500 // gtk_selection_data_set(); 501 return; 502 } 503 504 505 #if 0 506 /** 507 Get the WPFolder object from a container widget (icon view). If the object can't be queried 508 NULL is returned. 509 Note that this function checks if the pointer points to a NOMObject so a call to 510 nomIsObj() is not necessary. 511 */ 512 static PWPFolder fldrQueryWPFolderFromContainer(GtkWidget * wgtThis) 513 { 514 GtkWidget* wgtToplevel; 515 PWPFolder wpFolder; 516 517 if((wgtToplevel=gtk_widget_get_toplevel(wgtThis))==NULLHANDLE) 518 return NULLHANDLE; 519 520 if(!GTK_WIDGET_TOPLEVEL(wgtToplevel)) 521 return NULLHANDLE; 522 523 wpFolder=(PWPFolder) g_object_get_data(G_OBJECT(wgtToplevel), NOMOBJECT_KEY_STRING); 524 if(nomIsObj(wpFolder)) 525 return wpFolder; 526 527 return NULLHANDLE; 528 } 529 #endif 530 531 532 /** 473 533 This method creates the folder window it doesn't query any files or creates 474 534 models and stuff. … … 479 539 PPRIVFOLDERDATA priv; 480 540 WPFolderData *nomThis = WPFolderGetData(nomSelf); 481 541 482 542 priv=(PPRIVFOLDERDATA)_privFolderData; 483 543 484 544 wpFldrWindow=WPFolderWindowNew(); 545 546 /* Save a pointer to the desktop folder object */ 547 WPFolderWindow_wpSetWPObject(wpFldrWindow, (WPObject*)nomSelf, NULLHANDLE); 485 548 486 549 /* Connect to the "item_activated" signal */ … … 489 552 490 553 WPFolderWindow_wpSetWindowTitle(wpFldrWindow, WPFolder_wpQueryTitle(nomSelf, NULLHANDLE), NULLHANDLE); 554 555 /* Prepare drag and drop */ 556 gtk_drag_source_set(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE), GDK_BUTTON3_MASK, targetEntries, 557 G_N_ELEMENTS(targetEntries) , 558 GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE); 559 gtk_drag_dest_set(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE), GTK_DEST_DEFAULT_ALL, targetEntries, 1 , 560 GDK_ACTION_LINK|GDK_ACTION_COPY|GDK_ACTION_MOVE); 561 g_signal_connect(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE),"drag_data_received", 562 G_CALLBACK(fldrDragDataReceived), NULL); 563 g_signal_connect(WPFolderWindow_wpQueryContainerHandle(wpFldrWindow, NULLHANDLE),"drag_data_get", 564 G_CALLBACK(fldrDragDataGet), NULL); 491 565 492 566 /* Show the new window */ … … 572 646 573 647 574 575 648 /* orbit-idl-c-stubs.c, cs_output_stub line 347 */ 649 NOM_Scope gulong NOMLINK impl_WPFolder_wpDragOver(WPFolder* nomSelf, const gpointer containerHandle, 650 const gpointer pDragInfo, CORBA_Environment *ev) 651 { 652 /* WPFolderData* nomThis=WPFolderGetData(nomSelf); */ 653 654 return GDK_ACTION_COPY; 655 656 #if 0 657 /* orbit-idl-c-stubs.c, VoyagerWriteProtoForParentCall line 119 */ 658 WPFolder_wpDragOver_parent(nomSelf, ev); 659 #endif 660 } 661 662
Note:
See TracChangeset
for help on using the changeset viewer.