Redo the fix for bug #492117, by adding a getter for the private drag
2007-11-01 Richard Hult <richard@imendio.com> * gdk/quartz/GdkQuartzWindow.c: * gdk/quartz/GdkQuartzWindow.h: * gdk/quartz/gdkdnd-quartz.c: * gdk/quartz/gdkquartz.h: * gtk/gtkdnd-quartz.c: Redo the fix for bug #492117, by adding a getter for the private drag context info so we don't need to expose so much in the public quartz header file. svn path=/trunk/; revision=18959
This commit is contained in:

committed by
Richard Hult

parent
c6c14a3abd
commit
5cb6747339
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2007-11-01 Richard Hult <richard@imendio.com>
|
||||
|
||||
* gdk/quartz/GdkQuartzWindow.c:
|
||||
* gdk/quartz/GdkQuartzWindow.h:
|
||||
* gdk/quartz/gdkdnd-quartz.c:
|
||||
* gdk/quartz/gdkquartz.h:
|
||||
* gtk/gtkdnd-quartz.c: Redo the fix for bug #492117, by adding a
|
||||
getter for the private drag context info so we don't need to
|
||||
expose so much in the public quartz header file.
|
||||
|
||||
2007-11-01 Richard Hult <richard@imendio.com>
|
||||
|
||||
* gdk/quartz/GdkQuartzWindow.h: Fix build, bug #492117.
|
||||
|
@ -411,7 +411,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
|
||||
- (void)draggingEnded:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
g_object_unref (current_context);
|
||||
if (current_context)
|
||||
g_object_unref (current_context);
|
||||
current_context = NULL;
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,8 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import <AppKit/AppKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <glib.h>
|
||||
|
||||
@interface GdkQuartzWindow : NSWindow {
|
||||
|
@ -210,3 +210,9 @@ gdk_drag_drop_succeeded (GdkDragContext *context)
|
||||
/* FIXME: Implement */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
id
|
||||
gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context)
|
||||
{
|
||||
return GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info;
|
||||
}
|
||||
|
@ -1,16 +1,34 @@
|
||||
/* gdkquartz.h
|
||||
*
|
||||
* Copyright (C) 2005-2007 Imendio AB
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __GDK_QUARTZ_H__
|
||||
#define __GDK_QUARTZ_H__
|
||||
|
||||
#include <AppKit/AppKit.h>
|
||||
#include "gdk/gdkprivate.h"
|
||||
#include "gdkprivate-quartz.h"
|
||||
#include "gdkdrawable-quartz.h"
|
||||
#include "gdkwindow-quartz.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
|
||||
NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
|
||||
NSView *gdk_quartz_window_get_nsview (GdkWindow *window);
|
||||
NSImage *gdk_quartz_pixbuf_to_ns_image_libgtk_only (GdkPixbuf *pixbuf);
|
||||
id gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -181,12 +181,15 @@ gtk_drag_get_data (GtkWidget *widget,
|
||||
GdkAtom target,
|
||||
guint32 time)
|
||||
{
|
||||
id <NSDraggingInfo> dragging_info = GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info;
|
||||
NSPasteboard *pasteboard = [dragging_info draggingPasteboard];
|
||||
id <NSDraggingInfo> dragging_info;
|
||||
NSPasteboard *pasteboard;
|
||||
GtkSelectionData *selection_data;
|
||||
GtkDragDestInfo *info;
|
||||
GtkDragDestSite *site;
|
||||
|
||||
dragging_info = gdk_quartz_drag_context_get_dragging_info_libgtk_only (context);
|
||||
pasteboard = [dragging_info draggingPasteboard];
|
||||
|
||||
info = gtk_drag_get_dest_info (context, FALSE);
|
||||
site = g_object_get_data (G_OBJECT (widget), "gtk-drag-dest");
|
||||
|
||||
@ -976,8 +979,8 @@ gtk_drag_dest_find_target (GtkWidget *widget,
|
||||
GdkDragContext *context,
|
||||
GtkTargetList *target_list)
|
||||
{
|
||||
id <NSDraggingInfo> dragging_info = GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info;
|
||||
NSPasteboard *pasteboard = [dragging_info draggingPasteboard];
|
||||
id <NSDraggingInfo> dragging_info;
|
||||
NSPasteboard *pasteboard;
|
||||
GtkWidget *source_widget;
|
||||
GList *tmp_target;
|
||||
GList *tmp_source = NULL;
|
||||
@ -987,6 +990,9 @@ gtk_drag_dest_find_target (GtkWidget *widget,
|
||||
g_return_val_if_fail (GDK_IS_DRAG_CONTEXT (context), GDK_NONE);
|
||||
g_return_val_if_fail (!context->is_source, GDK_NONE);
|
||||
|
||||
dragging_info = gdk_quartz_drag_context_get_dragging_info_libgtk_only (context);
|
||||
pasteboard = [dragging_info draggingPasteboard];
|
||||
|
||||
source_widget = gtk_drag_get_source_widget (context);
|
||||
|
||||
if (target_list == NULL)
|
||||
|
Reference in New Issue
Block a user