summaryrefslogtreecommitdiff
path: root/gtk/gtklabel.c
Commit message (Collapse)AuthorAgeFilesLines
* Make link coloring in labels optionalMatthias Clasen2009-07-091-6/+78
| | | | | | Turns out that link coloring is expected for actual hypertext-like use, but when using links just as 'mutant button', then it gets in the way.
* Merge fix for bgo#315462 - Make GtkLabel deal with too-small height ↵Federico Mena Quintero2009-05-121-3/+20
|\ | | | | | | | | | | allocations gracefully Merge branch 'gtk-2-16'
| * bgo#315462 - Make GtkLabel deal with too-small height allocations gracefullyFederico Mena Quintero2009-05-121-3/+20
| | | | | | | | | | | | | | | | | | | | Previously we would always align the top of the text with the label's allocation-plus-padding. However, this makes a single-line label inside a GtkButton look badly clipped when the button has a smaller allocation than its requisition. So, for single-line labels we respect the alignment even if it doesn't fit within the label's allocation. But for multi-line labels, we give preference to showing the first line, to give the user some context. Signed-off-by: Federico Mena Quintero <federico@novell.com>
* | Add a separate keybinding signal for activating linksMatthias Clasen2009-05-111-48/+72
| | | | | | | | | | | | Keeping the keybinding signal and the regular signal separate is cleaner and allows us to pass the uri as a parameter to the activate-link signal.
* | Add link support to GtkLabelMatthias Clasen2009-05-111-220/+1279
|/ | | | | This patch is based on SexyUrlLabel, but with significantly enhanced functionality: keynav, tooltips, context menu, theming.
* Accept a NULL string.Matthew Barnes2009-02-061-2/+1
| | | | | | | | | 2009-02-06 Matthew Barnes <mbarnes@redhat.com> * gtk/gtklabel.c (gtk_label_set_label): Accept a NULL string. svn path=/trunk/; revision=22289
* Implement select-by-words for selectable labelsMatthias Clasen2009-01-221-4/+46
| | | | svn path=/trunk/; revision=22168
* Correct some copy-and-paste mistakes in keybinding signal docs. PointedMatthias Clasen2009-01-191-1/+1
| | | | | | | | | | * gtk/gtkentry.c: * gtk/gtklabel.c: * gtk/gtktextview.c: Correct some copy-and-paste mistakes in keybinding signal docs. Pointed out by Pascal Terjan. svn path=/trunk/; revision=22140
* Doc additionsMatthias Clasen2008-12-291-1/+50
| | | | svn path=/trunk/; revision=22001
* gtk_label_set_attributes() now applies attributes on top of any markup orTristan Van Berkom2008-11-061-16/+50
| | | | | | | | | | * gtk/gtklabel.c: gtk_label_set_attributes() now applies attributes on top of any markup or mnemonic attributes (bug 558409). * README: Updated and added release notes for 2.16 svn path=/trunk/; revision=21764
* gtk/gtkcellrenderertext.h gtk/gtkentry.[ch] gtk/gtkimcontext.hMichael Natterer2008-10-301-2/+3
| | | | | | | | | | | | | | 2008-10-30 Michael Natterer <mitch@gimp.org> * gtk/gtkcellrenderertext.h * gtk/gtkentry.[ch] * gtk/gtkimcontext.h * gtk/gtklabel.c * gtk/gtkstyle.h: <pango/pango.h> is pulled in by <gdk/gdk.h>, remove its inclusion here. svn path=/trunk/; revision=21735
* gtk/gtkaccellabel.c gtk/gtkaction.c gtk/gtkclist.c gtk/gtkcolorbutton.cSven Neumann2008-08-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-08-12 Sven Neumann <sven@gimp.org> * gtk/gtkaccellabel.c * gtk/gtkaction.c * gtk/gtkclist.c * gtk/gtkcolorbutton.c * gtk/gtkctree.c * gtk/gtkdialog.c * gtk/gtkdnd-quartz.c * gtk/gtkdnd.c * gtk/gtkentry.c * gtk/gtkfilechooserdefault.c * gtk/gtkfilesel.c * gtk/gtkgamma.c * gtk/gtkiconview.c * gtk/gtkkeyhash.c * gtk/gtklabel.c * gtk/gtkmenu.c * gtk/gtkmenubar.c * gtk/gtkpaned.c * gtk/gtkrecentchooserdialog.c * gtk/gtkrecentchooserutils.c * gtk/gtkselection.c * gtk/gtksizegroup.c * gtk/gtktextbtree.c * gtk/gtktextbuffer.c * gtk/gtktextview.c * gtk/gtktoolbar.c * gtk/gtktreemodel.c * gtk/gtkuimanager.c * gtk/gtkwindow-decorate.c * gtk/gtkwindow.c: use canonical signal names in some more places that I missed earlier. Also changed this in the documentation and comments. svn path=/trunk/; revision=21094
* consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance)Michael Natterer2008-08-121-10/+10
| | | | | | | | | | | 2008-08-12 Michael Natterer <mitch@imendio.com> * gtk/*.c: consistently chain up using GTK_FOO_CLASS(parent_class)->bar(instance) instead of (*GTK_FOO_CLASS(parent_class))->bar(instance). svn path=/trunk/; revision=21085
* gtk/gtklabel.c gtk/gtklayout.c gtk/gtklist.c use canonical signal names.Sven Neumann2008-08-111-13/+13
| | | | | | | | | | | | 2008-08-11 Sven Neumann <sven@gimp.org> * gtk/gtklabel.c * gtk/gtklayout.c * gtk/gtklist.c * gtk/gtklistitem.c: use canonical signal names. svn path=/trunk/; revision=21064
* Trivial doc fixMatthias Clasen2008-07-151-1/+1
| | | | svn path=/trunk/; revision=20829
* Revert name changeCody Russell2008-07-011-1/+1
| | | | svn path=/trunk/; revision=20724
* Practically everything changed.Cody Russell2008-06-301-1/+1
| | | | | | | | | | | | | 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
* Bug 530255 – GtkAboutDialog cuts off comments label Followup patch fromBehdad Esfahbod2008-06-291-1/+3
| | | | | | | | | | | | 2008-06-29 Behdad Esfahbod <behdad@gnome.org> Bug 530255 – GtkAboutDialog cuts off comments label Followup patch from Jan Arne Petersen * gtk/gtklabel.c (gtk_label_get_layout_offsets): Ensure layout. svn path=/trunk/; revision=20703
* Include "config.h" instead of <config.h> Command used: find -nameJohan Dahlin2008-06-221-1/+1
| | | | | | | | | | | | 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
* Remove an unused variable.Johan Dahlin2008-06-191-2/+0
| | | | | | | | | | 2008-06-19 Johan Dahlin <jdahlin@async.com.br> * gtk/gtklabel.c (gtk_label_set_text_with_mnemonic): Remove an unused variable. svn path=/trunk/; revision=20460
* 2.13.1GTK_2_13_1Matthias Clasen2008-05-301-1/+1
| | | | svn path=/trunk/; revision=20246
* Bug 56355 – GtkLabel - Not all changes propagate correctlyJan Arne Petersen2008-05-291-24/+12
| | | | | | | | | | | | | | | 2008-05-29 Jan Arne Petersen <jpetersen@jpetersen.org> Bug 56355 – GtkLabel - Not all changes propagate correctly * gtk/gtklabel.c: (gtk_label_recalculate), (gtk_label_set_label), (gtk_label_set_markup_with_mnemonic), (gtk_label_parse_uline), (gtk_label_set_text_with_mnemonic), (gtk_label_set_use_underline): Call gtk_label_setup_mnemonic from gtk_label_recalculate. Add notifications of mnemonic-keyval changes. svn path=/trunk/; revision=20237
* Subtract logical.x from x to fix the wrong position for right and centerJan Arne Petersen2008-05-251-2/+4
| | | | | | | | | | | 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
* Added <attributes> / <attribute> custom tags to parse pango attributesTristan Van Berkom2008-04-111-1/+346
| | | | | | | | | | | * gtk/gtklabel.c: Added <attributes> / <attribute> custom tags to parse pango attributes into labels. * tests/buildertest.c: Added tests for GtkLabel custom tag parsing. svn path=/trunk/; revision=19995
* Use gtk_drag_*_add_{text,uri}_targets instead of hardcoded target tables.Matthias Clasen2008-02-161-9/+12
| | | | | | | | | | | | | | 2008-02-15 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c: * gtk/gtkfilesel.c: * gtk/gtklabel.c: * gtk/gtkpathbar.c: Use gtk_drag_*_add_{text,uri}_targets instead of hardcoded target tables. (#516092, Christian Persch) svn path=/trunk/; revision=19590
* gtk/gtkcellview.c gtk/gtklabel.c gtk/gtklayout.c gtk/gtklist.cMichael Natterer2008-02-071-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | 2008-02-07 Michael Natterer <mitch@imendio.com> * gtk/gtkcellview.c * gtk/gtklabel.c * gtk/gtklayout.c * gtk/gtklist.c * gtk/gtkmenu.c * gtk/gtkmenushell.c * gtk/gtkmisc.c * gtk/gtkoptionmenu.c * gtk/gtkplug.c * gtk/gtkpreview.c * gtk/gtkprogress.c * gtk/gtkradiomenuitem.c * gtk/gtkscale.c * gtk/gtkscrolledwindow.c * gtk/gtksocket.c: remove g_return_if_fail() from private functions and virtual function implementations. svn path=/trunk/; revision=19492
* gtk/gtkcontainer.c gtk/gtkexpander.c gtk/gtkframe.c gtk/gtklabel.cMichael Natterer2008-02-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 2008-02-06 Michael Natterer <mitch@imendio.com> * gtk/gtkcontainer.c * gtk/gtkexpander.c * gtk/gtkframe.c * gtk/gtklabel.c * gtk/gtkmain.c * gtk/gtkmenu.c * gtk/gtkmenuitem.c * gtk/gtkmenushell.c * gtk/gtknotebook.c * gtk/gtkseparatortoolitem.c * gtk/gtksocket.c * gtk/gtktextlayout.c * gtk/gtktoggletoolbutton.c * gtk/gtktoolbutton.c * gtk/gtktoolitem.c * gtk/gtktree.c * gtk/gtktreeitem.c: replace "foo && GTK_IS_FOO (foo)" by simply "GTK_IS_FOO (foo)". svn path=/trunk/; revision=19481
* More default property value correctionsMatthias Clasen2007-12-281-1/+1
| | | | svn path=/trunk/; revision=19276
* Require gtk-doc 1.8Matthias Clasen2007-11-251-3/+3
| | | | | | | | | | | 2007-11-25 Matthias Clasen <mclasen@redhat.com> * configure.in: Require gtk-doc 1.8 * */*.c: Use gtk-doc abbreviations for examples in docs. svn path=/trunk/; revision=19041
* gtk/gtkwidget.c gtk/gtkscrolledwindow.c Correct documentation that refersCody Russell2007-08-141-1/+1
| | | | | | | | | | | | | 2007-08-14 Cody Russell <bratsche@gnome.org> * gtk/gtkwidget.c * gtk/gtkscrolledwindow.c * gtk/gtklabel.c: Correct documentation that refers to the deprecated gtk_widget_set_usize() API. Refer instead to gtk_widget_set_size_request(). (#459340, Guillaume Cottenceau) svn path=/trunk/; revision=18613
* Use a bit of the GtkLabel structure to remember that a pattern has beenMatthias Clasen2007-07-091-1/+13
| | | | | | | | | | | | | | | | | 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
* added calls to g_object_freeze/thaw_notify() so gtk_label_get_text()Michael Natterer2007-06-131-0/+4
| | | | | | | | | | | 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
* Require gtk-doc 1.6, for signal and property links.Matthias Clasen2007-05-261-50/+51
| | | | | | | | | | | | | | | | | | | 2007-05-26 Matthias Clasen <mclasen@redhat.com> * configure.in: Require gtk-doc 1.6, for signal and property links. * gtk/gtkbox.c: * gtk/gtkbutton.c: * gtk/gtkcontainer.c: * gtk/gtkdialog.c: * gtk/gtkentry.c: * gtk/gtkimage.c: * gtk/gtklabel.c: * gtk/gtkmisc.c: * gtk/gtksettings.c: * gtk/gtkwidget.c: Documentation improvements, link signals and properties where it makes sense. svn path=/trunk/; revision=17924
* Make GTK_JUSTIFY_FILL work, using pango_layout_set_justify() that worksBehdad Esfahbod2007-05-041-1/+0
| | | | | | | | | | | 2007-05-03 Behdad Esfahbod <behdad@gnome.org> * gtk/gtklabel.c (gtk_label_ensure_layout): * gtk/gtktextlayout.c (set_para_values): Make GTK_JUSTIFY_FILL work, using pango_layout_set_justify() that works now. (#435675) svn path=/trunk/; revision=17790
* add new boolean settings gtk-enable-accels and gtk-enable-mnemonics whichMichael Natterer2007-02-051-3/+74
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Use pango_matrix_transform_rectangle(). (#340141)Behdad Esfahbod2007-01-101-51/+6
| | | | | | | | | | | | | 2007-01-10 Behdad Esfahbod <behdad@gnome.org> * gdk/gdkpango.c (gdk_draw_layout_with_colors): * gtk/gtklabel.c (gtk_label_size_request): Use pango_matrix_transform_rectangle(). (#340141) * configure.in: Bump pango requirement to 1.15.3. svn path=/trunk/; revision=17129
* Fix the buildMatthias Clasen2007-01-071-1/+1
| | | | svn path=/trunk/; revision=17099
* Make line wrapping work with width-chars and max-width-chars, and simplifyMatthias Clasen2007-01-071-68/+68
| | | | | | | | | | | | 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
* Fix broken width computation, again.Behdad Esfahbod2007-01-051-2/+3
| | | | | | | | | | 2007-01-05 Behdad Esfahbod <behdad@gnome.org> * gtk/gtklabel.c (get_layout_location): Fix broken width computation, again. svn path=/trunk/; revision=17083
* Fix uninitialized width variable.Behdad Esfahbod2007-01-041-3/+3
| | | | | | | | | | 2007-01-04 Behdad Esfahbod <behdad@gnome.org> * gtk/gtklabel.c (get_layout_location): Fix uninitialized width variable. svn path=/trunk/; revision=17069
* Fix #332604, reported by Joe Wreschnig, patch by Jan Arne Petersen andMatthias Clasen2007-01-041-6/+19
| | | | | | | | | | | | | | | | 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
* Don't install cursors on insensitive widgets. (#358864, Jan Schampera)Matthias Clasen2006-12-311-5/+26
| | | | | | | | | | | | | 2006-12-30 Matthias Clasen <mclasen@redhat.com> * gtk/gtkentry.c: * gtk/gtklabel.c: * gtk/gtkpaned.c: * gtk/gtkstatusbar.c: * gtk/gtktextview.c: Don't install cursors on insensitive widgets. (#358864, Jan Schampera) svn path=/trunk/; revision=16983
* Bug 340141 – Update to Pango 1.16 APIBehdad Esfahbod2006-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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().
* Add new infrastructure for notifications of failed keyboard navigation andMichael Natterer2006-11-161-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Improve consistency of signal and property namesMatthias Clasen2006-07-061-3/+3
|
* Documentation additions and fixes.Matthias Clasen2006-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add gtk_label_set_line_wrap_mode, gtk_label_get_line_wrap_mode, and aAlexander Larsson2006-06-191-0/+72
| | | | | | | | | 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.
* More of the sameMatthias Clasen2006-05-141-1/+1
|
* Boilerplate reductionMatthias Clasen2006-05-021-42/+12
|
* added note about the inablity to do height-for-width text layout andMichael Natterer2006-05-021-0/+6
| | | | | | | | | 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.