Commit b29a1d0f authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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)
parent 168ad4bc
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
setting.
(gtk_label_grab_focus): And use it here to select the contents of
......
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
setting.
(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:
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
=============
......
......@@ -4876,11 +4876,13 @@ _gtk_toolbar_elide_underscores (const gchar *original)
gchar *q, *result;
const gchar *p;
gboolean last_underscore;
gint s;
if (!original)
return NULL;
q = result = g_malloc (strlen (original) + 1);
s = strlen (original);
q = result = g_malloc (s + 1);
last_underscore = FALSE;
for (p = original; *p; p++)
......@@ -4893,8 +4895,18 @@ _gtk_toolbar_elide_underscores (const gchar *original)
*q++ = *p;
}
}
*q = '\0';
if (s > 4)
{
if (original[s - 5] == ' ' &&
original[s - 4] == '(' &&
original[s - 3] == '_' &&
original[s - 1] == ')')
q[-4] = '\0';
}
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment