diff --git a/src/bin/e_config.c b/src/bin/e_config.c index 5999461e1..ff9c554bd 100644 --- a/src/bin/e_config.c +++ b/src/bin/e_config.c @@ -361,6 +361,7 @@ e_config_init(void) E_CONFIG_VAL(D, T, zone_desks_x_count, INT); /**/ E_CONFIG_VAL(D, T, zone_desks_y_count, INT); /**/ E_CONFIG_VAL(D, T, use_virtual_roots, INT); /* should not make this a config option (for now) */ + E_CONFIG_VAL(D, T, show_desktop_icons, INT); /**/ E_CONFIG_VAL(D, T, edge_flip_dragging, INT); /**/ E_CONFIG_VAL(D, T, edge_flip_moving, INT); /**/ E_CONFIG_VAL(D, T, edge_flip_timeout, DOUBLE); /**/ @@ -1433,6 +1434,10 @@ e_config_init(void) e_config->allow_above_fullscreen = 0; IFCFGEND; + IFCFG(0x0120); + e_config->show_desktop_icons = 1; + IFCFGEND; + e_config->config_version = E_CONFIG_FILE_VERSION; #if 0 /* example of new config */ @@ -1456,6 +1461,7 @@ e_config_init(void) E_CONFIG_LIMIT(e_config->cache_flush_interval, 0.0, 600.0); E_CONFIG_LIMIT(e_config->zone_desks_x_count, 1, 64); E_CONFIG_LIMIT(e_config->zone_desks_y_count, 1, 64); + E_CONFIG_LIMIT(e_config->show_desktop_icons, 0, 1); E_CONFIG_LIMIT(e_config->edge_flip_dragging, 0, 1); E_CONFIG_LIMIT(e_config->edge_flip_moving, 0, 1); E_CONFIG_LIMIT(e_config->edge_flip_timeout, 0.0, 2.0); diff --git a/src/bin/e_config.h b/src/bin/e_config.h index b3a83137c..29a634d86 100644 --- a/src/bin/e_config.h +++ b/src/bin/e_config.h @@ -54,7 +54,7 @@ typedef Eet_Data_Descriptor E_Config_DD; /* increment this whenever a new set of config values are added but the users * config doesn't need to be wiped - simply new values need to be put in */ -#define E_CONFIG_FILE_GENERATION 0x0119 +#define E_CONFIG_FILE_GENERATION 0x0120 #define E_CONFIG_FILE_VERSION ((E_CONFIG_FILE_EPOCH << 16) | E_CONFIG_FILE_GENERATION) #define E_EVAS_ENGINE_DEFAULT 0 @@ -99,6 +99,7 @@ struct _E_Config int zone_desks_x_count; // GUI int zone_desks_y_count; // GUI int use_virtual_roots; // NO GUI - maybe remove? + int show_desktop_icons; // GUI int edge_flip_dragging; // GUI int edge_flip_moving; // GUI double edge_flip_timeout; // GUI diff --git a/src/bin/e_fwin.c b/src/bin/e_fwin.c index f00963dc7..f36615b72 100644 --- a/src/bin/e_fwin.c +++ b/src/bin/e_fwin.c @@ -339,6 +339,9 @@ _e_fwin_free(E_Fwin *fwin) fwin->fad = NULL; } if (fwin->win) e_object_del(E_OBJECT(fwin->win)); + if (fwin->fm_obj) evas_object_del(fwin->fm_obj); + if (fwin->scrollframe_obj) evas_object_del(fwin->scrollframe_obj); + fwins = evas_list_remove(fwins, fwin); if (fwin->wallpaper_file) evas_stringshare_del(fwin->wallpaper_file); if (fwin->overlay_file) evas_stringshare_del(fwin->overlay_file); diff --git a/src/bin/e_int_config_desks.c b/src/bin/e_int_config_desks.c index 8607b4b2a..9ee099c09 100644 --- a/src/bin/e_int_config_desks.c +++ b/src/bin/e_int_config_desks.c @@ -22,6 +22,7 @@ struct _E_Config_Dialog_Data int flip_animate; /*- ADVANCED -*/ + int show_desktop_icons; int edge_flip_moving; int edge_flip_dragging; double edge_flip_timeout; @@ -67,6 +68,7 @@ _fill_data(E_Config_Dialog_Data *cfdata) cfdata->y = e_config->zone_desks_y_count; cfdata->edge_flip_basic = e_config->edge_flip_moving || e_config->edge_flip_dragging; cfdata->flip_animate = e_config->desk_flip_animate_mode > 0; + cfdata->show_desktop_icons = e_config->show_desktop_icons; cfdata->edge_flip_moving = e_config->edge_flip_moving; cfdata->edge_flip_dragging = e_config->edge_flip_dragging; cfdata->edge_flip_timeout = e_config->edge_flip_timeout; @@ -155,14 +157,17 @@ _advanced_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata) for (ll = man->containers; ll; ll = ll->next) { con = ll->data; - for (lll = con ->zones; lll; lll = lll->next) + for (lll = con->zones; lll; lll = lll->next) { zone = lll->data; e_zone_desk_count_set(zone, cfdata->x, cfdata->y); + e_zone_fm_set(zone, cfdata->show_desktop_icons); } } } + e_config->show_desktop_icons = cfdata->show_desktop_icons; + e_config->desk_flip_animate_mode = cfdata->flip_mode; e_config->desk_flip_animate_interpolation = cfdata->flip_interp; e_config->desk_flip_animate_time = cfdata->flip_speed; @@ -226,7 +231,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data o = e_widget_list_add(evas, 0, 0); ott = e_widget_table_add(evas, 0); - of = e_widget_framelist_add(evas, _("Number of Desktops"), 0); + of = e_widget_framelist_add(evas, _("Desktops"), 0); ot = e_widget_table_add(evas, 0); ob = e_widget_desk_preview_add(evas, cfdata->x, cfdata->y); @@ -241,6 +246,9 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data e_widget_on_change_hook_set(ob, _cb_slider_change, cfdata); e_widget_table_object_append(ot, ob, 0, 1, 1, 1, 1, 0, 1, 0); + ob = e_widget_check_add(evas, _("Show desktop icons"), &(cfdata->show_desktop_icons)); + e_widget_table_object_append(ot, ob, 0, 2, 2, 1, 1, 1, 1, 1); + e_widget_framelist_object_append(of, ot); e_widget_table_object_append(ott, of, 0, 0, 1, 2, 1, 1, 1, 1); diff --git a/src/bin/e_zone.c b/src/bin/e_zone.c index 9c45cca02..b69fe3614 100644 --- a/src/bin/e_zone.c +++ b/src/bin/e_zone.c @@ -619,6 +619,33 @@ e_zone_flip_win_restore(void) } } +EAPI void +e_zone_fm_set(E_Zone *zone, int set) +{ + E_OBJECT_CHECK(zone); + E_OBJECT_TYPE_CHECK(zone, E_ZONE_TYPE); + + if (set) + { + if (zone->bg_fwin) return; + if ((zone->container->num == 0) && (zone->num == 0)) + _e_zone_fm_add(zone, "desktop", "/"); + else + { + char buf[256]; + + snprintf(buf, sizeof(buf), "%i", zone->container->num + zone->num); + _e_zone_fm_add(zone, "desktop", buf); + } + } + else + { + if (!zone->bg_fwin) return; + e_object_del(E_OBJECT(zone->bg_fwin)); + zone->bg_fwin = NULL; + } +} + /* local subsystem functions */ static void _e_zone_free(E_Zone *zone) @@ -1012,15 +1039,7 @@ _e_zone_fm_deferred(void *data) E_Zone *zone; zone = data; - if ((zone->container->num == 0) && (zone->num == 0)) - _e_zone_fm_add(zone, "desktop", "/"); - else - { - char buf[256]; - - snprintf(buf, sizeof(buf), "%i", zone->container->num + zone->num); - _e_zone_fm_add(zone, "desktop", buf); - } + e_zone_fm_set(zone, e_config->show_desktop_icons); zone->deferred_fm_timer = NULL; return 0; } diff --git a/src/bin/e_zone.h b/src/bin/e_zone.h index 046995581..c5e473f46 100644 --- a/src/bin/e_zone.h +++ b/src/bin/e_zone.h @@ -92,6 +92,7 @@ EAPI void e_zone_desk_linear_flip_by(E_Zone *zone, int dx); EAPI void e_zone_desk_linear_flip_to(E_Zone *zone, int x); EAPI void e_zone_flip_win_disable(void); EAPI void e_zone_flip_win_restore(void); +EAPI void e_zone_fm_set(E_Zone *zone, int set); extern EAPI int E_EVENT_ZONE_DESK_COUNT_SET; extern EAPI int E_EVENT_POINTER_WARP;