Commit Graph

589 Commits

Author SHA1 Message Date
Matthias Clasen
6e51533ec3 Fix a shadowed variable and a few other compiler warnings 2009-05-03 12:15:28 -04:00
Matthias Clasen
1ad8bfb69a Better i18n support in GtkBuilder
Let descriptions of accessible actions be translated, by specifying
the description as content of the <action> element, and allowing
"translatable", "context" and "comment" as attributes. (#518642)
2009-04-06 12:12:08 -04:00
Claudio Saavedra
584bd9cbc6 Bug 574283 – unused assignment and dead code in
2009-03-19  Claudio Saavedra  <csaavedra@igalia.com>

	Bug 574283 – unused assignment and dead code in
	gtk_widget_set_tooltip_window()

	* gtk/gtkwidget.c: (gtk_widget_set_tooltip_window): Remove
	an unused assignment, improving checks, and clean up method.


svn path=/trunk/; revision=22575
2009-03-19 07:47:23 +00:00
Matthias Clasen
d0e7f5889e Bug 573069 – Gdk-CRITICAL warnings with Gtk 2.14 when dragging
GtkNotebook tabs

        * gtk/gtkwidget.c (_gtk_widget_synthesize_crossing): Be a little
        more careful when navigating up the parent chain.

        * gdk/gdkwindow.c (_gdk_window_destroy_hierarchy): Reset the
        pointer window thats stored on the screen when it is destroyed.


svn path=/trunk/; revision=22420
2009-02-28 05:24:07 +00:00
Matthias Clasen
379822c74b Use a different approach to snapshotting that is in line with what is done
* gtk/gtkwidget.c (gtk_widget_get_snapshot): Use a different approach
        to snapshotting that is in line with what is done in the client-side
        windows branch, and that works for widgets regardless if they are
        double-buffered or not. Patch by Alex Larsson.

        * gdk/gdkwindow.c (_gdk_window_calculate_full_clip_region): Clip
        to the parent.


svn path=/trunk/; revision=22187
2009-01-23 05:34:14 +00:00
Matthias Clasen
125e80a64b Add docs
svn path=/trunk/; revision=22042
2009-01-02 20:55:54 +00:00
Matthias Clasen
860286c919 Doc additions
svn path=/trunk/; revision=21991
2008-12-29 06:48:44 +00:00
Matthias Clasen
a7e5938f58 Un-doc-commentize non-exported functions
svn path=/trunk/; revision=21979
2008-12-29 04:50:15 +00:00
Matthias Clasen
9f7e7c435b Documentation fixes
2008-12-28  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkhsv.c:
        * gtk/gtkwidget.c:
        * gtk/gtkaccelgroup.c: Documentation fixes

        * gtk/gtkstatusicon.c:
        * gtk/gtkentry.c:
        * gtk/gtkeditable.[hc]: Make parameter names match to make gtk-doc
        happy.


svn path=/trunk/; revision=21953
2008-12-28 06:58:09 +00:00
Matthias Clasen
1934d3423b Fix a typo
svn path=/trunk/; revision=21877
2008-12-13 05:20:10 +00:00
Sven Neumann
2c32cdd893 removed redundant conditional.
2008-10-30  Sven Neumann  <sven@gimp.org>

	* gtk/gtkwidget.c (gtk_widget_get_property): removed redundant
	conditional.


svn path=/trunk/; revision=21731
2008-10-30 15:04:38 +00:00
Christian Dywan
fa59a16884 Bug 558397 – gtk_widget_error_bell undefined without a screen
* gtk/gtkwidget.c (gtk_widget_error_bell): Test the settings
instance and return silently if unset

svn path=/trunk/; revision=21725
2008-10-29 15:08:49 +00:00
Tristan Van Berkom
c29237900c Added a note about GtkWidget:has-tooltip in the docs for
* gtk/gtkwidget.c: Added a note about GtkWidget:has-tooltip in
	the docs for GtkWidget::query-tooltip.


svn path=/trunk/; revision=21712
2008-10-24 18:25:43 +00:00
Christian Dywan
4630182ec4 Bug 555676 – gtk_widget_real_grab_focus assumes toplevel == window
* gtk/gtkwidget.c (gtk_widget_real_grab_focus):
Actually test for GTK_IS_WINDOW *and* GTK_WIDGET_TOPLEVEL

svn path=/trunk/; revision=21631
2008-10-11 03:37:47 +00:00
Christian Dywan
7bd7a266f2 Bug 555676 – gtk_widget_real_grab_focus assumes toplevel == window
* gtk/gtkwidget.c (gtk_widget_real_grab_focus):
Test for GTK_IS_WINDOW instead of GTK_WIDGET_TOPLEVEL

svn path=/trunk/; revision=21622
2008-10-09 17:27:59 +00:00
Kristian Rietveld
978e780018 Bug 487624 - Tooltips doesn't get updated if ther's no mouse motion over
2008-09-29  Kristian Rietveld  <kris@imendio.com>

	Bug 487624 - Tooltips doesn't get updated if ther's no mouse motion
	over widget

	* gtk/gtkwidget.c (gtk_widget_set_property): after updating
	tooltip text or markup, call gtk_widget_trigger_tooltip_query()
	so that existing visible tooltips are updated.


svn path=/trunk/; revision=21544
2008-09-29 16:44:10 +00:00
Matthias Clasen
ed877089bd Bug 551722 – gtk_widget_set_scroll_adjustments() should check the signal
2008-09-17  Matthias Clasen  <mclasen@redhat.com>

        Bug 551722 – gtk_widget_set_scroll_adjustments() should check the
        signal signature

        * gtk/gtkwidget.c (gtk_widget_set_scroll_adjustments): Check the
        signature of the signal. Patch by Christian Persch


svn path=/trunk/; revision=21410
2008-09-17 15:07:32 +00:00
Michael Natterer
eca33d60be don't access widget->window if the widget is not realized.
2008-09-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (_gtk_widget_set,get_pointer_window): don't
	access widget->window if the widget is not realized.


svn path=/trunk/; revision=21403
2008-09-16 17:47:30 +00:00
Michael Natterer
5e25a5c7ca when extending the draw rectangle by the "draw-border" style property,
2008-09-04  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_get_draw_rectangle): when extending
	the draw rectangle by the "draw-border" style property, subtract
	"left" from "x" and "top" from "y", not the other way around.


svn path=/trunk/; revision=21285
2008-09-04 11:10:29 +00:00
Michael Natterer
839aeeafa8 removed this function because there is massive disagreement about how to
2008-09-02  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_get_allocation): removed this
	function because there is massive disagreement about how to
	implement it. Needs some general discussion in the next
	development cycle about how our C api should evolve.

	* gtk/gtk.symbols: changed accordingly.


svn path=/trunk/; revision=21259
2008-09-02 16:06:02 +00:00
Michael Natterer
2faae9fd1d move the gtk_widget_get_parent() and gtk_widget_get_parent_window()
2008-08-29  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.h: move the gtk_widget_get_parent() and
	gtk_widget_get_parent_window() prototypes together with their
	respective setters.

	* gtk/gtkwidget.c: move gtk_widget_get_parent_window() together
	with its setter.


