Re: [E-devel] Edje State Set from C

2006-02-10 Thread Jan Rychter
Rasterman wrote:
> On Wed, 08 Feb 2006 01:43:03 -0600 Ed Presutti <[EMAIL PROTECTED]> babbled:
> > On Wed, 2006-02-08 at 15:34 +0900, Carsten Haitzler wrote:
> > > On Wed, 08 Feb 2006 01:05:49 -0600 Ed Presutti <[EMAIL PROTECTED]>
> > > babbled:
> > > 
> > > > Is there a way to set the state of an Edje part using C?
> > > > 
> > > > I'm currently using a program inside of the Edje file to set state. I
> > > > would like to do it via the C API if possible.
> > > 
> > > no. u need to use programs to handle signals to set the state.
> > > 
> > 
> > Would it be worth my time to create a patch to add the C API to Edje?
> > I'm just wondering if this was a "nice to have" that hasn't been
> > implemented yet. If so, I can do a little work on a patch. If it's a
> > "not going to happen" then i'll leave it be and continue to use signals.
> 
> whats wrong with using signals? signals are a subset of the edje message queue
> api - this is basicalyl an ipc system for process <-> edje to talk back and
> forth. settign the state explicitly kind of bypasses the channel by setting
> something directly - it kind of is a bit evil imho. if it's a nmatter of just
> gettign tired of writign signal handler programs... write a macro so it 
> becoems
> a 1 liner :)

I'll pitch in here, as I've been thinking about the same issue. If you
use C, you probably appreciate the existence of a scriptable language in
Edje. But if you use Edje from a high-level language, you would often
much rather set the state directly, rather than use a second language to
write little programs that set the state based on signals. It adds
another level of indirection and duplicates code in many cases.

It was my impression that I'd eventually end up writing code that will
generate the little programs for me, and that feels kind of wrong.

Wouldn't it be better to be able to set the state, and if one wants to,
"hook" into the state changes with Edje programs? That way the designer
would still be able to do fancy transitions if he wanted to, but overall
code size would be minimized?

Just thinking out loud.

--J.


---
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Edje State Set from C

2006-02-10 Thread Brian Mattern
On Friday 10 February 2006 02:18, Jan Rychter wrote:
> Rasterman wrote:
> > On Wed, 08 Feb 2006 01:43:03 -0600 Ed Presutti <[EMAIL PROTECTED]> 
babbled:
> > > On Wed, 2006-02-08 at 15:34 +0900, Carsten Haitzler wrote:
> > > > On Wed, 08 Feb 2006 01:05:49 -0600 Ed Presutti
> > > > <[EMAIL PROTECTED]>
> > > >
> > > > babbled:
> > > > > Is there a way to set the state of an Edje part using C?
> > > > >
> > > > > I'm currently using a program inside of the Edje file to set state.
> > > > > I would like to do it via the C API if possible.
> > > >
> > > > no. u need to use programs to handle signals to set the state.
> > >
> > > Would it be worth my time to create a patch to add the C API to Edje?
> > > I'm just wondering if this was a "nice to have" that hasn't been
> > > implemented yet. If so, I can do a little work on a patch. If it's a
> > > "not going to happen" then i'll leave it be and continue to use
> > > signals.
> >
> > whats wrong with using signals? signals are a subset of the edje message
> > queue api - this is basicalyl an ipc system for process <-> edje to talk
> > back and forth. settign the state explicitly kind of bypasses the channel
> > by setting something directly - it kind of is a bit evil imho. if it's a
> > nmatter of just gettign tired of writign signal handler programs... write
> > a macro so it becoems a 1 liner :)
>
> I'll pitch in here, as I've been thinking about the same issue. If you
> use C, you probably appreciate the existence of a scriptable language in
> Edje. But if you use Edje from a high-level language, you would often
> much rather set the state directly, rather than use a second language to
> write little programs that set the state based on signals. It adds
> another level of indirection and duplicates code in many cases.
>

Using signals and programs instead of setting the state directly is more of an 
encapsulation than a redirection. As is, a 'theme spec' for most edje apps 
would include 
A) a list of signals that are emitted by the app. 
B) a list of signals expected by the app from the edje.
C) A list of part names that are required for swallowing objects in, and 
possibly that events are expected from.

If we allow apps to set state directly we would add (D) A list of expected 
STATE names. 

So now, instead of telling the object "go_active", which could update several 
parts, possibly through several state transitions, you would say "set the 
'title' part to the 'active' state". Now one part changes to a _defined_ 
state. Severe loss of flexibility from the theme side. I much prefer having 
the choice of states used be completely flexible.

> It was my impression that I'd eventually end up writing code that will
> generate the little programs for me, and that feels kind of wrong.

