Add user information to general options

Signed-off-by: Chris Michael <devilhorns@comcast.net>
This commit is contained in:
Chris Michael 2014-01-11 11:47:08 +00:00
parent d84234fbca
commit 8ce7901198
1 changed files with 58 additions and 3 deletions

View File

@ -11,12 +11,11 @@ _cb_translucent(void *data EINA_UNUSED, Evas_Object *obj, void *event EINA_UNUSE
void
_options_general(Evas_Object *box, Evas_Object *grid EINA_UNUSED)
{
Evas_Object *o, *o_frame;
Evas_Object *o, *o_frame, *tb;
/* general frame */
o_frame = elm_frame_add(box);
evas_object_size_hint_weight_set(o_frame,
EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_weight_set(o_frame, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o_frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o_frame, "User Interface");
evas_object_show(o_frame);
@ -32,11 +31,67 @@ _options_general(Evas_Object *box, Evas_Object *grid EINA_UNUSED)
evas_object_show(o);
elm_box_pack_end(box, o_frame);
/* user frame */
o_frame = elm_frame_add(box);
evas_object_size_hint_weight_set(o_frame, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(o_frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o_frame, "User Information");
evas_object_show(o_frame);
tb = elm_table_add(box);
elm_table_homogeneous_set(tb, EINA_FALSE);
elm_table_padding_set(tb, 4, 2);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(tb, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_show(tb);
elm_object_content_set(o_frame, tb);
o = elm_label_add(box);
evas_object_size_hint_weight_set(o, 0.0, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, "Nick Name");
evas_object_show(o);
elm_table_pack(tb, o, 0, 0, 1, 1);
o = elm_entry_add(box);
elm_entry_single_line_set(o, EINA_TRUE);
elm_entry_scrollable_set(o, EINA_TRUE);
elm_entry_input_panel_layout_set(o, ELM_INPUT_PANEL_LAYOUT_NORMAL);
elm_scroller_policy_set(o, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, _ex_cfg->nick);
evas_object_show(o);
elm_table_pack(tb, o, 1, 0, 1, 1);
o = elm_label_add(box);
evas_object_size_hint_weight_set(o, 0.0, 0.0);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, "User Name");
evas_object_show(o);
elm_table_pack(tb, o, 0, 1, 1, 1);
o = elm_entry_add(box);
elm_entry_single_line_set(o, EINA_TRUE);
elm_entry_scrollable_set(o, EINA_TRUE);
elm_entry_input_panel_layout_set(o, ELM_INPUT_PANEL_LAYOUT_NORMAL);
elm_scroller_policy_set(o, ELM_SCROLLER_POLICY_OFF,
ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o, _ex_cfg->name);
evas_object_show(o);
elm_table_pack(tb, o, 1, 1, 1, 1);
elm_box_pack_end(box, o_frame);
/* other options */
o_frame = elm_frame_add(box);
evas_object_size_hint_weight_set(o_frame,
EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(o_frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(o_frame, "Other Options");
evas_object_show(o_frame);
elm_box_pack_end(box, o_frame);
}