Commit Graph

31 Commits

Author SHA1 Message Date
Michael Natterer
c1e0317824 quartz: merge the clipboard storing code from gtk-2-24 2013-01-17 13:16:02 +01:00
Michael Natterer
597dc649e1 quartz: make setting_same_owner member of GtkClipboardOwner @public
to fix the build, thanks to parafin for the patch.
(cherry picked from commit e3e055f855)
2012-12-17 22:22:21 +01:00
John Ralls
796ae50064 Fix compilation on MacOSX Tiger
NSInteger isn't defined until MacOSX Leopard, so in the 3 files that
use it, include ../gdk/quartz/gdkquartz.h which provides a typedef when
needed.
2012-12-10 16:51:31 -08:00
Michael Natterer
9d31a04d12 quartz: fix crash in the recent clipboard "fix", and really fix it
We must not release the GtkClipboardOwner in pasteboardChangedOwner
becaue we don't own a reference to ourselves (NSPasteboard does).
Instead, release the owner right after setting it, transferring
ownership to NSPasteboard

Also, fix repeated setting of the same owner by keeping the
owner around in GtkCLipboard, and re-use it if "user_data"
doesn't change. To avoid clipboard_unset()ting our own contents
in the process, add an ugly "setting_same_owner" boolean to
GtkClipboardOwner, set it during re-setting the same owner,
and avoid calling clipboard_unset() from pasteboardChangedOwner
if it's TRUE.
(cherry picked from commit 4a8df7a33c)
2012-12-07 12:30:15 +01:00
Michael Natterer
f08fc12741 Bug 626499 - GtkClipboard unnotified on change of OS X pasteboard owner
pasteboardChangedOwner is not called as reliably as we'd want to get it,
so keep track of [pasteboard changeCount] and drop clipboard ownership
when a change happened. Also better unset the clipboard content redundantly
in a few places rather than missing one, and reorder the code in
gtk_clipboard_set_contents() so that the new aggressive unsetting
won't unset the clipboard under our feet when we call
[pasteboard declareTypes].
(cherry picked from commit f2b74db5dc)
2012-12-04 14:42:08 +01:00
Matthias Clasen
1bfa58951c Remove empty doc comments
These confuse gtk-doc. All these functions are documented
in gtkclipboard.c
2012-09-23 21:14:46 -04:00
John Ralls
398dc1cf27 Copy in annotations missing from gtkdnd-quartz and gtkclipboard-quartz 2012-08-22 14:39:11 -07:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Kristian Rietveld
8d69f3daf2 Bug 508601 - Copying from GTK+ applications causes crash
In GtkClipboardOwner pasteboard:provideDataForType do not call
_gtk_quartz_set_selection_data_for_pasteboard() is selection_data.length
is smaller than 0.  The function relies on having a positive length,
since it stores the length in a uint ...
2011-07-25 22:05:52 +02:00
Kristian Rietveld
4a6c50c298 gtkclipboard-quartz: use accessors and add missing include 2010-12-22 17:47:03 +01:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Kristian Rietveld
c049c6a385 Rework a previous commit to not crash in addition to fixing leaks
The target list/entry to pasteboard entry conversions return a NSSet
now instead of NSArray.
2010-01-01 21:28:16 +01:00
Kristian Rietveld
f91907101d Fix memory management of types array
Also add autorelease pool to gtk_drag_begin_idle().
2009-12-30 14:18:33 +01:00
Matthias Clasen
927aaa43f9 Remove duplicate doc comments.
These can only serve to confuse gtk-doc.
2009-11-27 00:42:54 -05:00
Richard Hult
b29d3d4082 Bug 554141 – uninitialized data use/free in gtkclipboard-quartz.c
2008-09-29  Richard Hult  <richard@imendio.com>

	Bug 554141 – uninitialized data use/free in gtkclipboard-quartz.c

	* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_contents):
	Patch from Jon A. Cruz to initialize the allocated selection data.

svn path=/trunk/; revision=21540
2008-09-29 10:41:07 +00:00
Richard Hult
6a1ff1bc22 Add another missing symbol.
2008-08-15  Richard Hult  <richard@imendio.com>

	* gtk/gtkclipboard-quartz.c (gtk_clipboard_wait_is_uris_available):
	Add another missing symbol.

svn path=/trunk/; revision=21135
2008-08-15 20:20:46 +00:00
Sven Neumann
b5796771d2 gtk/gtkaccelgroup.c gtk/gtkactiongroup.c gtk/gtkcalendar.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaccelgroup.c
	* gtk/gtkactiongroup.c
	* gtk/gtkcalendar.c
	* gtk/gtkcelleditable.c
	* gtk/gtkclipboard-quartz.c
	* gtk/gtkclipboard.c
	* gtk/gtkcolorbutton.c
	* gtk/gtkcolorsel.c
	* gtk/gtkcontainer.c
	* gtk/gtkcurve.c: use canonical signal names.


svn path=/trunk/; revision=21068
2008-08-11 13:07:18 +00:00
Richard Hult
33ce9f17ba Implement missing functions.
2008-08-10  Richard Hult  <richard@imendio.com>

	* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_uris),
	(gtk_clipboard_request_uris): Implement missing functions.

