Commit Graph

82 Commits

Author SHA1 Message Date
Matthias Clasen
585a6652d5 Use G_SOURCE_CONTINUE/REMOVE
Now that GLib provides these macros, we should use them
to make the code more readable.
2012-01-30 19:12:27 -05:00
Javier Jardón
85b356da10 Move documentation to inline comments: GtkClipboard 2011-04-13 12:48:47 +01:00
Alexander Larsson
9db4accf9c Make gtkclipboard.c:clipboard_get_timestamp multi-backend safe
We can't just check for the backend defines, we have to do runtime checks too.
2011-04-07 20:19:30 +02:00
John (J5) Palmieri
cdf69b4bed [gi] add missing annotations for signals that emit Gdk.Events 2011-03-03 16:05:28 -05:00
Pavel Holejsovsky
374e76a19d [GI] Mark unintrospectable constructs as (skip)
Also adds 'Rename to:' annotation to some constructs replacing the
skipped ones.
2011-01-20 13:57:21 +01:00
Pavel Holejsovsky
2fb1c06402 [GI] Add missing (out) and (array) annotations 2011-01-20 13:57:20 +01:00
Matthias Clasen
3c47c8467c Remove some direct access to GdkDragContext members 2010-12-21 12:06:56 -05:00
Javier Jardón
cf9e9ff47f gtk/gtkclipboard.c: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:16 +00:00
Alberto Garcia
d6a73fd5b0 Assign all g_signal_connect() and friends to gulong variables
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=87821
2010-10-22 18:58:47 +02:00
Benjamin Otte
2ee8fdb79b gtk: gdk_drawable_get_display() => gdk_window_get_display() 2010-09-26 15:11:33 +02:00
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Javier Jardón
07d3f20202 gtk/gtkdnd.c: Use accessor functions to access GtkWidget 2010-08-22 22:56:16 +02: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
John (J5) Palmieri
0d2366d5eb add allow-none annotation to gtk_clipboard_set_can_store's targets parameter 2010-06-07 13:15:27 -04:00
Alan Knowles
8b6e1b4de2 Fix introspection on return value transfer for gtk_clipboard_get*
ownership transfer set to none for clipboard get methods
2010-03-10 22:21:52 +08:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
3faf7d0214 Fix a doc comment 2009-11-27 00:39:26 -05:00
Federico Mena Quintero
e2bce0d630 bgo#463773 - Handle a NULL display in gtk_clipboard_get_for_display() so Flash won't hang 2009-05-12 13:44:04 -05:00
Matthias Clasen
2db879fe87 Bug 557315 – stale clipboard target cache
2008-10-25  Matthias Clasen  <mclasen@redhat.com>

        Bug 557315 – stale clipboard target cache

        * gtk/gtkclipboard.c (gtk_clipboard_set_contents): Remove cached
        targets. Pointed out by Evan Stade


svn path=/trunk/; revision=21713
2008-10-25 23:12:03 +00:00
Paolo Borelli
3a13747e3f use canonical signal name.
2008-08-12  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtkclipboard.c (gtk_clipboard_store):
	use canonical signal name.


svn path=/trunk/; revision=21104
2008-08-12 19:20:43 +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
Sven Neumann
2a95978506 gtk/gtkaboutdialog.c gtk/gtkcellrendereraccel.c gtk/gtkcellrenderercombo.c
2008-08-11  Sven Neumann  <sven@gimp.org>

	* gtk/gtkaboutdialog.c
	* gtk/gtkcellrendereraccel.c
	* gtk/gtkcellrenderercombo.c
	* gtk/gtkcellrendererspin.c
	* gtk/gtkcellrenderertext.c
	* gtk/gtkclipboard.c
	* gtk/gtkcolorsel.c
	* gtk/gtkcombo.c
	* gtk/gtkcombobox.c
	* gtk/gtkdnd-quartz.c
	* gtk/gtkdnd.c
	* gtk/gtkentry.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkfilechooserbutton.c
	* gtk/gtkfilechooserdefault.c
	* gtk/gtkfilechooserentry.c
	* gtk/gtkfontsel.c
	* gtk/gtkinputdialog.c
	* gtk/gtkmenutoolbutton.c
	* gtk/gtkpathbar.c
	* gtk/gtktooltip.c: use canonical signal names in 
