Commit Graph

36 Commits

Author SHA1 Message Date
Matthias Clasen
45e33fe9c2 Go back to 2.13.0 as version for now, as there was no consensus to do the
2008-02-15  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Go back to 2.13.0 as version for now,
        as there was no consensus to do the jump.

        * many other places: Update Since: tags.



svn path=/trunk/; revision=19586
2008-02-15 23:42:42 +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
Kristian Rietveld
239fd8ace2 use a weak pointer to set last_window to NULL as soon as it's destroyed.
2007-12-17  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_finalize),
	(gtk_tooltip_set_last_window): use a weak pointer to set last_window
	to NULL as soon as it's destroyed.  (#496546, patch from
	Benjamin Berg).


svn path=/trunk/; revision=19189
2007-12-17 15:33:45 +00:00
Matthias Clasen
da057b5675 Close an api gap in tooltips
svn path=/trunk/; revision=19175
2007-12-14 05:00:51 +00:00
Kristian Rietveld
aed59b3ea9 Fix #482841, patch by Karl Tomlinson.
2007-10-08  Kristian Rietveld  <kris@imendio.com>

	Fix #482841, patch by Karl Tomlinson.

	* gtk/gtktooltip.c (gtk_tooltip_display_closed): use g_object_set_data
	instead of g_object_set ...
	(_gtk_tooltip_toggle_keyboard_mode),
	(_gtk_tooltip_handle_event): connect to GdkDisplay::closed after
	creating tooltip.


svn path=/trunk/; revision=18890
2007-10-08 12:39:02 +00:00
Kristian Rietveld
7adde1e4fd update alignment padding after theme changes. (Fixes #467003, patch by
2007-08-21  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_init),
	(gtk_tooltip_window_style_set): update alignment padding after
	theme changes. (Fixes #467003, patch by Benjamin Berg).


svn path=/trunk/; revision=18667
2007-08-21 13:13:42 +00:00
Kristian Rietveld
ef1da5f6c2 always set hide_tooltip to TRUE if we are handling a leave notify event.
2007-08-21  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (_gtk_tooltip_handle_event): always set
	hide_tooltip to TRUE if we are handling a leave notify event. (Fixes
	#468245, reported by Dennis Jacobfeuerborn).


svn path=/trunk/; revision=18666
2007-08-21 11:09:42 +00:00
Kristian Rietveld
f6235caef9 Fix #457642, reported by Christian Persch.
2007-08-21  Kristian Rietveld  <kris@imendio.com>

	Fix #457642, reported by Christian Persch.

	* gtk/gtktooltip.c: added debugging output which can be compiled
	in with a #define, annotated all coordinate translations in the
	source code,
	(find_widget_under_pointer): remove the "no-window correction";
	always convert the coordinates from window relative to allocation
	relative; after recursing through a container, translate the
	coordinates from container allocation relative to child widget
	allocation relative;
	(find_topmost_widget_from_event): now we get allocation relative
	coordinates here we do not have to distinguish no-window and window
	widgets.


svn path=/trunk/; revision=18663
2007-08-21 10:52:43 +00:00
Kristian Rietveld
02eda450ea Disable tooltips in touchscreen mode.
2007-08-07  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (_gtk_tooltip_handle_event): Disable tooltips
	in touchscreen mode.


svn path=/trunk/; revision=18586
2007-08-07 11:28:01 +00:00
Matthias Clasen
b11262594c Make the label wrap, for compatibility with the old tooltips code. This
2007-07-31  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (gtk_tooltip_init): Make the label
        wrap, for compatibility with the old tooltips code. This
        fixes absurdly long tooltips in the color selector.



svn path=/trunk/; revision=18558
2007-07-31 17:38:27 +00:00
Matthias Clasen
ef8bdfb703 Call gtk_tooltip_hide_tooltip() even if the tooltip is not visible yet.
2007-07-25  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (_gtk_tooltip_handle_event): Call
        gtk_tooltip_hide_tooltip() even if the tooltip is not
        visible yet. This fixes annoying dangling tooltips
        on systray icons.


svn path=/trunk/; revision=18544
2007-07-25 17:45:22 +00:00
Matthias Clasen
17aacf414d Protect against recursion via gtk_container_remove(). (#459561, Christian
2007-07-23  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (gtk_tooltip_set_custom): Protect against
        recursion via gtk_container_remove().  (#459561, Christian Persch)
        (gtk_tooltip_window_hide): Simplify.



svn path=/trunk/; revision=18534
2007-07-24 03:54:16 +00:00
Matthias Clasen
c8c42229f1 Don't pop up under the cursor.
2007-07-20  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (gtk_tooltip_position): Don't pop up
        under the cursor.



svn path=/trunk/; revision=18512
2007-07-20 12:13:24 +00:00
Kristian Rietveld
9719e5fb3c handle no-window and regular widgets seperately.
2007-07-19  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event): handle
	no-window and regular widgets seperately.

	* gtk/gtktreeview.c (gkt_tree_view_set_tooltip_cell): rect.x should
	be zero.


svn path=/trunk/; revision=18502
2007-07-19 15:03:18 +00:00
Kristian Rietveld
2a8be448e3 only do the coordinate check if tmp is not NULL.
2007-07-17  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_widget_under_pointer): only do the
	coordinate check if tmp is not NULL.


svn path=/trunk/; revision=18486
2007-07-17 12:39:20 +00:00
Kristian Rietveld
50a0d3b8eb check if the pointer is really over the returned widget, since the
2007-07-16  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event): check
	if the pointer is really over the returned widget, since the
	coordinate check may not always be hit in find_widget_under_pointer().


svn path=/trunk/; revision=18478
2007-07-16 16:39:53 +00:00
Kristian Rietveld
da989212f3 #408327, improve tooltip positioning.
2007-07-13  Kristian Rietveld  <kris@imendio.com>

	#408327, improve tooltip positioning.

	* gtk/gtk.symbols: updated.

	* gtk/gtktooltip.[ch] (gtk_tooltip_position): factor out
	positioning code in here,
	(gtk_tooltip_set_tip_area): new function to set the tooltip
	area,
	(gtk_tooltip_reset), (_gtk_tooltip_handle_event): hide tooltip
	once the pointer leaves the tip area.

	* gtk/gtktreeview.[ch] (gtk_tree_view_set_tooltip_row),
	(gtk_tree_view_set_tooltip_cell): convenience functions to set
	tip area for row/column/cell.

	* tests/testtooltips.c (query_tooltip_tree_view_cb): use
	gtk_tree_view_set_tooltip_row.


svn path=/trunk/; revision=18464
2007-07-13 14:25:21 +00:00
Kristian Rietveld
75d9d02b72 use gtk_container_forall, instead of gtk_container_foreach(). Makes
2007-07-10  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_widget_under_pointer),
	(child_location_foreach): use gtk_container_forall, instead of
	gtk_container_foreach().  Makes tooltips on notebook tabs work. (Fixes
	bug reported by Christian Persch).


