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
This commit is contained in:
Chidambar Zinnoury 2012-07-15 13:56:18 +00:00
parent 8f0a2d783c
commit a6c39bb620
2 changed files with 7 additions and 6 deletions

View File

@ -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);

View File

@ -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);