these 'little programs' are as simple as

program { name: "foo"; signal: "do_this"; action: SET_STATE "this" 0.0; 
target: "partA"; target: "partB"; transition: LINEAR 0.5 }

does that really require "generating code"?
if you really hate typing it out, write a macro for the generic case (single 
target, no/common transition).

>
> Wouldn't it be better to be able to set the state, and if one wants to,
> "hook" into the state changes with Edje programs? That way the designer
> would still be able to do fancy transitions if he wanted to, but overall
> code size would be minimized?

Think of the states as "internal implementation" in the edje object, and the 
signals as the interface. I find the encapsulation much more flexible.

--
rephorm


---
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [e-users] Re: [E-devel] Continuing... Anonymous CVS & Servers - YOU CAN HELP!

2006-02-10 Thread The Rasterman
On Fri, 10 Feb 2006 10:41:51 -0500 Geoffrey <[EMAIL PROTECTED]> babbled:

> Carsten Haitzler (The Rasterman) wrote:
> > On Thu, 09 Feb 2006 20:57:26 -0500 Geoffrey <[EMAIL PROTECTED]>
> > babbled:
> > 
> > 
> >> Ed Presutti wrote:
> >> 
> >>> Geoffrey,
> >>> 
> >>> I have a friend in sales at Monarch that might be helpful in
> >>> these matters. Let me know if you need an assist.
> >> 
> >> Well, I stopped by Monarch and inquired as to the possibility of 
> >> providing some sponsorship.  I was informed that the marketing
> >> people will only see you by appointment and that sponsorship is
> >> only addressed via email.  I've not heard back from the email
> >> message I sent.
> >> 
> >> Needless to say, I was quite disappointed in the whole thing.
> >> Maybe we'll have better luck with another vendor.
> > 
> > 
> > not overly surprising though :)
> 
> Except for the fact that they could at least respond to the email.  Not
> exactly good PR or customer relations.

typical company: "is there any $ in it for us? - who are these enlightenemnt
people? i don't know. don't waste your time on some group of open soruce
looneys. if you don't know them they don't count.". do you think the MARKETING
guys at a company like a server manufacturer have a concept of the open source
world beyond "Redhat" or maybe "debian" and "linux kernel" and that's about it?
if they do - you are insanely lucky. these guys simply slap a debian or redhat
install image on a disk and sell a piece of hardware. if they do much more than
that you are VERY lucky.

> The guy at the shop acted like I was putting him out as well.  That's
> not the way they will continue to get my business.  Then again, why
> worry about the small fish in the pond right?

yup. small fish. if they lose 1 customer - they dont care. if u represent a
massiv organisation that is buying 100's or 1000's of boxes - and they piss u
off - they will care. the oss world matters little to them. they get the code
one way or another. a window manager and gfx toolkit are even more irrelevant
if their business is servers. not only are we irrelevant to their business - we
arent even a "household name" and you have no "leverage". it sucks - i know.
the only leverage u might have is with the BIG BIG BIG players where they do
span LOTS of domains and the publicity is worht the tiny dent in their budget,
OR unless offending you means a big enough dent in their sales. if everyone on
this list decides not to buy form them - i doubt they will see a dent in their
budget and even that happening is unlikely as they havent really "wronged" us.
they simply havent decided to give us a few hundred or thousand dollars for
free (as giving a box is a box they can't sell - thus at least worht the cost
of manufacture, likely also worht its full retail price considering the special
out-of-the-ordinary effort to get it to you, etc. etc.).

-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)[EMAIL PROTECTED]
裸好多
Tokyo, Japan (東京 日本)


---
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [e-users] Re: [E-devel] Continuing... Anonymous CVS & Servers - YOU CAN HELP!

2006-02-10 Thread Geoffrey
Carsten Haitzler (The Rasterman) wrote:
> On Thu, 09 Feb 2006 20:57:26 -0500 Geoffrey <[EMAIL PROTECTED]>
> babbled:
> 
> 
>> Ed Presutti wrote:
>> 
>>> Geoffrey,
>>> 
>>> I have a friend in sales at Monarch that might be helpful in
>>> these matters. Let me know if you need an assist.
>> 
>> Well, I stopped by Monarch and inquired as to the possibility of 
>> providing some sponsorship.  I was informed that the marketing
>> people will only see you by appointment and that sponsorship is
>> only addressed via email.  I've not heard back from the email
>> message I sent.
>> 
>> Needless to say, I was quite disappointed in the whole thing.
>> Maybe we'll have better luck with another vendor.
> 
> 
> not overly surprising though :)

Except for the fact that they could at least respond to the email.  Not
exactly good PR or customer relations.

