2008-05-25 Jan Arne Petersen <jpetersen@jpetersen.org>
* gtk/gtklabel.c: (get_layout_location): Subtract logical.x from x to
fix the wrong position for right and center justified labels with
logical.x > 0 (#530255).
svn path=/trunk/; revision=20146
2007-07-09 Matthias Clasen <mclasen@redhat.com>
* gtklabel.[ch]: Use a bit of the GtkLabel structure to
remember that a pattern has been set.
(gtk_label_set_pattern_internal): Don't do anything if
a specific pattern has been set.
(gtk_label_set_pattern): set the new bit to TRUE when
setting a pattern, and recalculate everything if the
pattern is unset. Fix gtk_label_set_pattern() not working
anymore. (#452861, Vincent Untz)
svn path=/trunk/; revision=18426
2007-06-13 Michael Natterer <mitch@imendio.com>
* gtk/gtklabel.c (gtk_label_set_label): added calls to
g_object_freeze/thaw_notify() so gtk_label_get_text() doesn't
return the old text when called from a "notify::label" callback.
svn path=/trunk/; revision=18120
2007-02-05 Michael Natterer <mitch@imendio.com>
* gtk/gtksettings.c: add new boolean settings gtk-enable-accels
and gtk-enable-mnemonics which enable/disable accelerators and
mnemonics (bug #72375, based on a patch from Tommi Komulainen).
* gtk/gtkwindow.c (gtk_window_activate_key)
* gtk/gtkmenushell.c (gtk_menu_shell_key_press): don't invoke them
if the resp. setting is FALSE.
* gtk/gtkaccellabel.c (gtk_accel_label_refetch)
* gtk/gtklabel.c (gtk_label_set_pattern_internal): don't display
them if the setting is FALSE.
* gtk/gtklabel.c: added signal connection to the screen's settings
object and traverse all widgets on the screen when the setting
changes. It's slightly ugly to also update GtkAccelLabels here,
but less ugly than connecting and traversing all widgets twice.
svn path=/trunk/; revision=17262
2007-01-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtklabel.c: Make line wrapping work with width-chars
and max-width-chars, and simplify the storage of wrap-width.
(#322580, Itai Bar-Haim)
svn path=/trunk/; revision=17098
2007-01-03 Matthias Clasen <mclasen@redhat.com>
Fix#332604, reported by Joe Wreschnig, patch
by Jan Arne Petersen and Behdad Esfahbod.
* gtk/gtklabel.c (gtk_label_size_allocate): Only
set the width of the layout when necessary.
(get_layout_location): Use pango_layout_get_pixel_extents()
instead of pango_layout_get_width().
svn path=/trunk/; revision=17052
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-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-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-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-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)
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-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-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-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-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-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-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)