Since the ctxpopup position/Size is totally oriented to the arrow position.
the concept of the ctxpopup may go wrong if it allow arrow is missed.

maybe you need just popup/menu

------------------------------------
-Regards, Hermet-

-----Original Message-----
From: "Mike Blumenkrantz"<[email protected]> 
To: <[email protected]>; 
Cc: 
Sent: 2014-04-29 (화) 00:01:46
Subject: [EGIT] [core/elementary] master 01/01: ctxpopup should not blindly 
show arrows when they are not wanted by the theme

discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=595e0ca8280192f51554efafb5a54f476406e142

commit 595e0ca8280192f51554efafb5a54f476406e142
Author: zmike <michael.blumenkrantz>@gmail.com>
Date:   Mon Apr 28 11:00:54 2014 -0400

    ctxpopup should not blindly show arrows when they are not wanted by the 
theme
    
    @fix
---
 src/lib/elc_ctxpopup.c  34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)

diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index 9eb87bd..b118bc1 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -392,10 +392,13 @@ _arrow_update(Evas_Object *obj,
      {
       case ELM_CTXPOPUP_DIRECTION_RIGHT:
         edje_object_signal_emit(sd->arrow, "elm,state,left", "elm");
-        edje_object_part_swallow
-           (wd->resize_obj,
+        if (!edje_object_part_swallow(wd->resize_obj,
             (elm_widget_mirrored_get(obj) ? "elm.swallow.arrow_right" :
-             "elm.swallow.arrow_left"), sd->arrow);
+             "elm.swallow.arrow_left"), sd->arrow))
+          {
+             evas_object_hide(sd->arrow);
+             break;
+          }
 
         if (base_size.h > 0)
           {
@@ -415,10 +418,13 @@ _arrow_update(Evas_Object *obj,
 
       case ELM_CTXPOPUP_DIRECTION_LEFT:
         edje_object_signal_emit(sd->arrow, "elm,state,right", "elm");
-        edje_object_part_swallow
-           (wd->resize_obj,
+        if (!edje_object_part_swallow(wd->resize_obj,
             (elm_widget_mirrored_get(obj) ? "elm.swallow.arrow_left" :
-             "elm.swallow.arrow_right"), sd->arrow);
+             "elm.swallow.arrow_right"), sd->arrow))
+          {
+             evas_object_hide(sd->arrow);
+             break;
+          }
 
         if (base_size.h > 0)
           {
@@ -438,9 +444,11 @@ _arrow_update(Evas_Object *obj,
 
       case ELM_CTXPOPUP_DIRECTION_DOWN:
         edje_object_signal_emit(sd->arrow, "elm,state,top", "elm");
-        edje_object_part_swallow
-          (wd->resize_obj, "elm.swallow.arrow_up",
-          sd->arrow);
+        if (!edje_object_part_swallow(wd->resize_obj, "elm.swallow.arrow_up", 
sd->arrow))
+          {
+             evas_object_hide(sd->arrow);
+             break;
+          }
 
         if (base_size.w > 0)
           {
@@ -459,9 +467,11 @@ _arrow_update(Evas_Object *obj,
 
       case ELM_CTXPOPUP_DIRECTION_UP:
         edje_object_signal_emit(sd->arrow, "elm,state,bottom", "elm");
-        edje_object_part_swallow
-          (wd->resize_obj, "elm.swallow.arrow_down",
-          sd->arrow);
+        if (!edje_object_part_swallow(wd->resize_obj, 
"elm.swallow.arrow_down", sd->arrow))
+          {
+             evas_object_hide(sd->arrow);
+             break;
+          }
 
         if (base_size.w > 0)
           {

-- 



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to