forked from enlightenment/enlightenment
page 000 now auto-selects an "intl" font that will work and applies it to
most text classes. testing now - but seems to work. title got some japanese in it for testing. SVN revision: 31746
This commit is contained in:
parent
745c95731d
commit
6c9df33256
|
@ -266,6 +266,12 @@ e_wizard_button_next_enable_set(int enable)
|
|||
_e_wizard_next_eval();
|
||||
}
|
||||
|
||||
EAPI void
|
||||
e_wizard_title_set(const char *title)
|
||||
{
|
||||
edje_object_part_text_set(o_bg, "e.text.title", title);
|
||||
}
|
||||
|
||||
static void
|
||||
_e_wizard_back_eval(void)
|
||||
{
|
||||
|
@ -332,19 +338,13 @@ _e_wizard_main_new(E_Zone *zone)
|
|||
o_ev = o;
|
||||
|
||||
/* set up next/prev buttons */
|
||||
edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment"));
|
||||
edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment 東京"));
|
||||
edje_object_part_text_set(o_bg, "e.text.page", "");
|
||||
edje_object_part_text_set(o_bg, "e.text.next", _("Next"));
|
||||
edje_object_part_text_set(o_bg, "e.text.back", _("Back"));
|
||||
edje_object_signal_emit(o_bg, "e,state,next,disable", "e");
|
||||
edje_object_signal_emit(o_bg, "e,state,back,disable", "e");
|
||||
|
||||
/* set up rest here */
|
||||
//evas_object_show(o);
|
||||
//edje_object_part_swallow(o_bg, "e.swallow.content", o);
|
||||
//e_widget_focus_set(o, 1);
|
||||
//o_content = o;
|
||||
|
||||
e_popup_edje_bg_object_set(pop, o_bg);
|
||||
e_popup_show(pop);
|
||||
if (!e_grabinput_get(ecore_evas_software_x11_subwindow_get(pop->ecore_evas),
|
||||
|
|
|
@ -39,6 +39,7 @@ EAPI E_Wizard_Page *
|
|||
EAPI void e_wizard_page_del(E_Wizard_Page *pg);
|
||||
EAPI void e_wizard_button_back_enable_set(int enable);
|
||||
EAPI void e_wizard_button_next_enable_set(int enable);
|
||||
EAPI void e_wizard_title_set(const char *title);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -4,6 +4,25 @@
|
|||
#include "e.h"
|
||||
#include "e_mod_main.h"
|
||||
|
||||
const char *intlfont = NULL;
|
||||
/* A list of fonts to choose as the default, in order of preference. This list
|
||||
* can and probably will change over time with fine-tuning
|
||||
*/
|
||||
const char *preferred_fonts[] =
|
||||
{
|
||||
"Sans",
|
||||
"DejaVu Sans",
|
||||
"Bitstream Vera Sans",
|
||||
"Arial",
|
||||
"Nice",
|
||||
"Verdana",
|
||||
"Lucida Sans"
|
||||
};
|
||||
/* negative numbers == keep theme set size but multiple by negative value
|
||||
* multiplied by -100 (so scale, 100 = 1:1 scaling)
|
||||
*/
|
||||
const int fontsize = -100;
|
||||
|
||||
EAPI int
|
||||
wizard_page_init(E_Wizard_Page *pg)
|
||||
{
|
||||
|
@ -17,7 +36,86 @@ wizard_page_shutdown(E_Wizard_Page *pg)
|
|||
EAPI int
|
||||
wizard_page_show(E_Wizard_Page *pg)
|
||||
{
|
||||
printf("t0\n");
|
||||
Evas_List *fonts;
|
||||
Evas_Hash *fonts_hash;
|
||||
int i;
|
||||
|
||||
fonts = evas_font_available_list(pg->evas);
|
||||
fonts_hash = e_font_available_list_parse(fonts);
|
||||
|
||||
for (i = 0; i < (sizeof(preferred_fonts) / sizeof(char *)); i++)
|
||||
{
|
||||
E_Font_Properties *efp;
|
||||
|
||||
efp = evas_hash_find(fonts_hash, preferred_fonts[i]);
|
||||
printf("WIZ: page_000: FONT \"%s\" exists=", preferred_fonts[i]);
|
||||
if (efp) printf("yes\n");
|
||||
else printf("no\n");
|
||||
if ((!intlfont) && (efp))
|
||||
intlfont = preferred_fonts[i];
|
||||
}
|
||||
|
||||
if (!intlfont) printf("WIZ: page_000: No intl font found\n");
|
||||
else printf("WIZ: page_000: Chose \"%s\"\n", intlfont);
|
||||
|
||||
if (intlfont)
|
||||
{
|
||||
const char *classes[] =
|
||||
{
|
||||
"title_bar",
|
||||
"menu_item",
|
||||
"menu_title",
|
||||
"tb_plain",
|
||||
"tb_light",
|
||||
"tb_big",
|
||||
"move_text",
|
||||
"resize_text",
|
||||
"winlist_title",
|
||||
"configure",
|
||||
"about_title",
|
||||
"about_version",
|
||||
"button_text",
|
||||
"desklock_title",
|
||||
"desklock_passwd",
|
||||
"dialog_error",
|
||||
"exebuf_command",
|
||||
"init_title",
|
||||
"init_text",
|
||||
"init_version",
|
||||
"entry",
|
||||
"frame",
|
||||
"label",
|
||||
"button",
|
||||
"slider",
|
||||
"radio_button",
|
||||
"check_button",
|
||||
"tlist",
|
||||
"ilist_item",
|
||||
"ilist_header",
|
||||
"fileman_typebuf",
|
||||
"fileman_icon",
|
||||
"module_small",
|
||||
"module_normal",
|
||||
"module_large",
|
||||
"module_small_s",
|
||||
"module_normal_s",
|
||||
"module_large_s",
|
||||
"wizard_title",
|
||||
"wizard_button"
|
||||
/* FIXME: this list needs to be extended as new text classes
|
||||
* appear - maybe we need to put the list of textclasses into
|
||||
* core E
|
||||
*/
|
||||
};
|
||||
|
||||
for (i = 0; i < (sizeof(classes) / sizeof(char *)); i++)
|
||||
e_font_default_set(classes[i], intlfont, fontsize);
|
||||
|
||||
e_font_apply();
|
||||
}
|
||||
|
||||
e_font_available_hash_free(fonts_hash);
|
||||
evas_font_available_list_free(pg->evas, fonts);
|
||||
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
|
||||
}
|
||||
EAPI int
|
||||
|
@ -28,6 +126,5 @@ wizard_page_hide(E_Wizard_Page *pg)
|
|||
EAPI int
|
||||
wizard_page_apply(E_Wizard_Page *pg)
|
||||
{
|
||||
printf("a0\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue