From a6c39bb6204a54269df4f8458509d6dc04af92c0 Mon Sep 17 00:00:00 2001 From: Chidambar Zinnoury Date: Sun, 15 Jul 2012 13:56:18 +0000 Subject: [PATCH] e color selector: increment id so that all entries have the correct value instead of all the red value. Also translate some strings and rearrange some widgets. SVN revision: 73877 --- src/bin/e_color_dialog.c | 2 +- src/bin/e_widget_csel.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bin/e_color_dialog.c b/src/bin/e_color_dialog.c index 1b91d0037..ba78228de 100644 --- a/src/bin/e_color_dialog.c +++ b/src/bin/e_color_dialog.c @@ -43,7 +43,7 @@ e_color_dialog_new(E_Container *con, const E_Color *color, Eina_Bool alpha_enabl e_widget_on_change_hook_set(o, _e_color_dialog_cb_csel_change, dia); /* buttons at the bottom */ - e_dialog_button_add(dia->dia, _("OK"), NULL, _e_color_dialog_button1_click, dia); + e_dialog_button_add(dia->dia, _("Select"), NULL, _e_color_dialog_button1_click, dia); e_dialog_button_add(dia->dia, _("Cancel"), NULL, _e_color_dialog_button2_click, dia); e_dialog_resizable_set(dia->dia, 1); e_win_centered_set(dia->dia->win, 1); diff --git a/src/bin/e_widget_csel.c b/src/bin/e_widget_csel.c index dbe6d80f9..5d1ffe4f2 100644 --- a/src/bin/e_widget_csel.c +++ b/src/bin/e_widget_csel.c @@ -174,6 +174,7 @@ _e_wid_cb_color_changed(void *data, Evas_Object *o) break; } e_widget_entry_text_set(eo, buf); + i++; } wd->changing = 0; @@ -194,7 +195,7 @@ e_widget_csel_add(Evas *evas, E_Color *color, Eina_Bool alpha_enabled) Evas_Object *frame, *table; int i = 0; E_Radio_Group *grp = NULL; - char *labels[6] = { "R", "G", "B", "H", "S", "V" }; + char *labels[6] = { N_("R"), N_("G"), N_("B"), N_("H"), N_("S"), N_("V") }; E_Widget_Data *wd; obj = e_widget_add(evas); @@ -246,7 +247,7 @@ e_widget_csel_add(Evas *evas, E_Color *color, Eina_Bool alpha_enabled) break; } - o = e_widget_radio_add(evas, labels[i], i, grp); + o = e_widget_radio_add(evas, _(labels[i]), i, grp); e_widget_sub_object_add(obj, o); e_widget_on_change_hook_set(o, _e_wid_cb_radio_changed, wd); e_widget_table_object_append(frame, o, 0, i, 1, 1, 1, 1, 0, 0); @@ -268,12 +269,12 @@ e_widget_csel_add(Evas *evas, E_Color *color, Eina_Bool alpha_enabled) if (alpha_enabled) { - o = e_widget_label_add(evas, "Alpha"); - e_widget_table_object_append(frame, o, 1, i, 1, 1, 1, 1, 0, 0); + o = e_widget_label_add(evas, _("Alpha")); + e_widget_table_object_append(frame, o, 0, i, 1, 1, 1, 1, 0, 0); o = e_widget_slider_add(evas, 1, 0, "%0.0f", 0, 255, 1, 0, NULL, &(wd->cv->a), 100); e_widget_on_change_hook_set(o, _e_wid_cb_alpha_changed, wd); - e_widget_table_object_append(frame, o, 2, i, 1, 1, 1, 1, 0, 0); + e_widget_table_object_append(frame, o, 1, i, 2, 1, 1, 1, 0, 0); } o = e_widget_spectrum_add(evas, wd->mode, wd->cv);