Commit Graph

370 Commits

Author SHA1 Message Date
Matthias Clasen
e0aa12eb0a Tons of transfer annotations 2010-09-21 00:18:11 -04:00
Kristian Rietveld
a79d6676ac Update gtkstyle.c to account for removal of row-ending-details
The detail strings now have more "detail" by default, so gtkstyle.c
needed to be updated to properly handle this.  Tests like testtreeview,
testtreesort now have proper background drawing again.

This strncmp trick was the best I could think of so quickly, if anybody
has an idea to do this in a better way, let me know.
2010-09-13 17:13:21 +02:00
Benjamin Otte
66e860b5d1 style: Fix drawing of insensitive text
When writing the original code I erroneously assumed that the current
point of the cairo context would be saved by cairo_save/restore(), but
of course the current point is part of the path and therefor isn't
saved.

Also do a cairo_new_path() before rendering any text so that we are sure
the text ends up at the right spot.
2010-09-12 16:00:05 +02:00
Benjamin Otte
d8f3a162c8 style: Use gtk_widget_get_state() for the entry background
New code sets the entry background to GTK_STATE_ACTIVE when it has focus
and the active color in the default theme looks rather bad.
2010-09-03 17:14:17 +02:00
Javier Jardón
bf1f03ad5d gtk/gtkstyle.c: use accessor functions to access GtkWidget 2010-08-22 21:25:24 +02:00
Christian Persch
ffa07ee21e Use G_DEFINE_BOXED_TYPE
Bug #627214.
2010-08-18 15:34:47 +02:00
Benjamin Otte
709e05cdb2 style: Use _gtk_pango_fill_layout() 2010-08-10 21:02:31 +02:00
Benjamin Otte
ccacd3a46a style: Apply same matrix conversion as gdk_draw_layout() did
This is only necessary for GtkLabel with an angle set as no other widget
rotates text.
Note that the label code does not need these adjustments as those paths
are only taken when the label is not rotated.
2010-08-10 21:02:31 +02:00
Benjamin Otte
7b9e2b941c style: Don't use gdk_pixmap_create_from_xpm
Instead, do what that code did manually.
2010-08-10 21:02:30 +02:00
Benjamin Otte
09fbed7bc9 style: Do not allocate colors anymore 2010-08-10 21:02:30 +02:00
Kristian Rietveld
089892df27 Add missing calls to cairo_destroy() 2010-08-10 21:02:29 +02:00
Benjamin Otte
acf33c9e4c API: Remove GC members from GtkStyle 2010-08-10 21:02:29 +02:00
Benjamin Otte
66048b2f92 style: Replace last gdk_draw_rectangle() with Cairo 2010-08-10 21:02:28 +02:00
Benjamin Otte
a3057d0150 style: replace draw_frame_gap with Cairo calls 2010-08-10 21:02:27 +02:00
Benjamin Otte
5eb76955fd style: Replace draw_diamond vfunc with Cairo calls 2010-08-10 21:02:27 +02:00
Benjamin Otte
d2b1da4e84 API: remove gtk_paint_polygon()
Almost noone uses it in real applications and it's broken in most theme
engines.
2010-08-10 21:02:27 +02:00
Benjamin Otte
1c4ce45a42 style: apply cleanup patch from bug 576988
Ideally this patch would be split up into chunks, but the git branch it
came from doesn't exist anymore. Only this patch is left in a bug
report.

It it's adapted to use accessors and contains some fixes that were
spotted while using the patch.

https://bugzilla.gnome.org/show_bug.cgi?id=576988
2010-08-10 21:02:27 +02:00
Javier Jardón
237ed3bbf8 Remove some unused variables 2010-08-03 12:44:52 +02:00
Benjamin Otte
610e29892e style: Draw insertion cursor with Cairo 2010-07-26 16:42:49 +02:00
Benjamin Otte
9bac13b1f5 Remove _gtk_widget_get_cursor_gc() function
It's unused now.
2010-07-26 16:42:48 +02:00
Javier Jardón
0a07e9733b gtk/: fully remove gtkalias hacks
https://bugzilla.gnome.org/show_bug.cgi?id=623845
2010-07-10 02:51:26 +02:00
Javier Jardón
34573b53f3 [GtkStyle] Remove deprecated GdkFont usage 2010-06-28 23:38:03 +02:00
Javier Jardón
d5d7fd9f51 Remove unused gtk_style_get_font_internal() function
This function is no longer necesary as draw_string() function
was dropped from GtkStyle
See commit 5300dc2b36
2010-06-20 00:50:52 +02:00
Sven Herzberg
5300dc2b36 drop the draw_string() function from GtkStyle
Reviewed by Michael Natterer.

* gtk/gtkstyle.c,
* gtk/gtkstyle.h: gdk_draw_string() has been deprecated and removed
  already. There's no one left who should be using this function
  (found this when porting sapwood to GTK+ 3.0)
* modules/engines/pixbuf/pixbuf-draw.c: don't implement this unused
  function
2010-06-07 13:56:10 +02:00
Javier Jardón
da8643e457 Remove some GTK_DISABLE_DEPRECATED and ENABLE_BROKEN guards 2010-06-07 04:50:05 +02:00
Javier Jardón
885b6d8a75 Move documentation to inline comments: GtkStyle 2010-05-16 01:37:36 +02:00
Javier Jardón
623966b6da Remove all gtk_draw_* deprecated functions completely 2010-05-03 01:51:23 +02:00
Christian Dywan
575d3ffa83 Include gtkspinner.h in GtkStyle 2010-05-03 01:51:17 +02:00
Christian Dywan
8ac9a0e67f Remove deprecated GtkStyle functions 2010-05-03 01:39:50 +02:00
Hiroyuki Ikezoe
590ceded96 Don't get settings unless we need them
Pointed out in bug 613028.
2010-03-16 13:01:18 -04:00
Javier Jardón
16a59ad912 Deprecate widget flag: GTK_WIDGET_REALIZED
Use gtk_widget_get_realized() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-03 20:41:05 +01:00
Javier Jardón
4232115e22 Deprecate widget flag: GTK_WIDGET_HAS_FOCUS
Use gtk_widget_has_focus() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 06:11:01 +01:00
Javier Jardón
f5bde06e82 Don't use GTK_WIDGET_NO_WINDOW in internal code anymore
Use gtk_widget_get_has_window() instead

https://bugzilla.gnome.org/show_bug.cgi?id=69872
2010-03-01 05:44:19 +01:00
Johan Dahlin
fe85272112 [annotations] Add allow-none
This commit was created using a script that searched for all docstrings
containing a parameter and the string 'or %NULL'.
Gdk backends and demos excluded as they are not part of a public API

https://bugzilla.gnome.org/show_bug.cgi?id=610474
2010-02-19 17:57:51 -02:00
Dan Winship
0b4af241b6 Change GtkIconSize to int in params/return values
GtkIconSize is an extensible enumeration (via
gtk_icon_size_register()), so methods that claim to take/return a
GtkIconSize need to actually use "int" to work correctly with bindings
that are strict about enum values.

