Commit Graph

139 Commits

Author SHA1 Message Date
Matthias Clasen
463aab93dd Various cleanups. (#315360, Kjartan Maraas)
2005-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c: Various cleanups.  (#315360, Kjartan Maraas)
2005-09-13 19:57:42 +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
9b356ea0d8 Add a GrabBroken event to GDK, and a grab-broken-event signal to
2005-06-25  Matthias Clasen  <mclasen@redhat.com>

	Add a GrabBroken event to GDK, and a grab-broken-event
	signal to GtkWidget.  (#107320, Simon Cooke, initial patch
	by John Ehresman)

	* gdk/gdkevents.h: Add a GDK_GRAB_BROKEN event type,
	define a GdkEventGrabBroken event struct.

	* gdk/win32/gdkevents-win32.c (gdk_event_translate):
	Generate GrabBroken events in response to WM_KILLFOCUS.

	* gdk/x11/gdkmain-x11.c: Generate GrabBroken events
	when a grab is broken by the window becoming unviewable,
	or by another grab from the same client.

	* gtk/gtkwidget.h (GtkWidgetClass): Add grab_broken_event.

	* gtk/gtkwidget.c (gtk_widget_event_internal): Translate
	GrabBroken events into grab_broken_event signals.

	* gtk/gtkmain.c (gtk_main_do_event): Propagate GrabBroken
	events.

	* gtk/gtkmenushell.c (gtk_menu_shell_grab_broken): Deactivate
	the menu when the grab is broken.

	* gtk/gtkcolorsel.c (gtk_color_selection_grab_broken): Stop
	the color picker if the grab is broken.

	* gtk/gtkpaned.c (gtk_paned_grab_broken): Stop the drag if
	the grab is broken.
2005-06-25 07:10:40 +00:00
Matthias Clasen
d1f2cb63d9 Use a named cursor with the name "color-picker", when available.
2005-06-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorsel.c (make_picker_cursor): Use a named cursor
	with the name "color-picker", when available.
2005-06-14 17:16:15 +00:00
Owen Taylor
dda40ca71a Use a GtkAlignment rather than a GtkDrawingArea to draw the swatch in to
2005-05-11  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkcolorbutton.c: Use a GtkAlignment rather than a GtkDrawingArea
	to draw the swatch in to avoid having an extraneous window.

	* gtk/gtkcolorsel.c (color_sample_draw_sample): Actually se tthe
	color when !has_opacity.

2005-05-10  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkcairo.[ch] gdk/gdkcolor.[ch] gdk/Makefile.am: Add source
	files for Cairo convenience functionality.

	* gdk/gdkcairo.h (gdk_cairo_rectangle, gdk_cairo_region): Add a
	convenience functions to add GdkRectangle, GdkRegion to a cairo path.

	* gdk/gdkwindow.c gdk/gdkgc.c gtk/gtkcolorsel.c gtk/gtkiconview.c
	gtk/gtkstyle.c: Use gdk_cairo_rectangle/region().

	* gdk/gdkcairo.[ch] gdk/gdkdrawable.h gdk/gdkdraw.c: Rename
	gdk_drawable_create_cairo_context() to gdk_cairo_create().

	* gdk/gdkcairo.c gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c:
	Rename gdk_pixbuf_set_as_cairo_source() to
	gdk_cairo_set_source_pixbuf().

	* gdk/gdkdraw.c gdk/gdkpango.c gtk/gtkcolorsel.c gtk/gtkhruler.c
	gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkstyle.c gtk/gtkvruler.c:
	Adjust for renames.

	* gdk/gdk.symbols: Update.

	* gtk/gtkwidget.c (gtk_widget_queue_shallow_draw): Fix
	coordinate system problem that was causing the wrong portions
	to be invalidated.

	* gtk/gtkcellrenderer.c (gtk_cell_renderer_render)
	gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_render)
	gtk/gtkcellrendererprogress.c (gtk_cell_renderer_progress_render)
	gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render)
	gtk/gtkcellview.c (gtk_cell_view_expose)
	gtk/gtkdnd.c (gtk_drag_highlight_expose)
	gtk/gtkentry.c (gtk_entry_draw_text)
	gtk/gtktextview.c (text_window_invalidate_rect): Some cairoization.

	* gtk/gtkcalendar.[ch]: Beat into something roughly resembling
	GTK+ style ... use instance-private data and standard names for
	private structure, etc. Move function docs inline.

	* gtk/gtkcalendar.[ch]: Switch to drawing everything in
	expose. Switch drawing to Cairo.

	* gtk/gtkcalendar.c (gtk_calendar_freeze): Deprecate
	gtk_calendar_freeze/thaw