g_signal_connect().


svn path=/trunk/; revision=21060
2008-08-11 09:17:49 +00:00
Matthias Clasen
29fc592dad Use g_timeout_add_seconds
svn path=/trunk/; revision=20921
2008-07-31 22:19:07 +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
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
Christian Persch
c9e85e48f8 Add clipboard convenience helpers for URIs. Bug #537639.
svn path=/trunk/; revision=20465
2008-06-19 12:55:57 +00:00
Matthias Clasen
88fa693540 Make finalizer more robust
svn path=/trunk/; revision=19283
2007-12-28 19:55:37 +00:00
Matthias Clasen
11eba86f2a Add docs
svn path=/trunk/; revision=18454
2007-07-12 03:23:42 +00:00
Christian Persch
6400dda3a0 Use gtk_target_table_new_from_list and gtk_target_table_free instead of
2007-01-14  Christian Persch  <chpe@svn.gnome.org>

	* gtk/gtkclipboard.c: (gtk_clipboard_set_text),
	(gtk_clipboard_set_image): Use gtk_target_table_new_from_list and
	gtk_target_table_free instead of duplicating the code. Bug #396493.

svn path=/trunk/; revision=17152
2007-01-14 18:47:36 +00:00
Matthias Clasen
721c3bc101 Replace a lot of idle and timeout calls by the new gdk_threads api.
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * *.c: Replace a lot of idle and timeout calls by
        the new gdk_threads api.
2006-12-22 19:10:43 +00:00
Matthias Clasen
f8f9384537 Documentation additions and fixes.
2006-06-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkprinter.c:
        * gtk/gtkprintunixdialog.c:
        * gtk/gtkprintoperationpreview.c:
        * gtk/gtkprintcontext.c (gtk_print_context_set_cairo_context):
        * gtk/gtklabel.c (gtk_label_set_line_wrap_mode):
        * gtk/gtkentry.c (gtk_entry_new):
        * gtk/gtkprintoperation.c (gtk_print_operation_set_custom_tab_label):
        * gtk/gtkclipboard.c (gtk_clipboard_wait_for_rich_text): Documentation
        additions and fixes.

        * gtk/gtkaspectframe.h:
        * gtk/gtkaboutdialog.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkinputdialog.c:
        * gtk/gtk.symbols: Remove unnecessary includes.

        * gtk/gtkprogress.[hc]:
        * gtk/gtkitemfactory.[hc]: Don't unnecessarily use GTK_COMPILATION,
        remove unnecessary includes.
2006-06-29 09:18:07 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
e272345b5d More G_DEFINE_TYPE conversion.
2006-05-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkaccessible.c:
	* gtk/gtkclipboard.c:
	* gtk/gtkfilefilter.c:
	* gtk/gtkimmodule.c:
	* gtk/gtkmenubar.c: More G_DEFINE_TYPE conversion.
2006-05-03 17:07:09 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Michael Natterer
6c1d990adc Add infrastructure for copy/paste and DND of rich text for GtkTextBuffer.
2006-03-07  Michael Natterer  <mitch@imendio.com>

	Add infrastructure for copy/paste and DND of rich text for
	GtkTextBuffer. Fixes bug #324177.

	* gtk/gtktextbufferrichtext.[ch]: new files implementing a
	per-buffer registry of rich text formats.

	* gtk/gtk.h: #include gtktextbufferrichtext.h

	* gtk/gtktextbufferserialize.[ch]: new files implementing an
	internal serialization format that can handle all of a text
	buffer's tags and pixbufs. It's not useful for anything except
	tranfer between instances of GtkTextBuffer (Anders Carlsson).

	* gtk/Makefile.am: build the new files.

	* gtk/gtkclipboard.[ch]: added convenience APIs for rich text,
	just as they exist for plain text and pixbufs.

	* gtk/gtkselection.[ch]: added rich text convenience APIs here
	too.  Return the target list from gtk_target_list_ref(). Register
	GtkTargetList as boxed type. Added
	gtk_target_table_new_from_list() and gtk_target_table_free(),
	which make converting between GtkTargetList and arrays of
	GtkTargetEntry considerably easier.

	* gtk/gtktextutil.[ch]: added _gtk_text_util_create_rich_drag_icon()
	which creates a fancy rich text icon (Matthias Clasen).

	* gtk/gtktextbuffer.[ch]: use all the new stuff above and
	implement copy and paste of rich text. Added APIs for getting the
	target lists used for copy and paste. Added public enum
	GtkTextBufferTargetInfo which contains the "info" IDs associated
	with the entries of the target lists.

	* gtk/gtktextview.c: use the new rich text APIs and
	GtkTextBuffer's new target list API to enable DND of rich text
	chunks.

	* gtk/gtk.symbols: export all the new symbols added.

	* tests/testtext.c: added rich text testing stuff.