https://bugzilla.gnome.org/show_bug.cgi?id=604895
2009-12-19 10:32:35 +01:00
Colin Walters
6529c07614 [introspection] Merge in Gtk-custom.c annotations
The Gtk-custom.c file in gir-repository contained a number of
introspection annotations.  Merge those into the GTK source files.

Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
2009-12-16 17:22:01 -02:00
Matthias Clasen
8ecd77ffd1 Add a release note about statusbar internal hierarchy changes 2009-11-30 14:06:57 -05:00
Matthias Clasen
0567ea1c18 Add customary args to gtk_style_paint_spinner()
...and adjust all callers.
2009-11-27 01:23:55 -05:00
Bastien Nocera
d21700f510 Bug 319607 – Add a throbber (activity widget) to GTK+
Add GtkSpinner activity throbber, as well as a cell renderer.
2009-10-14 14:58:30 +01:00
Matthias Clasen
013cd9bbda Bug 574561 – gtk_style_get "shadows" g_object_get
* gtk/gtk.symbols:
        * gtk/gtkstyle.[hc]: Rename gtk_style_get_property to
        gtk_style_get_style_property to avoid problems for language
        bindings. Pointed out by Torsten Schoenfeld.


svn path=/trunk/; revision=22502
2009-03-10 18:58:23 +00:00
Torsten Schönfeld
71a975f69b Add a "Since: 2.16" tag to gtk_style_get.
svn path=/trunk/; revision=22151
2009-01-20 19:09:53 +00:00
Matthias Clasen
bbc4891e3d Doc additions
svn path=/trunk/; revision=22012
2008-12-30 05:56:57 +00:00
Matthias Clasen
7e7866f12b More additions
svn path=/trunk/; revision=21996
2008-12-29 07:25:29 +00:00
Matthias Clasen
32237671ca Doc additions
svn path=/trunk/; revision=21995
2008-12-29 07:24:06 +00:00
Matthias Clasen
5a49a5cd59 Doc fixes
svn path=/trunk/; revision=21963
2008-12-29 03:12:35 +00:00
Matthias Clasen
4f8f288163 Bug 412134 – Add API to query style properties from the style
2008-11-01  Matthias Clasen  <mclasen@redhat.com>

        Bug 412134 – Add API to query style properties from the style

        * gtk/gtk.symbols:
        * gtk/gtkstyle.[hc]: Add getters for style properties to
        avoid the need for ugly workarounds with dummy widget instances.
        Patch by Mariano Suárez-Alvarez

svn path=/trunk/; revision=21744
2008-11-01 04:15:14 +00:00
Matthias Clasen
0eb6848908 Add docs
svn path=/trunk/; revision=20796
2008-07-06 23:43:15 +00:00
Cody Russell
57223c9a05 Revert name change
svn path=/trunk/; revision=20724
2008-07-01 22:57:50 +00:00
Cody Russell
fce9c8b7d4 Practically everything changed.
2008-06-30  Cody Russell  <bratsche@gnome.org>

        * Practically everything changed.

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


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

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


svn path=/trunk/; revision=20669
2008-06-22 14:28:52 +00:00
Johan Dahlin
ce811f7cec Do not ignore the return value of g_slist_remove. gtkstyle.c changes
2008-06-19  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkclist.c:
    * gtk/gtkstyle.c (gtk_style_finalize):
    Do not ignore the return value of g_slist_remove.
    gtkstyle.c changes rubberstamped by Owen.


svn path=/trunk/; revision=20469
2008-06-19 14:08:59 +00:00
Johan Dahlin
78c88e77d6 Add deprecated version and change the deprecation markup used by ref/unref
2008-06-17  Johan Dahlin  <jdahlin@async.com.br>

    * gtk/gtkstyle.c: Add deprecated version
    and change the deprecation markup used by ref/unref 


svn path=/trunk/; revision=20443
2008-06-18 01:42:13 +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
Johan Dahlin
6f9bcaa8b7 Make gtk-doc happy:
2008-03-06  Johan Dahlin  <johan@gnome.org>

    Make gtk-doc happy:
    
    * gtk/gtkstyle.c: npoints->n_points.
    * gtk/gtktestutils.h: widget->spinner
    * gtk/gtktestutils.c: argc->argcp, argv->argvp


