[gtk+/wip/colorchooser-v2: 27/84] Mark strings for translation



commit 344f4ddaa92e48fff159ebf7b5dbce9b44276b6f
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Feb 3 01:48:29 2012 -0500

    Mark strings for translation

 gtk/gtkcolorchooserwidget.c |    1 +
 gtk/gtkcoloreditor.c        |   12 ++++++------
 2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcolorchooserwidget.c b/gtk/gtkcolorchooserwidget.c
index 71e60e1..fbf5756 100644
--- a/gtk/gtkcolorchooserwidget.c
+++ b/gtk/gtkcolorchooserwidget.c
@@ -278,6 +278,7 @@ gtk_color_chooser_widget_init (GtkColorChooserWidget *cc)
        gtk_grid_attach (GTK_GRID (grid), p, i, 0, 1, 1);
     }
 
+  /* translators: label for the custom section in the color chooser */
   label = gtk_label_new (_("Custom"));
   gtk_widget_set_halign (label, GTK_ALIGN_START);
   gtk_container_add (GTK_CONTAINER (cc->priv->palette), label);
diff --git a/gtk/gtkcoloreditor.c b/gtk/gtkcoloreditor.c
index b8a8a6e..86ef51e 100644
--- a/gtk/gtkcoloreditor.c
+++ b/gtk/gtkcoloreditor.c
@@ -247,7 +247,7 @@ get_child_position (GtkOverlay     *overlay,
 
   if (widget == editor->priv->sv_popup)
     {
-      if (gtk_widget_get_direction (overlay) == GTK_TEXT_DIR_RTL)
+      if (gtk_widget_get_direction (GTK_WIDGET (overlay)) == GTK_TEXT_DIR_RTL)
         allocation->x = 0;
       else
         allocation->x = gtk_widget_get_allocated_width (GTK_WIDGET (overlay)) - req.width;
@@ -258,7 +258,7 @@ get_child_position (GtkOverlay     *overlay,
       gtk_widget_get_allocation (editor->priv->h_slider, &alloc);
       gtk_range_get_slider_range (GTK_RANGE (editor->priv->h_slider), &s, &e);
 
-      if (gtk_widget_get_direction (overlay) == GTK_TEXT_DIR_RTL)
+      if (gtk_widget_get_direction (GTK_WIDGET (overlay)) == GTK_TEXT_DIR_RTL)
         gtk_widget_translate_coordinates (editor->priv->h_slider,
                                           gtk_widget_get_parent (editor->priv->grid),
                                           - req.width, (s + e - req.height) / 2,
@@ -436,9 +436,9 @@ gtk_color_editor_init (GtkColorEditor *editor)
                     G_CALLBACK (popup_key_press), editor);
 
   gtk_container_add (GTK_CONTAINER (editor->priv->sv_popup), grid);
-  gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("S"), 0, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (grid), gtk_label_new (C_("Color channel", "S")), 0, 0, 1, 1);
   gtk_grid_attach (GTK_GRID (grid), editor->priv->s_entry, 1, 0, 1, 1);
-  gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("V"), 0, 1, 1, 1);
+  gtk_grid_attach (GTK_GRID (grid), gtk_label_new (C_("Color channel", "V")), 0, 1, 1, 1);
   gtk_grid_attach (GTK_GRID (grid), editor->priv->v_entry, 1, 1, 1, 1);
   gtk_widget_show_all (editor->priv->sv_popup);
   gtk_widget_hide (editor->priv->sv_popup);
@@ -461,7 +461,7 @@ gtk_color_editor_init (GtkColorEditor *editor)
   g_signal_connect (editor->priv->h_entry, "key-press-event",
                     G_CALLBACK (popup_key_press), editor);
   gtk_container_add (GTK_CONTAINER (editor->priv->h_popup), box);
-  gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("H"));
+  gtk_container_add (GTK_CONTAINER (box), gtk_label_new (C_("Color channel", "H")));
   gtk_container_add (GTK_CONTAINER (box), editor->priv->h_entry);
   gtk_widget_show_all (editor->priv->h_popup);
   gtk_widget_hide (editor->priv->h_popup);
@@ -485,7 +485,7 @@ gtk_color_editor_init (GtkColorEditor *editor)
   g_signal_connect (editor->priv->a_entry, "key-press-event",
                     G_CALLBACK (popup_key_press), editor);
   gtk_container_add (GTK_CONTAINER (editor->priv->a_popup), grid);
-  gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("A"), 0, 0, 1, 1);
+  gtk_grid_attach (GTK_GRID (grid), gtk_label_new (C_("Color channel", "A")), 0, 0, 1, 1);
   gtk_grid_attach (GTK_GRID (grid), editor->priv->a_entry, 1, 0, 1, 1);
   gtk_widget_show_all (editor->priv->a_popup);
   gtk_widget_hide (editor->priv->a_popup);



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