Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_menus.c 


Log Message:


dont make empty apps menus

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_int_menus.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- e_int_menus.c       26 Dec 2004 05:04:02 -0000      1.12
+++ e_int_menus.c       27 Dec 2004 07:50:03 -0000      1.13
@@ -183,6 +183,7 @@
    E_Menu_Item *mi;
    E_App *a;
    Evas_List *l;
+   int app_count = 0;
    
    a = e_object_data_get(E_OBJECT(m));
    e_app_subdir_scan(a, 0);
@@ -196,6 +197,7 @@
          {
             e_menu_item_icon_edje_set(mi, a->path, "icon");
             e_menu_item_callback_set(mi, _e_int_menus_apps_run, a);
+            app_count++;
          }
        else
          {
@@ -204,8 +206,14 @@
             snprintf(buf, sizeof(buf), "%s/.directory.eet", a->path);
             e_menu_item_icon_edje_set(mi, buf, "icon");
             e_menu_item_submenu_set(mi, e_int_menus_apps_new(a->path, 0));
+            app_count++;
          }
      }
+   if (app_count == 0)
+     {
+       mi = e_menu_item_new(m);
+       e_menu_item_label_set(mi, "(No Applications)");
+     }
 }
 
 static void
@@ -292,7 +300,7 @@
    if (!borders)
      { /* FIXME here we want nothing, but that crashes!!! */
        mi = e_menu_item_new(m);
-       e_menu_item_label_set(mi, "empty"); 
+       e_menu_item_label_set(mi, "(No Windows)");
        return;
      }
    for (l = borders; l; l = l->next)




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to