enventor - added shortcut F1 for readme

This commit is contained in:
ChunEon Park 2013-07-21 16:10:00 +09:00
parent 9752938d54
commit 66bda10fd8
4 changed files with 28 additions and 3 deletions

1
README
View File

@ -39,6 +39,7 @@ Short Cut Keys:
--------------------------------------------------------------------------------
Esc = Open/Close Menu
F1 = Show README
F5 = Show/Hide Line Number
F6 = Show/Hide Status
Ctrl+S = Save / Compile EDC

View File

@ -4,5 +4,5 @@ Eina_Bool menu_option_toggle();
void menu_ctxpopup_register(Evas_Object *ctxpopup);
Eina_Bool menu_edc_load(menu_data *md);
void menu_exit(menu_data *md);
Eina_Bool menu_help(menu_data *md);

View File

@ -255,6 +255,12 @@ main_key_down_cb(void *data, int type EINA_UNUSED, void *ev)
{
ad->ctrl_pressed = EINA_TRUE;
}
//README
else if (!strcmp(event->keyname, "F1"))
{
ad->menu_opened = menu_help(ad->md);
return ECORE_CALLBACK_DONE;
}
//Line Number
else if (!strcmp(event->keyname, "F5"))
{

View File

@ -93,8 +93,8 @@ setting_dismiss_done(void *data, Evas_Object *obj EINA_UNUSED,
const char *source EINA_UNUSED)
{
menu_data *md = data;
evas_object_del(md->help_layout);
md->help_layout = NULL;
evas_object_del(md->setting_layout);
md->setting_layout = NULL;
elm_object_disabled_set(md->menu_layout, EINA_FALSE);
elm_object_focus_set(md->menu_layout, EINA_TRUE);
}
@ -445,8 +445,11 @@ help_open(menu_data *md)
elm_object_style_set(entry, elm_app_name_get());
elm_entry_scrollable_set(entry, EINA_TRUE);
elm_entry_line_wrap_set(entry, EINA_TRUE);
elm_entry_editable_set(entry, EINA_FALSE);
evas_object_show(entry);
elm_object_focus_set(entry, EINA_TRUE);
elm_object_part_content_set(layout, "elm.swallow.entry", entry);
elm_entry_entry_append(entry, "<color=#ffffff><font_size=12>");
@ -705,6 +708,13 @@ load_save_btn_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
warning_close(md);
}
Eina_Bool
menu_help(menu_data *md)
{
help_open(md);
return EINA_TRUE;
}
Eina_Bool
menu_edc_load(menu_data *md)
{
@ -826,6 +836,14 @@ menu_option_toggle()
return EINA_TRUE;
}
}
else
{
if (md->help_layout)
{
help_close(md);
return EINA_FALSE;
}
}
//Ctxpopup
if (md->ctxpopup)