The guy at the shop acted like I was putting him out as well.  That's
not the way they will continue to get my business.  Then again, why
worry about the small fish in the pond right?

-- 
Until later, Geoffrey


---
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://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Patches for Etk_Filechooser_Widget

2006-02-10 Thread Chris Michael
Hello Moom, CodeWarrior,

As per my discussion with CodeWarrior, here is a diff for
etk_filechooser_widget which does the following:

***
-Adds 2 new properties: Select_Multiple and Show_Hidden.

-Adds a function to allow/disallow multiple files to be selected. (False
By Default).

-Adds a function to allow/disallow showing of hidden files. (False By
Default).

-Adds a function to get the current_folder.

-Adds a function to get/set the current_file.
***

Please give it a once-over, and if everything is kewl, commit it :)

I've tested all this with a proto app I am making. The only "gotcha" I
found is that show_hidden needs to be set before the current_folder is
set. Perhaps there is a way to work around that.

Cheers,
devilhorns
--- etk_filechooser_widget.c.orig	2006-02-10 05:43:33.0 -0500
+++ etk_filechooser_widget.c	2006-02-10 19:30:36.0 -0500
@@ -29,7 +29,9 @@
 
 enum _Etk_Filechooser_Widget_Property_Id
 {
-   ETK_FILECHOOSER_WIDGET_PATH_PROPERTY
+   ETK_FILECHOOSER_WIDGET_PATH_PROPERTY,
+   ETK_FILECHOOSER_WIDGET_SELECT_MULTIPLE_PROPERTY,
+   ETK_FILECHOOSER_WIDGET_SHOW_HIDDEN_PROPERTY
 };
 
 typedef struct _Etk_Filechooser_Widget_Icons
@@ -45,6 +47,7 @@
 static void _etk_filechooser_widget_favs_get(Etk_Filechooser_Widget *filechooser_widget);
 static void _etk_filechooser_widget_dir_row_selected_cb(Etk_Object *object, Etk_Tree_Row *row, void *data);
 static void _etk_filechooser_widget_fav_row_selected_cb(Etk_Object *object, Etk_Tree_Row *row, void *data);
+static void _etk_filechooser_widget_file_row_selected_cb(Etk_Object *object, Etk_Tree_Row *row, void *data);
 
 static Etk_Filechooser_Widget_Icons _etk_file_chooser_icons[] =
 {
@@ -67,7 +70,7 @@
{ "rar", "mimetypes/package-x-generic_16" },
 };
 static int _etk_file_chooser_num_icons = sizeof(_etk_file_chooser_icons) / sizeof (_etk_file_chooser_icons[0]);
