jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8c505e31917f7607c0b6607bb8c73fb39f1bce9f

commit 8c505e31917f7607c0b6607bb8c73fb39f1bce9f
Author: Jean-Philippe Andre <[email protected]>
Date:   Tue Nov 22 17:09:48 2016 +0900

    win: Remove menu from EDC group (fixes compatibility)
    
    This fixes compatibility with legacy themes (ie. every single
    theme in existence beyond the default one, for now), by checking
    where to swallow the menu widget. If a legacy theme is used,
    the legacy swallow should be used, and it will all look correct.
    
    Moving forward I hope to get rid of the internal edje object
    entirely, except for compatibility reasons.
---
 data/elementary/themes/edc/elm/win.edc | 52 +++++-----------------------------
 src/lib/elementary/efl_ui_win.c        |  6 ++--
 2 files changed, 10 insertions(+), 48 deletions(-)

diff --git a/data/elementary/themes/edc/elm/win.edc 
b/data/elementary/themes/edc/elm/win.edc
index 292ff24..44ae634 100644
--- a/data/elementary/themes/edc/elm/win.edc
+++ b/data/elementary/themes/edc/elm/win.edc
@@ -1,66 +1,28 @@
 group { name: "elm/win/base/default";
    parts {
-      part { name: "menu_bg"; type: RECT;
-         description { state: "default" 0.0;
-            color: 64 64 64 255;
-            align: 0.5 0;
-            rel2.to: "elm.swallow.menu";
-         }
-      }
-      part { name: "elm.swallow.menu"; type: SWALLOW;
-         description { state: "default" 0.0;
-            rel2.relative: 1.0 0.0;
-            visible: 0;
-            align: 0.5 0;
-            fixed: 1 1;
-         }
-         description { state: "visible" 0.0;
-            inherit: "default" 0.0;
-            visible: 1;
-            fixed: 0 1;
-         }
-      }
-      part { name: "client_clip"; type: RECT; mouse_events: 0;
-         description { state: "default" 0.0;
+      rect { "client_clip"; nomouse;
+         desc { "default";
             rel1.to_y: "elm.swallow.contents";
             rel2.to_y: "elm.swallow.contents";
          }
       }
-      part { name: "elm.swallow.contents"; type: SWALLOW;
+      swallow { "elm.swallow.contents";
          clip_to: "client_clip";
-         description { state: "default" 0.0;
-            rel1 {
-               to_y: "elm.swallow.menu";
-               relative: 0.0 1.0;
-            }
-         }
       }
-      part { name: "blocker"; type: RECT;
-         description { state: "default" 0.0;
+      rect { "blocker";
+         desc { "default";
             rel1.relative : 0.0 0.0;
             rel2.relative : 1.0 1.0;
             color: 64 64 64 150;
             visible: 0;
          }
-         description { state: "visible" 0.0;
-            inherit: "default" 0.0;
+         desc { "visible";
+            inherit: "default";
             visible: 1;
          }
       }
    }
    programs {
-      program { name: "show_menu";
-         signal: "elm,action,show_menu";
-         source: "elm";
-         action: STATE_SET "visible" 0.0;
-         target: "elm.swallow.menu";
-      }
-      program { name: "hide_menu";
-         signal: "elm,action,hide";
-         source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "elm.swallow.menu";
-      }
       program { name: "hide_blocker";
          signal: "elm,action,hide_blocker";
          source: "elm";
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index ae8cd53..56e392a 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -5320,10 +5320,10 @@ _efl_ui_win_fullscreen_get(Eo *obj EINA_UNUSED, 
Efl_Ui_Win_Data *sd)
 static inline Eo *
 _main_menu_swallow_get(Efl_Ui_Win_Data *sd)
 {
-   if (sd->frame_obj)
+   if (edje_object_part_exists(sd->legacy.edje, "elm.swallow.menu"))
      {
-        if (edje_object_part_exists(sd->frame_obj, "elm.swallow.menu"))
-          return sd->frame_obj;
+        DBG("Detected legacy theme, using legacy swallows.");
+        return sd->legacy.edje;
      }
    return sd->legacy.edje;
 }

-- 


Reply via email to