Enlightenment CVS committal

Author  : handyande
Project : e17
Module  : proto

Dir     : e17/proto/enhance/src/lib


Modified Files:
        enhance.c 


Log Message:
Fix sume abuse of the IF_PARENT_CLASS macro and add support for stock menu items

===================================================================
RCS file: /cvs/e/e17/proto/enhance/src/lib/enhance.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- enhance.c   17 May 2006 12:35:02 -0000      1.5
+++ enhance.c   18 May 2006 18:59:48 -0000      1.6
@@ -541,7 +541,7 @@
        etk_window_skip_pager_hint_set(ETK_WINDOW(wid-wid), value);
      }   
 
-       else if(!strcmp(name, "label"))
+   else if(!strcmp(name, "label"))
      {
        IF_PARENT_CLASS("GtkButton")
          etk_button_label_set(ETK_BUTTON(wid->wid), node->value);        
@@ -582,7 +582,6 @@
      {
        Etk_Stock_Id id;
        PROPERTY_STR;
-       IF_PARENT_CLASS("GtkImage")
 
        _en_stock_items_hash_init();      
        id = (Etk_Stock_Id)ecore_hash_get(_en_stock_items_hash, value);
@@ -592,7 +591,6 @@
    else if(!strcmp(name, "icon_size"))
      {
        PROPERTY_INT;
-       IF_PARENT_CLASS("GtkImage");
        Etk_Stock_Id id = ETK_STOCK_MEDIUM;
        if (value <= 2) id = ETK_STOCK_SMALL;
        else if (value >= 5) id = ETK_STOCK_BIG;
@@ -602,18 +600,30 @@
    else if(!strcmp(name, "use_stock"))
      {
        PROPERTY_BOOL;
-       IF_PARENT_CLASS("GtkButton");
        char *label;
        Etk_Stock_Id id = ETK_STOCK_NO_STOCK;
        
        if (value)
-       {
-               _en_stock_items_hash_init();
-               label = (char *)etk_button_label_get(ETK_BUTTON(wid->wid));
-               id = (Etk_Stock_Id)ecore_hash_get(_en_stock_items_hash, label);
-               if (id != ETK_STOCK_NO_STOCK)
-                       etk_button_set_from_stock(ETK_BUTTON(wid->wid), 
(Etk_Stock_Id)id);
-       }
+         {
+            IF_PARENT_CLASS("GtkButton")
+              {
+                                                
+                 _en_stock_items_hash_init();
+                 label = (char *)etk_button_label_get(ETK_BUTTON(wid->wid));
+                 id = (Etk_Stock_Id)ecore_hash_get(_en_stock_items_hash, 
label);
+                 if (id != ETK_STOCK_NO_STOCK)
+                   etk_button_set_from_stock(ETK_BUTTON(wid->wid), 
(Etk_Stock_Id)id);
+              }
+            IF_PARENT_CLASS("GtkImageMenuItem")
+              {
+
+                  _en_stock_items_hash_init();
+                 label = (char 
*)etk_menu_item_label_get(ETK_MENU_ITEM(wid->wid));
+                 id = (Etk_Stock_Id)ecore_hash_get(_en_stock_items_hash, 
label);
+                 if (id != ETK_STOCK_NO_STOCK)
+                   etk_menu_item_set_from_stock(ETK_MENU_ITEM(wid->wid), 
(Etk_Stock_Id)id);
+              }
+         }
      }
 }
 




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to