svn path=/trunk/; revision=18436
2007-07-10 17:47:10 +00:00
Kristian Rietveld
94cfbbfa15 ignore invisible (!drawable) widgets. (Fixes bug reported by Paolo
2007-07-10  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (child_location_foreach): ignore invisible
	(!drawable) widgets.  (Fixes bug reported by Paolo Borelli).


svn path=/trunk/; revision=18435
2007-07-10 17:40:05 +00:00
Matthias Clasen
d8a25fcdff Fix a typo in the docs. (#453930, Guillaume Cottenceau)
2007-07-09  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtktooltip.c (gtk_tooltip_trigger_tooltip_query):
        Fix a typo in the docs.  (#453930, Guillaume Cottenceau)



svn path=/trunk/; revision=18419
2007-07-09 19:29:51 +00:00
Johan Dahlin
3865f68226 Make the GTK_TOOLTIP and GTK_IS_TOOLTIP macros public.
2007-07-09  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtktooltip.c:
    * gtk/gtktooltip.h: Make the GTK_TOOLTIP and GTK_IS_TOOLTIP macros public.


svn path=/trunk/; revision=18410
2007-07-09 17:24:24 +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
Kristian Rietveld
38b0ef28b0 remove unused call to gtk_widget_size_request(). (Reported by Carlos
2007-06-06  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_paint_window): remove unused
	call to gtk_widget_size_request().  (Reported by Carlos
	Garnacho).


svn path=/trunk/; revision=18052
2007-06-06 12:33:08 +00:00
Kristian Rietveld
97af2e0063 bail out if last_window is not a GdkWindow anymore. (Fixes #434021,
2007-06-06  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_show_tooltip): bail out if
	last_window is not a GdkWindow anymore. (Fixes #434021, several
	reporters).


svn path=/trunk/; revision=18051
2007-06-06 12:28:50 +00:00
Matthias Clasen
4f3e3a617b More doc fixage
svn path=/trunk/; revision=17937
2007-05-26 20:29:26 +00:00
Michael Natterer
5a1a2cf44c apply patch from Bogdan Nicula which fixes a crash on GdkWindows which
2007-05-24  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktooltip.c (find_widget_under_pointer): apply patch from
	Bogdan Nicula which fixes a crash on GdkWindows which have no
	GtkWidget as user_data (bug #440890).


svn path=/trunk/; revision=17906
2007-05-24 15:54:23 +00:00
Matthias Clasen
451b0a7bfd Add some missing symbols.
2007-05-23   Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtk.symbols:
        * gdk/x11/xsettings-common.h:
        * gdk/gdk.symbols: Add some missing symbols.

        * gtk/paper_names_offsets.c:
        * gtk/gen-paper-names.c: Make variables static.

        * gtk/gtktooltip.[hc]:
        * gtk/gtkvolumebutton.c:
        * gtk/gtkscalebutton.c:  Fix up symbol aliasing.

svn path=/trunk/; revision=17899
2007-05-23 17:49:34 +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
8af6804b71 cleanup/refactor some leftover code.
2007-04-25  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event):
	cleanup/refactor some leftover code.


svn path=/trunk/; revision=17628
2007-04-25 07:15:49 +00:00
Kristian Rietveld
e397ed56cc use new gdk_threads API.
2007-04-04  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (tooltip_browse_mode_expired),
	(gtk_tooltip_hide_tooltip), (tooltip_popup_timeout),
	(gtk_tooltip_start_delay): use new gdk_threads API.


svn path=/trunk/; revision=17583
2007-04-04 13:05:42 +00:00
Kristian Rietveld
01a2ea4a33 check return value of gtk_widget_translate_coordinates() so we cannot end
2007-02-14  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (child_location_foreach): check return value
	of gtk_widget_translate_coordinates() so we cannot end up
	using uninitialized x, y values.  (#407863, patch from Carlos
	Garnacho).


svn path=/trunk/; revision=17293
2007-02-14 20:38:02 +00:00
Kristian Rietveld
1cad322c6d stop any pending tooltip timeout. (Fixes #406110, Carlos Garnacho).
2007-02-13  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_hide_tooltip): stop any
	pending tooltip timeout. (Fixes #406110, Carlos Garnacho).


svn path=/trunk/; revision=17290
2007-02-13 12:41:36 +00:00
Tim Janik
caa4d15dab call gdk_event_request_motions() for new motion events after receiving
Tue Feb  6 15:53:59 2007  Tim Janik  <timj@imendio.com>

        * gtk/gtktextview.c (gtk_text_view_motion_event):
        * gtk/gtkspinbutton.c (gtk_spin_button_motion_notify):
        * gtk/gtkaboutdialog.c (credits_motion_notify_event):
        * gtk/gtkhruler.c (gtk_hruler_motion_notify):
        * gtk/gtkvruler.c (gtk_vruler_motion_notify): 
        * gtk/gtkentry.c (gtk_entry_motion_notify):
        * gtk/gtktooltip.c (_gtk_tooltip_handle_event):
        * gtk/gtkhsv.c (gtk_hsv_motion): call gdk_event_request_motions()                              
        for new motion events after receiving motion hints.

        * gdk/gdkevents.[hc]: added gdk_event_request_motions().



svn path=/trunk/; revision=17269
2007-02-06 14:53:35 +00:00
Kristian Rietveld
af7f77d97b remove unused get of has_tooltip.
2007-02-06  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtktooltip.c (find_topmost_widget_coords_from_event):
	remove unused get of has_tooltip.

	* tests/testtooltips.c (query_tooltip_tree_view_cb): use the
	portable g_snprintf instead of snprintf.


svn path=/trunk/; revision=17266
2007-02-06 13:13:19 +00:00
Michael Natterer
3c65aade6f chain up.
2007-02-06  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktooltip.c (gtk_tooltip_finalize): chain up.

	(gtk_tooltip_show_tooltip): move variables and code to local
	scope. Fixes warnings about maybe uninitialized variables.


svn path=/trunk/; revision=17265
2007-02-06 12:11:33 +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