2006-03-07 13:46:11 +00:00
Michael Natterer
8bdc0bf97c Applied patch from maemo-gtk that addresses many issues wrt display
2005-11-10  Michael Natterer  <mitch@imendio.com>

	Applied patch from maemo-gtk that addresses many issues wrt
	display migration and display closing (bug #85715).

	* gdk/gdkdisplay.c (gdk_display_dispose): don't just set the
	default display to NULL when it's closed. Instead set the most
	recently opened display as new default (if one exists).

	* gdk/gdkpango.c (on_renderer_display_closed): fixed signature
	of this callback.

	* gdk/gdkscreen.c (gdk_screen_dispose): check if the GCs still
	exist before unrefing them.

	* gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): if the screen
	is closed, allow destruction of the root window.

	* gdk/x11/gdkdisplay-x11.c: moved some stuff from finalize() to
	dispose(), free stuff that was leaked before.

	* gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen): check if
	the xsettings_client still exists before destroying it.

	* gdk/x11/gdkkeys-x11.c: added finalization and free the allocated
	X resources.

	* gdk/x11/gdkpixmap-x11.c: moved stuff from finalize() to new
	dispose() implementation.

	* gdk/x11/gdkscreen-x11.c: moved stuff from finalize() to
	dispose() and check if it still exists before unrefing it. Set
	their pointers to NULL/None *after* upchaining in dispose(),
	because X11 implementations of members of the parent class still
	need them for their own destruction.

	* gdk/x11/gdkvisual-x11.c: removed finalize() implementation which
	was g_error()ing when finalizing a visual.

	* gtk/gtkclipboard.c (gtk_clipboard_finalize): don't use
	get_clipboard_widget() because it would create the widget if it
	doesn't exist. Use g_object_get_data() directly instead.

	* gtk/gtktextdisplay.c (on_renderer_display_closed): fixed signature
	of this callback.
