[nautilus/thumbnail-limit-tweaks: 23/23] preferences-window: mark string as translatable



commit 05ee250995cbdc2f43f5cb879a83bb913f2db667
Author: Ernestas Kulik <ernestask gnome org>
Date:   Fri Mar 2 17:10:22 2018 +0200

    preferences-window: mark string as translatable
    
    611f381d561024b0a590237c31fc0612e6698530 added a spin button for
    thumbnailable file size limit. The units are displayed in the text, but
    the string is not translatable.

 src/nautilus-preferences-window.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/src/nautilus-preferences-window.c b/src/nautilus-preferences-window.c
index 66b5e1782..377728eff 100644
--- a/src/nautilus-preferences-window.c
+++ b/src/nautilus-preferences-window.c
@@ -354,16 +354,15 @@ nautilus_preferences_window_setup_list_column_page (GtkBuilder *builder)
     gtk_box_pack_start (GTK_BOX (box), chooser, TRUE, TRUE, 0);
 }
 
-static gboolean format_spin_button(GtkSpinButton *spin_button,
-                                   gpointer       user_data)
+static gboolean
+format_spin_button (GtkSpinButton *spin_button,
+                    gpointer       user_data)
 {
-    GtkAdjustment *adjustment;
-    int value;
+    gint value;
     gchar *text;
 
-    adjustment = gtk_spin_button_get_adjustment (spin_button);
-    value = (int) gtk_adjustment_get_value (adjustment);
-    text = g_strdup_printf ("%d MB", value);
+    value = gtk_spin_button_get_value_as_int (spin_button);
+    text = g_strdup_printf (_("%d MB"), value);
     gtk_entry_set_text (GTK_ENTRY (spin_button), text);
 
     return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]