Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_embed.c ewl_menu.c ewl_menu.h ewl_menubar.c 


Log Message:
- formatting

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_embed.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- ewl_embed.c 7 Jan 2006 07:07:33 -0000       1.41
+++ ewl_embed.c 7 Jan 2006 15:49:17 -0000       1.42
@@ -270,7 +270,7 @@
 
        if (e && e->last.clicked)
        {
-               Ewl_Widget* temp;
+               Ewl_Widget *temp;
        
        
                ewl_object_state_remove(EWL_OBJECT(e->last.clicked),
@@ -280,14 +280,13 @@
                
                ewl_callback_call(e->last.clicked, EWL_CALLBACK_FOCUS_OUT);
 
-               /*Clean the last.clicked up recursively..*/
+               /* Clean the last.clicked up recursively.. */
                temp = e->last.clicked;
                while (temp) {
                        if (!(ewl_object_state_has(EWL_OBJECT(temp),
-                               EWL_FLAG_STATE_DISABLED))) {
-                       ewl_object_state_remove(EWL_OBJECT(temp),
-                                       EWL_FLAG_STATE_PRESSED);
-
+                                               EWL_FLAG_STATE_DISABLED))) {
+                               ewl_object_state_remove(EWL_OBJECT(temp),
+                                               EWL_FLAG_STATE_PRESSED);
                        }
                        temp = temp->parent;
                }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_menu.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- ewl_menu.c  7 Jan 2006 12:27:46 -0000       1.21
+++ ewl_menu.c  7 Jan 2006 15:49:18 -0000       1.22
@@ -137,29 +137,27 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
-
 void
 ewl_menu_expand_mouse_move_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
                                        void *user_data __UNUSED__) 
 {
-       Ewl_Menu* menu;
+       Ewl_Menu *menu;
        
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
        DCHECK_TYPE("w", w, "widget");
        
-       menu= EWL_MENU(w);
-                                       
+       menu = EWL_MENU(w);
        if (menu->menubar_parent) {
-               Ewl_Menu* sub;
-               int vis=0;
-               Ewl_Menu* hide_menu = NULL;
-               Ewl_Menubar* bar = EWL_MENUBAR(menu->menubar_parent);
-               ewl_container_child_iterate_begin(EWL_CONTAINER(bar));
-
-               while ( (sub = 
EWL_MENU(ewl_container_child_next(EWL_CONTAINER(bar))))) {
-                       if (sub != EWL_MENU(w) && sub->base.popup && 
-                         VISIBLE(sub->base.popup)) {
+               Ewl_Menu *sub, *hide_menu = NULL;
+               Ewl_Container *bar;
+               int vis = 0;
+        
+               bar = EWL_CONTAINER(menu->menubar_parent);
+               ewl_container_child_iterate_begin(bar);
+               while ((sub = EWL_MENU(ewl_container_child_next(bar)))) {
+                       if ((sub != EWL_MENU(w)) && (sub->base.popup) 
+                                       && VISIBLE(sub->base.popup)) {
                                hide_menu = sub;
                                vis++;
                                break;
@@ -175,8 +173,6 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
-
-
 void
 ewl_menu_expand_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
                                        void *user_data __UNUSED__)
@@ -230,14 +226,11 @@
 void
 ewl_menu_mouse_move_cb(Ewl_Widget *w, void *ev_data, void *user_data) 
 {
-
-       Ewl_Event_Mouse_Move* ev;
-       Ewl_Menu* menu;
-       Ewl_Embed* embed;
-       Ewl_Embed* menu_embed;
-       int wx, wy;
-       int x, y;
-       int width,height;
+       Ewl_Event_Mouse_Move *ev;
+       Ewl_Menu *menu;
+       Ewl_Embed *embed, *menu_embed;
+       int x, y, wx, wy;
+       int width, height;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
@@ -245,7 +238,7 @@
        DCHECK_TYPE("user_data", user_data, "menu");
 
        ev = ev_data;
-       menu = EWL_MENU(user_data);
+       menu = user_data;
        
        embed = ewl_embed_widget_find(EWL_WIDGET(menu)->parent);
        menu_embed = ewl_embed_widget_find(EWL_WIDGET(menu->base.popup));
@@ -253,28 +246,29 @@
        ewl_window_position_get(EWL_WINDOW(menu->base.popup), &x, &y);
        ewl_object_current_size_get(EWL_OBJECT(menu->base.popup), &width, 
&height);
 
-       if (ev->x+x > x && ev->y+y > y && ev->x+x < x+width && ev->y+y < 
y+height) {
+       if (((ev->x + x) > x) && ((ev->y + y) > y) 
+                       && ((ev->x + x) < (x + width)) 
+                       && ((ev->y + y) < (y + height))) {
                if (ewl_embed_active_embed_get() != menu_embed)
-                       ewl_embed_active_set(menu_embed,1);
-       } else {
+                       ewl_embed_active_set(menu_embed, 1);
+       } 
+       else {
                if (menu->menubar_parent) 
-                       ewl_embed_mouse_move_feed(embed, ev->x+x - wx, ev->y+y 
- wy,0);
+                       ewl_embed_mouse_move_feed(embed, (ev->x + x) - wx, 
+                                                       (ev->y + y) - wy, 0);
        }
 }
 
-
 void
 ewl_menu_hide_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
-                                       void *user_data )
+                                       void *user_data __UNUSED__)
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("w", w);
        DCHECK_TYPE("w", w, "widget");
 
-       if (w == ewl_embed_focused_widget_get(EWL_EMBED(w))) {
+       if (w == ewl_embed_focused_widget_get(EWL_EMBED(w)))
                ewl_widget_hide(w);
-               
-       }
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_menu.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_menu.h  7 Jan 2006 06:45:23 -0000       1.8
+++ ewl_menu.h  7 Jan 2006 15:49:18 -0000       1.9
@@ -37,7 +37,7 @@
         int            popup_x;
         int            popup_y;
 
-       Ewl_Widget* menubar_parent;
+       Ewl_Widget    *menubar_parent;
 };
 
 Ewl_Widget     *ewl_menu_new(void);
@@ -55,7 +55,6 @@
 void ewl_menu_expand_mouse_move_cb(Ewl_Widget *w, void *ev_data, void 
*user_data);
 void ewl_menu_mouse_move_cb(Ewl_Widget *w, void *ev_data, void *user_data);
 
-
 /**
  * @}
  */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_menubar.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_menubar.c       7 Jan 2006 06:45:23 -0000       1.8
+++ ewl_menubar.c       7 Jan 2006 15:49:18 -0000       1.9
@@ -93,7 +93,7 @@
                                        EWL_CONTAINER(mb->inner_box));
 
        ewl_container_add_notify_set(EWL_CONTAINER(mb->inner_box),
-                               ewl_menubar_cb_child_add);
+                                       ewl_menubar_cb_child_add);
 
 
        ewl_menubar_orientation_set(mb, EWL_ORIENTATION_HORIZONTAL);
@@ -162,9 +162,10 @@
        DCHECK_TYPE("w", w, "widget");
 
        mb = EWL_MENUBAR(c);
-       if (ewl_widget_type_is(w,"menu")) 
+       if (ewl_widget_type_is(w, "menu")) 
                EWL_MENU(w)->menubar_parent = EWL_WIDGET(mb);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 
 }
+




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to