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

Avoid gratitious use of g_strdup_printf().

2007-07-13  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkrecentmanager.c (get_uri_shortname_for_display): Avoid
        gratitious use of g_strdup_printf().

        * gtk/gtkrecentchooserdefault.c:
        * gtk/gtkrecentchoosermenu.c: Mark some strings for
        translation.  (#439480, Murray Cumming)



svn path=/trunk/; revision=18465
parent da989212
2007-07-13 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentmanager.c (get_uri_shortname_for_display): Avoid
gratitious use of g_strdup_printf().
* gtk/gtkrecentchooserdefault.c:
* gtk/gtkrecentchoosermenu.c: Mark some strings for
translation. (#439480, Murray Cumming)
2007-07-13 Kristian Rietveld <kris@imendio.com>
#408327, improve tooltip positioning.
......
......@@ -1272,7 +1272,7 @@ gtk_recent_chooser_default_add_filter (GtkRecentChooser *chooser,
/* display new filter */
name = gtk_recent_filter_get_name (filter);
if (!name)
name = "Untitled filter";
name = _("Untitled filter");
gtk_combo_box_append_text (GTK_COMBO_BOX (impl->filter_combo), name);
......
......@@ -795,9 +795,21 @@ gtk_recent_chooser_menu_create_item (GtkRecentChooserMenu *menu,
/* avoid clashing mnemonics */
if (count <= 10)
text = g_strdup_printf ("_%d. %s", count, escaped);
/* This is the label format that is used for the first 10 items
* in a recent files menu. The %d is the number of the item,
* the %s is the name of the item. Please keep the _ in front
* of the number to give these menu items a mnemonic.
*
* Don't include the prefix "recent menu label|" in the translation.
*/
text = g_strdup_printf (Q_("recent menu label|_%d. %s"), count, escaped);
else
text = g_strdup_printf ("%d. %s", count, escaped);
/* This is the format that is used for items in a recent files menu.
* The %d is the number of the item, the %s is the name of the item.
*
* Don't include the prefix "recent menu label|" in the translation.
*/
text = g_strdup_printf (Q_("recent menu label|%d. %s"), count, escaped);
item = gtk_image_menu_item_new_with_mnemonic (text);
......
......@@ -2136,7 +2136,7 @@ get_uri_shortname_for_display (const gchar *uri)
rest = get_method_string (uri, &method);
local_file = g_filename_display_basename (rest);
name = g_strdup_printf ("%s: %s", method, local_file);
name = g_strconcat (method, ": ", local_file, NULL);
g_free (local_file);
g_free (method);
......
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