2005-05-11 19:16:19 +00:00
Owen Taylor
9725c8d752 gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c Update to
2005-04-18  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c
        * gdk/gdkcolor.c gdk/gdkwindow.c gdk/gdkpixbuf-render.c
        gdk/gdkpango.c tests/testcairo.c: Update to new Cairo API for
        setting color and opacity. (#301066, Vincent Noel)
2005-04-18 15:11:01 +00:00
Matthias Clasen
4c28ce0877 Use canonical names for g_object_notify() as well.
2005-03-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/*.c:
	* gdk/gdkdisplaymanager.c:
	Use canonical names for g_object_notify() as well.
2005-03-26 05:49:15 +00:00
Matthias Clasen
269d89c79c Define macros GTK_PARAM_READABLE, GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE
2005-03-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkprivate.h: Define macros GTK_PARAM_READABLE,
	GTK_PARAM_WRITABLE, GTK_PARAM_READWRITE which are like
	their G_ counterparts, but also mark the name, nick
	and blurb as static.

	* gtk/*.c: Mark param spec strings as static, using
	the new macros.
2005-03-22 02:14:55 +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
Owen Taylor
09d7eafb15 Switch set_cairo_target() virtual function to ref_cairo_surface()
2005-03-15  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkdrawable.h gdk/gdkdraw.c gdk/gdkpixmap.c gdk/gdkwindow.c
	gdk/x11/gdkdrawable-x11.c gdk/x11/gdkpixmap-x11.c gdk/x11/gdkwindow-x11.c
	gdk/gdkinternals.h: Switch set_cairo_target() virtual function to
	ref_cairo_surface()

	* gdk/gdkdrawable.h gdk/gdkdraw.h: Switch set_cairo_target() virtual
	function to create_cairo_context()

	* gdk/gdkwindow.c: Clear double buffer pixmaps with Cairo.

	* gdk/x11/gdkwindow-x11.c: Keep all components in GdkWindowObject.bg_color,
	not just the pixel.

	* tests/testcairo.c: Update for create_cairo_context()

	* gdk/gdkdraw.c (gdk_draw_trapezoids, gdk_draw_glyphs[_transformed]):
	Reimplement in terms of Cairo, bypass the vtable entries.

	* gdk/x11/gdkdrawable-x11.[ch] gdk/x11/gdkdisplay-x11.[ch]
	gdk/x11/gdkgc-x11.c gdk/x11/gdkpango-x11.c
	gdk/x11/gdkprivate-x11.h gdk/x11/Makefile.am: Remove
	implementation of draw_trapezoids / draw_glyphs[_transformed].

	* gdk/gdkpango.c: Switch GdkPangoRenderer to use Cairo

	* gdk/gdkpango.c gdk/x11/gdkpango-x11.c: Move
	gdk_pango_context_get_for_screen() into the backend independent code.

	* gdk/x11/gdkdrawable-x11.[ch]: Remove Xft use, use RENDER directly
	for drawing images.

	* gdk/gdkdrawable.h gdk/x11/gdkdrawable-x11.c: Remove
	gdk_draw_rectangle_alpha_libgtk_only.

	* gdk/gdkpixbuf.h gdk/gdkpixbuf-render.c: Add
	gdk_pixbuf_set_as_cairo_source()

	* gdk/gdk.symbols: Update

	* gtk/gtkcolorsel.c gtk/gtkhsv.c gtk/gtkiconview.c gtk/gtkruler.[ch]
	gtk/gtk[hv]ruler.c: Convert to Cairo rendering.

	* gtk/gtkstyle.c (gtk_default_draw_check, gtk_default_draw_focus,
	gtk_default_draw_option): Switch to Cairo. Simplify the checkbutton,
	radio button style for now to get something more scalable.

	*  gtk/gtksettings.c: #if 0 out the code to use PangoXft for hinting/
	antialiasing/dpi settings.
2005-03-17 01:54:40 +00:00
Matthias Clasen
52711c24e8 More canonical property names. 2005-03-09 06:15:13 +00:00
Matthias Clasen
3f8461b769 Add pointer warping to GDK. (#160437)
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	* gdk/gdkdisplay.h:
	* gdk/x11/gdkwindow-x11.c (gdk_display_warp_pointer):
	* gdk/win32/gdkwindow-win32.c (gdk_display_warp_pointer): Add
	pointer warping to GDK.  (#160437)

	* gtk/gtkcolorsel.c (key_press): Use gdk_display_warp_pointer.
2005-01-18 20:59:31 +00:00
Hans Breuer
67643f6f4b Implement keynav for the color picker - win32 too. Fixes bug #160437.
2004-12-06  Hans Breuer  <hans@breuer.org>

	* gtk/gtkcolorsel.c (key_press): Implement keynav for the color
	picker - win32 too. Fixes bug #160437.
2004-12-05 23:56:37 +00:00
Matthias Clasen
2925aee8be Implement keynav for the color picker (only on X11 currently, since GDK
2004-11-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorsel.c (key_press): Implement keynav for the color
	picker (only on X11 currently, since GDK doesn't support pointer
	warping). Space and Return pick a color, Esc cancels the picking,
	arrow keys move the pointer by single pixels, Alt-arrow combinations
	move the pointer by 20 pixels.  (#135385, Frances Keenan)
2004-11-28 04:38:18 +00:00
Matthias Clasen
3612aee585 Add hidden aliases for exported symbols which are used internally in order
Mon Aug  9 12:48:04 2004  Matthias Clasen  <maclas@gmx.de>

	Add hidden aliases for exported symbols which are
	used internally in order to get rid of many PLT
	entries.  (#145519, Arjan van de Ven)

	* gtk/Makefile.am: Add rules to generate gtk.def and
	from gtk.symbols, and make make check check the abi
	with abicheck.sh.
	(gtk_private_h_sources): Add gtkinternals.h
	(gtk_built_private_headers): Add gtkalias.h
	(gtk_extra_sources): Add gtk.symbols
	(EXTRA_DIST): Add makegtkalias.pl and abicheck.sh

	* gtk/gtk.symbols: New file. Definition of the GTK+ ABI.
	The file can be processed by cpp to filter out certain
	subsets of symbols.

	* gtk/abicheck.sh: New file. Script to check the actually
	symbols exported from libgtk-x11.2.0.so against the symbols
	found in gtk.symbols.

	* gtk/makegtkalias.pl: New file. Perl script to generate the
	header containing the alias definitions for internally used
	exported symbols from a list of symbols.

	* gtk/gtkinternals.h: New file. An uninstalled header listing
	symbols which must be exported for some reason and do not appear
	in any other header.

	* gtk/*.c: Include gtkalias.h
2004-08-09 16:59:53 +00:00
Matthias Clasen
321cedab98 Add a11y relations between the color wheel and the spin buttons. (#132745,
2004-04-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkcolorsel.c: Add a11y relations between the color
	wheel and the spin buttons.  (#132745, Padraig, O'Briain)

	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon): Document
	the meaning of size == -1.

	* gtk/gtkwidget.c (gtk_widget_render_icon): Explicitly accept
	a size of -1.  (#137436, Brian Cameron)
2004-04-14 21:04:29 +00:00
Federico Mena Quintero
80581c3011 Fixes #136082 and #135265, patch by Morten Welinder.
2004-03-05  Federico Mena Quintero  <federico@ximian.com>

	Fixes #136082 and #135265, patch by Morten Welinder.

	* configure.in: Use AC_SYS_LARGEFILE.

	* */*.c: #include <config.h>
2004-03-06 03:38:59 +00:00
Owen Taylor
0d898ffc6a #109594, reported by Olivier Ripoll
Wed Mar  3 16:47:10 2004  Owen Taylor  <otaylor@redhat.com>

         #109594, reported by Olivier Ripoll

        * gtk/gtkentry.c (gtk_entry_size_request): Use max of
        width and digit width for gtk_entry_set_width_chars,
        and round up.

        * gtk/gtkcolorsel.c (gtk_color_selection_init): Set the
        width of the entry to 7 chars.
2004-03-03 22:02:02 +00:00
Federico Mena Quintero
5ebb6b04f2 Fix #105497; constify uses of GdkColor.
2004-01-26  Federico Mena Quintero  <federico@ximian.com>

	Fix #105497; constify uses of GdkColor.

	* gdk/gdkgc.c (gdk_gc_set_rgb_fg_color): Constify.
	(gdk_gc_set_rgb_bg_color): Constify.
	(gdk_gc_set_foreground): Constify.

	* gdk/x11/gdkcursor-x11.c (gdk_cursor_new_from_pixmap): Constify.
	* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Constify.
	* gdk/linux-fb/gdkcursor-fb.c (gdk_cursor_new_from_pixmap): Constify.

	* gdk/x11/gdkpixmap-x11.c (gdk_pixmap_create_from_data): Constify.
	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_create_from_data): Constify.
	* gdk/linux-fb/gdkpixmap-fb.c (gdk_pixmap_create_from_data): Constify.

	* gdk/x11/gdkwindow-x11.c (gdk_window_set_background): Constify.
	* gdk/win32/gdkwindow-win32.c (gdk_window_set_background): Constify.
	* gdk/linux-fb/gdkwindow-fb.c (gdk_window_set_background): Constify.

	* gdk/gdkpango.c (gdk_draw_layout_line_with_colors): Constify.
	(gdk_draw_layout_with_colors): Constify.

	* gdk/gdkpixmap.c (gdk_pixmap_colormap_new_from_pixbuf): Constify.
	(gdk_pixmap_colormap_create_from_xpm): Constify.
	(gdk_pixmap_create_from_xpm): Constify.
	(gdk_pixmap_colormap_create_from_xpm_d): Constify.
	(gdk_pixmap_create_from_xpm_d): Constify.

	* gtk/gtkcellview.c (gtk_cell_view_set_background_color): Constify.

	* gtk/gtkclist.c (gtk_clist_set_foreground): Constify.
	(gtk_clist_set_background): Constify.

	* gtk/gtkcolorbutton.c (gtk_color_button_new_with_color): Constify.
	(gtk_color_button_set_color): Constify.

	* gtk/gtkcolorsel.c (gtk_color_selection_set_current_color):
	Constify and add a check for color != NULL.
	(gtk_color_selection_get_current_color): Add a check for color != NULL.
	(gtk_color_selection_set_previous_color): Constify and add a check
	for color != NULL.
	(gtk_color_selection_get_previous_color): Add a check for color != NULL.

	* gtk/gtkctree.c (gtk_ctree_node_set_foreground): Constify.
	(gtk_ctree_node_set_background): Constify.

	* gtk/gtktext.c (gtk_text_insert): Constify.
	(insert_text_property): Constify.
	(text_properties_equal): Constify.
	(new_text_property): Constify.

	* gtk/gtkwidget.c (gtk_widget_modify_color_component): Constify.
	(gtk_widget_modify_fg): Constify.
	(gtk_widget_modify_bg): Constify.
	(gtk_widget_modify_text): Constify.
	(gtk_widget_modify_base): Constify.
