+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.
- (void)draggingEnded:(id <NSDraggingInfo>)sender
{
- g_object_unref (current_context);
+ if (current_context)
+ g_object_unref (current_context);
current_context = NULL;
}
* Boston, MA 02111-1307, USA.
*/
-#import <Cocoa/Cocoa.h>
+#import <AppKit/AppKit.h>
+#import <Foundation/Foundation.h>
#include <glib.h>
@interface GdkQuartzWindow : NSWindow {
/* FIXME: Implement */
return FALSE;
}
+
+id
+gdk_quartz_drag_context_get_dragging_info_libgtk_only (GdkDragContext *context)
+{
+ return GDK_DRAG_CONTEXT_PRIVATE (context)->dragging_info;
+}
+/* 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
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");
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;
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)