-static Etk_Signal *_etk_filechooser_widget_signals[ETK_FILECHOOSER_WIDGET_NUM_SIGNALS];
+//static Etk_Signal *_etk_filechooser_widget_signals[ETK_FILECHOOSER_WIDGET_NUM_SIGNALS];
 
 /**
  *
@@ -90,7 +93,9 @@
   //_etk_filechooser_widget_signals[ETK_FILECHOOSER_WIDGET_TEXT_POPPED_SIGNAL] = etk_signal_new("text_popped", filechooser_widget_type, -1, etk_marshaller_VOID__INT_POINTER, NULL, NULL);
   
   etk_type_property_add(filechooser_widget_type, "path", ETK_FILECHOOSER_WIDGET_PATH_PROPERTY, ETK_PROPERTY_STRING, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_string(NULL));
-  
+  etk_type_property_add(filechooser_widget_type, "select_multiple", ETK_FILECHOOSER_WIDGET_SELECT_MULTIPLE_PROPERTY, ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(ETK_FALSE));
+  etk_type_property_add(filechooser_widget_type, "show_hidden", ETK_FILECHOOSER_WIDGET_SHOW_HIDDEN_PROPERTY, ETK_PROPERTY_BOOL, ETK_PROPERTY_READABLE_WRITABLE, etk_property_value_bool(ETK_FALSE));
+
   filechooser_widget_type->property_set = _etk_filechooser_widget_property_set;
   filechooser_widget_type->property_get = _etk_filechooser_widget_property_get;
}
@@ -135,8 +140,11 @@
ecore_list_goto_first(files);
while ((file_name = ecore_list_next(files)))
{
-  if (file_name[0] == '.')
- continue;
+  if (!filechooser_widget->show_hidden) 
+	{
+	   if (file_name[0] == '.')
+	 continue;
+	}
   
   free(file_path);
   file_path = malloc(strlen(folder) + strlen(file_name) + 2);
@@ -162,9 +170,12 @@
   const char *ext;
   char *icon = NULL;
   int i;
-  
-  if (file_name[0] == '.')
- continue;
+
+  if (!filechooser_widget->show_hidden) 
+	{  
+	   if (file_name[0] == '.')
+	 continue;
+	}
   
   free(file_path);
   file_path = malloc(strlen(folder) + strlen(file_name) + 2);
@@ -197,6 +208,112 @@
ecore_list_destroy(files);
 }
 
+/**
+ * @brief Retrieve the current folder
+ * @return Returns the current folder
+ */
+char *etk_filechooser_widget_current_folder_get(Etk_Filechooser_Widget *filechooser_widget) 
+{
+   Etk_Widget *fcw;
+
+   if (!(fcw = ETK_WIDGET(filechooser_widget)) || !filechooser_widget->dir_tree)
+  return NULL;
+
+   return filechooser_widget->current_folder;
+}
+
+/**
+ * @brief Sets the current filename
+ * @return
+ */
+void etk_filechooser_widget_current_file_set(Etk_Filechooser_Widget *filechooser_widget, const char *file)
+{
+   Etk_Widget *fcw;
+
+   if (!(fcw = ETK_WIDGET(filechooser_widget)) || !filechooser_widget->files_tree)
+  return;
+
+   filechooser_widget->current_file = strdup(file);
+}
+
+/**
+ * @brief Retrieve the currently selected filename
+ * @return Returns the currenttly selected filename
+ */
+char *etk_filechooser_widget_current_file_get(Etk_Filechooser_Widget *filechooser_widget)
+{
+   Etk_Widget *fcw;
+
+   if (!(fcw = ETK_WIDGET(filechooser_widget)) || !filec

[E-devel] Ecore_con_dns patch

2006-02-10 Thread Joel Klinghed
Hi.

Attached is a small patch for Ecore DNS lookup.

When forking all queued atexits is copied as well.
This creates trouble in at least embrace, or rather Edb when the forked
dns lookup calls exit.
So, changed to a exit function that doesn't call all queued atexits.
Only tested with GNU libc.

Symptoms:
The forked children of embrace takes 100% CPU and (naturally) hogs the
system.
Have attached a backtrace after interrupting one of these children.
Only embrace was compiled with debug symbols.

Regards, Joel Klinghed
#1  0x2abdea46 in __memp_mf_close () from /sw/edb/lib/libedb.so.1
#2  0x2abde511 in memp_fclose () from /sw/edb/lib/libedb.so.1
#3  0x2ac1cc83 in __edb_close () from /sw/edb/lib/libedb.so.1
#4  0x2ac041e5 in __edb_nedbm_close () from /sw/edb/lib/libedb.so.1
#5  0x2abd2d42 in _e_db_close () from /sw/edb/lib/libedb.so.1
#6  0x2abd34b1 in e_db_flush () from /sw/edb/lib/libedb.so.1
#7  0x2d57527d in *__GI_exit (status=0) at exit.c:60
#8  0x2b28967f in ecore_con_dns_lookup ()
   from /sw/ecore/lib/libecore_con.so.1
#9  0x2b287954 in ecore_con_server_connect ()
   from /sw/ecore/lib/libecore_con.so.1
#10 0x2aaab0df08d2 in imap_server_check (server=0x543e10) at imap.c:258
#11 0x2aaab0df0945 in on_timer (udata=Variable "udata" is not available.
) at imap.c:282
#12 0x2d0ab030 in _ecore_timer_call () from /sw/ecore/lib/libecore.so.1
#13 0x2d0a877f in _ecore_main_loop_iterate_internal ()
   from /sw/ecore/lib/libecore.so.1
#14 0x2d0a7c8a in ecore_main_loop_begin ()
   from /sw/ecore/lib/libecore.so.1
#15 0x004037b7 in main (argc=1, argv=Variable "argv" is not available.
) at main.c:82
Index: ecore/src/lib/ecore_con/ecore_con_dns.c
===
RCS file: /root/e17/libs/ecore/src/lib/ecore_con/ecore_con_dns.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 ecore_con_dns.c
--- ecore/src/lib/ecore_con/ecore_con_dns.c 19 Jan 2006 09:36:42 
-1.1.1.2
+++ ecore/src/lib/ecore_con/ecore_con_dns.c 11 Feb 2006 03:09:24 -
@@ -378,7 +378,11 @@
 write(fd[1], &(addr.s_addr), sizeof(in_addr_t));
  }
close(fd[1]);
-   exit(0);
+#ifdef __USE_ISOC99
+   Exit(0);
+#else
+   _exit(0);
+#endif
  }
/* PARENT */
cbdata->handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_ecore_con_dns_exit_handler, cbdata);