Enlightenment CVS committal

Author  : urandom
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_config.c e_config.h e_fwin.c e_int_config_desks.c e_zone.c 
        e_zone.h 


Log Message:
new option to hide the desktop icons (under virtual desktops -> advanced)

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_config.c,v
retrieving revision 1.251
retrieving revision 1.252
diff -u -3 -r1.251 -r1.252
--- e_config.c  15 Jul 2007 13:25:56 -0000      1.251
+++ e_config.c  23 Jul 2007 16:32:10 -0000      1.252
@@ -361,6 +361,7 @@
    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->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_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);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_config.h,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -3 -r1.158 -r1.159
--- e_config.h  10 Jun 2007 11:44:29 -0000      1.158
+++ e_config.h  23 Jul 2007 16:32:10 -0000      1.159
@@ -54,7 +54,7 @@
 /* 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 @@
    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
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fwin.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -3 -r1.54 -r1.55
--- e_fwin.c    28 Jun 2007 23:22:20 -0000      1.54
+++ e_fwin.c    23 Jul 2007 16:32:10 -0000      1.55
@@ -339,6 +339,9 @@
        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);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_desks.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- e_int_config_desks.c        19 Jan 2007 03:57:09 -0000      1.28
+++ e_int_config_desks.c        23 Jul 2007 16:32:10 -0000      1.29
@@ -22,6 +22,7 @@
    int flip_animate;
    
    /*- ADVANCED -*/
+   int show_desktop_icons;
    int edge_flip_moving;
    int edge_flip_dragging;
    double edge_flip_timeout;
@@ -67,6 +68,7 @@
    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 @@
        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 @@
    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);
@@ -240,6 +245,9 @@
    ob = e_widget_slider_add(evas, 1, 0, _("%1.0f"), 1.0, 12.0, 1.0, 0, NULL, 
&(cfdata->x), 200);
    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);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -3 -r1.119 -r1.120
--- e_zone.c    26 May 2007 17:16:21 -0000      1.119
+++ e_zone.c    23 Jul 2007 16:32:10 -0000      1.120
@@ -619,6 +619,33 @@
      }
 }
 
+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 *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;
 }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_zone.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- e_zone.h    13 May 2007 09:12:30 -0000      1.40
+++ e_zone.h    23 Jul 2007 16:32:10 -0000      1.41
@@ -92,6 +92,7 @@
 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;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to