From ca9e193c8c532780e5a02d269b2cbe5e9d90376b Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Tue, 29 May 2007 11:25:54 +0000 Subject: [PATCH] load modules later. SVN revision: 30135 --- src/bin/e_border.c | 3 +- src/bin/e_config.c | 8 ++- src/bin/e_config.h | 1 + src/bin/e_fm.c | 62 +++++++++++----------- src/bin/e_fm.h | 4 +- src/bin/e_fm_prop.c | 7 ++- src/bin/e_int_config_window_manipulation.c | 5 ++ src/bin/e_main.c | 50 ++++++++--------- 8 files changed, 74 insertions(+), 66 deletions(-) diff --git a/src/bin/e_border.c b/src/bin/e_border.c index ae51e2d14..1083b0ace 100644 --- a/src/bin/e_border.c +++ b/src/bin/e_border.c @@ -1990,8 +1990,9 @@ e_border_fullscreen(E_Border *bd, E_Fullscreen policy) bd->client_inset.b = 0; /* e_zone_fullscreen_set(bd->zone, 1); */ + if (!e_config->allow_above_fullscreen) + e_border_layer_set(bd, 200); - e_border_layer_set(bd, 200); if ((evas_list_count(bd->zone->container->zones) > 1) || (policy == E_FULLSCREEN_RESIZE)) { e_border_move_resize(bd, bd->zone->x, bd->zone->y, bd->zone->w, bd->zone->h); diff --git a/src/bin/e_config.c b/src/bin/e_config.c index d06189afc..af2bb15d7 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -428,6 +428,7 @@ e_config_init(void) E_CONFIG_VAL(D, T, maximize_policy, INT); /**/ E_CONFIG_VAL(D, T, allow_manip, INT); /**/ E_CONFIG_VAL(D, T, border_fix_on_shelf_toggle, INT); /**/ + E_CONFIG_VAL(D, T, allow_above_fullscreen, INT); /**/ E_CONFIG_VAL(D, T, kill_if_close_not_possible, INT); /**/ E_CONFIG_VAL(D, T, kill_process, INT); /**/ E_CONFIG_VAL(D, T, kill_timer_wait, DOUBLE); /**/ @@ -1411,7 +1412,11 @@ e_config_init(void) e_config->menu_favorites_show = 1; e_config->menu_apps_show = 1; IFCFGEND; - + + IFCFG(0x0119); + e_config->allow_above_fullscreen = 1; + IFCFGEND; + e_config->config_version = E_CONFIG_FILE_VERSION; #if 0 /* example of new config */ @@ -1474,6 +1479,7 @@ e_config_init(void) E_CONFIG_LIMIT(e_config->maximize_policy, E_MAXIMIZE_FULLSCREEN, E_MAXIMIZE_DIRECTION); E_CONFIG_LIMIT(e_config->allow_manip, 0, 1); E_CONFIG_LIMIT(e_config->border_fix_on_shelf_toggle, 0, 1); + E_CONFIG_LIMIT(e_config->allow_above_fullscreen, 0, 1); E_CONFIG_LIMIT(e_config->kill_if_close_not_possible, 0, 1); E_CONFIG_LIMIT(e_config->kill_process, 0, 1); E_CONFIG_LIMIT(e_config->kill_timer_wait, 0.0, 120.0); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index c1ef52543..7da28e744 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -169,6 +169,7 @@ struct _E_Config int maximize_policy; // GUI int allow_manip; // GUI int border_fix_on_shelf_toggle; // GUI + int allow_above_fullscreen; // GUI int kill_if_close_not_possible; int kill_process; double kill_timer_wait; diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c index 44c2e5d33..8e11a3308 100644 --- a/src/bin/e_fm.c +++ b/src/bin/e_fm.c @@ -951,26 +951,24 @@ e_fm2_all_icons_update(void) } EAPI Evas_Object * -e_fm2_icon_get(Evas *evas, const char *realpath, - E_Fm2_Icon *ic, E_Fm2_Icon_Info *ici, - const char *keyhint, +e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic, void (*gen_func) (void *data, Evas_Object *obj, void *event_info), void *data, int force_gen, const char **type_ret) { Evas_Object *oic = NULL; char buf[PATH_MAX], *p; - if (ici->icon) + if (ic->info.icon) { /* custom icon */ - if (ici->icon[0] == '/') + if (ic->info.icon[0] == '/') { /* path to icon file */ - p = strrchr(ici->icon, '.'); + p = strrchr(ic->info.icon, '.'); if ((p) && (!strcmp(p, ".edj"))) { oic = edje_object_add(evas); - if (!edje_object_file_set(oic, ici->icon, "icon")) + if (!edje_object_file_set(oic, ic->info.icon, "icon")) _e_fm2_theme_edje_object_set(ic->sd, oic, "base/theme/fileman", "e/icons/fileman/file"); @@ -978,23 +976,23 @@ e_fm2_icon_get(Evas *evas, const char *realpath, else { oic = e_icon_add(evas); - e_icon_file_set(oic, ici->icon); + e_icon_file_set(oic, ic->info.icon); e_icon_fill_inside_set(oic, 1); } if (type_ret) *type_ret = "CUSTOM"; } else { - if (ici->mime) + if (ic->info.mime) { const char *icon; - icon = e_fm_mime_icon_get(ici->mime); + icon = e_fm_mime_icon_get(ic->info.mime); if (!strcmp(icon, "DESKTOP")) { Efreet_Desktop *ef; - snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); ef = efreet_desktop_get(buf); if (ef) oic = e_util_desktop_icon_add(ef, "48x48", evas); if (type_ret) *type_ret = "DESKTOP"; @@ -1007,13 +1005,13 @@ e_fm2_icon_get(Evas *evas, const char *realpath, { /* theme icon */ oic = edje_object_add(evas); - e_util_edje_icon_set(oic, ici->icon); + e_util_edje_icon_set(oic, ic->info.icon); if (type_ret) *type_ret = "THEME_ICON"; } } return oic; } - if (S_ISDIR(ici->statinfo.st_mode)) + if (S_ISDIR(ic->info.statinfo.st_mode)) { oic = edje_object_add(evas); _e_fm2_theme_edje_object_set(ic->sd, oic, @@ -1022,9 +1020,9 @@ e_fm2_icon_get(Evas *evas, const char *realpath, } else { - if (ici->icon_type == 1) + if (ic->info.icon_type == 1) { - snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); oic = e_thumb_icon_add(evas); e_thumb_icon_file_set(oic, buf, NULL); e_thumb_icon_size_set(oic, 128, 128); @@ -1037,11 +1035,11 @@ e_fm2_icon_get(Evas *evas, const char *realpath, _e_fm2_icon_thumb(ic, oic, force_gen); if (type_ret) *type_ret = "THUMB"; } - else if (ici->mime) + else if (ic->info.mime) { const char *icon; - icon = e_fm_mime_icon_get(ici->mime); + icon = e_fm_mime_icon_get(ic->info.mime); /* use mime type to select icon */ if (!icon) { @@ -1053,7 +1051,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, } else if (!strcmp(icon, "THUMB")) { - snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); oic = e_thumb_icon_add(evas); e_thumb_icon_file_set(oic, buf, NULL); @@ -1072,7 +1070,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, Efreet_Desktop *ef; oic = NULL; - snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); ef = efreet_desktop_get(buf); if (ef) oic = e_util_desktop_icon_add(ef, "48x48", evas); if (type_ret) *type_ret = "DESKTOP"; @@ -1113,13 +1111,14 @@ e_fm2_icon_get(Evas *evas, const char *realpath, } else { - snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); + snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file); /* fallback */ - if ((e_util_glob_case_match(ici->file, "*.edj"))) + if ((e_util_glob_case_match(ic->info.file, "*.edj"))) { oic = e_thumb_icon_add(evas); - if (keyhint) - e_thumb_icon_file_set(oic, buf, keyhint); + if (ic->sd->config->icon.key_hint) + e_thumb_icon_file_set(oic, buf, + ic->sd->config->icon.key_hint); else { /* FIXME: There is probably a quicker way of doing this. */ @@ -1140,8 +1139,8 @@ e_fm2_icon_get(Evas *evas, const char *realpath, _e_fm2_icon_thumb(ic, oic, force_gen); if (type_ret) *type_ret = "THUMB"; } - else if ((e_util_glob_case_match(ici->file, "*.desktop")) || - (e_util_glob_case_match(ici->file, "*.directory"))) + else if ((e_util_glob_case_match(ic->info.file, "*.desktop")) || + (e_util_glob_case_match(ic->info.file, "*.directory"))) { Efreet_Desktop *ef; @@ -1153,7 +1152,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, // frees - doesnt just unref. // if (ef) efreet_desktop_free(ef); } - else if (e_util_glob_case_match(ici->file, "*.imc")) + else if (e_util_glob_case_match(ic->info.file, "*.imc")) { E_Input_Method_Config *imc; Eet_File *imc_ef; @@ -1189,7 +1188,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, if (type_ret) *type_ret = "IMC"; } } - else if (S_ISCHR(ici->statinfo.st_mode)) + else if (S_ISCHR(ic->info.statinfo.st_mode)) { oic = edje_object_add(evas); _e_fm2_theme_edje_object_set(ic->sd, oic, @@ -1197,7 +1196,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, "e/icons/fileman/file"); if (type_ret) *type_ret = "FILE_TYPE"; } - else if (S_ISBLK(ici->statinfo.st_mode)) + else if (S_ISBLK(ic->info.statinfo.st_mode)) { oic = edje_object_add(evas); _e_fm2_theme_edje_object_set(ic->sd, oic, @@ -1205,7 +1204,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, "e/icons/fileman/file"); if (type_ret) *type_ret = "FILE_TYPE"; } - else if (S_ISFIFO(ici->statinfo.st_mode)) + else if (S_ISFIFO(ic->info.statinfo.st_mode)) { oic = edje_object_add(evas); _e_fm2_theme_edje_object_set(ic->sd, oic, @@ -1213,7 +1212,7 @@ e_fm2_icon_get(Evas *evas, const char *realpath, "e/icons/fileman/file"); if (type_ret) *type_ret = "FILE_TYPE"; } - else if (S_ISSOCK(ici->statinfo.st_mode)) + else if (S_ISSOCK(ic->info.statinfo.st_mode)) { oic = edje_object_add(evas); _e_fm2_theme_edje_object_set(ic->sd, oic, @@ -3113,8 +3112,7 @@ _e_fm2_icon_icon_direct_set(E_Fm2_Icon *ic, Evas_Object *o, void (*gen_func) (vo { Evas_Object *oic; - oic = e_fm2_icon_get(evas_object_evas_get(o), ic->sd->realpath, - ic, &(ic->info), ic->sd->config->icon.key_hint, + oic = e_fm2_icon_get(evas_object_evas_get(o), ic, gen_func, data, force_gen, NULL); if (oic) { diff --git a/src/bin/e_fm.h b/src/bin/e_fm.h index 848b43fd0..9a78253e0 100644 --- a/src/bin/e_fm.h +++ b/src/bin/e_fm.h @@ -172,9 +172,7 @@ EAPI void e_fm2_fop_add_add(Evas_Object *obj, const char *file, */ EAPI Evas_Object * - e_fm2_icon_get(Evas *evas, const char *realpath, - E_Fm2_Icon *ic, E_Fm2_Icon_Info *ici, - const char *keyhint, + e_fm2_icon_get(Evas *evas, E_Fm2_Icon *ic, void (*gen_func) (void *data, Evas_Object *obj, void *event_info), void *data, int force_gen, const char **type_ret); EAPI E_Fm2_Icon_Info *e_fm2_icon_file_info_get(E_Fm2_Icon *ic); diff --git a/src/bin/e_fm_prop.c b/src/bin/e_fm_prop.c index d6d9a7f79..c5e02056d 100644 --- a/src/bin/e_fm_prop.c +++ b/src/bin/e_fm_prop.c @@ -342,7 +342,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf e_widget_entry_readonly_set(ob, 1); e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 1, 0, 1, 0); - ob = e_widget_label_add(evas, _("Size:")); + ob = e_widget_label_add(evas, _("Size:")); e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0); ob = e_widget_entry_add(evas, &(cfdata->size)); e_widget_min_size_set(ob, 140, -1); @@ -401,9 +401,8 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf ob = e_widget_button_add(evas, "", NULL, _cb_icon_sel, cfdata, cfd); cfdata->gui.icon_wid = ob; - oi = e_fm2_icon_get(evas, e_fm2_real_path_get(cfdata->fi->fm), - cfdata->ic, cfdata->fi, - cfg->icon.key_hint, + oi = e_fm2_icon_get(evas, + cfdata->ic, NULL, NULL, 0, &itype); e_widget_button_icon_set(ob, oi); e_widget_frametable_object_append(ot, ob, 0, 0, 1, 3, 0, 1, 0, 1); diff --git a/src/bin/e_int_config_window_manipulation.c b/src/bin/e_int_config_window_manipulation.c index 00572c6a9..b3b77df17 100644 --- a/src/bin/e_int_config_window_manipulation.c +++ b/src/bin/e_int_config_window_manipulation.c @@ -28,6 +28,7 @@ struct _E_Config_Dialog_Data int border_fix_on_shelf_toggle; int border_raise_on_mouse_action; int border_raise_on_focus; + int allow_above_fullscreen; }; /* a nice easy setup function that does the dirty work */ @@ -75,6 +76,7 @@ _fill_data(E_Config_Dialog_Data *cfdata) cfdata->border_fix_on_shelf_toggle = e_config->border_fix_on_shelf_toggle; cfdata->border_raise_on_mouse_action = e_config->border_raise_on_mouse_action; cfdata->border_raise_on_focus = e_config->border_raise_on_focus; + cfdata->allow_above_fullscreen = e_config->allow_above_fullscreen; } static void * @@ -125,6 +127,7 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) e_config->border_fix_on_shelf_toggle = cfdata->border_fix_on_shelf_toggle; e_config->border_raise_on_mouse_action = cfdata->border_raise_on_mouse_action; e_config->border_raise_on_focus = cfdata->border_raise_on_focus; + e_config->allow_above_fullscreen = cfdata->allow_above_fullscreen; e_config_save_queue(); return 1; /* Apply was OK */ } @@ -186,6 +189,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data e_widget_framelist_object_append(of, ob); ob = e_widget_check_add(evas, _("Raise when clicking to focus"), &(cfdata->border_raise_on_focus)); e_widget_framelist_object_append(of, ob); + ob = e_widget_check_add(evas, _("Allow windows to be above fullscreen window"), &(cfdata->allow_above_fullscreen)); + e_widget_framelist_object_append(of, ob); e_widget_table_object_append(ot, of, 1, 0, 1, 1, 1, 1, 1, 1); of = e_widget_framelist_add(evas, _("Resistance"), 0); diff --git a/src/bin/e_main.c b/src/bin/e_main.c index 7245f2677..31b11c424 100644 --- a/src/bin/e_main.c +++ b/src/bin/e_main.c @@ -753,29 +753,6 @@ main(int argc, char **argv) _e_main_shutdown(-1); } _e_main_shutdown_push(e_color_class_shutdown); - /* load modules */ - TS("load modules"); - if (!safe_mode) - e_module_all_load(); - else - { - e_int_config_modules(e_container_current_get(e_manager_current_get())); - e_error_message_show - (_("Enlightenment crashed early on start and has
" - "been restarted. All modules have been disabled
" - "and will not be loaded to help remove any problem
" - "modules from your configuration. The module
" - "configuration dialog should let you select your
" - "modules again.")); - e_util_dialog_show - (_("Enlightenment crashed early on start and has been restarted"), - _("Enlightenment crashed early on start and has been restarted.
" - "All modules have been disabled and will not be loaded to help
" - "remove any problem modules from your configuration.

" - "The module configuration dialog should let you select your
" - "modules again.")); - e_config_save_queue(); - } TS("gadcon"); /* setup gadcon */ if (!e_gadcon_init()) @@ -872,10 +849,33 @@ main(int argc, char **argv) /* run any testing code now we are set up */ e_test(); - /* FIXME: for testing only */ + /* load modules */ + TS("load modules"); + if (!safe_mode) + e_module_all_load(); + else + { + e_int_config_modules(e_container_current_get(e_manager_current_get())); + e_error_message_show + (_("Enlightenment crashed early on start and has
" + "been restarted. All modules have been disabled
" + "and will not be loaded to help remove any problem
" + "modules from your configuration. The module
" + "configuration dialog should let you select your
" + "modules again.")); + e_util_dialog_show + (_("Enlightenment crashed early on start and has been restarted"), + _("Enlightenment crashed early on start and has been restarted.
" + "All modules have been disabled and will not be loaded to help
" + "remove any problem modules from your configuration.

" + "The module configuration dialog should let you select your
" + "modules again.")); + e_config_save_queue(); + } + TS("shelf config init"); e_shelf_config_init(); - + /* an idle enterer to be called after all others */ _e_main_idle_enterer_after = ecore_idle_enterer_add(_e_main_cb_idler_after, NULL);