svn path=/trunk/; revision=21240
2008-08-29 16:21:09 +00:00
Michael Natterer
e0bbf16989 get rid of the deprecated aliases NONE and BOOL.
2008-08-13  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkmarshalers.list: get rid of the deprecated aliases NONE
	and BOOL.

	* gtk/gtkdialog.c
	* gtk/gtkentrycompletion.c
	* gtk/gtkmenuitem.c
	* gtk/gtkoldeditable.c
	* gtk/gtkrange.c
	* gtk/gtktreeview.c
	* gtk/gtkwidget.c: changed accordingly.


svn path=/trunk/; revision=21111
2008-08-13 18:44:11 +00:00
Michael Natterer
4980a282a0 change names of default implementations of our own signals to consistently
2008-08-12  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c: change names of default implementations of
	our own signals to consistently contain "real":

	gtk_widget_style_set -> gtk_widget_real_style_set
	gtk_widget_direction_changed -> gtk_widget_real_direction_changed


svn path=/trunk/; revision=21087
2008-08-12 09:25:35 +00:00
Sven Neumann
5de626f17d use canonical signal names.
2008-08-08  Sven Neumann  <sven@gimp.org>

	* gtk/gtkwidget.c:
	* gtk/gtkwindow.c: use canonical signal names.


svn path=/trunk/; revision=21042
2008-08-08 13:44:46 +00:00
Hans Breuer
491999783b build gdkwindowimpl
2008-08-01  Hans Breuer  <hans@breuer.org>

	* gdk/makefile.msc : build gdkwindowimpl

	* gtk/gtkwidget.c : fix c99ism - declaration needs to be at the
	start of a block

	* tests/makefile.msc : update


svn path=/trunk/; revision=20926
2008-08-01 14:43:22 +00:00
Cody Russell
4e3c97b3f2 Bug 56070 – Can't click button after setting it sensitive.
2008-07-31  Cody Russell  <bratsche@gnome.org>

        Bug 56070 – Can't click button after setting it sensitive.

        * gtk/gtkwidget.[ch] 
        * gtk/gtkwindow.c
        * gtk/gtkmain.c
        * gtk/gtkbutton.c
        * gtk/gtkprivate.h
        * gdk/gdkevents.h: Synthesize crossing events events where necessary.

        * gtk/tests/crossingevents.c: Add unit tests for crossing events.

        Big thanks to Ed Catmur, Matthias Clasen, and everyone else who
        has worked on and helped out with this.


svn path=/trunk/; revision=20924
2008-08-01 03:30:50 +00:00
Michael Natterer
7f00695920 remove _gtk_binding_signal_new().
2008-07-21  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbindings.[ch]: remove _gtk_binding_signal_new().

	* gtk/gtkfilechooserdefault.c
	* gtk/gtkmenu.c
	* gtk/gtkmenushell.c
	* gtk/gtkscalebutton.c
	* gtk/gtktextview.c
	* gtk/gtktoolbar.c
	* gtk/gtkwidget.c: use g_signal_new_class_handler() instead. Add
	some missing I_() to the signal names.


svn path=/trunk/; revision=20874
2008-07-21 09:48:20 +00:00
Murray Cumming
9c16d619b9 tooltip-text and tooltip-markup properties: Interpret an empty string as a
2008-07-03  Murray Cumming  <murrayc@murrayc.com>

* gtk/gtkwidget.c (gtk_widget_set_property):  tooltip-text and 
tooltip-markup properties: Interpret an empty string as a NULL 
string because an empty tooltip is silly. This will help 
language bindings that do not bother to have the two types of 
empty/null strings.
Bug #541399.

svn path=/trunk/; revision=20814
2008-07-10 17:46:25 +00:00
Matthias Clasen
7f12a27249 Clarify the docs. Pointed out by Wolfgang Oertl
* gtk/gtkwidget.c (gtk_widget_get_composite_name): Clarify the
        docs. Pointed out by Wolfgang Oertl



svn path=/trunk/; revision=20798
2008-07-06 23:58:37 +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
Michael Natterer
971023d922 Some unrelated cleanups found while reviewing the offscreen window patch:
2008-06-30  Michael Natterer  <mitch@imendio.com>

	Some unrelated cleanups found while reviewing
	the offscreen window patch:

	* gdk/gdkwindow.c: add missing Since: 2.14 to the redirection
	functions, fix some function header indentation, update
	documentation of redirect_to_drawable().

	* gdk/x11/gdkwindow-x11.c
	* gdk/x11/gdkpixmap-x11.c: fix function header
	formatting/indentation.

	* gtk/gtkwidget.c: use I_() on "damage_event".


svn path=/trunk/; revision=20708
2008-06-30 12:15:29 +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
Johan Dahlin
02fbfecda2 Initialize the allocation to avoid compiler warnings
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c (gtk_widget_get_allocation): Initialize the
    allocation to avoid compiler warnings


svn path=/trunk/; revision=20647
2008-06-20 14:28:09 +00:00
Johan Dahlin
c4aa58f9bc Remove unused variable and check if the widget is a GtkWidget subclass,
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c (gtk_widget_get_allocation): Remove unused variable
    and check if the widget is a GtkWidget subclass, not the uninitialized
    allocation.


svn path=/trunk/; revision=20644
2008-06-20 14:19:22 +00:00
Johan Dahlin
e46eeab2a9 Add missing Since: gtk-doc markup for newly added GSEAL API. Change all
2008-06-20  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkaccelgroup.c:
    * gtk/gtkcolorseldialog.c:
    * gtk/gtkcontainer.c:
    * gtk/gtkdialog.c:
    * gtk/gtkentry.c (gtk_entry_class_init):
    * gtk/gtkfontsel.c:
    * gtk/gtkhandlebox.c:
    * gtk/gtklayout.c:
    * gtk/gtkmenu.c (gtk_menu_class_init):
    * gtk/gtkmenuitem.c (gtk_menu_item_class_init):
    * gtk/gtkplug.c (gtk_plug_class_init):
    * gtk/gtkselection.c:
    * gtk/gtksocket.c:
    * gtk/gtktreeselection.c:
    * gtk/gtkwidget.c (gtk_widget_class_init):
    * gtk/gtkwindow.c:
    Add missing Since: gtk-doc markup for newly added GSEAL API.
    Change all Since: GSEAL-branch to Since: 2.14.


svn path=/trunk/; revision=20639
2008-06-20 13:54:31 +00:00
Tim Janik
bf2323b1de Change docs and signature of gtk_widget_get_allocation
svn path=/trunk/; revision=20625
2008-06-20 11:10:14 +00:00
Tim Janik
886ffbe067 Fix gtk_widget_get_allocation
svn path=/trunk/; revision=20622
2008-06-20 11:09:56 +00:00
Tim Janik
10896d4874 Seal GtkWidget
svn path=/trunk/; revision=20620
2008-06-20 11:09:42 +00:00
Johan Dahlin
7c45f6f5fc Add deprecated versions and fixup markup.
2008-06-17  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c: 
    Add deprecated versions and fixup markup.


