Commit Graph

254 Commits

Author SHA1 Message Date
Michael Natterer
7f374a74ba Add new infrastructure for notifications of failed keyboard navigation and
2006-11-16  Michael Natterer  <mitch@imendio.com>

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

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

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

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

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

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

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

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

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

	* gtk/gtkradiobutton.c: ask gtk_widget_keynav_failed() to decide
	whether to to wrap-around, and don't select active items on cursor
	navigation if gtk-keynav-cursor-only is TRUE. Should look at
	gtk-keynav-wrap-around too, will look into that.
2006-11-16 12:56:30 +00:00
Matthias Clasen
f8794cccca Improve consistency of signal and property names 2006-07-06 05:14:03 +00:00
Matthias Clasen
f8f9384537 Documentation additions and fixes.
2006-06-28  Matthias Clasen  <mclasen@redhat.com>

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

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

        * gtk/gtkprogress.[hc]:
        * gtk/gtkitemfactory.[hc]: Don't unnecessarily use GTK_COMPILATION,
        remove unnecessary includes.
2006-06-29 09:18:07 +00:00
Alexander Larsson
ff865a441f Add gtk_label_set_line_wrap_mode, gtk_label_get_line_wrap_mode, and a
2006-06-19  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtk.symbols:
	* gtk/gtklabel.[ch]:
	Add gtk_label_set_line_wrap_mode, gtk_label_get_line_wrap_mode, and
	a wrap-mode property that lets you set the PangoWrapMode.
2006-06-19 14:27:50 +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
Michael Natterer
5d6f77b4ed added note about the inablity to do height-for-width text layout and
2006-05-02  Michael Natterer  <mitch@imendio.com>

	* gtk/gtklabel.c (gtk_label_set_line_wrap): added note about the
	inablity to do height-for-width text layout and suggest to use
	gtk_widget_set_size_request() for getting a label that wraps at
	some specific position.
2006-05-02 12:17:29 +00:00
Matthias Clasen
94dc872ff5 Fix padding handling 2006-02-03 05:37:06 +00:00
Behdad Esfahbod
2990e0d796 Use logical extents of the layout instead of ink extents. According to
2006-01-25  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtklabel.c (get_layout_location): Use logical extents of the
        layout instead of ink extents.  According to Pango docs, that's what
        should be used for placement.  Moreover, simply use
        pango_layout_get_pixel_size instead of getting the extents and
        dividing ourselves.