2004-01-26 20:21:09 +00:00
Matthias Clasen
07d4d314b6 The first part of the fix for #114351 (see also gdk-pixbuf/ChangeLog and
Fri Jan 16 23:59:01 2004  Matthias Clasen  <maclas@gmx.de>

	The first part of the fix for #114351 (see also
	gdk-pixbuf/ChangeLog and po/ChangeLog):

	* gtk/gtkintl.h:
	* gdk-pixbuf/gdk-pixbuf-i18n.h:
	* gdk/gdkintl.h: Define P_() for property blurbs and nicks.

	* gdk/gdkdisplaymanager.c:
	* gdk-pixbuf/gdk-pixbuf.c:
	* modules/input/gtkimcontextxim.c:
	* gtk/*.c:  Mark property blurbs and nicks with P_().

	* po/Makefile.in.in: Add --keyword=P_ to the xgettext
	invocation, since property blurbs and nicks are
	now marked with P_().
2004-01-16 23:10:05 +00:00
Padraig O'Briain
b0ec8fa202 *gtk/gtkcolorsel.c (gtk_color_selection_init): Add tooltip for opacity
2003-11-12  Padraig O'Briain  <padraig.obriain@sun.com>

	*gtk/gtkcolorsel.c (gtk_color_selection_init): Add tooltip for
	opacity entry widget. Change tooltip for opacity widgets. (#126426)
2003-11-12 09:22:48 +00:00
Matthias Clasen
0a80b63b06 Change the ranges for Saturation and Value to be 0-100 instead of 0-255,
Wed Nov  5 21:02:26 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (update_color):
	(make_label_spinbutton):
	(adjustment_changed): Change the ranges for Saturation and
	Value to be 0-100 instead of 0-255, since these axes of HSV
	are usually expressed in percent.  (#121519, Gregory Merchan)
Wed Nov  5 21:02:26 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (update_color):
	(make_label_spinbutton):
	(adjustment_changed): Change the ranges for Saturation and
	Value to be 0-100 instead of 0-255, since these axes of HSV
	are usually expressed in percent.  (#121519, Gregory Merchan)
2003-11-05 20:05:47 +00:00
Matthias Clasen
3d4c726c48 Accept drops with the wrong format, since the KDE color chooser
2003-08-02  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (color_sample_drop_handle)
	(palette_drop_handle):
	* gtk/gtkcolorbutton.c (gtk_color_button_drag_data_received):  Accept drops with the
	wrong format, since the KDE color chooser incorrectly drops application/x-color with
	format 8.
2003-08-02 09:22:38 +00:00
Matthias Clasen
d5d9ecbf80 Make the hue spinbutton wrap. (#118097, John Darrington)
2003-07-23  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (gtk_color_selection_init): Make the hue
	spinbutton wrap.  (#118097, John Darrington)
2003-07-23 21:00:15 +00:00
Matthias Clasen
a32adaf4f9 Update color on focus out of hex_entry. (#112665) (hex_focus_out): New
2003-05-23  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (gtk_color_selection_init): Update color on
	focus out of hex_entry.  (#112665)
	(hex_focus_out): New signal handler for focus out of hex entry.
2003-05-22 22:25:11 +00:00
Manish Singh
dd74be94c6 demos/gtk-demo/main.c demos/gtk-demo/tree_store.c gdk/x11/gdkscreen-x11.c
Thu Feb 27 17:44:24 2003  Manish Singh  <yosh@gimp.org>

        * demos/gtk-demo/main.c
        * demos/gtk-demo/tree_store.c
        * gdk/x11/gdkscreen-x11.c
        * gtk/gtkcellrenderertoggle.c
        * gtk/gtkcolorsel.c
        * gtk/gtkdnd.c
        * gtk/gtkeditable.c
        * gtk/gtkentry.c
        * gtk/gtkmenu.c
        * gtk/gtkmenubar.c
        * gtk/gtkmenuitem.c
        * gtk/gtkmenushell.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktextbuffer.c
        * gtk/gtktextview.c
        * gtk/gtktreeviewcolumn.c
        * tests/testgtk.c
        * tests/testtext.c
        * tests/testtreeedit.c
        * tests/testtreefocus.c
        * tests/testtreeview.c: remove unnecessary G_OBJECT() casts.
2003-02-28 01:45:51 +00:00
Matthias Clasen
46d15e32bd Deprecate. (#60582)
2003-01-31  Matthias Clasen  <maclas@gmx.de>

	* gdk/gdkpixbuf.h:
	* gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
	(gdk_pixbuf_render_to_drawable_alpha): Deprecate.  (#60582)

	* gtk/gtkcolorsel.h:
	* gtk/gtkcolorsel.c (gtk_color_selection_set_change_palette_hook):
	Deprecate.  (#98167)
2003-01-31 00:37:38 +00:00
Daniel Elstner
9ca772ac70 Explicitely draw an opaque rectangle using the background color rather
2003-01-30  Daniel Elstner  <daniel.elstner@gmx.net>

	* gtk/gtkcolorsel.c (palette_paint): Explicitely draw an opaque
	rectangle using the background color rather than relying on
	gdk_window_clear_area(), so that the palette works properly with
	pixmap themes.

	* demos/gtk-demo/colorsel.c: Install an "expose_event" handler
	to fill the drawing area in the background color.
2003-01-30 20:05:03 +00:00
Matthias Clasen
fb5befb643 Fix clamping to [0,1] to avoid unnecessary roundtrip failures. (#93500)
2003-01-21  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkcolorsel.c (hex_changed): Fix clamping to [0,1] to avoid
	unnecessary roundtrip failures.  (#93500)
2003-01-20 23:57:12 +00:00
Matthias Clasen
14ee65b66a Data constness fixes. (#75754) 2002-12-10 21:39:53 +00:00
Matthias Clasen
3bdc520c48 Reset priv->changing before returning. (#100443)
* gtk/gtkcolorsel.c (gtk_color_selection_set_previous_color):
	(gtk_color_selection_set_previous_alpha): Reset priv->changing
	before returning.  (#100443)
2002-12-08 22:17:22 +00:00
Matthias Clasen
7cb3f99fc7 Document 2.2 API additions. 2002-11-28 00:33:17 +00:00
Manish Singh
bc035915e9 add -DGTK_DISABLE_DEPRECATED. #undef it at the top of gtktypebuiltins.c.
Tue Nov 19 17:05:51 2002 Manish Singh  <yosh@gimp.org>

	* gtk/Makefile.am: add -DGTK_DISABLE_DEPRECATED. #undef it at the
	top of gtktypebuiltins.c.

	* gtk/gtkclist.c
	* gtk/gtkcombo.c
	* gtk/gtkctree.c
	* gtk/gtklist.c
	* gtk/gtklistitem.c
	* gtk/gtkoldeditable.c
	* gtk/gtkpixmap.c
	* gtk/gtkpreview.c
	* gtk/gtksignal.c
	* gtk/gtktext.c
	* gtk/gtktipsquery.c
	* gtk/gtktree.c
	* gtk/gtktreeitem.c
	* gtk/gtktypeutils.c: #undef GTK_DISABLE_DEPRECATED, deprecated widgets
	and compat code.

	* gtk/gtkcolorsel.c: move gtk_color_selection_set_color implementation
	to set_color_internal, and use that. The deprecated function now
	merely wraps it.

	* gtk/gtkfontsel.c: same as above, except with
	gtk_font_selection_get_font.

	* gtk/gtknotebook.c: same as above, except with
	gtk_notebook_set_homogeneous, and gtk_notebook_set_tab_{border,
	hborder,vborder}.

	* gtk/gtkprogressbar.c: same as above, except with
	gtk_progress_bar_set_{bar_stype,discrete_blocks,activity_step,
	activity_blocks}.

	* gtk/gtkstyle.c: same as above, except with gtk_style_get_font.

	* gtk/gtkwidget.c: same as above, except with gtk_widget_set_usize.

	* gtk/gtkitemfactory.h: declare compatibility functions for deprecated
	GtkMenuFactory stuff if GTK_COMPILATION, since they are used
	internally by the compat code.

	* gtk/gtkitemfactory.c (gtk_item_factory_create_item): remove
	use of deprecated gtk_check_menu_item_set_show_toggle (it is a noop
	now).

	* gtk/gtkmain.c: replaced deprecated GTK_TYPE_* with G_TYPE_*.

	* gtk/gtkobject.c: replaced various deprecated functions. In set and
	get_property, use g_object_{set,get}_data with "user_data" instead
	of gtk_object_{set,get}_user_data.

	* gtk/gtkprogress.h: API declared if GTK_COMPILATION

	* gtk/gtkprogress.c: port get_type to GObject API.

	* gtk/gtktypeutils.h: declare GtkArg stuff and gtk_type_init,
	if GTK_COMPILATION.

	* gtk/gtkwidget.c: define gtk_widget_queue_clear in terms of
	gtk_widget_queue_draw instead of the other way around.

	* tests/Makefile.am: define -DGTK_DISABLE_DEPRECATED

	* tests/testgtk.c
	* tests/testselection.c
	* tests/testsocket.c: #undef GTK_DISABLE_DEPRECATED, makes use of
	deprecated stuff.
2002-11-20 01:07:33 +00:00
Matthias Clasen
050c933b34 Add a const here.
* gtk/theme-bits/decompose-bits.c (do_part): Add a const here.

	* gtk/gtkcolorsel.c:
	* gtk/gtkimcontextsimple.c:
	* gtk/gtkstyle.c: Mark constant data as const to give the compiler
	a chance to put it in a readonly section.  (#75754)
2002-11-13 20:23:02 +00:00
Matthias Clasen
2d1ce5a4fb Put into #ifdef DO_BLINK to avoid an unused static function. (#97965)
* tests/testtext.c (blink_timeout): Put into #ifdef DO_BLINK to
	avoid an unused static function.  (#97965)

	* gtk/gtktextiter.c (backward_line_leaving_caches_unmodified):
	* gtk/gtkstyle.c (radio_aa_bits):
	(draw_spin_entry_shadow): #if-0-out unused static functions and
	variables.  (#97965)

	* gtk/gtktextview.c (text_window_get_allocation):
	* gtk/gtkcolorsel.c (gtk_color_selection_get_palette_size):
	(gtk_color_selection_get_palette_color):
	(gtk_color_selection_unset_palette_color): Remove unused static
	functions.  (#97965)

	* gtk/gtkcolorsel.c
	(gtk_color_selection_set_change_palette_with_screen_hook): Fix doc
	comment.
2002-11-08 22:34:38 +00:00
Manish Singh
c77265d3a7 Deprecation cleanup
Sun Oct 13 12:29:15 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkcolorsel.[ch] gtk/gtkcombo.[ch] gtk/gtkplug.[ch]
        gtk/gtksocket.[ch] gtk/gtktreeview.[ch] gtk/gtktreeviewcolumn.[ch]:
        Deprecation cleanup

        * gtk/gtkcolorseldialog.c: make window not resizable (lost
        accidently in the previous cleanup)
2002-10-13 19:34:42 +00:00
Owen Taylor
6dde472cbe Free the private data. (#84903, Matthias Clasen)
Mon Oct  7 18:50:46 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorsel.c (gtk_color_selection_finalize):
        Free the private data. (#84903, Matthias Clasen)
2002-10-07 22:52:35 +00:00
Owen Taylor
123d1fb81c Use a pixbuf to set the drag icon, combine code to create drag icons
Mon Oct  7 16:28:11 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorsel.c (palette_drag_begin): Use
        a pixbuf to set the drag icon, combine code
        to create drag icons (Fixes #80092, #80093)

        * gtk/gtkcolorsel.c (get_screen_color): Don't warn
        on failure to grab keyboard/mouse. (#80085)

        * gtk/gtkcolorsel.c (palette_press): Return FALSE,
        so DND initiation is possible.

        * gtk/gtkcolorsel.c (palette_release): Set the color
        from the palette on release, not press.

        * tests/testgtk.c (create_color_selection): Use
        gtk_widget_show_all()
2002-10-07 21:53:59 +00:00
Owen Taylor
253458ec52 - Replace GdkPointerHooks with a multihead-safe GdkDisplayPointerHooks,
Mon Oct  7 15:10:00 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.[ch] gdk/gdkinternals.h
        gdk/gdkwindow.[ch] gdk/linux-fb/gdkwindow-fb.c
        gdk/win32/gdkwindow-win32.c gdk/x11/gdkwindow-x11.c:

        - Replace GdkPointerHooks with a multihead-safe
          GdkDisplayPointerHooks, leave GdkPointerHooks
          around for singlehead.
        - Add gdk_display_get_pointer() to get the pointer
          location with the screen it is on.

        * gdk/gdk.def gdk/gdkdisplay.[ch] gdk/gdkscreen.[ch]:
        Change gdk_screen_get_window_at_pointer() to
        gdk_display_get_window_at_pointer().

        * gtk/gtktreeview.c demos/gtk-demo/changedisplay.c
        tests/testgtk.c: Use gdk_display_get_window_at_pointer(),
        not gdk_screen_get_window_at_pointer().

        * gtk/gtkcolorsel.c: Fix grabbing color to be multihead
        safe.

        * gtk/gtkwidget.c: Allow gtk_widget_push_colormap (NULL).
        since it is useful for writing code that doesn't
        know the dcurrent state but needs a clean colormap.

        * gtk/gtkrc.c: When loading the settings for a particular
        screen, only reset toplevels on that screen.

        * gtk/gtkiconfactory.h: Fix #ifdef GTK_MULTIHEAD_SAFE
        that should have been #ifndef GTK_MULTIHEAD_SAFE.
2002-10-07 19:42:49 +00:00
Owen Taylor
afecb32dbc Fix some signed/unsigned warnings. (#85863, David L. Cooper II)
Fri Sep 27 17:23:31 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorsel.c: Fix some signed/unsigned warnings.
        (#85863, David L. Cooper II)
2002-09-27 21:26:18 +00:00
Matthias Clasen
703b02db6a Stockify color picker icon. (#89880)
* gtk/stock-icons/stock_color_picker_25.png:
	* gtk/stock-icons/Makefile.am (VARIABLES1):
	* gtk/gtkstock.h (GTK_STOCK_COLOR_PICKER):
	* gtk/gtkiconfactory.c (get_default_icons):
	* gtk/gtkcolorsel.c (gtk_color_selection_init): Stockify color
	picker icon.   (#89880)
2002-09-16 22:52:22 +00:00
Owen Taylor
bf09470d79 Fix some cases where signal connection IDs where being assigned to guint
Wed Jul 10 14:27:14 2002  Owen Taylor  <otaylor@redhat.com>

        * modules/input/gtkimcontextxim.c gtk/gtkcolorsel.c
        gtk/gtkdialog.c gtk/gtktextbtree.c: Fix some cases
        where signal connection IDs where being assigned to
        guint rather than gulong. (part of #87281, Shivram U)
2002-07-10 18:30:23 +00:00
Owen Taylor
28c2b0a31f Renames:
Thu Jun 20 19:41:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdisplay.h gdk/gdkscreen.h gdk/**.c gtk/*.c
        tests/*.c: Renames:

         gdk_get_default_display => gdk_display_get_default
         gdk_get_default_screen  => gdk_screen_get_default
         gdk_open_display        => gdk_display_open
2002-06-20 23:59:27 +00:00
Alex Larsson
4632fb81c7 Integrate Erwann Chenede's multihead changes for the gtk/ directory.
Mon Apr 29 18:28:00 2002  Owen Taylor  <otaylor@redhat.com>

	Integrate Erwann Chenede's multihead changes for the gtk/ directory.

	* gtk/gtkclipboard.[ch]: Add gtk_clipboard_get_for_display(),
	make internals multihead aware.

	* gtk/gtkcolorsel.[ch]: Add
	gtk_color_selection_set_change_palette_with_screen_hook () [ugh!]
	make up for non-multihead safety of
	gtk_color_selection_set_change_palette_hook()

	* gtk/gtkinvisible.[ch] gtk/gtkmenu.[ch] gtkwindow.[ch]: Add
	gtk_{invisible,menu,window}_set_screen(); add "screen" properties
	for GtkWindow and GtkMenu.

	* gtk/gtkplug.[ch]: Add gtk_plug_construct_for_display(),
	gtk_plug_new_for_display(). Multihead fixes.

	* gtk/gtkselection.[ch]: Add gtk_selection_owner_set_for_display(),
	make internals multihead aware.

	* gtk/gtksettings.[ch]: Add gtk_settings_get_for_screen(), get
	rid of now-useless gtk_settings_constructor().

	* gtk/gtkstyle.[ch]: Add gtk_style_get_font_for_display(), fix
	check/radio button indicators bitmap handling to be multihead
	safe.

	* gtk/gtkwidget.[ch]: Add gtk_widget_get_screen(), gtk_widget_has_screen(),
	gtk_widget_get_display(), gtk_widget_get_clipboard(),
	gtk_widget_get_root_window().

	* gtk/gtkbindings.c gtk/gtkbutton.c gtk/gtkclist.c gtk/gtkcombo.c
	gtk/gtkctree.c gtk/gtkdnd.c gtk/gtkfilesel.c gtk/gtkgamma.c
	gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtkimcontext.c gtk/gtklabel.c
	gtk/gtklist.c gtk/gtkmain.c gtk/gtkmenuitem.c gtk/gtkmenushell.c
	gtk/gtknotebook.c gtk/gtkoldeditable.c gtk/gtkoptionmenu.c
	gtk/gtkpaned.c gtk/gtkpreview.c gtk/gtksocket.c gtk/gtktext.c
	gtk/gtktextbuffer.c gtk/gtktextview.c gtk/gtktipsquery.c
	gtk/gtktooltips.c gtk/gtktreeview.c gtk/gtktreeviewcolumn.c:
	misc mechanical multihead-safety fixes.

	* gtk/gtkclipboard.c: Use a GtkImage rather than a pixmap for
	the dropper, look up the color palette only at realization time,
	other multihead fixes.

	* gtk/gtkcombo.c (gtk_combo_unrealize): Popdown the list when
	unrealizing.

	* gtk/gtkentry.c: Only claim ownership of the primary selection
	when realized, misc multihead fixes.

	* gtk/gtkfontsel.c: Only fill in fonts when attached to a screen,
	fix gtk_font_selection_get_font() for multihead.

	* gtk/gtkgc.c: make the depth => drawable hash per-screen.

	* gtk/gtkinvisible.c: Add a constructor that realizes the
	widget, so we get a realized widget with g_object_new() as
	well gtk_invisible_new() as before.

	* gtk/gtkmain.c: Get rid of unused gtk_visual/gtk_colormap
	variables.

	* gtk/gtktextdisplay.c: Add warnings if stipple bitmaps
	are used on the wrong screen.

	* gtk/gtktoolbar.c: Make handling of GtkSettings-based layout
	read properties and connect to settings when the screen is changed,
	rather than on init/finalize.

	* gtk/gtkwindow.c: Fix icon handing to be multihead safe ...
	default icon pixmaps/mask are only shared between windows on the
	same screen. Misc multihead fixes.

Sat Apr 27 13:49:53 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkclipboard.c (gtk_clipboard_get_for_display):
	Update docs to reference GDK_SELECTION_CLIPBOARD rather GDK_NONE.

2002-04-29  Alex Larsson  <alexl@redhat.com>

	* gdk/linux-fb/gdkproperty-fb.c (gdk_property_get):
	Fix silly bug, noticed by Sven Neumann.

Sun Apr 28 22:43:55 2002  Jonathan Blandford  <jrb@gnome.org>

	* gtk/gtktreemodelsort.c (gtk_tree_model_sort_set_sort_func): Fix
	so that you can set a new sort func.
2002-04-29 22:53:45 +00:00
Owen Taylor
e7171e19c9 Emit ::color_changed every time we notify current_color. (Brute force fix
Tue Feb 26 17:04:44 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkcolorsel.c (update_color): Emit ::color_changed
        every time we notify current_color. (Brute force
        fix for #72470, Matthias Clasen). Some fixes to improve
        reentrancy.
2002-02-26 22:16:06 +00:00
Owen Taylor
a504db9e83 Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann, #72182.
Fri Feb 22 18:36:45 2002  Owen Taylor  <otaylor@redhat.com>

	Fixes for AIX compilation from Miroslaw Dobrzanski-Neumann,
	#72182.

	* demos/gtk-demo/main.c gtk/gtktreeview.c gtk/gtktoolbar.c
	gtk/gtkpaned.c gtk/gtkobject.c gtk/gtkcontainer.c
	gtk/gtkcolorsel.c gtk/gtkcellrender.c gdk/x11/xsettings-client.h:
	Squash trailing commas on enumerations.

	* gdk/gdktypes.h: Drop GDK_RELEASE_MASK to 1 << 30 instead
	of 1 << 31 to work around AIX compiler problem. (C standard
	seems to imply that compiler is required to use an unsigned
	type for the enum value in this case.)

	* gdk/gdkpixbuf-drawable.c: Fix lvalue casts.

	* gtk/gtkwindow.h: Fix use of enum types for bitfields ...
	compilers may choose to use a signed type for bitfields.
2002-02-23 00:13:17 +00:00
Sven Neumann
55b46cc8d4 check handler_id before disconnecting the signal handler since it might
2002-02-20  Sven Neumann  <sven@gimp.org>

	* gtk/gtkcolorsel.c (gtk_color_selection_finalize): check
	handler_id before disconnecting the signal handler since it might
	have never been connected if the GtkColorSelection is destroyed
	before it was realized.
2002-02-20 11:56:17 +00:00