svn path=/trunk/; revision=21053
2008-08-10 08:25:23 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

        Change	all references	of GIMP	Toolkit	(and variations	of it)
        to GTK+	Toolkit, showing no mercy at all to our	beloved
	ancestry. (#540529)


svn path=/trunk/; revision=20709
2008-06-30 23:01:56 +00:00
Richard Hult
2f29e8d9f5 Patch from Christian Dywan to clean up selection data setting.
2008-06-26  Richard Hult  <richard@imendio.com>

	* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_contents):
	* gtk/gtkquartz.c:
	(_gtk_quartz_get_selection_data_from_pasteboard),
	(_gtk_quartz_set_selection_data_for_pasteboard): Patch from
	Christian Dywan to clean up selection data setting.

svn path=/trunk/; revision=20690
2008-06-26 13:01:40 +00:00
Johan Dahlin
d97cdbdf53 Include "config.h" instead of <config.h> Command used: find -name
2008-06-21  Johan Dahlin  <jdahlin@async.com.br>

    * *.[ch]: Include "config.h" instead of <config.h>
    Command used:
    find -name \*.[ch]|xargs perl -p -i -e 's/^#include <config.h>/#include "config.h"/g'
    Rubberstamped by Mitch and Tim


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Richard Hult
fce8ef214e Remove unused variables. (gtk_clipboard_set_contents),
2008-02-13  Richard Hult  <richard@imendio.com>

	* gtk/gtkclipboard-quartz.c: (gtk_clipboard_wait_for_contents):
	Remove unused variables.
	(gtk_clipboard_set_contents),
	(gtk_clipboard_get_owner), (clipboard_unset),
	(gtk_clipboard_request_targets): Notify the previous clipboard
	owner when the owner changes. Fixes bug #493406.

svn path=/trunk/; revision=19560
2008-02-13 15:36:18 +00:00
Matthias Clasen
945db7f6a6 Use GSlice for GtkSelectionData. (#515060, Christian Persch)
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkclipboard-quartz.c:
        * gtkquartz.c:
        * gtkselection.c: Use GSlice for GtkSelectionData.  (#515060,
        Christian Persch)


svn path=/trunk/; revision=19533
2008-02-12 16:10:39 +00:00
Richard Hult
fd90de672b Fix bug #486369, by passing the selection info along when pasting.
2007-11-03  Richard Hult  <richard@imendio.com>

	* gtk/gtkclipboard-quartz.c: (clipboard_owner_destroyed),
	(gtk_clipboard_set_contents), (clipboard_unset): Fix bug #486369,
	by passing the selection info along when pasting.

svn path=/trunk/; revision=18965
2007-11-03 13:12:45 +00:00
Matthias Clasen
70ae6a0e83 Apply a patch by Behdad Esfahbod to reduce relocations. (#359053)
2006-10-03  Matthias Clasen  <mclasen@redhat.com>

        * gtk/*.c, gdk/*.c: Apply a patch by Behdad Esfahbod to
        reduce relocations. (#359053)
2006-10-03 15:54:52 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
2006-09-10  Matthias Clasen  <mclasen@redhat.com>

        * Commit a patch by Behdad to fix typos, omissions and other
        errors in the symbol aliasing, and add checks for local PLT
        entries.  (#354687, Behdad Esfahbod)
2006-09-10 06:39:16 +00:00
Richard Hult
bbc45a6230 Reindent.
2006-07-19  Richard Hult  <richard@imendio.com>

	* gtk/gtkdnd-quartz.c (register_types): Reindent.

	* gtk/gtkclipboard-quartz.c (gtk_clipboard_set_contents): Add
	autorelease pool.
2006-07-19 18:55:27 +00:00
Richard Hult
451543039a Implement some more stubs for pygtk, bug #346713.
2006-07-09  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkgeometry-quartz.c:
	* gdk/quartz/gdkmain-quartz.c:
	* gdk/quartz/gdkpixmap-quartz.c:
	* gdk/quartz/gdkwindow-quartz.c:
	* gtk/gtkclipboard-quartz.c: Implement some more stubs for pygtk,
	bug #346713.
2006-07-09 18:09:09 +00:00
Anders Carlsson
856ee02fe4 Make the poll func work with real file descriptors. We do this by creating
2006-03-27  Anders Carlsson  <andersca@imendio.com>

        * gdk/quartz/gdkevents-quartz.c:
        (select_thread_func):
        (got_fd_activity):
        (poll_func):
        (gdk_event_translate):
        Make the poll func work with real file descriptors.
        We do this by creating a thread which calls poll and then
        signals the main thread using a run loop source.

        * gtk/gtkclipboard-quartz.c:
        (-[GtkClipboardOwner pasteboard:provideDataForType:]):
        Remove debugging output
2006-03-27 18:46:38 +00:00
Anders Carlsson
0c230f6061 Add new files.
2006-03-21  Anders Carlsson  <andersca@imendio.com>

        * gtk/Makefile.am:
        Add new files.

        * gtk/gtkclipboard-quartz.c: Added.
        * gtk/gtkdnd-quartz.c: Added.
        * gtk/gtkquartz.c: Added.
        * gtk/gtkquartz.h: Added.
        Add dnd and clipboard implementations.
2006-03-21 16:50:47 +00:00