2006-01-25 16:23:33 +00:00
Behdad Esfahbod
5d80e4b65c Fix misalignment of RTL text in ellipsized GtkLabel: use layout width if
2006-01-23  Behdad Esfahbod  <behdad@gnome.org>

        * gtk/gtklabel.c (get_layout_location): Fix misalignment of RTL
        text in ellipsized GtkLabel: use layout width if set, otherwise
        fallback to ink extents width. (#322042)
2006-01-23 20:00:02 +00:00
Matthias Clasen
5c62a90e38 Fix a C99ism 2006-01-12 04:33:33 +00:00
Matthias Clasen
c5584b10ca Add some notify batching, always emit notify after setting the new value.
2006-01-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c: Add some notify batching, always
	emit notify after setting the new value.
2006-01-11 16:13:23 +00:00
Matthias Clasen
a7a85ac867 Shrink the private structs of these a bit.
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.[hc]:
	* gtk/gtklabel.[hc]: Shrink the private structs of these a bit.
2006-01-08 07:54:43 +00:00
Matthias Clasen
8f526a5dc9 Fix label alignment when width-chars is set. (#326098, Benjamin Otte)
2006-01-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (get_layout_location): Fix label alignment
	when width-chars is set.  (#326098, Benjamin Otte)
2006-01-08 06:44:11 +00:00
Matthias Clasen
8de623acd4 Don't return a value from a void function.
2006-01-05  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_grab_focus): Don't return a value from
	a void function.
2006-01-05 06:28:58 +00:00
Matthias Clasen
168ad4bc79 Add a gtk-label-select-on-focus setting. (gtk_label_grab_focus): And use
2005-12-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus
	setting.
	(gtk_label_grab_focus): And use it here to select the contents of
	the label when appropriate.
	(gtk_label_class_init): Use the same keybindings for select all/
	unselect all as GtkEntry and GtkTextView.

	* gtk/gtkdialog.c (gtk_dialog_map): When looking for the initial
	focus, avoid leaving a selection in a label.
2005-12-26 07:02:51 +00:00
Matthias Clasen
a086076057 Use GDK_WINDOW_CHILD for the selection window. (#318806, Alex Larsson)
2005-10-20  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_create_window): Use GDK_WINDOW_CHILD
	for the selection window.  (#318806, Alex Larsson)
2005-10-20 20:40:54 +00:00
Matthias Clasen
ece1601498 No point in using a mem chunk for window groups, buttons, labels.
2005-09-14  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_get_type):
	* gtk/gtkbutton.c (gtk_button_get_type):
	* gtk/gtkwindow.c (gtk_window_group_get_type): No point in
	using a mem chunk for window groups, buttons, labels.
2005-09-14 04:31:23 +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
9a86f65818 Stylistic improvements and clarifications for some blurbs. (#315520,
2005-09-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkiconview.c (gtk_icon_view_class_init):
	* gtk/gtkfilesel.c (gtk_file_selection_class_init):
	* gtk/gtkcombobox.c (gtk_combo_box_class_init):
	* gtk/gtklabel.c (gtk_label_class_init):
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init):
	Stylistic improvements and clarifications for some blurbs.
	(#315520, Clytie Siddall)
2005-09-09 16:21:15 +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
13a341e0e9 When dragging text, use a drag icon showing the (ellipsized) text that is
2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	When dragging text, use a drag icon showing the (ellipsized)
	text that is being dragged: (#161132, Kevin Duffus, patch
	by Carlos Garnacho Parro)

	* gtk/gtktextutil.h:
	* gtk/gtktextutil.c (_gtk_text_util_create_drag_icon): Add
	a function to create a pixmap for use when dragging text.

	* gtk/gtktextview.c (gtk_text_view_start_selection_dnd):
	* gtk/gtklabel.c (gtk_label_motion):
	* gtk/gtkentry.c (gtk_entry_motion_notify): Use a drag icon
	showing the text being dragged.

2005-07-11  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkentry.c (gtk_entry_move_forward_word)
	(gtk_entry_move_backward_word): Match the text view change
	to allow selecting whitespace with double-click.
2005-07-11 17:51:54 +00:00
Matthias Clasen
2ef6d354d1 Modify all of the GtkMisc widgets to round down on centering calculations
2005-06-21  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkarrow.c:
	* gtk/gtkimage.c:
	* gtk/gtklabel.c:
	* gtk/gtkpixmap.c: Modify all of the GtkMisc widgets to round down
	on centering calculations to match the behaviour of other parts
	of GTK+. (#307419, Ryan Lortie)
2005-06-21 15:38:40 +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
Matthias Clasen
e3737e59fe Fix formatting in example in the docs. (#170611, Jianfei Wang)
2005-03-17  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_set_markup): Fix formatting
	in example in the docs.  (#170611, Jianfei Wang)
2005-03-17 19:32:45 +00:00
Matthias Clasen
263bce4445 x
2005-03-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtktextbuffer.c (gtk_text_buffer_class_init):
	* gtk/gtkrange.c (gtk_range_class_init):
	* gtk/gtkscrolledwindow.c (gtk_scrolled_window_class_init):
	* gtk/gtktexttag.c (gtk_text_tag_class_init):
	* gtk/gtktextview.c (gtk_text_view_class_init):
	* gtk/gtkscrollbar.c (gtk_scrollbar_class_init):
	* gtk/gtknotebook.c (gtk_notebook_class_init):
	* gtk/gtkentry.c (gtk_entry_class_init):
	* gtk/gtkexpander.c (gtk_expander_class_init):
	* gtk/gtkarrow.c (gtk_arrow_class_init):
	* gtk/gtkalignment.c (gtk_alignment_class_init):
	* gtk/gtkbutton.c (gtk_button_class_init):
	* gtk/gtklabel.c (gtk_label_class_init):
	* gtk/gtktreeviewcolumn.c (gtk_tree_view_column_class_init):
	* gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_class_init): x
	* gtk/gtkcellrenderer.c (gtk_cell_renderer_class_init):
	* gtk/gtktreeview.c (gtk_tree_view_class_init):
	* gtk/gtkbox.c (gtk_box_class_init):
	* gtk/gtkwindow.c (gtk_window_class_init, gtk_window_class_init):
	* gtk/gtkcontainer.c (gtk_container_class_init):
	* gtk/gtkwidget.c (gtk_widget_class_init):
	* gtk/gtkobject.c (gtk_object_class_init): Use canonical names
	when registering param specs.
2005-03-09 04:04:40 +00:00
Matthias Clasen
0a206df7e9 Fix a typo. (#168646, Vincent Untz)
2005-02-27  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_size_request): Fix a typo.
	(#168646, Vincent Untz)
2005-02-28 04:33:42 +00:00
Matthias Clasen
09239601fd Revert the last change, since gtk_widget_set_style_internal() already
2005-02-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_style_set): Revert the last
	change, since gtk_widget_set_style_internal() already
	queues a resize.
2005-02-24 13:39:47 +00:00
Matthias Clasen
14fefb8617 Queue a resize, since fonts may have changed. (#164128, Phil Blundell)
2005-02-23  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_style_set): Queue a resize, since
	fonts may have changed.  (#164128, Phil Blundell)
2005-02-24 04:49:37 +00:00
Anders Carlsson
b1167d1d11 Don't pass NULL to pango_context_get_metrics. Use
2005-01-09  Anders Carlsson <andersca@gnome.org>

	* gtk/gtkcellrenderertext.c: (get_size):
	* gtk/gtklabel.c: (gtk_label_size_request):
	* gtk/gtkprogressbar.c: (gtk_progress_bar_size_request):
	Don't pass NULL to pango_context_get_metrics. Use
	pango_context_get_language instead, which is way faster.
2005-01-09 17:32:25 +00:00
Matthias Clasen
e9740d62c3 Don't forget to null the mnemonic_menu when unsetting a mnemonic, reported
2004-12-22  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_setup_mnemonic): Don't forget to
	null the mnemonic_menu when unsetting a mnemonic, reported
	by Owen Taylor.
2004-12-22 18:52:41 +00:00
Matthias Clasen
dcfcfe73b2 s/maximal/maximum/g (#161195, David Lodge)
2004-12-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c: s/maximal/maximum/g  (#161195, David Lodge)
2004-12-13 20:41:19 +00:00
Matthias Clasen
50cbd51d26 Add a max-width-chars property, which can be used to specify the width of
2004-12-13  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.[hc]: Add a max-width-chars property, which can
	be used to specify the width of the label in characters, while
	still allowing it to fall short of this length if the text
	is shorter.  (#155944, Christian Persch)

	* gtk/gtk.symbols: Add new symbols.
2004-12-13 06:34:54 +00:00
Matthias Clasen
ea3e4f7255 Fix a copy-and-paste error, noticed by Robert Ögren.
2004-12-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_setup_mnemonic): Fix a
	copy-and-paste error, noticed by Robert Ögren.
2004-12-12 18:11:47 +00:00
Matthias Clasen
f3a74ace5f Support no-Alt mnemnonics in menu bars (#101309, Owen Taylor)
2004-12-10  Matthias Clasen  <mclasen@redhat.com>

	Support no-Alt mnemnonics in menu bars  (#101309, Owen Taylor)

	* gtk/gtkwindow.c: Factor out mnemonic hash code into
	a separate file.

	* gtk/gtkmnemonichash.[hc]: Factored out mnemonic hash
	code from gtkwindow.c.

	* gtk/Makefile.am (gtk_c_sources): Add gtkmnemonichash.[hc].

	* gtk/gtkmenushell.c (struct _GtkMenuShellPrivate): Give
	menu shells their own mnemonic hash.

	* gtk/gtkmenushell.h: Add private api to support mnemonics.

	* gtk/gtklabel.c (gtk_label_setup_mnemonic): Add mnemonic to
	the menushell mnemonic hash when inside a menu.
2004-12-10 22:09:22 +00:00
Matthias Clasen
50d8e17fc3 Fix a property nick typo.
2004-12-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_class_init): Fix a property
	nick typo.
2004-12-10 03:41:04 +00:00
Owen Taylor
3d737ee8ba Add GdkPangoRenderer, a subclass of PangoRenderer targeting GDK drawables.
Sat Nov 20 15:13:51 2004  Owen Taylor  <otaylor@redhat.com>

	* gdk/gdkpango.[ch]: Add GdkPangoRenderer, a subclass of
	PangoRenderer targeting GDK drawables. Use to implement the old
	gdk_draw_layout() and friends.

	* gdk/gdkdraw.c gdk/gdkdrawable.h gdk/gdkwindow.c gdk/gdkpixmap.c:
	Add gdk_draw_glyphs_transformed() gdk_draw_trapezoids() and
	the corresponding members of GdkDrawableClass. Add a fallback
	implementation of gdk_draw_trapezoids() in terms of pixbufs.

	* gdk/gdkwindowing.h gdk/x11/gdkg-x11.h: Add
	_gdk_windowing_gc_get_foreground() to enable the fallback
	trapezoid implementation.

	* gdk/x11/gdkdrawable-x11.c gdk/x11/gdkdisplay-x11.h: Implement
	draw_glyph_transformed,	draw_trapezoids.

	* gdk/x11/gdkdrawable-x11.[ch]: Add
	_gdk_x11_drawable_draw_xtrapezoids, _gdk_x11_drawable_draw_xft_glyphs
	for use of GdkX11Renderer.

	* gdk/x11/gdkgc-x11.c gdk/x11/gdkprivate-x11.h: Implement
	GDK_TILED, GDK_STIPPLED, GDK_OPAQUE_STIPPLED in the RENDER codepath.

	* gdk/gdkpango-x11.c: Add GdkX11Renderer... a subclass of
	PangoXftRenderer that does tiles/stipples and fallback rendering
	of trapezoids without the RENDER extension.

	* gdk/gdkpango-x11.c gdk/x11/gdkscreen-x11.[ch] _gdk_x11_renderer_get:
	Add _gdk_x11_renderer_get() to get a singleton GdkX11Renderer
	for the screen.

	* gdk/x11/gdkdrawable-x11.c (get_impl_drawable): Fix a None/NULL
	confusion.

	* gtk/gtklabel.[ch] gtk/gtk.symbols: Add gtk_label_set/get_angle(),
	and an ::angle property.

	* gtk/gtklabel.c: Remove #if 0'd dead code gtk_label_paint_word().

	* gtk/gtktextdisplay.c: Switch to using a GtkTextRenderer subclass
	of GdkPangoRenderer for drawing.

	* gtk/gtktextlayout.[ch] gtk/gtktextdisplay.c: Switch to using
	gtk_attr_shape_new_with_data() to store backreferences to
	embedded pixmaps and widgets. Leave line_display->shaped_objects
	around for backwords compatibility.

	* gdk/gdkpango.[ch] (gdk_pango_context_set_colormap): Describe
	as deprecated, remove implementation.

	* gtk/gtkwidget.c (gtk_widget_create_pango_context): Remove
	call to gdk_pango_context_set_colormap.

	* demos/gtk-demo/Makefile.am demos/gtk-demo/rotated_text.c: Add
	a demo showing drawing rotated text.

	* tests/testgtk.c: Add a rotated-label test, and also a rotated
	drawing test (differs from demos/gtk-demo/rotated_text by also
	using a tile)
2004-11-21 16:24:01 +00:00
Matthias Clasen
a63d57cd49 Include gtkdnd.h (#158243, Kazuki IWAMOTO)
2004-11-15  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c: Include gtkdnd.h  (#158243, Kazuki IWAMOTO)
2004-11-15 13:40:06 +00:00
Matthias Clasen
cb87aa11c9 Implement DND for selectable labels.
2004-11-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_button_press, gtk_label_button_release)
	(gtk_label_drag_data_get): Implement DND for selectable labels.
2004-11-12 21:52:04 +00:00
Matthias Clasen
74a5fd15d7 Adjust to the current entry popup menu.
2004-11-12  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_do_popup): Adjust to the current
	entry popup menu.
2004-11-12 20:20:29 +00:00
Matthias Clasen
9ca871be3f Clip when drawing the cursor. This prevents bits of a selectable label
2004-11-09  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (draw_insertion_cursor, gtk_label_expose):
	Clip when drawing the cursor. This prevents bits of a
	selectable label leaking out from underneath the resize
	grip in a statusbar.  (#73359)
2004-11-09 14:28:34 +00:00
Matthias Clasen
b87307b918 Avoid resizing GtkStatusbar if the text of the label changes (#90955, He
2004-11-09  Matthias Clasen  <mclasen@redhat.com>

	Avoid resizing GtkStatusbar if the text of the label
	changes  (#90955, He Qiangqiang, fix proposed by
	Owen Taylor, patch by Christian Persch)

	* gtk/gtklabel.[hc]: Add a boolean single-line-mode property
	which causes the label height not to depend on the actual
	text, but only on the font.

	* gtk/gtkstatusbar.c (gtk_statusbar_init): Turn on
	single-line-mode for the label.
2004-11-09 05:04:41 +00:00
Matthias Clasen
9f3382613a Allow unsetting a pattern by passing NULL. (#156720, Tristan Van Berkom)
2004-11-03  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_set_pattern_internal): Allow
	unsetting a pattern by passing NULL.  (#156720, Tristan Van Berkom)
2004-11-03 06:20:33 +00:00
James M. Cape
ede3c39918 Rework of GtkFileChooserButton, some cleanups. Fixes #154388, #154390,
2004-10-25  James M. Cape  <jcape@ignore-your.tv>

	Rework of GtkFileChooserButton, some cleanups. Fixes #154388,
	#154390, #154390, #156272.

	* docs/reference/gtk/gtk-docs.sgml: Moved GtkFileChooserButton
	below GtkFileChooser.
	* docs/reference/gtk/gtk-sections.txt: Added
	gtk_file_chooser_button_get_width_chars(),
	gtk_file_chooser_button_set_width_chars(),
	gtk_label_set_width_chars(), gtk_label_get_width_chars().
	* docs/reference/gtk/gtk.types: Added
	gtk_cell_renderer_combo_get_type,
	gtk_cell_view_get_type,
	gtk_text_iter_get_type.
	* docs/reference/gtk/tmpl/gtkaboutdialog.sgml: Add
	"logo-icon-name" property.
	* docs/reference/gtk/tmpl/gtkcellview.sgml: Updates for
	properties
	(b/c of get_type() inclusion above).
	* docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml:
	* docs/reference/gtk/tmpl/gtklabel.sgml: Add "width-chars"
	property,
	getters/setters.
	* docs/reference/gtk/tmpl/gtkcellrenderercombo.sgml: Added.
	* gtk/gtkentrycompletion.c:
	(_gtk_entry_completion_popdown): Don't show if the entry isn't
	mapped.
	* gtk/gtkfilechooserbutton.[c,h]: (*): About 45%
	rewritten, adds "width-chars" property, icons, working save
	modes, volume/Home/Desktop friendly-naming support.
	* gtk/gtklabel.[c,h]:
	(gtk_label_class_init), (gtk_label_init),
	(gtk_label_get_property), (gtk_label_set_property),
	(gtk_label_get_width_chars), (gtk_label_set_width_chars),
	(gtk_label_size_request): Add "width-chars" property.
	* tests/testfilechooserbutton.c: Update, use 4 different buttons
	for the different ACTIONs.
	* gtk/.cvsignore: Ignore gtk-update-icon-cache.
	* tests/.cvsignore: Ignore testimage.
2004-10-26 04:29:56 +00:00
Matthias Clasen
57a61d6f9f Skip selectable labels when looking for the initial focus widget.
2004-09-29  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkdialog.c (gtk_dialog_map): Skip selectable labels when
	looking for the initial focus widget.

	* gtk/gtklabel.c (gtk_label_focus): Remove to put selectable labels
	in the regular focus chain again.
2004-09-29 05:04:31 +00:00
Jonathan Blandford
4e7e404938 Add an example to the docs.
Fri Sep 17 11:20:03 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtklabel.c (gtk_label_set_markup): Add an example to the
        docs.
2004-09-17 15:20:31 +00:00
Matthias Clasen
a578e11346 Fix #150822, reported by Christian Persch
2004-08-23  Matthias Clasen  <mclasen@redhat.com>

	Fix #150822, reported by Christian Persch

	* gtk/gtklabel.c (gtk_label_ensure_layout): Set the layout width
	appropriately when ellipsized.
	(gtk_label_size_allocate): Only set the layout width if there
	is a layout.
2004-08-23 15:37:23 +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
502c09e65c Expand the documentation for GtkLabel::ellipsize.
2004-07-26  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtklabel.c (gtk_label_class_init): Expand the documentation
	for GtkLabel::ellipsize.
2004-07-26 17:38:56 +00:00
Matthias Clasen
ccb1f08ef8 Require Pango 1.5.1 (for ellipsisation).
Thu Jul 22 01:05:16 2004  Matthias Clasen  <maclas@gmx.de>

	* configure.in: Require Pango 1.5.1 (for ellipsisation).

	* gtk/gtklabel.h:
	* gtk/gtklabel.c (gtk_label_class_init): Add a new :ellipsise
	property which controls ellipsisation of the label.  (#125250,
	Tim Van Wassenhove, patch by James M. Cape)

	* tests/testellipsise.c: Simple test for ellipsisation.
2004-07-22 05:06:39 +00:00
Owen Taylor
4bbe84b508 Check for Control-Tab or Control-Shift-Tab, not any Control-key as a
Mon Mar 15 09:54:36 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_focus): Check for
        Control-Tab or Control-Shift-Tab, not any Control-key
        as a current event ... handles the case where a dialog
        is triggered from a control accelerator better.
2004-03-15 14:57:54 +00:00
Owen Taylor
796d15ef8b Fix a missing return value.
Thu Mar 11 14:07:18 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_focus): Fix a missing return
        value.
2004-03-11 19:10:09 +00:00
Owen Taylor
b5ddc23be3 Back out the put-labels-into-the-standard-focus-chain patches from bug
Thu Mar 11 13:58:24 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkmessagedialog.c gtk/gtklabel.c: Back out the
        put-labels-into-the-standard-focus-chain patches
        from bug #59707.

        * gtk/gtklabel.c (gtk_label_focus): Only put the
        label in the tab chain when the control key is pressed.
2004-03-11 19:07:45 +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
fa4514afc6 Handle dynamically resolved bidi direction when drawing the cursor.
Mon Mar  1 12:23:06 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c: Handle dynamically resolved bidi direction
        when drawing the cursor. (#118541)

        * gtk/gtkentry.c (get_better_cursor_x): Use entry->resolved_dir;

        * gtk/gtkentry.c (draw_insertion_cursor): Fix up
        some confusion in parameter ordering.
2004-03-01 18:10:40 +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
32ba5ce7d8 Patch from Padraig O'Briain to add gtk_widget_add/remove_mnemonic_label,
Wed Feb 25 12:21:32 2004  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.[ch] gtk/gtklabel.c: Patch from
        Padraig O'Briain to add gtk_widget_add/remove_mnemonic_label,
        gtk_widget_get_mnemonic_labels(). (#103456)
2004-02-25 17:28:34 +00:00
Federico Mena Quintero
9a98cd8f87 Fix #59707.
2004-02-04  Federico Mena Quintero  <federico@ximian.com>

	Fix #59707.

	* gtk/gtklabel.c (gtk_label_focus): Removed, so we don't ignore
	the focus chain.
	(gtk_label_button_press): Fix prototype.
	(gtk_label_button_release): Likewise.
	(gtk_label_motion): Likewise.

	* tests/testgtk.c (create_message_dialog): For the dialog with
	only GTK_BUTTONS_CLOSE, make GTK_RESPONSE_CLOSE the default.
2004-02-04 21:55:33 +00:00
Matthias Clasen
362158dc78 Right-justify labels in rtl mode. (#129071, chinen@jp.ibm.com)
Tue Feb  3 02:04:44 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtklabel.c (gtk_label_ensure_layout): Right-justify labels
	in rtl mode.  (#129071, chinen@jp.ibm.com)

Tue Feb  3 02:01:25 2004  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkmenushell.c (gtk_real_menu_shell_move_current): Exchange the
	meaning GTK_MENU_DIR_PARENT/CHILD and GTK_MENU_DIR_PREV/NEXT in rtl
	mode.  (#107528)
2004-02-03 01:03:56 +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
Mark McLoughlin
7dac6a2b01 Allow gtk_label_set_attributes() take NULL. See bug #128517.
2003-12-04  Mark McLoughlin  <mark@skynet.ie>

        * gtk/gtklabel.c: (gtk_label_set_attributes_internal): Allow
        gtk_label_set_attributes() take NULL. See bug #128517.
2003-12-04 18:17:23 +00:00
Matthias Clasen
2435e831cf Deprecate gtk_paned_computed_position(). (#97077)
2003-01-31  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkpaned.h: Deprecate gtk_paned_computed_position(). (#97077)

	* gtk/gtkmain.h: Deprecate the gtk_timeout_*, gtk_idle_*
	and gtk_input_* functions.  (#71596)

	* gtk/gtkentry.c (gtk_entry_move_cursor):
	* gtk/gtklabel.c (gtk_label_move_cursor): Handle
	GTK_MOVEMENT_HORIZONTAL_PAGES in switches.

	* gdk/gdk.h: Deprecate gdk_wcstombs() and gdk_mbstowcs().  (#79803)

	* gtk/gtkitemfactory.h:
	* gtk/gtkitemfactory.c (gtk_item_factory_add_foreign): Deprecate.
	(#69244)

	* gtk/tmpl/gtkmain.sgml: Deprecate the gtk_timeout_*, gtk_idle_*
	and gtk_input_* functions.  (#71596)
2003-01-31 00:08:35 +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
ff9c2c5669 Add _gtk_window_unset_focus_and_default(), use to clear the focus and
Tue Nov 12 15:13:58 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkwidget.c gtk/gtkwindow.[ch]: Add
        _gtk_window_unset_focus_and_default(), use to clear
        the focus and default out of parts of the widget
        heirarchy that we are hiding.

        * gtk/gtkwidget.c (gtk_widget_propagate_screen_changed_recurse):
        Fix typo that was resulting in missed screen-change
        notifies.

        * gtk/gtkwindow.c (do_focus_change): Allow for
        widget->window == NULL.

        * gtk/gtklabel.c (gtk_label_screen_changed): Clear the
        layout here not in hierarchy changed to handle the case
        where the toplevel was moved between screens.
2002-11-12 21:08:29 +00:00
Manish Singh
8b6a832f26 deprecation cleanup
Sat Oct  5 16:11:22 2002  Manish Singh  <yosh@gimp.org>

        * gtk/gtkmisc.[ch] gtk/gtklabel.[ch] gtk/gtkimage.[ch]
        gtk/gtkdrawingarea.[ch] gtk/gtknotebook.[ch]: deprecation cleanup
2002-10-05 23:15:39 +00:00
Owen Taylor
6cb79658c2 Export _gdk_draw_pixbuf as gdk_draw_pixbuf(), rename the _draw_pixbuf
Wed Oct  2 17:46:53 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkdrawable.h gdk/gdkinternals.h gdk/gdkdraw.c
        gdk/gdkwindow.c gdk/gdkdrawable.c: Export _gdk_draw_pixbuf
        as gdk_draw_pixbuf(), rename the _draw_pixbuf virtual
        function to draw_pixbuf. (#60582)

        * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable[_alpha]):
        Note that these functions are obsolete in the docs.

        * gdk/gdkpixbuf-render.c (gdk_pixbuf_render_to_drawable):
        Remove all the sanity checks now we make it clear
        that it is obsolete name for gdk_draw_pixbuf().

        * gdk/gdkpixmap.c gtk/gtkcellrendererpixbuf.c gtk/gtkimage.c
          gtk/gtkpixmap.c demos/testpixbuf-scale.c demos/testpixbuf.c
          tests/testrgb.c: Use gdk_draw_pixbuf() everywhere.

        * gtk/gtklabel.c (gtk_label_set_mnemonic_widget): Fix
        some warnings.

        * gdk/gdkinternals.h (struct _GdkEventPrivate): Fix missed
        bit from last gdk_event_get_screen() change.

        * gdk/gdkevents.c: Couple of small fixes.i
2002-10-02 22:30:37 +00:00
Owen Taylor
d1d235adcb Make the reference to the mnemonic widget weak. (#93334, Murray Cumming)
Mon Sep 30 15:45:49 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_set_mnemonic_widget):
        Make the reference to the mnemonic widget weak.
        (#93334, Murray Cumming)
2002-09-30 20:02:00 +00:00
Owen Taylor
f3f02c0e1e ri Sep 27 16:23:49 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtklabel.c : Replaced instances where strlen (label->label) is
        used to get a byte code with strlen (label->text) as label->text
        contains the actual display text, while label->label contains
        markup / mnemonics. (#92683, Patch from Shivram U
        <shivaram.upadhyayula@wipro.com>, with some additions.)

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal):
        Fix a leftover, now incorrect comment.
2002-09-27 20:50:44 +00:00
Soren Sandmann
77eee887f3 Minor documentation fixes
2002-08-10  Soren Sandmann  <sandmann@daimi.au.dk>

	* docs/reference/gtk/tree_widget.sgml,
	docs/reference/gtk/tmpl/gtkdialog.sgml,
	docs/reference/gtk/tmpl/gtkentry.sgml,
	docs/reference/gtk/tmpl/gtkfilesel.sgml,
	docs/reference/gtk/tmpl/gtkfontsel.sgml,
	docs/reference/gtk/tmpl/gtkfontseldlg.sgml,
	docs/reference/gtk/tmpl/gtktreemodel.sgml,
	docs/reference/gtk/tmpl/gtkwidget.sgml, gdk/x11/gdkdisplay-x11.c,
	gtk/gtkbbox.c, gtk/gtkbox.c, gtk/gtkbutton.c, gtk/gtkcellrenderer.c,
	gtk/gtkcellrendererpixbuf.c, gtk/gtkcellrenderertext.c,
	gtk/gtkcheckmenuitem.c, gtk/gtkcontainer.c, gtk/gtkcurve.c,
	gtk/gtkdialog.h, gtk/gtkentry.c, gtk/gtkfilesel.c, gtk/gtkfontsel.c,
	gtk/gtkframe.c, gtk/gtkhandlebox.c, gtk/gtkiconfactory.c,
	gtk/gtkimage.c, gtk/gtkinvisible.c, gtk/gtkitemfactory.c,
	gtk/gtklabel.c, gtk/gtklayout.c, gtk/gtkmenu.c, gtk/gtkprogress.c,
	gtk/gtkprogressbar.c, gtk/gtkscrolledwindow.c, gtk/gtksizegroup.c,
	gtk/gtktable.c, gtk/gtktextiter.c, gtk/gtktexttag.c,
	gtk/gtktexttag.h, gtk/gtktextview.c, gtk/gtktogglebutton.c,
	gtk/gtktoolbar.c, gtk/gtktreemodel.c, gtk/gtktreeselection.c,
	gtk/gtktreestore.c, gtk/gtktreeview.c, gtk/gtktreeviewcolumn.c,
	gtk/gtkviewport.c, gtk/gtkwidget.c, gtk/gtkwidget.h,
	gtk/gtkwindow.c:

	Minor documentation fixes

	(#89254, patch from Brett Nash;
	 #85809, patch from daten@dnetc.org;
	 #76391, patch from Ross Burton;
	 #74559, Manuel Clos;
	 #73569, #72005, Alexey A. Malyshev;
	 #70061, patch from Dennis Bj"orklund;
	 #64566, #63388, #58328, #57499, #81007, #77349, Vitaly Tishkov;
	 #78932, Vitaly Tishkov, patch from Ross Burton;
	 #73306)
2002-08-10 09:55:41 +00:00
Owen Taylor
9eb97b045c Patch from Soeren Sandmann to improve GtkLabel behavior when it gets a too
Mon Aug  5 17:20:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c: Patch from Soeren Sandmann
        to improve GtkLabel behavior when it gets
        a too small allocation. (Always display the
        initial portion.) (#71742)
2002-08-05 21:22:22 +00:00
Owen Taylor
621fb7466a Replace gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
Tue Jun 18 14:41:48 2002  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkcursor.[ch] gdk/x11/gdkcursor-x11.c
        gdk/x11/gdkprivate-x11.h gdk/win32/gdkcursor-win32.c: Replace
        gdk_cursor_new_for_screen() with gdk_cursor_new_for_display().
        (#85671)

        * gtk/gtkclist.c gtk/gtkcombo.c gtk/gtkcurve.c gtk/gtkdnd.c
        gtk/gtkentry.c gtk/gtkhandlebox.c gtk/gtkhsv.c gtk/gtklabel.c
        gtk/gtkpaned.c gtk/gtktext.c gtk/gtktextview.c
        gtk/gtktipsquery.c gtk/gtktreeviewcolumn.c:
        Adapt to above change.
2002-06-18 20:59:44 +00:00
Owen Taylor
11aed263b7 Set the width of the layout to the actual wrap width (our requisition) not
Tue May 14 16:44:09 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtklabel.c (gtk_label_ensure_layout): Set
        the width of the layout to the actual wrap width
        (our requisition) not the width we set when calculating
        the width. This results in the lines being justified
        within the correct area. (#79157, Anders Carlsson)

        * gtk/gtkaccelgroup.c gtk/gtkmarshelers.list: Corrected
        registered parameter types of "accel_activate" and
        "accel_changed" signals. (Patch from Murray Cumming, #78798)

        * gtk/gtkrc.c (gtk_rc_make_default_dir): Switch
        binary-version and type to correspond to the
        current ordering in _gtk_get_module_path.
        (#78746, Sergey Kuzminov)

        * gtk/gtkrc.c (gtk_rc_get_module_dir): Add docs
        pointing to the GTK_PATH documentation.

        * gtk/Makefile.am (uninstall-local): Delete
        key themes as well. (#81286, Kristian Rietveld.)
2002-05-14 20:55:22 +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
Michael Meeks
a3547cf3b1 add freeze / thaws to stop deluge of 'notify' signals.
2002-04-11  Michael Meeks  <michael@ximian.com>

	* gtk/gtklabel.c
	(gtk_label_parse_uline, gtk_label_set_text),
	(gtk_label_set_text_with_mnemonic): add freeze / thaws
	to stop deluge of 'notify' signals.
2002-04-12 12:43:01 +00:00
Owen Taylor
c848fbbcfe Centralize lookup and caching of cursor GC's here.
Sun Mar  3 14:26:33 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkstyle.[ch] (_gtk_get_insertion_cursor_gc):
        Centralize lookup and caching of cursor GC's here.

        * gtk/gtkentry.[ch] gtk/gtktextview.[ch] gtk/gtktextdisplay.c
        gtk/gtklabel.c: Move to using _gtk_get_insertion_cursor_gc().

        * gtk/gtkentry.c (gtk_entry_expose): Draw cursors
        under the text, not over the text.

        * gtk/gtkwidget.c (gtk_widget_class_init): add
        a secondary-cursor-color property.

        * gtk/gtkwidget.c (gtk_widget_class_init): Decrease
        the default aspect ratio to 1/25 (0.04).

        * tests/testgtkrc (bell_duration): Comment out
        cursor color setting.
2002-03-03 19:59:29 +00:00
Havoc Pennington
8ddb92e491 change to pass in the cursor direction always, not just when we need an
2002-02-24  Havoc Pennington  <hp@pobox.com>

	* gtk/gtkstyle.c (_gtk_draw_insertion_cursor): change to pass in
	the cursor direction always, not just when we need an arrow, so we
	can flip the cursor around its axis for RTL. Resolves #72372

	* gtk/gtkentry.c (gtk_entry_draw_cursor): update for
	draw_insertion_cursor change

	* gtk/gtklabel.c (gtk_label_draw_cursor): ditto

	* gtk/gtktextdisplay.c (gtk_text_layout_draw): ditto
2002-02-25 04:19:05 +00:00
Owen Taylor
60c1630edc Take border width into account.
Sun Feb 24 14:15:45 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextview.c (widget_to_buffer): Take border
        width into account.

        * gtk/gtklabel.c (get_label_wrap_width): Don't use GdkFont
        to compute wrap width ... GdkFont will pull in X11 core
        fonts.
2002-02-24 19:56:14 +00:00
Owen Taylor
708e1a9574 Implement "fuzzy" key binding lookups; allow matches on key and level but
Wed Feb 20 14:26:47 2002  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtkkeyhash.[ch]: Implement "fuzzy" key binding lookups;
        allow matches on key and level but not group. Also, implement
        ignoring "consumed modifiers correctly."

        * gtk/gtkaccelgroup.c gtk/gtkbindings.c: Convert to using
        GtkKeyHash.

        * gtk/gtkdebug.h gtk/gtkmain.c: Support GTK_DEBUG=keybindings

        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Fill in
        the group for key release events as well as key press events.

        * gdk/gdkkeys.h gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        Rename unused_modifiers to consumed_modifiers, make the docs and
        non-Xkb implementation match the Xkb implementation.

        * gdk/linux-fb/gdkkeyboard-fb.c gdk/win32/gdkkeys-win32.c: Propagate
        doc and parameter name changes.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state):
        XkbTranslateKeyCode doesn't handle LockMask, we need to handle
        it ourselves.

        * gdk/x11/gdkkeys-x11.c (gdk_keymap_translate_keyboard_state): Force
        <Shift>Tab to give GDK_ISO_Left_Tab, since we need consistency
        to allow dealing with ISO_Left_Tab.

        * gtk/gtkwindow.c gtk/gtktextview.c gtk/gtkscrolledwindow.c
        gtk/gtkpaned.c gtk/gtkcombo.c  gtk/gtknotebook.c:
        Remove inappropriate uses of GDK_ISO_Left_Tab. (GDK_ISO_Left_Tab
        or <Shift>Tab both are equivalent as a binding specifier.)

        * gtk/gtkbutton.c (gtk_button_class_init): Make ::activate
        GTK_RUN_ACTION, so you can bind an accelerator to it.

        * gtk/gtklabel.c (gtk_label_set_uline_text_internal): Call
        gdk_unicode_to_keyval on the mnemonic character.

        * tests/testgtk.c: Add a test for the new fuzzy key binding matching.
2002-02-21 17:14:10 +00:00
Owen Taylor
8f5c2c7625 Patch from Bill Haneman and Padraig O'Briain to add cursor_aspect_ratio
Thu Feb 14 16:46:48 2002  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkentry.c gtk/gtktextdisplay.c gtk/gtklabel.c
	gtk/gtkstyle.[ch] gtk/gtkwidget.c: Patch from Bill
	Haneman and Padraig O'Briain to add cursor_aspect_ratio
	style property to GtkWidget to allow theming the aspect
	ratio of the cursor.

	* gtk/gtkentry.c gtk/gtktextview.c gtk/gtklabel.c
	gtk/gtkwidget.c tests/testgtkrc: Move cursor-color style property
	to GtkWidget.
2002-02-14 21:49:02 +00:00
Darin Adler
6ec06edbbf isspace -> g_ascii_isspace Remove gdki8n.h include. Remove <ctype.h>
* demos/gtk-demo/main.c: (load_file): isspace -> g_ascii_isspace
	* gdk/x11/gdkim-x11.c: Remove gdki8n.h include.
	* gdk/x11/gdkkeys-x11.c: Remove <ctype.h> include.
	* gdk/x11/gdkmain-x11.c: Remove <ctype.h> include.
	* gtk/fnmatch.c: Remove <ctype.h> include.
	* gtk/gtkaccelgroup.c: Remove <ctype.h> include.
	* gtk/gtkaccellabel.c: (gtk_accel_label_refetch): toupper ->
	g_unichar_toupper, toupper -> g_unichar_totile
	* gtk/gtkbindings.c: Remove <ctype.h> include.
	* gtk/gtkfontsel.c: Remove <ctype.h> include.
	* gtk/gtkiconfactory.c: Remove <ctype.h> include.
	* gtk/gtkinputdialog.c: Remove <ctype.h> include.
	* gtk/gtklabel.c: Remove <ctype.h> include.
	* gtk/gtkmain.c: Remove <ctype.h> include.
	* gtk/gtkmenu.c: Remove <ctype.h> include.
	* gtk/gtkoldeditable.c: Remove <ctype.h> include.
	* gtk/gtkrc.c: Remove <ctype.h> include.
	* gtk/gtktextbtree.c: Remove <ctype.h> include.
	* gtk/gtktextiter.c: Remove <ctype.h> include.
	* gtk/gtktextsegment.c: Remove <ctype.h> include.
2002-02-08 19:12:34 +00:00
Matthias Clasen
e2b730ac43 General property notification cleanup. 2002-01-28 18:52:49 +00:00
Anders Carlsson
529a9205e0 Set the cursor to GDK_XTERM.
2002-01-27  Anders Carlsson  <andersca@gnu.org>

	* gtk/gtklabel.c (gtk_label_create_window): Set the cursor to
	GDK_XTERM.
2002-01-27 18:54:36 +00:00
Havoc Pennington
c627d7299b sgml fixes
2002-01-11  Havoc Pennington  <hp@pobox.com>

	* gtk/running.sgml: sgml fixes

	* gtk/tmpl/gtksignal.sgml: sgml fixes

	* gtk/tmpl/gtklabel.sgml: do the intro section

2002-01-11  Havoc Pennington  <hp@pobox.com>

	* gtk/gtklabel.c: put in more links to Pango markup format docs
	(gtk_label_set_justify): mention gtk_misc_set_alignment
2002-01-12 04:39:07 +00:00
Matthias Clasen
3aabcd2891 More precise documentation about underscores and mnemonics. (#66380)
* gtk/gtklabel.c (gtk_label_new_with_mnemonic),
        gtk/gtkbutton.c (gtk_button_new_with_mnemonic): More precise
        documentation about underscores and mnemonics. (#66380)

        * gtk/gtktextiter.c (gtk_text_iter_backward_word_starts): Fix
        cyclic reference in docs.

        * gtk/gtklabel.c (gtk_label_set_justify): Correct documentation
        of default value. (#65402)

        * gtk/gtkmain.c (gtk_set_locale, gtk_disable_set_locale):
        Markup fixes.

        * gdk-pixbuf-io.c, gdk-pixbuf-animation.c, gdk-pixbuf-data.c,
        gdk-pixbuf-loader.c, gdk-pixbuf-scale.c, gdk-pixbuf-util.c,
        gdk-pixdata.c: Markup fixes.

        * gtk/text_widget.sgml: More precise wording. (#63388)

        * gtk/tmpl/gtksignal.sgml (GTK_SIGNAL_OFFSET): Add docs.

        * gtk/resources.sgml: Fix markup of mail URLs.

        * gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkobject.sgml: Markup fixes.

        * gtk/tmpl/gtktoolbar.sgml (gtk_toolbar_{prepend,append}_element):
        Expand documentation. (#60471)

        * gtk/tmpl/gtkmain.sgml: Remove misleading information about
        gtk_set_locale().  (#65758)
2001-12-20 23:09:29 +00:00
Jonathan Blandford
59bdb19b0e keep in sync with insert_page_menu. Code duplication is bad.
Wed Dec 12 15:01:33 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync
	with insert_page_menu.  Code duplication is bad.

	* gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the
	wrong fix yesterday.
2001-12-12 20:10:52 +00:00
Jonathan Blandford
9361b2c2e4 Small fix to let mnemonics work with notebooks.
Tue Dec 11 18:55:16 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtklabel.c (gtk_label_mnemonic_activate): Small fix to let
	mnemonics work with notebooks.
2001-12-11 23:56:46 +00:00
Matthias Clasen
31df9723e5 Fix docs. (#66383)
* gtk/gtklabel.c: Fix docs. (#66383)

        * gtk/gtkbbox.c (gtk_button_box_set_child_secondary): Fix docs.
        (#66278, #66280)

        * gdk/gdkwindow.h (gdk_window_get_deskrelative_origin),
        gdk/gdkimage.h (gdk_image_get): Deprecate. (#66208)

        * gtk/gtkcolorsel.c (gtk_color_selection_set_update_policy):
        Don't emit a g_warning() about being deprecated. (#66208)

        * gtk/gtkaccellabel.c (gtk_accel_label_set_accel_widget): Add docs.

        * gtk/gtkcontainer.c: Doc fixes.

        * gtk/gtkliststore.c (gtk_list_store_clear): Add docs; misc doc fixes.

        * gtk/gtkstyle.c (gtk_style_attach): Add docs.

        * gdk-pixbuf.h (gdk_pixbuf_ref, gdk_pixbuf_unref,
        gdk_pixbuf_animation_ref, gdk_pixbuf_animation_unref):
        Deprecate. (#66208)

        * gtk/tmpl/gtklabel.sgml: Remove redundant docs. (#66383)

        * gtk/tree_widget.sgml: Typo fix. (#66256)

        * gdk-pixbuf/Makefile.am (SCAN_OPTIONS): Add --deprecated-guards.

        * gtk/tmpl/gtktext.sgml, gtk/tmpl/gtktree.sgml,
        gtk/tmpl/gtktreeitem.sgml: Updates.
2001-12-06 21:38:12 +00:00
Alex Larsson
c7cd3421f7 Return FALSE from expose handlers.
2001-12-03  Alex Larsson  <alexl@redhat.com>

	* gtk/gtkaccellabel.c:
	* gtk/gtkarrow.c:
	* gtk/gtkcolorsel.c:
	* gtk/gtkcontainer.c:
	* gtk/gtklabel.c:
	* gtk/gtktextview.c:
	* gtk/gtktogglebutton.c:
	* gtk/gtktreeview.c:
	* gtk/gtkwindow.c:
	Return FALSE from expose handlers.
2001-12-03 22:11:40 +00:00
Owen Taylor
96e6febed8 Change default for justify to GTK_JUSTIFY_LEFT. Assuming that multiline
Mon Nov 19 14:08:18 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtklabel.c (gtk_label_init): Change default for
	justify to GTK_JUSTIFY_LEFT. Assuming that multiline
	labels are most often wrapped labels, this gives better
	compatibility with GTK+-1.2, where justification was
	ignored for wrapped labesl and is a more sensible
	default in any case. (#64489)

	* gtk/gtklabel.c (gtk_label_class_init): Fix default
	for wrap property to FALSE.
2001-11-19 19:20:21 +00:00
Owen Taylor
a036c6e59f Make gtkmarshal.list/gtkmarshal.h only for compatibility with GTK+-1.2;
Sat Nov 17 18:26:45 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/Makefile.am gtk/gtkmarshal.list gtk/gtkmarshalers.list
	gtk/*.c gtk/gtksignal.h: Make gtkmarshal.list/gtkmarshal.h
	only for compatibility with GTK+-1.2; and deprecate it;
	put all marshalers we actually use into gtkmarshalers.list
	and use the _gtk_marshal_ prefix for these marshalers.
2001-11-17 23:28:51 +00:00
Alex Larsson
cfb30b2d72 Don't recalculate the layout on each gkt_label_ensure_layout () for
2001-11-14  Alex Larsson  <alexl@redhat.com>

	* gtk/gtklabel.c:
	Don't recalculate the layout on each gkt_label_ensure_layout () for
	wrapped labels.
2001-11-14 23:10:53 +00:00
Matthias Clasen
3470c6347f Rearrange docs (#64566)
* gtk/gtkbutton.c (gtk_button_get_label): Rearrange docs (#64566)

        * gtk/gtktextbuffer.c (gtk_text_buffer_create_tag): Typo fix (#64474)

        * gtk/gtkruler.c (gtk_ruler_get_metric): Typo fix (#64470)

        * gtk/gtknotebook.c (gtk_notebook_prepend_page): Typo fix (#64467)

        * gtk/gtklabel.c: Documentation fixes (#64452)

        * docs/reference/gdk/Makefile.am (MKDB_OPTIONS),
        docs/reference/gdk-pixbuf/Makefile.am (MKDB_OPTIONS),
        docs/reference/gtk/Makefile.am (MKDB_OPTIONS): Add --sgml-mode.

        * docs/reference/gdk-pixbuf/tmpl/file-saving.sgml,
        docs/reference/gdk-pixbuf/tmpl/module_interface.sgml,
        docs/reference/gdk-pixbuf/tmpl/gdk-pixbuf-xlib-rgb.sgml: Consistent short descriptions.
        * docs/reference/gtk/tmpl/gtkprogressbar.sgml: Remove duplicate docs. (#64469)

        * docs/reference/gtk/gtk-sections.txt: Add missing TITLEs (#64459, #6456
2001-11-14 22:36:23 +00:00
Darin Adler
2b83deaedf Fix an obvious typo where it says LEFT instead of CENTER.
* gtk/gtklabel.c: (gtk_label_ensure_layout): Fix an obvious
	typo where it says LEFT instead of CENTER.
2001-11-08 18:56:23 +00:00
Jonathan Blandford
1b1b2e8264 remove extraneous gtk_label_clear_layout (label)
Fri Nov  2 11:51:49 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtklabel.c (gtk_label_select_region_index): remove
	extraneous gtk_label_clear_layout (label)
2001-11-02 17:18:01 +00:00
Owen Taylor
2145a4ef10 Add a "menu" property and notify on it. (#62798, Padraig O'Briain)
Wed Oct 31 18:23:47 2001  Owen Taylor  <otaylor@redhat.com>

	* gtk/gtkoptionmenu.c (gtk_option_menu_detacher):
	Add a "menu" property and notify on it. (#62798,
	Padraig O'Briain)

	* gtk/gtkselection.[ch] gtk/{gtkentry.c, gtkfilesel.c,
	gtkoldeditable.c, gtktextbuffer.c, gtktextview.c}:
	Fix set_text to take a gchar, not a guchar, and to have
	a len argument.
2001-10-31 23:49:09 +00:00
Hans Breuer
e2e6940366 to simplify parsing for exported functions: - made implementation
2001-10-27  Hans Breuer  <hans@breuer.org>

	* gtk/gtkbbox.c gtk/gtkctree.c gtk/gtkhbbox.c
	  gtk/gtkimmulticontext.c gtk/gtklabel.c gtk/gtkliststore.c
	  gtk/gtkmenu.c gtk/gtkpaned.c gtk/gtkrc.c gtk/gtkscale.c
	  gtk/gtkstyle.c gtk/gtktextbuffer.c gtk/gtktextlayout.c
	  gtk/gtktexttag.c gtk/gtktexttagtable.c gtk/gtktextview.c
	  gtk/gtktreestore.c gtk/gtkvbbox.c :
	to simplify parsing for exported functions:
	- made implementation signature static, when the local
	  prototype already was
	- put the functions return value on it's own line
	- added as space between the function name and the
	  opening bracket

	* gtk/gtk.def : added the remaining exported functions
2001-10-27 00:41:12 +00:00