svn path=/trunk/; revision=20442
2008-06-18 01:31:22 +00:00
Michael Natterer
ff5ba96c26 gtk/gtkfontsel.c gtk/gtkrc.c gtk/gtkstyle.c use g_object_unref() instead
2008-06-16  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkfontsel.c
	* gtk/gtkrc.c
	* gtk/gtkstyle.c
	* gtk/gtkwidget.c: use g_object_unref() instead of the deprecated
	gtk_rc_style_unref().


svn path=/trunk/; revision=20405
2008-06-16 16:53:39 +00:00
Christian Persch
dcc9428036 Bug 535608 – do not string-copy accel paths in the menu code
Don't store the accel path as a string in gtkmenu/gtkmenuitem.
The accel path will be interned anyway, so keeping a string copy around
is just a waste of memory.
Improve the documentation to mention this.

svn path=/trunk/; revision=20331
2008-06-07 20:40:20 +00:00
Matthias Clasen
3a4ac605a8 Fix Since tags
svn path=/trunk/; revision=20244
2008-05-30 02:46:49 +00:00
10:33:41 Tim Janik
727a7dbf46 guard gtk_widget_get_snapshot() against invalid or invisible widgets.
2008-05-27 10:33:41  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.c: guard gtk_widget_get_snapshot() against
        invalid or invisible widgets.


