Hello,

I tried to patch E to show the disabled state of a text entry. Here are
my patches:

Index: e_entry.c
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_entry.c,v
retrieving revision 1.53
diff -u -u -r1.53 e_entry.c
--- e_entry.c   12 Dec 2007 19:00:47 -0000      1.53
+++ e_entry.c   12 Jan 2008 18:25:48 -0000
@@ -292,6 +292,7 @@
      return;
    
    edje_object_signal_emit(entry, "e,state,enabled", "e");
+   edje_object_signal_emit(sd->editable_object, "e,state,enabled",
"e"); if (sd->focused)
      e_editable_cursor_show(sd->editable_object);
    sd->enabled = 1;
@@ -314,6 +315,7 @@
      return;
    
    edje_object_signal_emit(entry, "e,state,disabled", "e");
+   edje_object_signal_emit(sd->editable_object, "e,state,disabled",
"e"); e_editable_cursor_hide(sd->editable_object);
    sd->enabled = 0;
 }


-------------------------------------------------------------------


Index: default_entry.edc
===================================================================
RCS file: /cvs/e/e17/apps/e/data/themes/default_entry.edc,v
retrieving revision 1.14
diff -u -u -r1.14 default_entry.edc
--- default_entry.edc   6 Oct 2006 02:25:57 -0000       1.14
+++ default_entry.edc   12 Jan 2008 18:27:22 -0000
@@ -96,8 +96,30 @@
                text_class: "entry";
            }
         }
+        description {
+           state: "disabled" 0.0;
+      inherit:  "default" 0.0;
+           color: 255 0 0 255;
+        }
       }
    }
+
+   programs {
+      program {
+         name: "disable";
+              signal: "e,state,disabled";
+              source: "e";
+               action: STATE_SET "disabled" 0.0;
+              target: "e.text.text"; 
+            }
+      program {
+              name: "enable";
+              signal: "e,state,enabled";
+              source: "e";
+               action: STATE_SET "default" 0.0;
+              target: "e.text.text"; 
+     }
+  }
 }
 
 group {


I've chosen red for the inactive color as test. But later I would chose
a light gray. In my eyes this should work, but it doesn't. Any hints
why it doesn't work?

I tested it with edje_viewer and the signal works. I don't understand
it. Maybe the sd->editable_object isn't the correct object to send the
signal?

regards
Andreas

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to