On Jan 17, 2008 6:13 PM, Andreas Volz <[EMAIL PROTECTED]> wrote:
> Am Thu, 17 Jan 2008 18:00:28 -0300 schrieb Gustavo Sverzut Barbieri:
>
>
> > On Jan 17, 2008 3:44 PM, Andreas Volz <[EMAIL PROTECTED]> wrote:
> > > Am Sun, 13 Jan 2008 18:57:56 -0300 schrieb Gustavo Sverzut Barbieri:
> > >
> > >
> > > > On Jan 13, 2008 6:16 PM, Adriano Rezende <[EMAIL PROTECTED]> wrote:
> > > > > On Jan 13, 2008 3:03 PM, Andreas Volz <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > > Am Sat, 12 Jan 2008 19:44:40 -0300 schrieb Adriano Rezende:
> > > > > >
> > > > > >
> > > > > > > I believe you have to emit the signal to
> > > > > > > sd->editable_object->text_object
> > > > > > >
> > > > > > > Search for the following code in your e_entry.c
> > > > > > >
> > > > > > > | sd->editable_object = o;
> > > > > > > | e_editable_theme_set(o, "base/theme/widgets",
> > > > > > > "e/widgets/entry");
> > > > > > >
> > > > > > > and follow the method e_editable_theme_set.
> > > > > > >
> > > > > > > I just took a fast look at the code, so I recommend to test
> > > > > > > before.
> > > > > >
> > > > > > Thanks for that hint. I did a better patch and it works now. I
> > > > > > think the visual improvement is really nice.
> > > > > >
> > > > > > http://tux-style.de/tmp/tclock_deactivated_gray.png
> > > > > >
> > > > > > Now users could see that a text entry is deactivated.
> > > > > >
> > > > > > I've created a new bug entry about that topic:
> > > > > >
> > > > > > http://bugzilla.enlightenment.org/show_bug.cgi?id=357
> > > > > >
> > > > > > Please review the patch if possible. Commit it or allow me to
> > > > > > commit if the patch looks good.
> > > > >
> > > > > Sorry, I don't work on this project.
> > > > > But probably the owner will see the patch and apply the changes.
> > > >
> > > > :-)
> > > >
> > > > Andreas,
> > > >
> > > > Patch looks really small and yes, maybe applied by raster one he
> > > > have the time to check.
> > > >
> > > > As I'm not used to E code, just found something weird with the
> > > > existing code:
> > > >
> > > >     edje_object_signal_emit(entry, "e,state,enabled", "e");
> > >
> > > Ok, as you noticed correct it was there before my modifications.
> > >
> > > > since entry is not (at least looks like it's not) an Edje object,
> > > > this will have no effect due defensive programming,
> > > > edje_object_signal_emit() will find no "Edje *" with
> > > > "_edje_fetch(obj)" and then will return.
> > > >
> > > > I just noticed that because I think the signal should be sent to
> > > > sd->entry_object, not sd->editable_object, it would allow us even
> > > > to set a clipper and make it transparent, thus disabled items
> > > > could be semi-transparent! :-)
> > > >
> > > > If I'm right and the above code is bogus, then it's just a matter
> > > > of using sd->entry_object instead of entry, add the theme part
> > > > and we're done.
> > >
> > > I think my patch looks good so far. Not sure about the yet existing
> > > code.
> > >
> > > Please one of the E developers should give me the ok for commit the
> > > patch. I'll to create some more theme patches in the future and
> > > like to know if it's ok this way.
> >
> > Sorry, but if I'm correct and the existing code is wrong, then your
> > patch is useless.
>
> Perhaps there's a wrong understanding. Do you say it was wrong before?
> Then my patch does even not take it worse. And the result is as desired
> if you look at the screenshot that I attached to the bug report.

I'm saying that current code (already commited, in CVS) looks like it
was trying to do that, but it is wrong and thus is not working. If the
code is fixed and it should work without any patch to _code_ (but we
still require the theme patch, modified).

I'm talking about e_entry.c line 294:

    edje_object_signal_emit(entry, "e,state,enabled", "e");

entry is the smart object, not an edje file, so it is doing nothing
(due defensive programming in edje_object_signal_emit(), check the
code). If this code reads:

    edje_object_signal_emit(sd->entry_object, "e,state,enabled", "e");

and e/widgets/entry is changed (.edc), then it should work as you want.

Notes:
  1) I'd use sd->entry_object instead of sd->editable_object because
this would free us to do more things, since the editable_object is
swallowed inside entry_object, thus we can do things like apply a
clipper and change its color, graying it or even making it
transparent.
  2) I'd not add yet another API call to editable.

That's my understanding, what do you think about it?

-- 
Gustavo Sverzut Barbieri
--------------------------------------
Jabber: [EMAIL PROTECTED]
   MSN: [EMAIL PROTECTED]
  ICQ#: 17249123
 Skype: gsbarbieri
Mobile: +55 (81) 9927 0010

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to