Updating branch refs/heads/master to 48c64b8449981052a4e5f67dc5100bfdecd670ef (commit) from 2ac7254a72fb858fb34c0337f9011813a2744fc9 (commit)
commit 48c64b8449981052a4e5f67dc5100bfdecd670ef Author: Christian Dywan <christ...@twotoasts.de> Date: Sat Feb 12 17:28:42 2011 +0100 Copy the array of stock items to unbreak translations postler/postler-app.vala | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/postler/postler-app.vala b/postler/postler-app.vala index 9d865ec..9d3b878 100644 --- a/postler/postler-app.vala +++ b/postler/postler-app.vala @@ -106,7 +106,10 @@ public class Postler.App : Unique.App { }; public static void register_stock_items () { + /* We use translation_domain as a fallback icon name. We need to copy + the array and reset the domain, otherwise translations break. */ var factory = new Gtk.IconFactory (); + Gtk.StockItem[] stock_items_new = {}; foreach (var item in stock_items) { var icon_set = new Gtk.IconSet (); var icon_source = new Gtk.IconSource (); @@ -118,8 +121,9 @@ public class Postler.App : Unique.App { icon_source.set_icon_name (item.stock_id); icon_set.add_source (icon_source); factory.add (item.stock_id, icon_set); + stock_items_new += item; } - Gtk.stock_add (stock_items); + Gtk.stock_add (stock_items_new); factory.add_default (); } _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org http://foo-projects.org/mailman/listinfo/xfce4-commits