mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Use a bit of the GtkLabel structure to remember that a pattern has been
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
This commit is contained in:
parent
50499f030c
commit
4a5da8d09a
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
||||
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)
|
||||
|
||||
2007-07-09 Claude Paroz <claude@2xlibre.net>
|
||||
|
||||
* configure.in: Changed uz to uz@cyrillic and uz@Latn to uz.
|
||||
|
@ -798,6 +798,7 @@ gtk_label_init (GtkLabel *label)
|
||||
|
||||
label->use_underline = FALSE;
|
||||
label->use_markup = FALSE;
|
||||
label->pattern_set = FALSE;
|
||||
|
||||
label->mnemonic_keyval = GDK_VoidSymbol;
|
||||
label->layout = NULL;
|
||||
@ -1537,6 +1538,9 @@ gtk_label_set_pattern_internal (GtkLabel *label,
|
||||
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
if (label->pattern_set)
|
||||
return;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (label)),
|
||||
"gtk-enable-mnemonics", &enable_mnemonics,
|
||||
NULL);
|
||||
@ -1557,7 +1561,15 @@ gtk_label_set_pattern (GtkLabel *label,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_LABEL (label));
|
||||
|
||||
label->pattern_set = FALSE;
|
||||
|
||||
if (pattern)
|
||||
{
|
||||
gtk_label_set_pattern_internal (label, pattern);
|
||||
label->pattern_set = TRUE;
|
||||
}
|
||||
else
|
||||
gtk_label_recalculate (label);
|
||||
|
||||
gtk_label_clear_layout (label);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (label));
|
||||
|
@ -62,6 +62,7 @@ struct _GtkLabel
|
||||
guint have_transform : 1;
|
||||
guint in_click : 1;
|
||||
guint wrap_mode : 3;
|
||||
guint pattern_set : 1;
|
||||
|
||||
guint mnemonic_keyval;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user