Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/efreet

Dir     : e17/libs/efreet/src/lib


Modified Files:
        efreet_utils.c efreet_utils.h 


Log Message:


broadcast an event when the desktop list changes

===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_utils.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- efreet_utils.c      25 Mar 2007 22:54:28 -0000      1.17
+++ efreet_utils.c      31 Mar 2007 01:59:24 -0000      1.18
@@ -53,12 +53,16 @@
 
 static Ecore_Idler *idler = NULL;
 
+int EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE = 0;
+
 int
 efreet_util_init(void)
 {
     Efreet_Cache_Fill *fill;
     Ecore_List *dirs;
 
+    if (EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE == 0)
+       EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE = ecore_event_type_new();
     desktop_by_file_id = ecore_hash_new(ecore_str_hash, ecore_str_compare);
     ecore_hash_set_free_key(desktop_by_file_id, 
ECORE_FREE_CB(ecore_string_release));
     desktop_by_exec = ecore_hash_new(ecore_str_hash, ecore_str_compare);
@@ -362,6 +366,8 @@
     {
         free(fill);
         idler = NULL;
+       ecore_event_add(EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE, NULL, NULL, 
NULL);
+                      
         return 0;
     }
     if (!fill->current)
@@ -378,6 +384,8 @@
             ecore_hash_for_each_node(file_id_by_desktop_path, dump, NULL);
             printf("%d\n", ecore_hash_count(desktop_by_file_id));
 #endif
+            ecore_event_add(EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE, NULL, NULL, 
NULL);
+          
             return 0;
         }
     }
@@ -501,10 +509,12 @@
     search = data;
 
     if (!desktop->startup_wm_class) return 1;
-    if ((search->what1) && (!strcmp(desktop->startup_wm_class, search->what1)))
+    if ((search->what2) && (!strcmp(desktop->startup_wm_class, search->what2)))
         return 0;
-    else if ((search->what2) && (!strcmp(desktop->startup_wm_class, 
search->what2)))
+/* this isn't really valid - we look at class only, not name
+    else if ((search->what1) && (!strcmp(desktop->startup_wm_class, 
search->what1)))
         return 0;
+ */
     return 1;
 }
 
===================================================================
RCS file: /cvs/e/e17/libs/efreet/src/lib/efreet_utils.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- efreet_utils.h      25 Mar 2007 19:01:45 -0000      1.12
+++ efreet_utils.h      31 Mar 2007 01:59:24 -0000      1.13
@@ -18,5 +18,6 @@
 Ecore_List     *efreet_util_desktop_generic_name_glob_list(const char *glob);
 Ecore_List     *efreet_util_desktop_comment_glob_list(const char *glob);
 
+extern int EFREET_EVENT_UTIL_DESKTOP_LIST_CHANGE;
 
 #endif



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to