svn path=/trunk/; revision=19725
2008-03-06 23:21:26 +00:00
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
Xan Lopez
b28fea94a0 Add gtk_border_new to avoid memory allocator confusions when using
2007-12-27  Xan Lopez  <xan@gnome.org>

	* gtk/gtk.symbols:
	* gtk/gtkstyle.c (gtk_border_new, gtk_border_copy):

	Add gtk_border_new to avoid memory allocator confusions when using
	GtkBorders. Also, make gtk_border_copy use g_slice_dup. (#454042)

svn path=/trunk/; revision=19248
2007-12-27 14:04:37 +00:00
Michael Natterer
24a6e04cb2 cast pointers to fix warnings about signdness.
2007-11-14  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkstyle.c (gtk_default_draw_focus): cast pointers to fix
	warnings about signdness.


svn path=/trunk/; revision=18988
2007-11-14 09:45:14 +00:00
Manish Singh
0983017630 gtk/gtkstyle.c (option_menu_get_props) use gtk_requisition_free() instead
2007-09-21  Manish Singh  <yosh@gimp.org>

        * gtk/gtkstyle.c (option_menu_get_props)
        * gtk/gtkoptionmenu.c (gtk_option_menu_get_props): use
        gtk_requisition_free() instead of g_free() for freeing
        requisitions.

svn path=/trunk/; revision=18855
2007-09-21 21:14:56 +00:00
Matthias Clasen
18475a4aa3 Revert the clamping of cursor coordinates, since it causes really ugly
2007-09-08  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkstyle.c (draw_insertion_cursor): Revert the clamping
        of cursor coordinates, since it causes really ugly drawing
        artifacts with horizontal scrolling.  (#471215, Yevgen Muntyan)



svn path=/trunk/; revision=18765
2007-09-09 02:15:13 +00:00
Michael Natterer
3c9a4ac633 Fix check/radio indicator drawing mess (bug #452225):
2007-07-27  Michael Natterer  <mitch@imendio.com>

	Fix check/radio indicator drawing mess (bug #452225):

	* gtk/gtkstyle.c (gtk_default_draw_check): really decrease the
	indicator size by one to ensure odd size (don't say -= -1).

	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	removed -1 adjustment from calls to gtk_paint_option(). Theme
	engines now get the actually configured size passed, not one pixel
	less.

	* gtk/gtkcellrenderertoggle.c
	* gtk/gtkcheckmenuitem.c: changed default indicator size from 12
	to 13 so all widgets which draw check/option indicators have the
	same default size now (and render the same size after above
	changes).

	* README.in: mention above changes in the release notes.


svn path=/trunk/; revision=18547
2007-07-27 12:11:07 +00:00
Yevgen Muntyan
ef1e05f7de Implement block-cursor for overwrite mode. (#80378)
2007-06-12  Yevgen Muntyan  <muntyan@tamu.edu>

        * gtk/gtkentry.c (gtk_entry_expose), (gtk_entry_toggle_overwrite),
        (gtk_entry_draw_cursor):
        * gtk/gtkstyle.c (_gtk_widget_get_cursor_gc),
        (_gtk_widget_get_cursor_color):
        * gtk/gtkstyle.h:
        * gtk/gtktextdisplay.c (gtk_text_renderer_prepare_run),
        (gtk_text_renderer_draw_shape), (text_renderer_set_state),
        (render_para):
        * gtk/gtktextlayout.c (gtk_text_layout_set_overwrite_mode),
        (gtk_text_layout_invalidate_cache), (get_block_cursor),
        (add_cursor), (gtk_text_layout_get_line_display),
        (_gtk_text_layout_get_block_cursor):
        * gtk/gtktextlayout.h:
        * gtk/gtktextutil.c (layout_get_char_width),
        (_gtk_text_util_get_block_cursor_location):
        * gtk/gtktextutil.h:
        * gtk/gtktextview.c (gtk_text_view_set_editable),
        (gtk_text_view_toggle_overwrite), (gtk_text_view_set_overwrite),
        (gtk_text_view_ensure_layout), (text_window_invalidate_cursors):
        Implement block-cursor for overwrite mode.  (#80378)


svn path=/trunk/; revision=18108
2007-06-12 05:32:57 +00:00
Yevgen Muntyan
405df7f7db use text colors from widget style to draw cursor instead of hardcoded
2007-05-31  Yevgen Muntyan  <muntyan@tamu.edu>

	* gtk/gtkstyle.c (get_insertion_cursor_gc): use text colors from
	widget style to draw cursor instead of hardcoded black and grey
	(#79585, comment #30).


svn path=/trunk/; revision=17998
2007-06-01 05:02:05 +00:00
Tim Janik
8c2c327d34 clamp cursor coordinates to window bounds (fix from Maemo Gtk).
Fri Jan 26 13:07:07 2007  Tim Janik  <timj@imendio.com>

        * gtk/gtkstyle.c (draw_insertion_cursor): clamp cursor coordinates to
        window bounds (fix from Maemo Gtk).



svn path=/trunk/; revision=17217
2007-01-26 12:26:01 +00:00
Michael Natterer
559649c6ff gtk/gtkstyle.c (option_menu_get_props) Use gtk_border_free when freeing
2007-01-03  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkstyle.c (option_menu_get_props)
	* gtk/gtkoptionmenu.c (gtk_option_menu_get_props): Use 
	gtk_border_free when freeing borders.


svn path=/trunk/; revision=17032
2007-01-03 17:31:57 +00:00
Matthias Clasen
8064faafb3 Clarify docs. (#353423, Christian Persch)
2006-12-29  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkstyle.c (gtk_style_attach): Clarify docs.  (#353423,
        Christian Persch)
2006-12-29 19:57:03 +00:00
Behdad Esfahbod
c0e479bfab Use gslice for GtkBorder (#383557).
2006-12-24  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtkstyle.c (gtk_border_copy), (gtk_border_free): Use gslice for
        GtkBorder (#383557).
2006-12-24 05:32:38 +00:00
Behdad Esfahbod
d698e3eaf2 Bug 340141 – Update to Pango 1.16 API
2006-12-24  Behdad Esfahbod  <behdad@gnome.org>

        Bug 340141 – Update to Pango 1.16 API

        * gdk/gdkpango.c (layout_iter_get_line_clip_region),
        (gdk_pango_layout_line_get_clip_region):
        * gtk/gtkcalendar.c (gtk_calendar_size_request):
        * gtk/gtkentry.c (gtk_entry_get_pixel_ranges),
        (get_layout_position), (gtk_entry_find_position),
        (gtk_entry_adjust_scroll):
        * gtk/gtkiconview.c (get_pango_text_offsets):
        * gtk/gtklabel.c (get_cursor_direction):
        * gtk/gtkstyle.c (get_insensitive_layout):
        * gtk/gtktextdisplay.c (render_para):
        * gtk/gtktextlayout.c (allocate_child_widgets),
        (find_display_line_below), (find_display_line_above),
        (gtk_text_layout_move_iter_to_previous_line),
        (gtk_text_layout_move_iter_to_next_line),
        (gtk_text_layout_move_iter_to_line_end),
        (gtk_text_layout_iter_starts_line),
        (gtk_text_layout_move_iter_to_x):
        * gtk/gtktextutil.c (limit_layout_lines):
        Use the _readonly version of pango_layout_iter_get_line(),
        pango_layout_iter_get_run(), pango_layout_get_line(), and
        pango_layout_get_lines().

        * gtk/gtkmain.c (gtk_get_default_language): Use
        pango_get_default_language().
2006-12-24 05:29:25 +00:00
Benjamin Berg
683474c575 Protect against NULL widget. (#379503)
2006-11-26  Benjamin Berg  <benjamin@sipsolutions.net>

	* gtk/gtkstyle.c: (gtk_default_draw_flat_box): Protect against NULL
	  widget. (#379503)
2006-11-26 19:43:12 +00:00
Michael Natterer
43dd82ff0e also copy icon factories and color hashes. Fixes bug #357132.
2006-09-22  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkstyle.c (gtk_style_real_copy): also copy icon factories
	and color hashes. Fixes bug #357132.
2006-09-22 20:47:23 +00:00
Matthias Clasen
f45a35921a Commit a patch by Behdad to fix typos, omissions and other errors in the
2006-09-10  Matthias Clasen  <mclasen@redhat.com>

        * Commit a patch by Behdad to fix typos, omissions and other
        errors in the symbol aliasing, and add checks for local PLT
        entries.  (#354687, Behdad Esfahbod)
2006-09-10 06:39:16 +00:00
Matthias Clasen
97f4c323eb Only get the indicator-size and indicator-spacing style properties for
2006-08-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (option_menu_get_props): Only get the
	indicator-size and indicator-spacing style properties
	for GtkOptionMenu.  (#349859, Benjamin Otte)
2006-08-06 05:58:19 +00:00
Matthias Clasen
04b562f2de Add a missing initialization. (#349863, Benjamin Berg)
2006-08-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_default_draw_flat_box): Add a
	missing initialization.  (#349863, Benjamin Berg)
2006-08-06 02:33:15 +00:00
Michael Natterer
76f99372ba removed the "widget &&" part from "widget && GTK_IS_FOO (widget)" checks.
2006-08-03  Michael Natterer  <mitch@imendio.com>

	* gtk/gtkstyle.c: removed the "widget &&" part from
	"widget && GTK_IS_FOO (widget)" checks.
2006-08-03 09:49:37 +00:00
Matthias Clasen
fe03813226 2.10.1 2006-07-24 02:02:14 +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
Kristian Rietveld
d9c808b163 handle cell_even_ruled_sorted and cell_odd_ruled_sorted for the selected
2006-05-28  Kristian Rietveld  <kris@gtk.org>

	* gtk/gtkstyle.c (gtk_default_draw_flat_box): handle
	cell_even_ruled_sorted and cell_odd_ruled_sorted for the selected
	state.
2006-05-28 12:56:26 +00:00
Matthias Clasen
113f364a37 More of the same 2006-05-14 04:25:34 +00:00
Matthias Clasen
f26aad1916 Boilerplate reduction 2006-05-02 23:56:43 +00:00
Matthias Clasen
1f9bbaf3da Remove g_return_if_fail() checks from static functions.
2006-03-10  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c: Remove g_return_if_fail() checks
	from static functions.
2006-03-10 19:13:37 +00:00
Matthias Clasen
bd9e291b6c Add some docs. (#330073, Mart Rautsepp)
2006-02-10  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkstyle.c: Add some docs. (#330073, Mart Rautsepp)
2006-02-10 19:45:14 +00:00
Kristian Rietveld
5b8dbf0d5f Add support for row hinting for the selected state.
2006-01-31  Kristian Rietveld  <kris@imendio.com>

	* gtk/gtkstyle.c (gtk_default_draw_flat_box): Add support for row
	hinting for the selected state.
2006-01-31 15:58:23 +00:00
Michael Natterer
de3155a4c2 Added symbolic themable colors. Patch is a merged version of proposals
2005-11-23  Michael Natterer  <mitch@imendio.com>

	Added symbolic themable colors. Patch is a merged version of
	proposals from Matthias and maemo-gtk. Fixes bug #114355.

	* configure.in: require glib >= 2.9.1 for refcountable hashtables.

	* gtk/gtksettings.c: added property "color-scheme" which is a
	string defining colors like "foreground:black\nbackground:grey".
	Automatically provide a name->GdkColor hash table mapping for the
	color scheme.

	* gtk/gtkrc.[ch]: added list of color hashes that works like the
	list of icon factories. Append the color scheme hash from
	GtkSettings if it exists. Extended gtkrc syntax to allow defining
	and referencing of logical colors. Also allow to modulate colors
	in gtkrc by using arbitrary expressions of mix(), shade(),
	lighter() and darker(). Added internal function
	_gtk_rc_style_get_color_hashes().

	* gtk/gtkstyle.[ch]: keep a private list of color hashes around.
	Get the list from _gtk_rc_style_get_color_hashes(). Export
	internal function _gtk_style_shade() (used by above color
	expressions). Added public API gtk_style_lookup_color() which
	looks up a logical color by name.

	* gtk/gtk.symbols: add gtk_style_lookup_color

	* tests/testgtkrc: use symbolic colors for making
	the scrollbars red.
2005-11-23 10:33:58 +00:00
Matthias Clasen
b24876a79c Documentation improvements. (gtk_style_detach): Assert that the
2005-10-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_style_detach):
	(gtk_style_attach):  Documentation improvements.
	(gtk_style_detach): Assert that the attach_count is > 0.
2005-10-05 13:23:21 +00:00
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
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
a8122825b0 Make sure expanded expanders are not fuzzy. (#310172, reported by
2005-07-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_default_draw_expander): Make sure expanded
	expanders are not fuzzy.  (#310172, reported by Alexander Larsson,
	patch by Owen Taylor)
2005-07-20 20:30:37 +00:00
Hans Breuer
19e9165d64 updated <io.h> for open() use G_PI instead of M_PI
2005-07-03  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc[.in] : updated
	* gtk/gtkiconcache.c : <io.h> for open()
	* gtk/gtkstyle.c : use G_PI instead of M_PI

	* gdk/win32/gdkcursor-win32.c : implement gdk_cursor_new_from_name()
	by mapping the lower case win32 api name to the respective cursor.
	E.g. pass "wait" to get the IDC_WAIT cursor. Also allows to load
	cursors from named resources in the executable.
	(gdk_cursor_get_image) : just return NULL for now.

	* gdk/win32/gdkgeometry-win32.c : implement gdk_window_move_region()
	by delegation to ScollWindowEx(), untested.

	* gdk/win32/gdkwindow-win32.c : stub for gdk_window_set_urgency_hint()
2005-07-03 15:47:42 +00:00
Michael Natterer
e3f318b459 block the text_layout's "changed" handler when changing cursor visibility
2005-05-25  Michael Natterer  <mitch@imendio.com>

	* gtk/gtktextview.c (blink_cb): block the text_layout's "changed"
	handler when changing cursor visibility because it would expose
	the whole paragraph where the cursor is. Instead, expose the
	cursors' areas manually. (#173047).

	(text_window_invalidate_cursors): new function which exposes the
	cursors.

	* gtk/gtkstyle.c (draw_insertion_cursor): added comment that the
	same cursor size calculation is in text_window_invalidate_cursors().
2005-05-25 10:22:37 +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
788bbf520a Add a draw-border style property to allow themes to draw outside the
2005-04-28  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkwidget.c: Add a draw-border style property to allow
	themes to draw outside the widget's allocation.

	* gdk/gdkwindow.c gtk/gtkstyle.c: Remove some save/restore pairs
	that were working around the clip-leakage bug in Cairo.

	* gtk/gtkstyle.c: Use cairo_fill_preserve() rathe than
	save/fill/restore.

	* gdk/gdkgc.c gdk/gdkinternals.h: Add _gdk_gc_update_context()
	That updates a Cairo context to match a GC.

	* gdk/gdkdraw.c: Use _gdk_gc_update_context() to add support
	for tiles/stipples/clipping to gdk_draw_glyphs(),
	gdk_draw_trapezoids().

	* gdk/gdkpango.c: Use _gdk_gc_update_context() instead of internal
	implementation of stipples. Use one cairo_t across the entire
	drawing operation. Replace cairo_matrix_create() with
	stack-allocated matrices.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c: Save various aspects of the
	GC state (fill, tile, stipple, foreground, background, clip region)
	in instance-private-data for future use. Add getters.
	Get rid of _gdk_windowing_gc_get_foreground() function implemented
	by the backends.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Add
	_gdk_gc_init() to do initial setup of the GC from values;
	fixes some problems from drawable redirection.

	* gdk/gdkgc.c gdk/gdkinternals.h gdk/x11/gdkgc-x11.c
	gdk/win32/gdkgc-win32.c gdk/linux-fb/gdkgc-fb.c: Move
	gdk_gc_copy() and gdk_gc_set_clip_{region,rectangle}() into
	the generic code, add _gdk_windowing_gc_copy(),
	_gdk_windowing_gc_set_clip_region() to do backend specific
	stuff.

	* gdk/x11/{gdkprivate-x11.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
	gdk/win32/{gdkprivate-win32.h,gdkgc-x11.c.c,gdkdrawable-x11.c}
	gdk/linux-fb/{gdkprivate-fb.h,gdkgc-fb.c.c,gdkdrawable-fb.c}:
	Don't duplicate state that now is stored by the generic code.

	* gdk/gdk.symbols Update
2005-05-02 23:29:24 +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
Owen Taylor
f15a260ce0 Covert expander drawing to Cairo. Also always draw the entire triangle
2005-04-04  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c (gtk_default_draw_expander): Covert expander
        drawing to Cairo. Also always draw the entire triangle instead
        of just drawing the center for prelight. (Fixes inconsistent
        drawing in GtkTreeView.)
2005-04-04 20:51:24 +00:00
Hans Breuer
0ba6aed77e [merged from gtk-2-6 branch] let dash_offset shift the start of the line
2005-04-03  Hans Breuer  <hans@breuer.org>

	[merged from gtk-2-6 branch]
	* gdk/win32/gdkdrawable-win32.c : let dash_offset shift the start of
	the line pattern not the start of the line. Fixes bug #171641.

	* gtk/makefile.msc.in : follow .symbols changes

	* gdk/win32/gdkwindow-win32.c : declare and resolve GetAncestor()
	dynamically. (It is not available in _WIN_VER <= 0x0400)

	* gdk/win32/makefile.msc : removed gdkpango-win32.obj

	* gtk/gtkhsv.c gtk/gtkstyle.c : use G_PI instead of M_PI

	[also applied to gtk-2-6 branch]
	* gdk/makefile.msc gdk-pixbuf/makefile.msc : handle gdk*alias.def

	* gdk/makefile.msc.in : add gtkmnemonichash.obj

	* test/testgtk.c(set_parent_signal) : use g_message instead of
	g_print to keep the 'testgtk --bench=all' output clean
2005-04-03 21:03:08 +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
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
40b2753db5 Document which parameters may be NULL. (#166855, Frank Naumann)
2005-03-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c: Document which parameters may be NULL.
	(#166855, Frank Naumann)
2005-03-07 22:02:43 +00:00
Søren Sandmann
72c3b58732 Add
Thu Feb 24 14:20:16 2005  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtkstyle.c: Add

	g_return_if_fail (style->depth == gdk_drawable_get_depth(window));

	all over the place.
2005-02-24 19:34:02 +00:00
Matthias Clasen
37e2d4d892 Add some more NULL checks, patch by Michael Natterer.
2005-01-18  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_default_draw_check)
	(gtk_default_draw_option, gtk_default_draw_handle): Add some
	more NULL checks, patch by Michael Natterer.
2005-01-18 16:44:25 +00:00
Søren Sandmann
fd7eda15f1 Check for NULL detail and NULL widget.
Tue Jan 18 10:55:47 2005  Søren Sandmann  <sandmann@redhat.com>

	* gtk/gtkstyle.c (gtk_default_draw_handle): Check for NULL detail
	and NULL widget.

	* gtk/gtkstyle.c (gtk_default_draw_box): Check for NULL detail and
	NULL widget.  (#164477, Michael Natterer)
2005-01-18 16:01:19 +00:00
Manish Singh
60b30ff513 gdk/linux-fb/gdkgc-fb.c gdk/win32/gdkgc-win32.c
Fri Nov 19 14:54:09 2004  Manish Singh  <yosh@gimp.org>

        * gdk/linux-fb/gdkgc-fb.c
        * gdk/win32/gdkgc-win32.c
        * gdk/win32/gdkwindow-win32.c
        * gtk/gtkaboutdialog.c
        * gtk/gtkaction.c
        * gtk/gtkactiongroup.c
        * gtk/gtkcellrendererprogress.c
        * gtk/gtkcellview.c
        * gtk/gtkcolorbutton.c
        * gtk/gtkcombobox.c
        * gtk/gtkcomboboxentry.c
        * gtk/gtkentrycompletion.c
        * gtk/gtkfilechooserbutton.c
        * gtk/gtkmenutoolbutton.c
        * gtk/gtkrc.c
        * gtk/gtksettings.c
        * gtk/gtkstyle.c
        * gtk/gtktoggletoolbutton.c
        * gtk/gtktoolbutton.c
        * gtk/gtktoolitem.c
        * gtk/gtktreemodelfilter.c
        * gtk/gtktreeselection.c
        * gtk/gtktreeviewcolumn.c
        * gtk/gtkuimanager.c: get rid of unnecessary casts.

        * gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_set_property):
        cast away the const for g_value_set_enum. This is after the g_warning,
        so this is a hack to begin with.

        * gtk/gtkfilechooserdefault.c (gtk_file_chooser_default_set_property):
        add a cast to GTK_FILE_CHOOSER for impl here.
2004-11-19 23:18:38 +00:00
Matthias Clasen
ac83360abb Only clear the triangle below the grip to the background, not the full
2004-11-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_default_draw_resize_grip): Only
	clear the triangle below the grip to the background,
	not the full area.
2004-11-09 14:49:01 +00:00
Matthias Clasen
221233a981 Change the default expander size to 12 to compensate for the recent change
2004-09-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkexpander.c:
	* gtk/gtktreeview.c: Change the default expander size to 12 to compensate
	for the recent change to gtk_default_draw_expander().

	* gtk/gtkstyle.c (gtk_default_draw_expander): Use a linewidth of one
	for expander sizes up to 16.
2004-09-13 18:25:48 +00:00
Matthias Clasen
8dd03834d3 Draw expanders a bit better.
2004-09-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c (gtk_default_draw_expander): Draw expanders a bit
	better.
2004-09-07 16:16:09 +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
2da944fb09 Fix #60128, #58307, #144706:
Thu Jul 15 22:19:40 2004  Matthias Clasen  <maclas@gmx.de>

	Fix #60128, #58307, #144706:

	* gtk/gtkstyle.c (gtk_style_real_copy): Handle references
	to bg_pixmaps properly.
	(gtk_style_real_unrealize): Don't keep dangling references
	to the bg_pixmaps.
	(gtk_style_attach): Split the loop into two loops, first
	looking for a matching style, then for an empty one.
	(gtk_style_finalize):
	(gtk_style_duplicate): Add comments explaining the handling
	of style->styles.
2004-07-16 02:22:48 +00:00
Matthias Clasen
ee63b081c2 Fix some cases where style functions were not handling widget == NULL
2004-07-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkstyle.c: Fix some cases where style functions were
	not handling widget == NULL properly.  (#146282)
2004-07-09 14:40:36 +00:00
Soeren Sandmann
f7c67de9a1 small color tweak. (#141173)
Sat Jun 26 15:07:25 2004  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstyle.c, gtk/gtkrc.c: small color tweak. (#141173)
2004-06-26 13:09:22 +00:00
Matthias Clasen
957743919b Accept a NULL style.
Sat Jun 26 00:40:02 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkiconfactory.c (render_icon_name_pixbuf):
	* gtk/gtkiconfactory.c (gtk_icon_set_render_icon):
	* gtk/gtkstyle.c (gtk_default_render_icon): Accept a NULL
	style.
2004-06-26 04:58:33 +00:00
Matthias Clasen
1bc88a20d0 Typo fix. 2004-06-10 03:12:04 +00:00
Matthias Clasen
2072f9268d Draw focus indication in the color wheel using standard focus style.
2004-05-07  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkhsv.c: Draw focus indication in the color wheel using
	standard focus style.  (#63071, Bill Haneman, idea for new
	style by Owen Taylor)

	* gtk/gtkstyle.c (gtk_default_draw_focus): Support drawing on
	focus on the colorwheel via details.
2004-05-07 14:52:10 +00:00
Mark McLoughlin
a794a492f4 Use the PRELIGHT fg color for drawing the expander when prelit. Fixes
2004-03-11  Mark McLoughlin  <mark@skynet.ie>

        * gtk/gtkstyle.c: (gtk_default_draw_expander): Use the PRELIGHT
        fg color for drawing the expander when prelit. Fixes problem
        with the HighContrast theme: bug #136789.
2004-03-11 08:19:34 +00:00
Federico Mena Quintero
74f3471610 Remove spurious semicolon. Thanks to Kjartan Maraas for pointing it out.
2004-03-10  Federico Mena Quintero  <federico@ximian.com>

	* gtk/gtkstyle.c (draw_dot): Remove spurious semicolon.  Thanks to
	Kjartan Maraas for pointing it out.
2004-03-11 01:16:09 +00:00
Owen Taylor
160edfcf63 Fix g_return_if_fail() that was checking draw_shadow. (#136669, Morten
Tue Mar  9 13:49:14 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c (gtk_paint_polygon): Fix
        g_return_if_fail() that was checking draw_shadow.
        (#136669, Morten Welinder)
2004-03-09 18:52:56 +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
0459484caa hu Feb 26 15:43:43 2004 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.[ch]: Export insertion cursor drawing functionality
        in a simplified form as gtk_draw_insertion_cursor().
        (#99031, request from Alex Larsson)

        * gtk/gtktextdisplay.c gtk/gtkentry.c gtk/gtklabel.c:
        Adapt to new gtk_draw_insertion_cursor().

        * gtk/gtkradiomenuitem.c (gtk_radio_menu_item_class_init)
        gtk/gtkstyle.c (gtk_style_class_init): Add some missed
        Since: 2.4.

        * gtk/gtkiconfactory.c (icon_size_settings_changed)
          gtk/gtkicontheme.c (do_theme_change)
          gtk/gtkrc.c (_gtk_rc_context_get_default_font_name)
        * gtk/gtksettings.c (gtk_settings_notify):
        _gtk_rc_reset_styles => gtk_rc_reset_styles.
2004-02-26 20:59:01 +00:00
Owen Taylor
e81b19c5ee Make realize and unrealize signals. (#73310)
Wed Feb 25 12:44:49 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.[ch]: Make realize and unrealize signals. (#73310)
2004-02-25 18:03:12 +00:00
Owen Taylor
d0a4abcbf4 Free style->icon_factories (#130128)
Wed Feb 25 09:46:34 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c (gtk_style_finalize): Free
        style->icon_factories (#130128)
2004-02-25 15:15:32 +00:00
Matthias Clasen
40983a1294 Make the paned handles gray when the the widget is_focus() but not
Fri Feb 20 00:21:38 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkstyle.c (gtk_default_draw_handle):
	(gtk_default_draw_box): Make the paned handles gray when the the
	widget is_focus() but not HAS_FOCUS().  (#122751, Soeren Sandmann)
2004-02-19 23:20:07 +00:00
Matthias Clasen
6c935950b2 Clip narrow columns in rtl-oriented tree views (#128089,
Tue Feb  3 01:38:06 2004  Matthias Clasen  <maclas@gmx.de>

	Clip narrow columns in rtl-oriented tree views (#128089,
	chinen@jp.ibm.com):

	* gtk/gtkstyle.c (gtk_default_draw_option):
	* gtk/gtkstyle.c (gtk_default_draw_check): Clip to the
	given area.

	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
	Use the right clip area when calling gtk_cell_renderer_render().
	* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_cell_draw_focus):
	Use the right clip area when calling gtk_paint_focus().
	* gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_render):
	Use the right clip area when calling gtk_paint_toggle() or
	gtk_paint_check().
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render):
	Clip to the expose_area when drawing the background rectangle.
2004-02-03 00:40:56 +00:00
Matthias Clasen
81191b4588 Fix doc comment. (#126369, Olexiy Avramchenko)
Thu Nov  6 20:41:40 2003  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkstyle.c (gtk_style_attach): Fix doc comment.
	(#126369, Olexiy Avramchenko)
2003-11-06 19:42:39 +00:00
Soeren Sandmann
7913e63f69 remove correction on x when detail is "menuitem". With the new menu look
Tue Jul  8 19:57:14 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstyle.c (gtk_default_draw_arrow): remove correction on x
	when detail is "menuitem". With the new menu look is isn't needed
	anymore.

	* gtk/gtktoolitem.c (gtk_tool_item_toolbar_reconfigured): queue a
	resize here, so that tool items will get a chance to relayout
	themselves based on the toolbar configuration.

	change DEFAULT_SPACE_SIZE to 4 instead of 5

	* gtk/gtktoolbar.c
	Get rid of "!GTK_BIN (item)->child means separator". Separators
	are widgets in their own right

	change DEFAULT_SPACE_SIZE to 4 instead of 5

	(get_space_size): remove this function
	(toolbar_item_is_homogeneous): new function

	* gtk/gtkseparatortoolitem.c
	(gtk_separator_tool_item_size_request): new function.

Tue Jul  8 14:10:35 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtktoggletoolbutton.h: use private data, add new
	internal function _gtk_toggle_tool_button_get_button()

	* gtk/gtktoolbutton.h: move to private data

	* gtk/gtkradiotoolbutton.c, gtk/gtktoolbutton.c: updates for new
	private data.
2003-07-08 18:20:45 +00:00
Soeren Sandmann
e9b612a8a1 better drawing of GtkMenuItem add notes about GtkMenu remove leftover
Sun Jul  6 17:21:23 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/widget_geometry.txt: better drawing of GtkMenuItem
	* docs/widget_geometry.txt: add notes about GtkMenu
	* gtk/gtkstyle.c: remove leftover "#include "gtkhandlebox.h""
2003-07-06 15:33:56 +00:00
Soeren Sandmann
c8515b2f8d add vertical_padding style property.
Sat Jul  5 10:34:00 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

        * gtk/gtkmenu.c: add vertical_padding style property.

        * gtk/gtkmenuitem.c: add style properties toggle_spacing,
        arrow_spacing and horizontal_padding. Also center separators and
        make them a bit taller.

        * gtk/*menuitem.c: use new style properties.

        * docs/widget_geometry.txt: Add note about GtkMenuItem

        * gtk/gtkstyle.c
        (gtk_default_draw_vline, gtk_default_draw_hline):
        fix +/-1 errors.

        (gtk_default_draw_shadow): draw a black border around menus.

        * gtk/gtkvseparator, gtk/gtkhseparator.c, gtk/gtkmenuitem.c: fix
        calls to gtk_paint_hline() and gtk_paint_vline() (they take x1,
        x2 and y1, y2 respectively, not x, width and y, height).
2003-07-06 13:14:28 +00:00
Matthias Clasen
59bd288630 Doc additions and fixes. 2003-04-15 22:51:04 +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
Kristian Rietveld
2fb74b135b only count the special cell if it is also visible,
Thu Jan 30 23:48:30 2003  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_count_special_cell):
        only count the special cell if it is also visible,
        (_gtk_tree_view_column_get_neighbor_sizes): only take the width into
        account from visible cells,
        (gtk_tree_view_column_cell_get_position): likewise, (Reported and
        testcase provided by Vasco Alexandre da Silva Costa, via IRC,
        tracking bug was #104563).

Thu Jan 30 23:46:15 2003  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action):
        subtract expander space and focus line space from the extra space
        we are about the allocate. (Fixes #104635).

Thu Jan 30 23:42:03 2003  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkstyle.c (apply_affine_on_point): fix rouding error
        (Fixes #96252, patch from Soeren Sandmann).
2003-01-30 22:42:21 +00:00
Matthias Clasen
14ee65b66a Data constness fixes. (#75754) 2002-12-10 21:39:53 +00:00
Soeren Sandmann
439d61b96f new default color scheme based on the GNOME stock icon palette. (#80691,
Tue Dec 10 12:40:30 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkmenuitem.c, gtk/gtkstyle.c, gtk/gtkrc.c: new default
	color scheme based on the GNOME stock icon palette. (#80691,
	Tuomas Kuosmanen, Garrett LeSage, Owen Taylor)

	* gtk/gtknotebook.c (gtk_notebook_real_remove): take a new
	parameter, "destroying", and don't emit the switch-page signals
	when it is true (fix #64832, reported by Jarred Keuch)

	* gtk/gtklabel.c (gtk_label_set_property): remove unused
	variable.
2002-12-10 12:02:43 +00:00
Owen Taylor
2a455794b7 Remove unused draw_spin_entry_shadow(). (#80229)
Mon Dec  9 19:31:59 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.c (draw_spinbutton_shadow): Remove
        unused draw_spin_entry_shadow(). (#80229)
2002-12-10 00:34:44 +00:00
Anders Carlsson
65ab094e54 Fix doc comment.
2002-12-03  Anders Carlsson  <andersca@gnu.org>

	* gtk/gtkstyle.c: Fix doc comment.
2002-12-03 19:23:26 +00:00
Kristian Rietveld
a09f497c36 add a gtk_list_store_sort_iter_changed line for some special case ...
Tue Nov 26 22:26:04 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtk{tree,list}store.c (gtk_{tree,list}_store_real_set_value):
        add a gtk_list_store_sort_iter_changed line for some special
        case ... (#96647 (issue 1), testcases from Soeren Sandmann and
        Daniel Elstner).

Tue Nov 26 22:18:06 2002  Kristian Rietveld  <kris@gtk.org>

        Inconsistent state for toggle renderers, requested by Paolo Bacchilega
        in #88130.

        * gtk/gtktreeprivate.h: move GtkCellRendererInfo here.

        * gtk/gtkcellrenderer.c: moved GtkCellRendererInfo away,
        fix some indentation issues.

        * gtk/gtkcellrenderertoggle.c (gtk_cell_renderer_toggle_class_init),
        (gtk_cell_renderer_toggle_set_property),
        (gtk_cell_renderer_toggle_get_property),
        (gtk_cell_renderer_toggle_render): add an inconsistent property.

        * gtk/gtkstyle.c (gtk_default_draw_check),
        (gtk_default_draw_option): support drawing inconsistent
        options/checks for cells.

Tue Nov 26 22:14:14 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_editing_done),
        (gtk_cell_renderer_text_start_editing): add a focus_out_id to avoid
        calling _editing_done twice (which has nasty side-effects). (#96647,
        (issue 2) testcase from Soeren Sandmann).

Tue Nov 26 22:12:21 2002  Kristian Rietveld  <kris@gtk.org>

        #82739, patch from Padraig O'Briain.

        * gtk/gtktreeviewcolumn.[ch]: add
        gtk_tree_view_column_cell_get_position()

Tue Nov 26 22:06:29 2002  Kristian Rietveld  <kris@gtk.org>

        Yes, this chunk breaks ABI compatibility. Owen knows about it and
        agreed with it. It doesn't break ABI that bad though, things will
        still work. Please keep it silent :P.

        This patch fixes some keynav issues reported by Narayana Pattipati
        in #81633. (Also mentioned in #92037 (Sun tracking bug)).

        * gtk/gtkmarshalers.list: add two silly marshalers

        * gtk/gtktreeview.[ch] (gtk_tree_view_real_select_all),
        (gtk_tree_view_real_unselect_all),
        (gtk_tree_view_real_select_cursor_row),
        (gtk_tree_view_real_toggle_cursor_row),
        (gtk_tree_view_real_expand_collapse_cursor_row),
        (gtk_tree_view_real_start_interactive_search): change the return
        type from void to gboolean, update prototypes, functions, signals and
        entries in GtkTreeViewClass,
        (gtk_tree_view_class_init): add select_cursor_row binding for
        enter key,
        (gtk_tree_view_key_press): only navigate the header button if the
        header is also visible ...

Tue Nov 26 22:05:48 2002  Kristian Rietveld  <kris@gtk.org>

        API bit of #75745, reported by Richard Hult.

        * gtk/gtkcellrenderer.h (GtkCellRendererState): add
        GTK_CELL_RENDERER_FOCUSED, rest of this bug fix will follow later.
2002-11-26 21:28:01 +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
Soeren Sandmann
6bd08ac815 - comment out check_inconsistent_aa_bits[].
Wed Nov 13 14:01:44 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstyle.c:

          - comment out check_inconsistent_aa_bits[].

          - use fg/bg with a generated aa color to draw check and option
	    marks in menu items.

	  - use text/base to draw check and option buttons, except when
	    state is ACTIVE, in which case we use fg/bg with a generated
	    aa color.

	* tests/testgtk.c (menu_items): Add three check items.
2002-11-13 12:58:43 +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
Matthias Clasen
6b7b0c2bc3 Improve drawing of RTL submenu indicators.
* gtk/gtkstyle.c (gtk_default_draw_arrow): Improve drawing of RTL
	submenu indicators.
2002-11-08 21:55:43 +00:00
Soeren Sandmann
b1165617b7 docs/reference/gdk/tmpl/dnd.sgml docs/reference/gdk/tmpl/drawing.sgml
Fri Nov  8 20:14:52 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gdk/tmpl/dnd.sgml
	docs/reference/gdk/tmpl/drawing.sgml
	docs/reference/gdk/tmpl/gdk-unused.sgml
	docs/reference/gdk/tmpl/gdkdisplay.sgml
	docs/reference/gdk/tmpl/general.sgml
	docs/reference/gdk/tmpl/input_devices.sgml
	docs/reference/gdk/tmpl/selections.sgml
	docs/reference/gtk/tmpl/gtkcellrenderer.sgml
	docs/reference/gtk/tmpl/gtkcurve.sgml
	docs/reference/gtk/tmpl/gtkdnd.sgml
	docs/reference/gtk/tmpl/gtkitemfactory.sgml
	docs/reference/gtk/tmpl/gtkmenu.sgml
	docs/reference/gtk/tmpl/gtkoldeditable.sgml
	docs/reference/gtk/tmpl/gtkoptionmenu.sgml
	docs/reference/gtk/tmpl/gtkpreview.sgml
	docs/reference/gtk/tmpl/gtkselection.sgml
	docs/reference/gtk/tmpl/gtksocket.sgml
	docs/reference/gtk/tmpl/gtkstyle.sgml
	docs/reference/gtk/tmpl/gtktextbuffer.sgml
	docs/reference/gtk/tmpl/gtktreemodel.sgml
	docs/reference/gtk/tmpl/gtkwidget.sgml gdk/gdk.h gdk/gdkdisplay.c
	gdk/gdkdisplay.h gdk/gdkdnd.h gdk/gdkdraw.c gdk/gdkdrawable.h
	gdk/gdkinput.h gdk/gdkselection.h gdk/x11/gdkdisplay-x11.c
	gdk/x11/gdkdnd-x11.c gdk/x11/gdkselection-x11.c gtk/gtkcurve.h
	gtk/gtkdnd.h gtk/gtkitemfactory.c gtk/gtkitemfactory.h
	gtk/gtkmenu.h gtk/gtkoldeditable.c gtk/gtkoldeditable.h
	gtk/gtkoptionmenu.h gtk/gtkplug.c gtk/gtkplug.h gtk/gtkpreview.h
	gtk/gtkrange.h gtk/gtkselection.c gtk/gtkselection.h
	gtk/gtksocket.c gtk/gtksocket.h gtk/gtkstyle.c gtk/gtkstyle.h
	gtk/gtktextlayout.c gtk/gtktextlayout.h gtk/gtktreemodel.c
	gtk/gtktreemodel.h gtk/gtkwidget.h

	Trivial s/foo/foo_/ fixes to make gtk.h includable with -Wshadow
	without warnings. (#91680)
2002-11-08 19:41:50 +00:00
Matthias Clasen
00943af834 Automatic RTL flipping for some more widgets. 2002-11-02 00:18:14 +00:00
Kristian Rietveld
ecb42dc789 Another feature to create truly ugly TreeViews!: style properties for the
Wed Oct 23 01:03:43 2002  Kristian Rietveld  <kris@gtk.org>

        Another feature to create truly ugly TreeViews!: style properties
        for the even/odd colors used for row hinting. (#71595, reported
        by Owen Taylor).

        * gtk/gtktreeview.c (gtk_tree_view_class_init): add even_row_color
        and odd_row_color style properties.

        * gtk/gtkstyle.c (get_darkened_gc): support darken_count == 0 case,
        (gtk_default_draw_flat_box): rework cell coloring code to support
        user-provided even/odd row colors.

Wed Oct 23 01:01:52 2002  Kristian Rietveld  <kris@gtk.org>

        Cache signal IDs to speed up signal emission. This is a good speedup
        because GtkTreeModel emits a big number of signals.

        * gtk/gtktreemodel.c (gtk_tree_model_base_init): save IDs returned
        by g_signal_new,
        (gtk_tree_model_row_changed): use g_signal_emit instead of
        g_signal_emit_by_name,
        (gtk_tree_model_row_inserted): ditto,
        (gtk_tree_model_row_has_child_toggled): ditto,
        (gtk_tree_model_row_deleted): ditto,
        (gtk_tree_model_rows_reordered): ditto.

Wed Oct 23 00:56:15 2002  Kristian Rietveld  <kris@gtk.org>

        * gtk/gtktreeselection.c (model_changed): new function,
        (gtk_tree_selection_selected_foreach): monitor changes in the model,
        bail out if the model has been changed from the foreach func.
        (#50263, reported by Havoc Pennington).

        * gtk/gtktreeselection.c (_gtk_tree_selection_internal_select_node):
        free anchor if applicable (#94868, reported and testcase provided by
        Daniel Elstner).
2002-10-22 23:05:29 +00:00
Manish Singh
cb7c950af0 Deprecation cleanup
Tue Oct  8 17:34:26 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkmain.c gtk/gtkscrolledwindow.[ch] gtk/gtksettings.c
        gtk/gtkstatusbar.[ch] gtk/gtkstyle.c gtk/gtktoolbar.[ch]
        gtk/gtkviewport.[ch] gtk/gtkwindow.[ch]: Deprecation cleanup
2002-10-09 00:38:22 +00:00
Owen Taylor
15896b962d Make icon sizes configurable (#70648, slightly based on a patch from Bill
Tue Sep 24 16:40:14 2002  Owen Taylor  <otaylor@redhat.com>

	Make icon sizes configurable (#70648, slightly based
	on a patch from Bill Haneman, Brian Cameron)

	* gtk/gtkiconfactory.[ch]: Add
	gtk_icon_size_lookup_for_settings().

	* gtk/gtksettings.c: Add gtk-icon-sizes XSETTING

	* gtk/gtkiconfactory.c: Make icon sizes per-GtkSettings.

	* gtk/gtkstyle.c: Use gtk_icon_size_lookup_for_settings()

	* gtk/gtkrc.[ch]: Privately export _gtk_rc_reset_styles()
	to force all the widgets to recompute their appearance.
2002-09-24 21:03:58 +00:00
Soeren Sandmann
429409d40f Draw radio buttons more symmetric. Draw shadow out bevels slightly
Wed Sep 11 12:33:34 2002  Soeren Sandmann  <sandmann@daimi.au.dk>

	* gtk/gtkstyle.c: Draw radio buttons more symmetric. Draw shadow
	out bevels slightly different. Fix drawing of top right corner of
	etched in shadows.
2002-09-11 10:40:57 +00:00
Owen Taylor
090a1ac1cb Add a note that yes, we do know what () means and we can't change it.
Mon Aug  5 14:50:13 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkitemfactory.h: Add a note that yes, we do know
	what () means and we can't change it.

	Fixes for warnings reported by David L. Cooper II

	* tests/testtext.c: Warning fixes. Fix order of arguments
	to gtk_message_dialog_new(). (#85891)

	* gtk/gtktreeitem.c (gtk_tree_item_paint): Fix incorrect
	use GTK_STATE_INSENSITIVE for a shadow type. (Not clear
	what the drawing intent was, but it's ENABLE_BROKEN
	anyways.) (#85880)

	* gtk/gtktexttypes.c: Use character literals
	instead of direct constants to avoid warning. (#85878)

	* gtk/theme-bits/decompose-bits.c gtk/gtkstyle.c:
	Fix some signed/unsigned problems (#85876)

	* gtk/gtksignal.c (gtk_signal_newv): Add an explicit
	cast from GtkSignalRunType to GSignalFlags. (#85875)

	* gtk/gtkitemfactory.c (gtk_item_factory_add_item): Fix
	use of guint instead of GdkModifierType (#85871)

	* gtk/gtkimmulticontext.c (gtk_im_multicontext_append_menuitems):
	Fix signed/unsigned problem (#85870)

	* gtk/gtkimcontext.c (gtk_im_context_class_init): Get
	rid of GtkType/Signal*. (Fixes #85869 as a side effect)

	* gtk/gtkdnd.c (gtk_drag_get_cursor): Fix some
	signed/unsigned warnings (#85865)
2002-08-05 18:52:28 +00:00
Owen Taylor
63489392e6 New demo for window migration between different displays and screens.
Thu Aug  1 19:09:39 2002  Owen Taylor  <otaylor@redhat.com>

	* demos/gtk-demo/changedisplay.c: New demo for
	window migration between different displays and screens.

	* gtk/gtkrc.c gtkstyle.[ch]: Add
	_gtk_style_init_for_settings(), so that gtkrc.c
	can initialize the styles it creates for the
	right display.

	* gdk/gdkdisplaymanager.c (gdk_screen_get_default)
	* gtk/gtksettings.c (gtk_settings_get_default)
	* gtk/gtkstyle.c (gtk_style_init): Handle absence of
	a default screen.

	* gdk/x11/gdkmain-x11.c (_gdk_windowing_set_default_display):
	Handle display == NULL.x

	* gdk/gdkdisplay.c (gdk_display_dispose): Free the
	event queue.

	* gdk/x11/gdkevents-x11.c gdk/x11/gdkdisplay-x11.c:
	Remove the event source when closing a display.

	* gdk/gdkdisplay.[ch]: Add a ::closed signal, dispose()
	isn't convenient enough by itself.

	* gdk/x11/gdkevents-x11.c (gdk_xsettings_watch_cb):
	Create foreign windows for watch windows if there isn't
	an existing window, instead of installing a global filter.

	* gdk/x11/gdkscreen-x11.c gdk/x11/gdkprivate-x11.h
	gdk/x11/gdkevents-x11.c (_gdk_x11_events_uninit_screen):
	Clean up the xsettings_client when we are done with
	it.

	* gdk/x11/gdkevents-x11.c (_gdk_events_init): Remove
	excess call to _gdk_x11_events_init_screen()
2002-08-01 23:43:13 +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