2005-11-10 12:09:42 +00:00
Matthias Clasen
d52e81d599 Don't unref NULL. (#316828, Tor Lillqvist)
2005-09-28  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkclipboard.c (request_image_received_func): Don't unref
	NULL.  (#316828, Tor Lillqvist)
2005-09-28 20:06:08 +00:00
Matthias Clasen
af89d145f7 Use gdk_atom_intern_static_string() where appropriate.
* gtk/*.c:  Use gdk_atom_intern_static_string() where
	appropriate.
2005-09-11 05:48:27 +00:00
Matthias Clasen
94eec04267 Intern some more strings.
2005-09-01  Matthias Clasen  <mclasen@redhat.com>

        * gdk/*.c: Intern some more strings.
        * gtk/gtkintl.h:
        * gtk/*.c: Define an I_() macro and use it instead of the
        bulky g_intern_static_string().
2005-09-01 05:11:46 +00:00
Matthias Clasen
f4bbe8f0de Also intern static strings passed to g_object_set_data() 2005-08-31 17:58:55 +00:00
Matthias Clasen
c09cc89317 Intern type names in code generated by glib-mkenums, too.
2005-08-31  Matthias Clasen  <mclasen@redhat.com>

	* gdk/Makefile.am:
	* gtk/Makefile.am: Intern type names in code generated by
	glib-mkenums, too.

	* gtk/*.c:
	* gdk/x11/*.c:
	* gdk/*.c: Intern type names before registering the type to avoid
	unnecessary copies.
2005-08-31 16:53:43 +00:00
Matthias Clasen
1255e7fabd 2.8.2 2005-08-24 18:22:23 +00:00
Matthias Clasen
04135812bd Don't leak atom names. (#311933, Peter Zelezny)
2005-08-01  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkclipboard.c (gtk_clipboard_set_image)
	(gtk_clipboard_set_text): Don't leak atom names.  (#311933,
	Peter Zelezny)
2005-08-01 14:21:14 +00:00
Matthias Clasen
dd58d23390 Don't accept n_targets == -1. (clipboard_unset): unref the old_data, not
2005-03-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkclipboard.c (gtk_clipboard_set_can_store):
	Don't accept n_targets == -1.
	(clipboard_unset): unref the old_data, not the
	user_data which we have just cleared.  (#172038, Sven
	Neumann)
2005-03-30 17:37:42 +00:00
Matthias Clasen
cca8dd6347 Make PLT-reduction work with gcc4, and don't include everything in
2005-03-20  Matthias Clasen  <mclasen@redhat.com>

	Make PLT-reduction work with gcc4, and don't include
	everything in gdkalias.h:

	* gtk/grk.symbols: Group symbols by header and source file.
	* gtk/makegtkalias.pl: Protect definitions by the same
	preprocessor symbols used to guard the headers. Move
	the alias declarations to a separate file which is
	produced when calling makegtkalias.pl -def
	* gdk/Makefile.am (gtkaliasdef.c): Add a rule to generate
	this file.
	* gtk/*.c: Include gtkalias.h after the other headers,
	include gtkaliasdef.c at the bottom.
	* gtk/*.h: Small cleanups.
2005-03-20 07:01:23 +00:00
Matthias Clasen
bacee14097 Fix links to freedesktop.org specs in the documentation.
2005-02-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwindow.c:
	* gtk/gtkclipboard.c: Fix links to freedesktop.org specs
	in the documentation.
2005-02-21 04:24:48 +00:00
Matthias Clasen
676322ac06 Make the clipboard image API more robust (#162357, Torsten Schoenfeld):
2004-12-27  Matthias Clasen  <mclasen@redhat.com>

	Make the clipboard image API more robust (#162357,
	Torsten Schoenfeld):

	* gtk/gtkclipboard.c (clipboard_image_received_func): Don't
	ref the pixbuf if it is NULL.

	* gtk/gtkselection.c (gtk_selection_data_set_pixbuf):
	NULL-terminate the varargs in the call to
	gdk_pixbuf_save_to_buffer().
	(gtk_selection_data_get_pixbuf): Only use a pixbuf loader
	if there is data to load.
2004-12-28 04:31:40 +00:00
Matthias Clasen
75eb3f9d2f Remove two more places where we were unconditionally setting "visible",
2004-11-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkuimanager.c (update_node): Remove two more places
	where we were unconditionally setting "visible", causing
	unnecessary notifications.

	* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
	(gtk_clipboard_get): Clarify the docs.  (#156638, Torsten
	Schoenfeld)
	(gtk_clipboard_finalize): Warn if the clipboard is still in
	its displays clipboard list.
2004-11-11 19:57:41 +00:00
Matthias Clasen
1c8e6a0e4f Add api for image transfer via copy-and-paste (#156408)
2004-10-31  Matthias Clasen  <mclasen@redhat.com>

	Add api for image transfer via copy-and-paste (#156408)

	* gtk/gtkclipboard.c (gtk_clipboard_set_image)
	(gtk_clipboard_request_image, gtk_clipboard_wait_for_image)
	(gtk_clipboard_wait_is_image_available): New functions for image
	transfer.

	* gtk/gtkselection.h:
	* gtk/gtkselection.c (gtk_selection_data_targets_include_image):
	New function, similar to gtk_selection_data_targets_include_text().
2004-10-31 05:40:25 +00:00