forked from AuroraMiddleware/gtk
Mention the stripping of (_F) suffixes.
2005-12-26 Matthias Clasen <mclasen@redhat.com> * README.in: Mention the stripping of (_F) suffixes. * gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Strip a suffix of the form " (_<single character>)", since this is the preferred way for some languages to indicate accelerators. (#323956, Yang Hong)
This commit is contained in:
parent
168ad4bc79
commit
b29a1d0f7e
@ -1,5 +1,11 @@
|
|||||||
2005-12-26 Matthias Clasen <mclasen@redhat.com>
|
2005-12-26 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* README.in: Mention the stripping of (_F) suffixes.
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Strip a suffix of
|
||||||
|
the form " (_<single character>)", since this is the preferred way
|
||||||
|
for some languages to indicate accelerators. (#323956, Yang Hong)
|
||||||
|
|
||||||
* gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus
|
* gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus
|
||||||
setting.
|
setting.
|
||||||
(gtk_label_grab_focus): And use it here to select the contents of
|
(gtk_label_grab_focus): And use it here to select the contents of
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
2005-12-26 Matthias Clasen <mclasen@redhat.com>
|
2005-12-26 Matthias Clasen <mclasen@redhat.com>
|
||||||
|
|
||||||
|
* README.in: Mention the stripping of (_F) suffixes.
|
||||||
|
|
||||||
|
* gtk/gtktoolbar.c (_gtk_toolbar_elide_underscores): Strip a suffix of
|
||||||
|
the form " (_<single character>)", since this is the preferred way
|
||||||
|
for some languages to indicate accelerators. (#323956, Yang Hong)
|
||||||
|
|
||||||
* gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus
|
* gtk/gtklabel.c (gtk_label_class_init): Add a gtk-label-select-on-focus
|
||||||
setting.
|
setting.
|
||||||
(gtk_label_grab_focus): And use it here to select the contents of
|
(gtk_label_grab_focus): And use it here to select the contents of
|
||||||
|
@ -48,6 +48,10 @@ Release notes for 2.10
|
|||||||
reference. Details about floating references can be found in the docs:
|
reference. Details about floating references can be found in the docs:
|
||||||
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
|
http://developer.gnome.org/doc/API/2.0/gobject/gobject-The-Base-Object-Type.html#floating-ref
|
||||||
|
|
||||||
|
* Suffixes like (_F) are now stripped from labels when they are displayed
|
||||||
|
in toolbars. If this is not wanted, the feature can be suppressed by
|
||||||
|
inserting a Unicode control character, e.g ZWNJ.
|
||||||
|
|
||||||
Release notes
|
Release notes
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
@ -4876,11 +4876,13 @@ _gtk_toolbar_elide_underscores (const gchar *original)
|
|||||||
gchar *q, *result;
|
gchar *q, *result;
|
||||||
const gchar *p;
|
const gchar *p;
|
||||||
gboolean last_underscore;
|
gboolean last_underscore;
|
||||||
|
gint s;
|
||||||
|
|
||||||
if (!original)
|
if (!original)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
q = result = g_malloc (strlen (original) + 1);
|
s = strlen (original);
|
||||||
|
q = result = g_malloc (s + 1);
|
||||||
last_underscore = FALSE;
|
last_underscore = FALSE;
|
||||||
|
|
||||||
for (p = original; *p; p++)
|
for (p = original; *p; p++)
|
||||||
@ -4893,8 +4895,18 @@ _gtk_toolbar_elide_underscores (const gchar *original)
|
|||||||
*q++ = *p;
|
*q++ = *p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
|
|
||||||
|
if (s > 4)
|
||||||
|
{
|
||||||
|
if (original[s - 5] == ' ' &&
|
||||||
|
original[s - 4] == '(' &&
|
||||||
|
original[s - 3] == '_' &&
|
||||||
|
original[s - 1] == ')')
|
||||||
|
q[-4] = '\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user