forked from enlightenment/enlightenment
Fix some formatting & remove whitespace.
SVN revision: 43985
This commit is contained in:
parent
56197c776c
commit
3598e6ca4a
|
@ -11,11 +11,13 @@ wizard_page_init(E_Wizard_Page *pg)
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_shutdown(E_Wizard_Page *pg)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int
|
||||
_next_page(void *data)
|
||||
{
|
||||
|
@ -23,6 +25,7 @@ _next_page(void *data)
|
|||
e_wizard_next();
|
||||
return 0;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_show(E_Wizard_Page *pg)
|
||||
{
|
||||
|
@ -31,11 +34,13 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
ecore_timer_add(2.0, _next_page, NULL);
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_hide(E_Wizard_Page *pg)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_apply(E_Wizard_Page *pg)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
typedef struct _E_Intl_Pair E_Intl_Pair;
|
||||
|
||||
static int _basic_lang_list_sort(const void *data1, const void *data2);
|
||||
static int _basic_lang_list_sort(const void *data1, const void *data2);
|
||||
|
||||
struct _E_Intl_Pair
|
||||
{
|
||||
|
@ -72,13 +72,13 @@ _basic_lang_list_sort(const void *data1, const void *data2)
|
|||
EAPI int
|
||||
wizard_page_init(E_Wizard_Page *pg)
|
||||
{
|
||||
FILE *output;
|
||||
|
||||
FILE *output;
|
||||
|
||||
output = popen("locale -a", "r");
|
||||
if (output)
|
||||
{
|
||||
char line[32];
|
||||
|
||||
|
||||
while (fscanf(output, "%[^\n]\n", line) == 1)
|
||||
{
|
||||
E_Locale_Parts *locale_parts;
|
||||
|
@ -93,9 +93,8 @@ wizard_page_init(E_Wizard_Page *pg)
|
|||
(locale_parts, E_INTL_LOC_LANG | E_INTL_LOC_REGION);
|
||||
if (basic_language)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
int i = 0;
|
||||
|
||||
while (basic_language_predefined_pairs[i].locale_key)
|
||||
{
|
||||
/* if basic language is supported by E and System*/
|
||||
|
@ -124,27 +123,29 @@ wizard_page_init(E_Wizard_Page *pg)
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_shutdown(E_Wizard_Page *pg)
|
||||
{
|
||||
// FIXME: free blang_list
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_show(E_Wizard_Page *pg)
|
||||
{
|
||||
Evas_Object *o, *of, *ob;
|
||||
Eina_List *l;
|
||||
int i, sel = -1;
|
||||
|
||||
|
||||
o = e_widget_list_add(pg->evas, 1, 0);
|
||||
e_wizard_title_set(_("Language"));
|
||||
of = e_widget_framelist_add(pg->evas, _("Select one"), 0);
|
||||
ob = e_widget_ilist_add(pg->evas, 32 * e_scale, 32 * e_scale, &lang);
|
||||
e_widget_size_min_set(ob, 140 * e_scale, 140 * e_scale);
|
||||
|
||||
|
||||
e_widget_ilist_freeze(ob);
|
||||
|
||||
|
||||
for (i = 0, l = blang_list; l; l = l->next, i++)
|
||||
{
|
||||
E_Intl_Pair *pair;
|
||||
|
@ -164,7 +165,7 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
e_widget_ilist_go(ob);
|
||||
e_widget_ilist_thaw(ob);
|
||||
if (sel >= 0) e_widget_ilist_selected_set(ob, sel);
|
||||
|
||||
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
evas_object_show(ob);
|
||||
|
@ -173,6 +174,7 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
pg->data = of;
|
||||
return 1; /* 1 == show ui, and wait for user, 0 == just continue */
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_hide(E_Wizard_Page *pg)
|
||||
{
|
||||
|
@ -184,6 +186,7 @@ wizard_page_hide(E_Wizard_Page *pg)
|
|||
e_wizard_labels_update();
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_apply(E_Wizard_Page *pg)
|
||||
{
|
||||
|
|
|
@ -39,11 +39,13 @@ wizard_page_init(E_Wizard_Page *pg)
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_shutdown(E_Wizard_Page *pg)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_show(E_Wizard_Page *pg)
|
||||
{
|
||||
|
@ -51,7 +53,7 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
Eina_List *l, *profiles;
|
||||
int i, sel = -1;
|
||||
Evas_Object *ilist;
|
||||
|
||||
|
||||
o = e_widget_list_add(pg->evas, 1, 0);
|
||||
e_wizard_title_set(_("Profile"));
|
||||
of = e_widget_framelist_add(pg->evas, _("Select one"), 0);
|
||||
|
@ -60,9 +62,9 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
e_widget_size_min_set(ob, 140 * e_scale, 70 * e_scale);
|
||||
ilist = ob;
|
||||
e_widget_on_change_hook_set(ob, _profile_change, NULL);
|
||||
|
||||
|
||||
e_widget_ilist_freeze(ob);
|
||||
|
||||
|
||||
profiles = e_config_profile_list();
|
||||
for (i = 0, l = profiles; l; l = l->next, i++)
|
||||
{
|
||||
|
@ -70,7 +72,7 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
char buf[PATH_MAX], *prof;
|
||||
const char *label, *dir;
|
||||
Evas_Object *ic;
|
||||
|
||||
|
||||
prof = l->data;
|
||||
if (e_config_profile_get())
|
||||
{
|
||||
|
@ -111,20 +113,20 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
|
||||
e_widget_ilist_go(ob);
|
||||
e_widget_ilist_thaw(ob);
|
||||
|
||||
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
|
||||
ob = e_widget_textblock_add(pg->evas);
|
||||
e_widget_size_min_set(ob, 140 * e_scale, 70 * e_scale);
|
||||
e_widget_textblock_markup_set(ob, _("Select a profile"));
|
||||
textblock = ob;
|
||||
|
||||
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
|
||||
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
|
||||
if (sel >= 0) e_widget_ilist_selected_set(ilist, sel);
|
||||
|
||||
|
||||
evas_object_show(ob);
|
||||
evas_object_show(of);
|
||||
e_wizard_page_show(o);
|
||||
|
@ -132,6 +134,7 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
e_wizard_button_next_enable_set(0);
|
||||
return 1; /* 1 == show ui, and wait for user, 0 == just continue */
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_hide(E_Wizard_Page *pg)
|
||||
{
|
||||
|
@ -140,7 +143,8 @@ wizard_page_hide(E_Wizard_Page *pg)
|
|||
if (e_config_profile_get())
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
if (e_user_dir_snprintf(buf, sizeof(buf), "config/%s", e_config_profile_get()) >= sizeof(buf))
|
||||
if (e_user_dir_snprintf(buf, sizeof(buf), "config/%s",
|
||||
e_config_profile_get()) >= sizeof(buf))
|
||||
return 1;
|
||||
ecore_file_recursive_rm(buf);
|
||||
}
|
||||
|
@ -148,6 +152,7 @@ wizard_page_hide(E_Wizard_Page *pg)
|
|||
e_config_profile_set(profile);
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_apply(E_Wizard_Page *pg)
|
||||
{
|
||||
|
|
|
@ -13,16 +13,16 @@ check_menu_dir(const char *dir)
|
|||
{
|
||||
char buf[PATH_MAX], *file;
|
||||
Eina_List *files;
|
||||
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/menus", dir);
|
||||
files = ecore_file_ls(buf);
|
||||
EINA_LIST_FREE(files, file)
|
||||
{
|
||||
if (e_util_glob_match(file, "*.menu"))
|
||||
{
|
||||
if (e_util_glob_match(file, "*.menu"))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/menus/%s", dir, file);
|
||||
menus = eina_list_append(menus, strdup(buf));
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "%s/menus/%s", dir, file);
|
||||
menus = eina_list_append(menus, strdup(buf));
|
||||
}
|
||||
free(file);
|
||||
}
|
||||
}
|
||||
|
@ -47,7 +47,8 @@ wizard_page_init(E_Wizard_Page *pg)
|
|||
};
|
||||
int i, newdir;
|
||||
|
||||
for (i = 0; dirs[i]; i++) check_menu_dir(dirs[i]);
|
||||
for (i = 0; dirs[i]; i++)
|
||||
check_menu_dir(dirs[i]);
|
||||
newdir = 1;
|
||||
snprintf(buf, sizeof(buf), "%s/etc/xdg", e_prefix_get());
|
||||
for (i = 0; dirs[i]; i++)
|
||||
|
@ -61,27 +62,28 @@ wizard_page_init(E_Wizard_Page *pg)
|
|||
if (newdir) check_menu_dir(buf);
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_shutdown(E_Wizard_Page *pg)
|
||||
{
|
||||
// FIXME: free menus
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_show(E_Wizard_Page *pg)
|
||||
{
|
||||
Evas_Object *o, *of, *ob;
|
||||
char *file;
|
||||
int sel = -1;
|
||||
int i = 0;
|
||||
|
||||
int sel = -1, i = 0;
|
||||
|
||||
o = e_widget_list_add(pg->evas, 1, 0);
|
||||
e_wizard_title_set(_("Menus"));
|
||||
|
||||
|
||||
if (!menus)
|
||||
{
|
||||
of = e_widget_framelist_add(pg->evas, _("Error"), 0);
|
||||
|
||||
|
||||
ob = e_widget_textblock_add(pg->evas);
|
||||
e_widget_size_min_set(ob, 140 * e_scale, 140 * e_scale);
|
||||
e_widget_textblock_markup_set
|
||||
|
@ -94,9 +96,7 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
"for more details on<br>"
|
||||
"how to get your<br>"
|
||||
"application menus<br>"
|
||||
"working."
|
||||
)
|
||||
);
|
||||
"working."));
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
evas_object_show(ob);
|
||||
|
@ -105,10 +105,10 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
else
|
||||
{
|
||||
of = e_widget_framelist_add(pg->evas, _("Select application menu"), 0);
|
||||
|
||||
|
||||
ob = e_widget_ilist_add(pg->evas, 32 * e_scale, 32 * e_scale, &xdg_sel);
|
||||
e_widget_size_min_set(ob, 140 * e_scale, 140 * e_scale);
|
||||
|
||||
|
||||
e_widget_ilist_freeze(ob);
|
||||
|
||||
EINA_LIST_FREE(menus, file)
|
||||
|
@ -175,9 +175,9 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
}
|
||||
e_widget_ilist_go(ob);
|
||||
e_widget_ilist_thaw(ob);
|
||||
|
||||
|
||||
if (sel >= 0) e_widget_ilist_selected_set(ob, sel);
|
||||
|
||||
|
||||
e_widget_framelist_object_append(of, ob);
|
||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||
evas_object_show(ob);
|
||||
|
@ -188,12 +188,14 @@ wizard_page_show(E_Wizard_Page *pg)
|
|||
pg->data = of;
|
||||
return 1; /* 1 == show ui, and wait for user, 0 == just continue */
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_hide(E_Wizard_Page *pg)
|
||||
{
|
||||
evas_object_del(pg->data);
|
||||
return 1;
|
||||
}
|
||||
|
||||
EAPI int
|
||||
wizard_page_apply(E_Wizard_Page *pg)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue