[glade3] Fixed translatable stock ids (bug 352446)
- From: Tristan Van Berkom <tvb src gnome org>
- To: svn-commits-list gnome org
- Subject: [glade3] Fixed translatable stock ids (bug 352446)
- Date: Thu, 25 Jun 2009 17:44:08 +0000 (UTC)
commit 537020886d67b5afce27b247599604a781453982
Author: Tristan Van Berkom <vantr TheBully local>
Date: Thu Jun 25 13:42:55 2009 -0400
Fixed translatable stock ids (bug 352446)
* plugins/gtk+/glade-gtk.c: glade_gtk_button_write_widget (), make stock
button labels save as non-translatable automatically (bug 352446).
ChangeLog | 3 +++
plugins/gtk+/glade-gtk.c | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 2fe59cb..622e25b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
can float outside of widget->properties in some cases, shouldnt effect the
widget though).
+ * plugins/gtk+/glade-gtk.c: glade_gtk_button_write_widget (), make stock
+ button labels save as non-translatable automatically (bug 352446).
+
2009-06-22 Tristan Van Berkom <tvb gnome org>
* configure.ac, NEWS: Rolling Glade 3.6.6
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 6619489..270142a 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -4088,7 +4088,7 @@ glade_gtk_notebook_add_child (GladeWidgetAdaptor *adaptor,
/* Just destroy placeholders */
if (GLADE_IS_PLACEHOLDER (child))
- gtk_widget_destroy (child);
+ gtk_widget_destroy (GTK_WIDGET (child));
else
{
gwidget = glade_widget_get_from_gobject (child);
@@ -5926,13 +5926,16 @@ glade_gtk_button_write_widget (GladeWidgetAdaptor *adaptor,
/* Do not save GtkColorButton and GtkFontButton label property */
if (!(GTK_IS_COLOR_BUTTON (widget->object) || GTK_IS_FONT_BUTTON (widget->object)))
{
+ /* Make a copy of the GladeProperty,
+ * override its value and ensure non-translatable if use-stock is TRUE
+ */
prop = glade_widget_get_property (widget, "label");
- /* Make a copy of the GladeProperty, override its value if use-stock is TRUE */
prop = glade_property_dup (prop, widget);
glade_widget_property_get (widget, "use-stock", &use_stock);
if (use_stock)
{
glade_widget_property_get (widget, "stock", &stock);
+ glade_property_i18n_set_translatable (prop, FALSE);
glade_property_set (prop, stock);
}
glade_property_write (prop, context, node);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]