svn path=/trunk/; revision=20187
2008-05-27 08:35:24 +00:00
Matthias Clasen
e19eee548f Some doc formatting fixes.
svn path=/trunk/; revision=20172
2008-05-26 05:38:20 +00:00
Hans Breuer
0b57c6b98f updated fix c99ism (variable at start of block export functions for window
2008-05-23  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc gtk/makefile.msc.in : updated
	* gtk/gtkwidget.c : fix c99ism (variable at start of block
	* gdk/gdk.symbols gtk/gtk.symbols : export functions for window 
	redirection
	* gtk/gtkfilechooserdefault.c : #include <locale.h> for 
	setlocale(LC_ALL, ...)

svn path=/trunk/; revision=20131
2008-05-23 20:29:27 +00:00
21:10:15 Tim Janik
b3d160ced5 added GdkRectangle *clip_rect to gtk_widget_get_snapshot().
2008-05-21 21:10:15  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.h: added GdkRectangle *clip_rect to gtk_widget_get_snapshot().

        * gtk/gtkwidget.c: clip the returned snapshot pixmap to clip_rect.
        return snapshot pixmap coordinates widget relative in *clip_rect.

        * tests/testgtk.c: fixed bogus NULL pointer unref.


svn path=/trunk/; revision=20124
2008-05-21 19:15:12 +00:00
21:04:28 Tim Janik
aa4ab3f037 grow snapshot area from widget's allocation to cover extra widget windows
2008-05-21 21:04:28  Tim Janik  <timj@imendio.com>

        * gtk/gtkwidget.c gtk_widget_get_snapshot(): grow snapshot area from
        widget's allocation to cover extra widget windows placed outside the
        widget allocation (spinbutton arrows are the prime example for this).


svn path=/trunk/; revision=20123
2008-05-21 19:07:40 +00:00
10:49:20 Tim Janik
4111cf2065 Bug 318807 – Offscreen windows and window redirection.
2008-03-18 10:49:20  Tim Janik  <timj@imendio.com>

	* Applied pixmap redirection patch by Alexander Larsson with
	various updates from:
	Bug 318807 – Offscreen windows and window redirection.


	Updates:

	* updated docs to mention "Since 2.16".

	* tests/testgtk.c: fixed snapshooting pixmap leak.
	convert pixmap to pixbuf after snapshooting, to compensate for different
	bit depths (occurs when snapshooting ARGB visuals and displaying the
	pixmap in an RGB visual).

	* gdk/gdkwindow.[hc]: made GdkWindowRedirect private.

	* gdk/gdkwindow.c: removed damage idle handler, there's no aparent
	need for it. enqueue damage notification as GDK_DAMAGE events
	for each painting redirection at the start of the event queue.
	consider windows with a redirection fully visible when invalidating,
	and when updating from backing store. cleaned up stale variables.

	* gdk/gdkevents.c: added _gdk_event_queue_prepend().

	* gtk/gtkwidget.c: fixed coordinates for !NO_WINDOW widgets in
	gtk_widget_get_snapshot; this fixes garbage snap offsets for gammacurve,
	tree, drawingarea, text, handlebox, etc.
	clip the redirected window hierarchy to window sizes, the visible
	rectangles don't need to be taken into account here.
	extended snapshooting docs to recommend gdk_pixbuf_get_from_drawable()
	in case pixmap visuals could mismatch.

	* gdk/x11/gdkwindow-x11.c: removed _gdk_windowing_window_get_visible_rect().


	Base patch:

	* tests/testgtk.c: add a "Snapshot" test to demonstrate snapshooting
	of possibly obscured widgets into an offscreen pixmap.

	* gtk/gtkwidget.[hc]: add GtkWidget::damage-event signal, add
	gtk_widget_get_snapshot() to render a widget's contents to a GdkPixmap.

	* gtk/gtkmain.c: dispatch GDK_DAMAGE events.

	* gdk/gdkwindow.c: moved outer gdk_window_new() and gdk_window_reparent()
	implementations here, adapted them to propagate redirects to child windows.
	gdk_window_end_paint(): copy repainted window contents to redirection pixmap,
	clipped to visible region. queue GDK_DAMAGE event delivery.
	gdk_window_redirect_to_drawable(): install window painting redirection.
	gdk_window_remove_redirection(): remove previously installed redirection.

	* gdk/x11/gdkwindow-x11.c: added _gdk_windowing_window_get_visible_rect(),
	renamed _gdk_window_new() and _gdk_window_reparent().

	* gdk/gdkwindow.h: added GdkWindowRedirect* to GdkWindowObject, export
	gdk_window_redirect_to_drawable() and gdk_window_remove_redirection().

	* gdk/gdkevents.h: added GDK_DAMAGE event type.

	* gdk/gdkevents.c: extract time and state from GDK_DAMAGE events.

	* gdk/gdkinternals.h: added internal prototypes.



svn path=/trunk/; revision=20122
2008-05-21 19:04:24 +00:00
Tristan Van Berkom
e6ffa4f5de Clarified a g_warning message regarding parsing accelerators from builder
* gtk/gtkwidget.c: Clarified a g_warning message regarding
	parsing accelerators from builder files.


svn path=/trunk/; revision=19978
2008-04-06 03:10:23 +00:00
Matthias Clasen
f51751d2d8 Use g_value_set_static_string() where appropriate. (#515042, Christian
2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkprinter.c:
        * gtk/gtkwidget.c: Use g_value_set_static_string() where
        appropriate.  (#515042, Christian Persch)


svn path=/trunk/; revision=19527
2008-02-12 15:41:30 +00:00
Johan Dahlin
fddc9b8561 Implement accessible support, fixes #454653.
2008-01-25  Johan Dahlin  <johan@gnome.org>

        * gtk/gtkwidget.c: (gtk_widget_buildable_interface_init),
        (gtk_widget_buildable_get_internal_child), (free_action),
        (free_relation), (gtk_widget_buildable_parser_finished),
        (accessibility_start_element),
        (gtk_widget_buildable_custom_tag_start),
        (gtk_widget_buildable_custom_finished):
        Implement accessible support, fixes #454653.

        * gtk/gtk-builder-convert:
        Add support for migrating old glade files
        
        * tests/buildertest.c: (test_widget), (test_file):
        Add accessible tests and improve the test_file function to display
        toplevels and run dialogs.


svn path=/trunk/; revision=19403
2008-01-25 16:17:38 +00:00
Michael Natterer
a362eecc4a gtk/gtkbutton.h gtk/gtkcellrenderer.h gtk/gtkimcontext.h gtk/gtkstyle.h
2008-01-25  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkbutton.h
	* gtk/gtkcellrenderer.h
	* gtk/gtkimcontext.h
	* gtk/gtkstyle.h
	* gtk/gtktoolbar.h
	* gtk/gtktooltip.h
	* gtk/gtktreeprivate.h
	* gtk/gtktreeviewcolumn.h
	* gtk/gtkwidget.h: add const to constant structs which are passed
	into GTK+. Also add some forgotten const for const strings.

	* gtk/gtkbutton.c
	* gtk/gtkcellrenderer.c
	* gtk/gtkimcontext.c
	* gtk/gtkstyle.c
	* gtk/gtktoolbar.c
	* gtk/gtktooltip.c
	* gtk/gtktreeview.c
	* gtk/gtktreeviewcolumn.c
	* gtk/gtkwidget.c: changed accordingly.


svn path=/trunk/; revision=19399
2008-01-25 09:30:40 +00:00
Christian Persch
7265ed4fc8 Store the event mask and extension event mode directly in the gobject data
* gtk/gtkwidget.c: Store the event mask and extension event mode
	directly in the gobject data pointer, instead of in an allocated
	gint. Bug #506604.

svn path=/trunk/; revision=19381
2008-01-16 19:14:49 +00:00
Johan Dahlin
71e9be7e6d Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently. Fixes #5075
2008-01-06  Johan Dahlin  <johan@gnome.org>

	* gtk/gtkcellrenderercombo.c:
	(gtk_cell_renderer_combo_get_property),
	(gtk_cell_renderer_combo_set_property):
	* gtk/gtkcombobox.c: (gtk_combo_box_set_property):
	* gtk/gtkcomboboxentry.c: (gtk_combo_box_entry_set_property):
	* gtk/gtknotebook.c: (gtk_notebook_set_property):
	* gtk/gtkspinbutton.c: (gtk_spin_button_set_property):
	* gtk/gtktextbuffer.c: (gtk_text_buffer_set_property),
	(gtk_text_buffer_get_property):
	* gtk/gtktextview.c: (gtk_text_view_set_property):
	* gtk/gtktogglebutton.c: (gtk_toggle_button_set_property):
	* gtk/gtktoolbutton.c: (gtk_tool_button_set_property),
	(gtk_tool_button_get_property):
	* gtk/gtktoolitem.c: (gtk_tool_item_set_property),
	(gtk_tool_item_get_property):
	* gtk/gtktreeview.c: (gtk_tree_view_set_property):
	* gtk/gtkwidget.c: (gtk_widget_set_property):
	* gtk/gtkwindow.c: (gtk_window_set_property):
	Use G_OBJECT_WARN_INVALID_PROPERTY_ID consistently.
	Fixes #5075

svn path=/trunk/; revision=19311
2008-01-06 03:28:40 +00:00
Mathias Hasselmann
26124bb10b Avoid some compiler warnings (#507000).
* gtk/gtkbuilder.c, gtk/gtkbuilderprivate.h: Use proper sign
for value argument of _gtk_builder_flags_from_string.
* gtk/gtkwidget.c: Don't alias the child pointer passed
to gdk_window_get_user_data.

svn path=/trunk/; revision=19306
2008-01-05 08:33:53 +00:00
Ray Strode
8609315d28 Suggest g_signal_connect (..., "realize", ...) instead of
2007-12-14  Ray Strode  <rstrode@redhat.com>

	* gtk/gtkwidget.c: Suggest g_signal_connect (..., "realize", ...)
	instead of g_signal_connect_after (..., "realize", ...) as an
	alternative to gtk_widget_realize () (bug 503537).

svn path=/trunk/; revision=19181
2007-12-14 17:06:08 +00:00
Mathias Hasselmann
dce782750f Mention impact of GtkDestDefaults on "drag-motion" handlers. Clearify
* gtk/gtkdnd.c, gtk/gtkwidget.c: Mention impact of GtkDestDefaults
on "drag-motion" handlers. Clearify documentation for
gtk_drag_dest_set.

svn path=/trunk/; revision=19159
2007-12-11 18:56:56 +00:00
Matthias Clasen
4896e24bb1 Require gtk-doc 1.8
2007-11-25  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.8

        * */*.c: Use gtk-doc abbreviations for examples in docs.


svn path=/trunk/; revision=19041
2007-11-25 06:51:19 +00:00
Michael Natterer
f93e2db2a9 fixed docs.
2007-11-06  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_keynav_failed): fixed docs.


svn path=/trunk/; revision=18968
2007-11-06 08:57:33 +00:00
Cody Russell
46bbf4ebd8 gtk/gtkwidget.c gtk/gtkscrolledwindow.c Correct documentation that refers
2007-08-14  Cody Russell  <bratsche@gnome.org>

        * gtk/gtkwidget.c
        * gtk/gtkscrolledwindow.c
        * gtk/gtklabel.c: Correct documentation that refers to the
        deprecated gtk_widget_set_usize() API.  Refer instead to
        gtk_widget_set_size_request().  (#459340, Guillaume Cottenceau)


svn path=/trunk/; revision=18613
2007-08-14 22:44:11 +00:00
Ryan Lortie
f0cfba930c add note that the semantics of this call, when mixed with the new
2007-07-20  Ryan Lortie  <desrt@desrt.ca>

        * gtk/gtkwidget.c (gtk_widget_is_composited): add note that the
        semantics of this call, when mixed with the new
        gdk_window_set_composited(), will change in the future.

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): only grab Damage
        events that belong to us.


svn path=/trunk/; revision=18506
2007-07-19 23:50:39 +00:00
Matthias Clasen
1fe3fa46ea Apply a patch by Xan Lopez to document a lot of GtkWidget signals.
2007-07-16  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkwidget.c: Apply a patch by Xan Lopez to document
        a lot of GtkWidget signals.  (#172424)


svn path=/trunk/; revision=18474
2007-07-16 14:40:37 +00:00
Kristian Rietveld
15dee8e529 add getter/setter pair, slight addition to has-tooltip property
2007-07-10  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtk.symbols:
	* gtk/gtkwidget.[ch] (gtk_widget_{get,set}_has_tooltip): add
	getter/setter pair, slight addition to has-tooltip property
	documentation,
	(gtk_widget_real_set_has_tooltip): renamed internal function.


svn path=/trunk/; revision=18439
2007-07-10 18:24:37 +00:00
Kristian Rietveld
c255676e25 Replace non-deprecated API using old tooltips API, deprecate old tooltips
2007-07-09  Kristian Rietveld  <kris@imendio.com>

	Replace non-deprecated API using old tooltips API, deprecate
	old tooltips API for real. (#451575).

	* gtk/gtk.symbols: updated.

	* gtk/gtkwidget.c (gtk_widget_real_show_help): don't call
	_gtk_tooltips_toggle_keyboard_mode() anymore.

	* gtk/gtkmenutoolbutton.[ch] (gtk_menu_tool_button_set_arrow_tooltip):
	deprecated,
	(gtk_menu_tool_button_set_arrow_tooltip_{text,markup}): replacements.

	* gtk/gtktoolitem.[ch] (gtk_tool_item_real_set_tooltip): use
	new API,
	(gtk_tool_item_set_tooltip): deprecated,
	(gtk_tool_item_set_tooltip_{text,markup): replacements.
	(GtkToolItemClass:set_tooltip): deprecated.

	* gtk/gtktooltips.[ch]: strip out all unused parts, made
	gtk_tooltips_set_tip() call gtk_widget_set_tooltip_text(),
	deprecate all of gtk_tooltips_*.

	* gtk/gtktoolbar.[ch] (gtk_toolbar_get_tooltips): always return
	TRUE,
	(GtkToolbar:tooltips): deprecated, renamed.

	* gtk/gtkaction.c (gtk_action_sync_tooltip): use new API to
	set the tooltip text.

	* tests/autotestfilechooser.c: #undef GTK_DISABLE_DEPRECATED for now,
	will be removed GtkFileChooserDefault has been converted.


svn path=/trunk/; revision=18418
2007-07-09 19:23:18 +00:00
Matthias Clasen
6942fa3981 Fix a typo and a memory management bug
svn path=/trunk/; revision=18400
2007-07-08 03:59:30 +00:00
Johan Dahlin
0aeff7f47b Parse <accessibility> but don't do anything yet. Do not strip
2007-07-08  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkwidget.c (gtk_widget_buildable_custom_tag_start): 
    Parse <accessibility> but don't do anything yet.
    * gtk/gtk-builder-convert (GtkBuilderConverter._parse): 
    Do not strip atk/accessibility tags
    * tests/buildertest.c (test_widget): 
    Test this


svn path=/trunk/; revision=18399
2007-07-08 03:22:18 +00:00
Tristan Van Berkom
12bdfb430e Fixed assertions from setting "tooltip-text" to NULL (bug 452425)
* gtk/gtkwidget.c: Fixed assertions from setting "tooltip-text" to NULL
	(bug 452425)


svn path=/trunk/; revision=18353
2007-07-03 15:39:59 +00:00
Johan Dahlin
aaab9c05a5 Improve error handling for enum/flags, rename the converter functions to
2007-06-30  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkbuilder.c:
    * gtk/gtkbuilder.h:
    * gtk/gtkbuilderparser.c:
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkwidget.c: 
    * tests/buildertest.c:

    Improve error handling for enum/flags, rename the converter functions
    to be consistent. Add tests. Fixes #452465


svn path=/trunk/; revision=18312
2007-06-30 18:27:39 +00:00
Johan Dahlin
60a409785f Rename buildable methods to not clash with widget methods. (#448928,
2007-06-19  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/*: Rename buildable methods to not clash with widget 
    methods. (#448928, Torsten Schoenfeld)


svn path=/trunk/; revision=18187
2007-06-19 12:23:36 +00:00
Mathias Hasselmann
a34dfc3c5c Forgot to free the unescaped tooltip text.
2007-06-15  Mathias Hasselmann  <mathias.hasselmann@gmx.de>

	* gtk/gtkwidget.c: Forgot to free the unescaped tooltip text.

svn path=/trunk/; revision=18144
2007-06-15 18:34:21 +00:00
Mathias Hasselmann
ced0bab02f Improving handling of tooltip-text property. Also check result of tooltip
2007-06-15 Mathias Hasselmann <mathias.hasselmann@gmx.de>

	* gtk/gtkwidget.c: Improving handling of tooltip-text property.
	* tests/testtooltips.c: Also check result of tooltip getters.

svn path=/trunk/; revision=18143
2007-06-15 18:25:11 +00:00
Mathias Hasselmann
9b604e29a2 Introduce convenience property "GtkWidget:tooltip-text" taking care of
2007-06-15 Mathias Hasselmann <mathias.hasselmann@gmx.de>

        * docs/reference/gtk/gtk-sections.txt, gtk/gtk.symbols,
        gtk/gtkwidget.c, gtk/gtkwidget.h, tests/testtooltips.c: Introduce
        convenience property "GtkWidget:tooltip-text" taking care of escaping
        it for unwanted markup entities. Add functions to set tooltip text:
        gtk_widget_set_tooltip_text(), gtk_widget_set_tooltip_markup(),
        gtk_widget_get_tooltip_text(), gtk_widget_get_tooltip_markup().

        * gtk/gtktooltip.c, gtk/gtktooltip.h: Add gtk_tooltip_set_text()
        to set the tooltip text without using markup.

        Patches from Emmanuele Bassi (#447643).

svn path=/trunk/; revision=18142
2007-06-15 18:24:55 +00:00
Johan Dahlin
4d638bf0c1 Add GtkBuilder, fixes #172535
2007-06-15  Johan Dahlin  <jdahlin@async.com.br>

    * demos/gtk-demo/Makefile.am:
    * demos/gtk-demo/builder.c: (quit_activate), (about_activate),
    (do_builder):
    * demos/gtk-demo/demo.ui:
    * docs/reference/gtk/gtk-docs.sgml:
    * docs/reference/gtk/gtk-sections.txt:
    * docs/reference/gtk/gtk.types:
    * docs/reference/gtk/tmpl/gtkbuildable.sgml:
    * docs/reference/gtk/tmpl/gtkbuilder.sgml:
    * gtk/Makefile.am:
    * gtk/gtk.h:
    * gtk/gtk.symbols:
    * gtk/gtkaction.c: (gtk_action_buildable_init),
    (gtk_action_buildable_set_name), (gtk_action_buildable_get_name):
    * gtk/gtkactiongroup.c: (gtk_action_group_get_type),
    (gtk_action_group_buildable_init),
    (gtk_action_group_buildable_add),
    (gtk_action_group_buildable_set_name),
    (gtk_action_group_buildable_get_name):
    * gtk/gtkbuildable.c: (gtk_buildable_get_type),
    (gtk_buildable_set_name), (gtk_buildable_get_name),
    (gtk_buildable_add), (gtk_buildable_set_property),
    (gtk_buildable_parser_finished), (gtk_buildable_construct_child),
    (gtk_buildable_custom_tag_start), (gtk_buildable_custom_tag_end),
    (gtk_buildable_custom_finished),
    (gtk_buildable_get_internal_child):
    * gtk/gtkbuildable.h:
    * gtk/gtkbuilder.c: (gtk_builder_class_init), (gtk_builder_init),
    (gtk_builder_finalize), (gtk_builder_set_property),
    (gtk_builder_get_property), (_gtk_builder_resolve_type_lazily),
    (gtk_builder_real_get_type_from_name),
    (gtk_builder_get_parameters), (gtk_builder_get_internal_child),
    (_gtk_builder_construct), (_gtk_builder_add),
    (apply_delayed_properties), (_gtk_builder_finish),
    (gtk_builder_new), (gtk_builder_add_from_file),
    (gtk_builder_add_from_string), (gtk_builder_get_object),
    (object_add_to_list), (gtk_builder_get_objects),
    (gtk_builder_set_translation_domain),
    (gtk_builder_get_translation_domain),
    (gtk_builder_connect_signals_default),
    (gtk_builder_connect_signals), (gtk_builder_connect_signals_full),
    (gtk_builder_value_from_string),
    (gtk_builder_value_from_string_type),
    (_gtk_builder_enum_from_string), (_gtk_builder_flags_from_string),
    (gtk_builder_get_type_from_name), (gtk_builder_error_quark):
    * gtk/gtkbuilder.h:
    * gtk/gtkbuilderparser.c: (state_push), (state_peek), (state_pop),
    (error_missing_attribute), (error_invalid_attribute),
    (error_invalid_tag), (builder_construct), (parse_object),
    (free_object_info), (_get_type_by_symbol), (parse_child),
    (free_child_info), (parse_property), (free_property_info),
    (parse_signal), (_free_signal_info), (parse_interface),
    (create_subparser), (free_subparser), (subparser_start),
    (subparser_end), (parse_custom), (start_element), (end_element),
    (text), (_gtk_builder_parser_parse_buffer):
    * gtk/gtkbuilderprivate.h:
    * gtk/gtkcelllayout.c: (attributes_start_element),
    (attributes_text_element),
    (_gtk_cell_layout_buildable_custom_tag_start),
    (_gtk_cell_layout_buildable_custom_tag_end),
    (_gtk_cell_layout_buildable_add):
    * gtk/gtkcelllayout.h:
    * gtk/gtkcellview.c: (gtk_cell_view_buildable_init),
    (gtk_cell_view_buildable_custom_tag_start),
    (gtk_cell_view_buildable_custom_tag_end):
    * gtk/gtkcolorseldialog.c:
    (gtk_color_selection_dialog_buildable_interface_init),
    (gtk_color_selection_dialog_buildable_get_internal_child):
    * gtk/gtkcombobox.c: (gtk_combo_box_buildable_init),
    (gtk_combo_box_buildable_custom_tag_start),
    (gtk_combo_box_buildable_custom_tag_end):
    * gtk/gtkcomboboxentry.c:
    (gtk_combo_box_entry_buildable_interface_init),
    (gtk_combo_box_entry_buildable_get_internal_child):
    * gtk/gtkcontainer.c: (gtk_container_get_type),
    (gtk_container_buildable_init), (gtk_container_buildable_add),
    (gtk_container_buildable_set_child_property),
    (attributes_start_element), (attributes_text_element),
    (gtk_container_buildable_custom_tag_start),
    (gtk_container_buildable_custom_tag_end):
    * gtk/gtkdebug.h:
    * gtk/gtkdialog.c: (gtk_dialog_buildable_interface_init),
    (gtk_dialog_buildable_get_internal_child),
    (attributes_start_element), (attributes_text_element),
    (gtk_dialog_buildable_custom_tag_start),
    (gtk_dialog_buildable_custom_finished):
    * gtk/gtkentrycompletion.c: (gtk_entry_completion_buildable_init):
    * gtk/gtkexpander.c: (gtk_expander_buildable_add),
    (gtk_expander_buildable_init):
    * gtk/gtkfontsel.c:
    (gtk_font_selection_dialog_buildable_interface_init),
    (gtk_font_selection_dialog_buildable_get_internal_child):
    * gtk/gtkframe.c: (gtk_frame_buildable_init),
    (gtk_frame_buildable_add):
    * gtk/gtkiconview.c: (gtk_icon_view_buildable_init),
    (gtk_icon_view_buildable_custom_tag_start),
    (gtk_icon_view_buildable_custom_tag_end):
    * gtk/gtkliststore.c: (gtk_list_store_buildable_init),
    (list_store_start_element), (list_store_end_element),
    (list_store_text), (gtk_list_store_buildable_custom_tag_start),
    (gtk_list_store_buildable_custom_tag_end):
    * gtk/gtkmain.c:
    * gtk/gtknotebook.c: (gtk_notebook_buildable_init),
    (gtk_notebook_buildable_add):
    * gtk/gtksizegroup.c: (gtk_size_group_buildable_init),
    (size_group_start_element),
    (gtk_size_group_buildable_custom_tag_start),
    (gtk_size_group_buildable_custom_finished):
    * gtk/gtktreestore.c: (gtk_tree_store_buildable_init),
    (tree_model_start_element),
    (gtk_tree_store_buildable_custom_tag_start),
    (gtk_tree_store_buildable_custom_finished):
    * gtk/gtktreeview.c: (gtk_tree_view_buildable_init),
    (gtk_tree_view_buildable_add):
    * gtk/gtktreeviewcolumn.c: (gtk_tree_view_column_buildable_init):
    * gtk/gtkuimanager.c: (gtk_ui_manager_buildable_init),
    (gtk_ui_manager_buildable_add),
    (gtk_ui_manager_buildable_construct_child),
    (gtk_ui_manager_buildable_custom_tag_start),
    (gtk_ui_manager_buildable_custom_tag_end):
    * gtk/gtkwidget.c: (gtk_widget_get_type),
    (gtk_widget_buildable_interface_init),
    (gtk_widget_buildable_set_name), (gtk_widget_buildable_get_name),
    (gtk_widget_buildable_set_property),
    (gtk_widget_buildable_parser_finshed), (accel_group_start_element),
    (gtk_widget_buildable_custom_tag_start),
    (gtk_widget_buildable_custom_finshed):
    * gtk/gtkwindow.c: (gtk_window_buildable_interface_init),
    (gtk_window_buildable_set_property),
    (gtk_window_buildable_parser_finished):
    * tests/Makefile.am:
    * tests/buildertest.c: (builder_new_from_string), (test_parser),
    (signal_normal), (signal_after), (signal_object),
    (signal_object_after), (signal_first), (signal_second),
    (signal_extra), (signal_extra2), (test_connect_signals),
    (test_uimanager_simple), (test_domain), (test_translation),
    (test_sizegroup), (test_list_store), (test_tree_store),
    (test_types), (test_spin_button), (test_notebook),
    (test_construct_only_property), (test_children),
    (test_child_properties), (test_treeview_column), (test_icon_view),
    (test_combo_box), (test_combo_box_entry), (test_cell_view),
    (test_dialog), (test_accelerators), (test_widget), (main):

    Add GtkBuilder, fixes #172535


svn path=/trunk/; revision=18141
2007-06-15 17:53:46 +00:00
Matthias Clasen
cf8205eeef Improve docs
svn path=/trunk/; revision=18128
2007-06-14 04:03:58 +00:00
Cody Russell
5c48e783d4 Fix inconsistency in GTK_WIDGET_SAVED_STATE (#435840, Xan Lopez)
2007-06-13  Cody Russell  <bratsche@gnome.org>

       * gtk/gtkwidget.c: Fix inconsistency in GTK_WIDGET_SAVED_STATE
       (#435840, Xan Lopez)



svn path=/trunk/; revision=18122
2007-06-13 14:17:53 +00:00
Matthias Clasen
08cc834061 Update docs Deprecate gtk_widget_{ref,unref}
2007-06-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c:
        * gtk/gtkscrolledwindow.c: Update docs
        * gtk/gtkwidget.h: Deprecate gtk_widget_{ref,unref}

        * gtk/tmpl/gtkbindings.sgml:
        * gtk/tmpl/gtkrc.sgml:
        * gtk/tmpl/gtkwidget.sgml:
        * gtk/tmpl/gtkrecentmanager.sgml:
        * gtk/*.sgml:
        * gtk/tmpl/gtkstock.sgml:
        * gtk/gtk-sections.txt: Updates



svn path=/trunk/; revision=18090
2007-06-10 06:52:51 +00:00
Yevgen Muntyan
2cbaeadf43 new method, gtk_widget_modify_cursor() (#89314).
2007-06-06  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkwidget.c:
	* gtk/gtkwidget.h: new method, gtk_widget_modify_cursor() (#89314).

	* gtkrc.c:
	* gtkrc.h: new functions _gtk_rc_style_set_rc_property() and
	_gtk_rc_style_unset_rc_property().

	* gtk/gtk.symbols: added gtk_widget_modify_cursor.

	* tests/testtext.c (do_cursor_visible_changed):
	* tests/testgtk.c (create_styles): test it.


svn path=/trunk/; revision=18066
2007-06-06 19:43:31 +00:00
Michael Natterer
e631aef881 Move "move-focus" signals from several widgets to GtkWidget to enable more
2007-06-04  Michael Natterer  <mitch@imendio.com>

	Move "move-focus" signals from several widgets to GtkWidget to
	enable more flexible costomization of keyboard navigation via
	bindings. Fixes bug #414947.

	* gtk/gtkwidget.c: add "move-focus" binding signal, default to
	calling the toplevel GtkWindow's "move-focus" vfunc.

	* gtk/gtktextview.[ch]
	* gtk/gtkwindow.[ch]: remove "move-focus" signals and add compat
	code that makes sure that both emitting the signal on the widget
	and overriding the virtual functions keeps working as before.

	* gtk/gtktoolbar.c: remove "move-focus" signal here too and use
	GtkWidget's signal. This change slightly changes keyboard
	navigation in toolbars. I'll fix the behavior if somebody can
	explain me if and how exactly the new behavior is broken.


svn path=/trunk/; revision=18025
2007-06-04 15:00:22 +00:00
Carlos Garnacho
500e7c9375 Add back variable declaration removed in r17958.
2007-05-28  Carlos Garnacho  <carlos@imendio.com>

        * gtk/gtkwidget.c (gtk_widget_propagate_hierarchy_changed_recurse):
        Add back variable declaration removed in r17958.


svn path=/trunk/; revision=17964
2007-05-28 13:34:39 +00:00
Matthias Clasen
e95f511143 Document some more signals
svn path=/trunk/; revision=17958
2007-05-28 06:46:33 +00:00
Matthias Clasen
b80b526080 Require gtk-doc 1.6, for signal and property links.
2007-05-26  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Require gtk-doc 1.6, for signal and property links.
        * gtk/gtkbox.c:
        * gtk/gtkbutton.c:
        * gtk/gtkcontainer.c:
        * gtk/gtkdialog.c:
        * gtk/gtkentry.c:
        * gtk/gtkimage.c:
        * gtk/gtklabel.c:
        * gtk/gtkmisc.c:
        * gtk/gtksettings.c:
        * gtk/gtkwidget.c: Documentation improvements, link signals
        and properties where it makes sense.

svn path=/trunk/; revision=17924
2007-05-26 06:59:36 +00:00
Kristian Rietveld
5e59105ea3 translate coordinates from the window they were received on to the event
2007-05-23  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_widget_under_pointer): translate coordinates
	from the window they were received on to the event widget's window;
	correct for no-window widgets after that, bail out on failure.  This
	makes the coordinates given by GtkWidget::query-tooltip truly relative
	to widget->window.  (#435188).

	* gtk/gtkwidget.c (gtk_widget_class_init): update docs for
	GtkWidget::query-tooltip.


svn path=/trunk/; revision=17896
2007-05-23 12:32:42 +00:00
Kristian Rietveld
1e2e601e5c don't unref tooltip_window, since this is handled by set_qdata_full()
2007-03-28  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_set_tooltip_window): don't unref
	tooltip_window, since this is handled by set_qdata_full() already.
	(#412001, Torsten Schoenfeld).


svn path=/trunk/; revision=17566
2007-03-28 10:00:31 +00:00
Xan Lopez
74ca458b9a Fix documentation error in gtk_widget_set_redraw_on_allocate.
* gtk/gtkwidget.c: Fix documentation error in
gtk_widget_set_redraw_on_allocate.

svn path=/trunk/; revision=17533
2007-03-16 16:05:56 +00:00
Michael Natterer
d953ce8775 Make gtk_widget_set_extension_events() work on already realized widgets
2007-03-14  Michael Natterer  <mitch@imendio.com>

	Make gtk_widget_set_extension_events() work on already realized
	widgets (bug #379550, Tommi Komulainen)

	* gdk/x11/gdkinput.c (gdk_input_set_extension_events): allow to be
	called multiple times without leaking and work correctly when
	already realized (don't rely on a configure event following).

	* gtk/gtkwidget.c (gtk_widget_set_extension_events_internal): new
	internal function which walks the GdkWindow tree and sets the
	extension events on all windows that belong to the widget.

	(gtk_widget_realize)
	(gtk_widget_set_extension_events): use the new function.


svn path=/trunk/; revision=17515
2007-03-14 13:55:12 +00:00
Matthias Clasen
82ce59cd0f Remove unnecessary NULL checks before g_free(). (#369666, Morten Welinder,
2007-03-09  Matthias Clasen <mclasen@redhat.com>

        * Everywhere: Remove unnecessary NULL checks before
        g_free().  (#369666, Morten Welinder, Djihed Afifi)

        * configure.in: Check for ftw.h



svn path=/trunk/; revision=17444
2007-03-09 21:57:37 +00:00
Kristian Rietveld
0ef946ed64 New tooltips API.
2007-02-06  Kristian Rietveld  <kris@imendio.com>

	New tooltips API.

	* gtk/Makefile.am
	* gtk/gtk.h
	* gtk/gtk.symbols: build system foo.

	* gtk/gtkmain.c (gtk_main_do_event): call tooltip event handler
	hook for appropriate events.

	* gtk/gtkmarshalers.list: add BOOLEAN:INT,INT,BOOLEAN,OBJECT.

	* gtk/gtkrc.c: add style for gtk-tooltip.

	* gtk/gtksettings.c (gtk_settings_class_init): make the
	different tooltip timeouts configurable.

	* gtk/gtkwidget.[ch]: add new properties, signals, make sure
	tooltips are hidden on unmap, destroy, update window event
	mask on realize, hook into focus change and show help
	handlers.

	* gtk/gtkwindow.h: move GtkWindow typdef to gtkwidget.h ...

	* gtk/gtktooltip.[ch]: new files.

	* tests/Makefile.am
	* tests/testtooltips.c: add test application.


svn path=/trunk/; revision=17264
2007-02-06 10:25:21 +00:00
Michael Natterer
7446ae9fd7 revert generic disabling of PRELIGHT state for the reasons given in bug
2007-01-24  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkwidget.c (gtk_widget_set_state): revert generic disabling
	of PRELIGHT state for the reasons given in bug #135666. Widget
	states are sometimes abused or otherwise used wrongly for historic
	reasons, causing this part of the patch to break e.g. menu items.


svn path=/trunk/; revision=17211
2007-01-24 16:10:40 +00:00
Carlos Garnacho
d42bbb6466 Make GtkNotebook able to drop detached tabs anywhere. Bug #360225.
2006-12-28  Carlos Garnacho  <carlosg@gnome.org>

        Make GtkNotebook able to drop detached tabs anywhere. Bug #360225.

        * gtk/gtkwidget.c (gtk_widget_class_init): add "drag-failed" signal.
        * gtk/gtkmarshalers.list: add new marshaler definition.
        * gtk/gtkenums.h: add GtkDragResult enum.

        * gtk/gtkdnd.c (gtk_drag_drop_finished): emit "drag-failed" if DND
        operation wasn't successful.
        (_gtk_drag_source_handle_event) (gtk_drag_drop)
        (gtk_drag_selection_get) (gtk_drag_cancel) (gtk_drag_key_cb)
        (gtk_drag_grab_broken_event_cb) (gtk_drag_grab_notify_cb)
        (gtk_drag_button_release_cb) (gtk_drag_abort_timeout): tell
        gtk_drag_drop_finished() the operation result.

        * gtk/gtknotebook.c (gtk_notebook_drag_failed): new function.
        (gtk_notebook_drag_data_get): do not call window creation hook here.
        (gtk_notebook_init): do not set "application/x-rootwindow-drop"
        target, instead connect to "drag-failed".
        (gtk_notebook_draw_focus): fix potential crasher if cur_page is NULL.
2006-12-28 16:38:49 +00:00
Matthias Clasen
6ef83209bd Add a g_return_if_fail. (#362614, Xan Lopez)
2006-12-27  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_show): Add a g_return_if_fail.
        (#362614, Xan Lopez)
2006-12-27 06:45:19 +00:00
Matthias Clasen
33153bec36 Don't leak draw_border. (#387170, Kjartan Maraas)
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkwidget.c (gtk_widget_get_draw_rectangle): Don't
        leak draw_border.  (#387170, Kjartan Maraas)
2006-12-22 06:29:51 +00:00
Michael Natterer
7f374a74ba Add new infrastructure for notifications of failed keyboard navigation and
2006-11-16  Michael Natterer  <mitch@imendio.com>

	Add new infrastructure for notifications of failed keyboard
	navigation and navigation with restricted set of keys.

	The patch handles configurable beeping, navigating the GUI with
	cursor keys only (as in phone environments), and configurable
	wrap-around. Fixes bugs #322640, #70986, #318827, #334726, #334742
	and #309291.

	* gtk/gtksettings.c: added properties gtk-keynav-cursor-only,
	gtk-keynav-wrap-around and gtk-error-bell.

	* gtk/gtkwidget.[ch]: added new signal "keynav-failed" and public
	API to emit it. Added New function gtk_widget_error_bell() which
	looks at the gtk-error-bell setting and calls gdk_window_beep()
	accordingly.

	* gtk/gtk.symbols: add the new widget symbols.

	* gtk/gtkcellrendereraccel.c
	* gtk/gtkimcontextsimple.c
	* gtk/gtkmenu.c
	* gtk/gtknotebook.c: use gtk_widget_error_bell() or look at the
	gtk-error-bell setting instead of calling gdk_display_beep()
	unconditionally.

	* gtk/gtkcombobox.c
	* gtk/gtkentry.c
	* gtk/gtkiconview.c
	* gtk/gtklabel.c
	* gtk/gtkmenushell.c
	* gtk/gtkspinbutton.c
	* gtk/gtktextview.c
	* gtk/gtktreeview.c: call gtk_widget_error_bell() on failed keynav.

	* gtk/gtkentry.c
	* gtk/gtklabel.c
	* gtk/gtkrange.c
	* gtk/gtktextview.c: consult gtk_widget_keynav_failed() on failed
	cursor navigation and leave the widget if it returns FALSE.

	* gtk/gtkmenushell.c
	* gtk/gtknotebook.c: only wrap around if gtk-keynav-wrap-around
	is TRUE.

	* gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide
	whether to to wrap-around, and don't select active items on cursor
	navigation if gtk-keynav-cursor-only is TRUE. Should look at
	gtk-keynav-wrap-around too, will look into that.
2006-11-16 12:56:30 +00:00
Matthias Clasen
07e7719441 Apply a cleanup patch by Kjartan Maraas (#341812)
2006-10-08  Matthias Clasen  <mclasen@redhat.com>

	* Apply a cleanup patch by Kjartan Maraas  (#341812)
2006-10-08 05:07:55 +00:00
Matthias Clasen
0724c7887b Add docs for the parent-set signal. (#353772, Mariano Suárez-Alvarez)
2006-09-09  Matthias Clasen <mclasen@redhat.com>

        * gtk/gtkwidget.c: Add docs for the parent-set signal.
        (#353772, Mariano Suárez-Alvarez)
2006-09-09 05:12:49 +00:00
Matthias Clasen
df29084c1f Fix a typo. (#354035, Mariano Suárez-Alvarez)
2006-09-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkwidget.c (gtk_widget_class_init): Fix a typo.
	(#354035, Mariano Suárez-Alvarez)
2006-09-03 06:08:20 +00:00
Matthias Clasen
465daa910f Replace gtk_rc_style_ref/unref by g_object_ref/unref.
2006-07-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c:
	* gtk/gtkrc.c:
	* gtk/gtkwidget.c: Replace gtk_rc_style_ref/unref by
	g_object_ref/unref.
2006-07-21 14:52:05 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Matthias Clasen
01c092c00c broken pipe 2006-06-22 02:29:37 +00:00
Matthias Clasen
02ed1e9bdb Make GTK+ work as an untrusted X client. (#136571, Ed Catmur)
2006-05-25  Matthias Clasen  <mclasen@redhat.com>

	Make GTK+ work as an untrusted X client. (#136571,
	Ed Catmur)
2006-05-25 05:30:14 +00:00