Re: [E-devel] {Spam?} Re: suggestion for the night build system

2007-09-17 Thread David Seikel
On Thu, 6 Sep 2007 23:26:58 +0200 (CEST) Vincent Torri
[EMAIL PROTECTED] wrote:

 
 
 On Thu, 6 Sep 2007, Andreas Volz wrote:
 
  Am Wed, 5 Sep 2007 23:07:34 -0500 schrieb andres:
 
  I'm writting some Edje development documentation and realizing how
  many code examples all around the docs are broken over small
  details. Which is ok by me but it could be very discouraging to
  others.
 
  I think we should commit all code examples to a separate folder and
  setup the nightly build system to compile them (or run some test
  script for the interpreted languages).
 
  There're a lot of tests in the examples dir of eflpp. Would be nice
  to compile (and run) all tests in a nightly test and see the
  results at the next day. This would save me some time while
  developing eflpp. I think other libs may benefit also.
 
  So this is a good idea. Perhaps it's also a good idea to start
  writing more classic unit tests and run them each night.
 
 i want to write some, using the check library, gcov and lcov. I
 currently have some problems using lcov when the source code is not
 is the same directory tree than the tests (raster wants them in the
 test/ dir).

The nightly build system tries to be generic.  So to support testing,
we would need to define some standard way of invoking those tests.  On
the other hand, the nature of E development means that most tests
proggies are GUI apps that are not as easily tested.

Most E stuff is written in C using autotools, so that will be where
testing infrastructure should be developed first.

I think the simplest way would be similar to how the gendoc script is
currently supported.  If a gendoc script is found in the packages base
directory, it is used to generate docs.  So a test.sh script could be
used in a similar way.

The other thing to keep in mind is that the system currently runs on
the E web server.  We don't want to soak up resources running tests.
Everything is run with the lowest CPU and IO priority, so performance
testing is probably a waste of time.


signature.asc
Description: PGP signature
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] {Spam?} Re: suggestion for the night build system

2007-09-17 Thread Vincent Torri


On Mon, 17 Sep 2007, David Seikel wrote:


 i want to write some, using the check library, gcov and lcov. I
 currently have some problems using lcov when the source code is not
 is the same directory tree than the tests (raster wants them in the
 test/ dir).

 The nightly build system tries to be generic.  So to support testing,
 we would need to define some standard way of invoking those tests.  On
 the other hand, the nature of E development means that most tests
 proggies are GUI apps that are not as easily tested.

autogen.sh + configure + make. That's what I use. I think that it's good 
enough.

I mention that I want to add tests whose results can be tested 
programmatically. ecore_evas test in test/orig is not a test that I would 
add in unit tests, for example.

Vincent

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


Re: [E-devel] Ecore_Con

2007-09-17 Thread Cedric BAIL
Fisrt, I must thank you for this review. It's really nice you took the 
necessary time to do it and so quickly. Thanks a lot !

On Sunday 16 September 2007 01:29:11 Gustavo Sverzut Barbieri wrote:
 On 9/15/07, Cedric BAIL [EMAIL PROTECTED] wrote:
  During my testing of Ecore_Con, I found some little bug when you are
  doing multiple download simultaneously :
 
  - The data buffer we are receiving must be copied, or it could be
  reused by curl and we will receive garbage in the event handler. -
  Sometime the complete event show up before we receive the last chunk of
  data. I put all the complete event inside a list and the event are send
  inside an ecore_idler.
 
  I also added some functionnality :
  - Use ECORE_MAGIC.
  - The status code is no longer curl internal status, but ftp or
  http return code (I think it's more usefull than CURLE_OK). - You can now
  add a time condition on you requested url (see HTTP code 304). - Normally
  we must receive progress events also (I admit I didn't test if it worked
  fine, but it should).
 
  I used this modified ecore_con_url to developpe a library downloading
  file in a cache directory cleanly. I needed to include it inside Ecore as
  I wanted to use some ecore private facility like ECORE_MAGIC. I attached
  the patch if people are interested.

 +   struct _Ecore_Con_Event_Url_Progress_Download
 + {
 +Ecore_Con_Url   *url_con;
 +double   total;
 +double   now;
 + };
 +
 +   struct _Ecore_Con_Event_Url_Progress_Upload
 + {
 +Ecore_Con_Url   *url_con;
 +double   total;
 +double   now;
 + };

 You should made just one struct/typedef and IF required at later
 point, you can inherit this structure and add more fields for one
 specific case... but I don't think it will be required.

You are right.

 +   char   active : 1;

 it will cause bug with newer compilers, it should be unsigned char
 otherwise the unique bit will be used for the signal, thus comparisons
 would be active == -1 not active == 1.

Didn't know that. Will fix.

 +struct _litle_ecore_con_url_event_s

 typo: s/litle/little/g ?

 +static int
 +_url_complete_idler_cb(void *data)
 +{
 +   _litle_ecore_con_url_event_t *lev;
 +
 +   ecore_list_first_goto(_url_complete_list);

 Why don't you remove this _url_complete_list altogether and use
 data parameter to provide the lev? This way you use the idler's
 list (implicit list usage) and remove 2 globals since you don't need
 _url_complete_list or even _url_complete_idler.

Good question :) Will fix.

 +   ecore_idler_del(_url_complete_idler);
 +   _url_complete_idler = NULL;
 +
 +   return 1;
 +}

 it's deleted automatically if you return 0, so this should work more
 nicely:

   _url_complete_idler = NULL;
   return 0;
 }

 Or just remove _url_complete_idler if you use the way I said.

Yep.

 +   ecore_list_append(_url_complete_list, lev);
 +
 +   if (_url_complete_idler == NULL)
 + _url_complete_idler = ecore_idler_add(_url_complete_idler_cb, NULL);

 using the data approach would reduce this to:

ecore_idler_add(_url_complete_idler_cb, lev);

 much simpler :-)

 +EAPI void*
 +ecore_con_url_data_set(Ecore_Con_Url *url_con, const void *data)

 I don't like the setter returning the old value too much,
 ecore_evas_data_set() don't do that (API consistency).

I don't know where I saw this. Will fix for ecore_con and ecore_download.

 +EAPI void
 +ecore_con_url_time(Ecore_Con_Url *url_con, Ecore_Con_Url_Time
 condition, time_t tm)

 add set to the name? - ecore_con_url_time_set()

 @@ -256,18 +422,46 @@
 size_t real_size = size * nmemb;

 url_con = (Ecore_Con_Url *)userp;
 -   e = calloc(1, sizeof(Ecore_Con_Event_Url_Data));
 +   e = calloc(1, sizeof(Ecore_Con_Event_Url_Data) + sizeof(char) *
 real_size); if (e)
   {
   e-url_con = url_con;
 - e-data = buffer;
 + e-data = (void*) ((Ecore_Con_Event_Url_Data*)(e + 1));
   e-size = real_size;
 +memcpy(e-data, buffer, real_size);
   ecore_event_add(ECORE_CON_EVENT_URL_DATA, e,
 - _ecore_con_event_url_data_free, NULL);
 + _ecore_con_event_url_free, NULL);
   }
 return real_size;
  }

 No, if you want to do that, modify Ecore_Con_Event_Url_Data to be:

struct _Ecore_Con_Event_Url_Data {
   Ecore_Con_Url *url_con;
   int size;
   unsigned char data[1];
};

 And allocation code (i don't see need for calloc()):

e = malloc(sizeof(Ecore_Con_Event_Url_Data) + sizeof(char) *
 (real_size - 1));

 That's it, minor things but will look much better with them :-)

Thanks for the review, I will fix them all and propose a new patch.

Cedric

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. 

[E-devel] [PATCH] Fix edje_cc / edje_decc linkage in --as-needed mode

2007-09-17 Thread Pavlov Konstantin
Hello everyone.
The attached patch fixes edje_cc / edje_decc linking when ld is invoked
with --as-needed switch (this is default on my system, actually).

-- 
QOTD:
The forest may be quiet, but that doesn't mean
the snakes have gone away.
diff --git a/edje/src/bin/Makefile.am b/edje/src/bin/Makefile.am
index 60268a2..850da6b 100644
--- a/edje/src/bin/Makefile.am
+++ b/edje/src/bin/Makefile.am
@@ -36,7 +36,7 @@ edje_prefix.h \
 edje_main.h
 
 edje_cc_LDADD = \
-$(top_builddir)/src/lib/libedje.la
+$(top_builddir)/src/lib/libedje.la -lecore_evas
 
 edje_cc_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la
 
@@ -48,6 +48,6 @@ edje_cc_mem.c \
 edje_cc_sources.c
 
 edje_decc_LDADD = \
-$(top_builddir)/src/lib/libedje.la @edje_decc_lib@
+$(top_builddir)/src/lib/libedje.la @edje_decc_lib@ -lecore_evas
 
 edje_decc_DEPENDENCIES = $(top_builddir)/src/lib/libedje.la


signature.asc
Description: Digital signature
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix edje_cc / edje_decc linkage in --as-needed mode

2007-09-17 Thread Pavlov Konstantin
On Mon, Sep 17, 2007 at 04:16:11PM +0400, Pavlov Konstantin wrote:
 Hello everyone.
 The attached patch fixes edje_cc / edje_decc linking when ld is invoked
 with --as-needed switch (this is default on my system, actually).
Forgot to add, edje compile fails otherwise:

i586-alt-linux-gcc -pipe -Wall -O2 -march=i586 -mtune=i686 -o
.libs/edje_decc edje_decc.o edje_cc_mem.o edje_cc_sources.o
../../src/lib/.libs/libedje.so
edje_decc.o: In function `output':
edje_decc.c:(.text+0x21b): undefined reference to `ecore_evas_init'
edje_decc.c:(.text+0x22f): undefined reference to `ecore_evas_buffer_new'
edje_decc.c:(.text+0x24b): undefined reference to `ecore_evas_get'
edje_decc.c:(.text+0x392): undefined reference to `ecore_evas_free'
edje_decc.c:(.text+0x397): undefined reference to `ecore_evas_shutdown'


-- 
If you live long enough, you'll see that every victory turns into a defeat.
-- Simone de Beauvoir


signature.asc
Description: Digital signature
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Nightly build log for E17 on 2007-09-17 07:03:22 -0700

2007-09-17 Thread Nightly build system
Build log for Enlightenment DR 0.17 on 2007-09-17 07:03:22 -0700
Build logs are available at http://download.enlightenment.org/tests/logs

Packages that failed to build:
engage  http://download.enlightenment.org/tests/logs/engage.log
entropy  http://download.enlightenment.org/tests/logs/entropy.log
evfs  http://download.enlightenment.org/tests/logs/evfs.log
evolve  http://download.enlightenment.org/tests/logs/evolve.log

Packages with no supported build system:
esmart_rsvg, exorcist, python-efl, 

Packages skipped:
camE, enotes, enscribe, epbb, eplay, erss, etk_server, etox, e_utils, 
Evas_Perl, 
evoak, gfx_routines, lvs-gui, med, nexus, notgame, ruby-efl, webcam, 

Packages that build OK:
alarm, bling, cpu, deskshow, eclair, ecore, edb, e_dbus, edje_editor, edje, 
edje_viewer, edvi, eet, eflame, eflpp, efreet, elapse, elation, elicit, 
elitaire, e, embrace, embryo, emotion, emphasis, empower, emu, engrave, 
engycad, enhance, enity, enterminus, enthrall, entice, entrance_edit_gui, 
entrance, envision, epdf, epeg, ephoto, e_phys, epsilon, equate, esmart, 
estickies, etk_extra, etk, etk-perl, evas, ewl, examine, exhibit, exml, 
expedite, express, extrackt, feh, flame, forecasts, gevas2, iconbar, 
imlib2_loaders, 
imlib2, Imlib2_Perl, imlib2_tools, language, mail, mem, mixer, moon, net, 
news, pesh, photo, rage, rain, screenshot, scrot, slideshow, snow, taskbar, 
tclock, uptime, weather, winselector, wlan, 

Debian GNU/Linux 4.0 \n \l

Linux enlightenment2 2.6.18-4-686 #1 SMP Wed May 9 23:03:12 UTC 2007 i686 
GNU/Linux


See http://download.enlightenment.org/tests/ for details.


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


[E-devel] [E-Dbus] Get the connection

2007-09-17 Thread Atton Jonathan
hello ,

I have a problem with e_dbus. I'm in a function as type E_DBus_Method_Cb
typedef DBusMessage *(* E_DBus_Method_Cb)(E_DBus_Object *obj,
DBusMessage *message);

I need to retrieve E_Dbus_Connection information. This information
is in E_DBus_Object but the structure is private.

Is there a second tips ?

-- 
Regards,
Atton Jonathan [EMAIL PROTECTED]

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


[E-devel] [PATCH] Fix e_dbus handling of signals

2007-09-17 Thread Ulisses Furquim
Hi,

I created a python module to be able to use dbus-python with an ecore
main loop using e_dbus. However, I had to fix the handling of D-Bus
signals in e_dbus. We were returning to D-Bus that all signals were
handled and this was preventing other filters from being called. IOW,
we don't need to handle signals because they're for everyone who cares
about them, so we just do what we want and return
DBUS_HANDLER_RESULT_NOT_YET_HANDLED to D-Bus so other filters can be
run.

This patch also uses dbus_connection_ref (and later
dbus_connection_unref) for storing a pointer to the DBusConnection
structure and dbus_message_ref / dbus_message_unref to manage a
reference to the D-Bus message.

Best regards,

-- Ulisses
Index: proto/e_dbus/src/lib/dbus/e_dbus.c
===
RCS file: /var/cvs/e/e17/proto/e_dbus/src/lib/dbus/e_dbus.c,v
retrieving revision 1.7
diff -u -r1.7 e_dbus.c
--- proto/e_dbus/src/lib/dbus/e_dbus.c	25 Jul 2007 17:01:01 -	1.7
+++ proto/e_dbus/src/lib/dbus/e_dbus.c	17 Sep 2007 18:14:30 -
@@ -138,6 +138,26 @@
   if (hd-enabled) e_dbus_fd_handler_add(hd);
 }
 
+static E_DBus_Connection *
+_e_dbus_connection_new(DBusConnection *conn)
+{
+  E_DBus_Connection *cd;
+
+  cd = calloc(1, sizeof(E_DBus_Connection));
+  if (!cd) return NULL;
+
+  cd-conn = dbus_connection_ref(conn);
+  cd-conn_name = strdup(dbus_bus_get_unique_name(conn));
+
+  DEBUG(1, Connected! Name: %s\n, cd-conn_name);
+
+  cd-shared_type = -1;
+  cd-fd_handlers = ecore_list_new();
+  cd-timeouts = ecore_list_new();
+
+  return cd;
+}
+
 static void
 _e_dbus_connection_free(void *data)
 {
@@ -146,8 +166,6 @@
   Ecore_Timer *timer;
   DEBUG(5, _e_dbus_connection free!\n);
 
-  if (cd-conn_name) free(cd-conn_name);
-
   ecore_list_first_goto(cd-fd_handlers);
   while ((fd_handler = ecore_list_next(cd-fd_handlers)))
 ecore_main_fd_handler_del(fd_handler);
@@ -161,6 +179,9 @@
   if (cd-shared_type != -1)
 shared_connections[cd-shared_type] = NULL;
 
+  if (cd-conn_name) free(cd-conn_name);
+  dbus_connection_unref(cd-conn);
+
   free(cd);
 }
 
@@ -333,7 +354,7 @@
 static void
 e_dbus_message_free(void *data, void *message)
 {
-  //dbus_message_unref(message);
+  dbus_message_unref(message);
 }
 
 static DBusHandlerResult
@@ -359,15 +380,16 @@
   DEBUG(3, error: %s\n, dbus_message_get_error_name(message));
   break;
 case DBUS_MESSAGE_TYPE_SIGNAL:
-  ecore_event_add(E_DBUS_EVENT_SIGNAL, message, e_dbus_message_free, NULL);
-  return DBUS_HANDLER_RESULT_HANDLED;
+  ecore_event_add(E_DBUS_EVENT_SIGNAL, dbus_message_ref(message),
+  e_dbus_message_free, NULL);
+  /* don't need to handle signals, they're for everyone who wants them */
+  return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
   break;
 default:
   break;
   }
   DEBUG(3, -\n\n);
 
-
   return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
 }
 
@@ -449,17 +471,10 @@
 E_DBus_Connection *
 e_dbus_connection_setup(DBusConnection *conn)
 {
-  E_DBus_Connection *cd = NULL;
+  E_DBus_Connection *cd;
 
-  cd = calloc(1, sizeof(E_DBus_Connection));
+  cd = _e_dbus_connection_new(conn);
   if (!cd) return NULL;
-  cd-shared_type = -1;
-  cd-conn = conn;
-
-  cd-fd_handlers = ecore_list_new();
-  cd-timeouts = ecore_list_new();
-  cd-conn_name = strdup(dbus_bus_get_unique_name(cd-conn));
-  DEBUG(1, Connected! Name: %s\n, cd-conn_name);
 
   /* connection_setup */
   dbus_connection_set_exit_on_disconnect(cd-conn, FALSE);
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [PATCH] Fix e_dbus handling of signals

2007-09-17 Thread Gustavo Sverzut Barbieri
On 9/17/07, Ulisses Furquim [EMAIL PROTECTED] wrote:
 Hi,

 I created a python module to be able to use dbus-python with an ecore
 main loop using e_dbus. However, I had to fix the handling of D-Bus
 signals in e_dbus. We were returning to D-Bus that all signals were
 handled and this was preventing other filters from being called. IOW,
 we don't need to handle signals because they're for everyone who cares
 about them, so we just do what we want and return
 DBUS_HANDLER_RESULT_NOT_YET_HANDLED to D-Bus so other filters can be
 run.

 This patch also uses dbus_connection_ref (and later
 dbus_connection_unref) for storing a pointer to the DBusConnection
 structure and dbus_message_ref / dbus_message_unref to manage a
 reference to the D-Bus message.


Looks fine to me, may I apply? Later I'll add python-ecore_dbus to
proto/python-efl


-- 
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 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Etk: signals improvement

2007-09-17 Thread Caio Marcelo
On 9/15/07, Andre Magalhaes [EMAIL PROTECTED] wrote:
 1) Change the @brief comment of etk_signal_disconnect_by_id to use 80 columns.
 2) Change:

Done. In change (2) actually we need to save the original pointer callbacks
to free it before iterate on it, then evas_list_free on this pointer.



 Also, it would be great if you could provide patches for the apps on e
 CVS that uses etk_signal_disconnect if any

I've did a patch to change apps/exhibit, proto/edje_editor and proto/entropy
(but I couldn't check entropy since it doesn't compile).


Cheers,
  Caio Marcelo
diff --git a/src/lib/etk_colorpicker.c b/src/lib/etk_colorpicker.c
index 2ae1c59..35942c4 100644
--- a/src/lib/etk_colorpicker.c
+++ b/src/lib/etk_colorpicker.c
@@ -433,7 +433,7 @@ static void _etk_colorpicker_destructor(Etk_Colorpicker *cp)
   return;
 
for (i = 0; i  6; i++)
-  etk_signal_disconnect(toggled, ETK_OBJECT(cp-radios[i]), ETK_CALLBACK(_etk_colorpicker_radio_toggled_cb));
+  etk_signal_disconnect(toggled, ETK_OBJECT(cp-radios[i]), ETK_CALLBACK(_etk_colorpicker_radio_toggled_cb), cp);
 }
 
 /* Sets the property whose id is property_id to the value value */
diff --git a/src/lib/etk_dialog.c b/src/lib/etk_dialog.c
index e6bd02e..e2e 100644
--- a/src/lib/etk_dialog.c
+++ b/src/lib/etk_dialog.c
@@ -285,7 +285,7 @@ void etk_dialog_button_response_id_set(Etk_Dialog *dialog, Etk_Button *button, i
*id = response_id;
etk_object_data_set_full(ETK_OBJECT(button), _Etk_Dialog::Response_Id, id, free);
 
-   etk_signal_disconnect(clicked, ETK_OBJECT(button), ETK_CALLBACK(_etk_dialog_button_clicked_cb));
+   etk_signal_disconnect(clicked, ETK_OBJECT(button), ETK_CALLBACK(_etk_dialog_button_clicked_cb), dialog);
etk_signal_connect(clicked, ETK_OBJECT(button), ETK_CALLBACK(_etk_dialog_button_clicked_cb), dialog);
 }
 
diff --git a/src/lib/etk_entry.c b/src/lib/etk_entry.c
index ede16e7..eeaaa29 100644
--- a/src/lib/etk_entry.c
+++ b/src/lib/etk_entry.c
@@ -288,13 +288,13 @@ void etk_entry_image_highlight_set(Etk_Entry *entry, Etk_Entry_Image_Position po
else
{
   etk_signal_disconnect(mouse-in, ETK_OBJECT(image),
-ETK_CALLBACK(_etk_entry_image_mouse_in_cb));
+ETK_CALLBACK(_etk_entry_image_mouse_in_cb), entry);
   etk_signal_disconnect(mouse-out, ETK_OBJECT(image),
-ETK_CALLBACK(_etk_entry_image_mouse_out_cb));
+ETK_CALLBACK(_etk_entry_image_mouse_out_cb), entry);
   etk_signal_disconnect(mouse-down, ETK_OBJECT(image),
-ETK_CALLBACK(_etk_entry_image_mouse_down_cb));
+ETK_CALLBACK(_etk_entry_image_mouse_down_cb), entry);
   etk_signal_disconnect(mouse-up, ETK_OBJECT(image),
-ETK_CALLBACK(_etk_entry_image_mouse_up_cb));
+ETK_CALLBACK(_etk_entry_image_mouse_up_cb), entry);
 
   etk_widget_color_set(ETK_WIDGET(image), 255, 255, 255, 255);
}
diff --git a/src/lib/etk_mdi_area.c b/src/lib/etk_mdi_area.c
index 9b0d647..ffbcd76 100644
--- a/src/lib/etk_mdi_area.c
+++ b/src/lib/etk_mdi_area.c
@@ -295,7 +295,7 @@ static void _etk_mdi_area_child_remove(Etk_Container *container, Etk_Widget *wid
 
   if (ETK_IS_MDI_WINDOW(widget))
   {
- etk_signal_disconnect(moved, ETK_OBJECT(widget), ETK_CALLBACK(_etk_mdi_area_child_moved_cb));
+ etk_signal_disconnect(moved, ETK_OBJECT(widget), ETK_CALLBACK(_etk_mdi_area_child_moved_cb), mdi_area);
  etk_object_notification_callback_remove(ETK_OBJECT(widget), maximized, _etk_mdi_area_child_maximized_cb);
   }
 
diff --git a/src/lib/etk_menu.c b/src/lib/etk_menu.c
index f057ad3..5de86b6 100644
--- a/src/lib/etk_menu.c
+++ b/src/lib/etk_menu.c
@@ -408,12 +408,12 @@ static void _etk_menu_item_removed_cb(Etk_Object *object, void *item, void *data
   return;
 
etk_widget_theme_parent_set(ETK_WIDGET(item_object), NULL);
-   etk_signal_disconnect(entered, item_object, ETK_CALLBACK(_etk_menu_item_entered_cb));
-   etk_signal_disconnect(left, item_object, ETK_CALLBACK(_etk_menu_item_left_cb));
-   etk_signal_disconnect(mouse-up, item_object, ETK_CALLBACK(_etk_menu_item_mouse_up_cb));
-   etk_signal_disconnect(selected, item_object, ETK_CALLBACK(_etk_menu_item_selected_cb));
-   etk_signal_disconnect(unselected, item_object, ETK_CALLBACK(_etk_menu_item_unselected_cb));
-   etk_signal_disconnect(activated, item_object, ETK_CALLBACK(_etk_menu_item_activated_cb));
+   etk_signal_disconnect(entered, item_object, ETK_CALLBACK(_etk_menu_item_entered_cb), NULL);
+   etk_signal_disconnect(left, item_object, ETK_CALLBACK(_etk_menu_item_left_cb), NULL);
+   etk_signal_disconnect(mouse-up, item_object, ETK_CALLBACK(_etk_menu_item_mouse_up_cb), NULL);
+   etk_signal_disconnect(selected, item_object, ETK_CALLBACK(_etk_menu_item_selected_cb), NULL);
+   etk_signal_disconnect(unselected, item_object, ETK_CALLBACK(_etk_menu_item_unselected_cb), NULL);
+   etk_signal_disconnect(activated, item_object, ETK_CALLBACK(_etk_menu_item_activated_cb), NULL);
 }
 
 

Re: [E-devel] Etk: signals improvement

2007-09-17 Thread Caio Marcelo
This is now in bugzilla:

http://bugzilla.enlightenment.org/show_bug.cgi?id=215


I've updated the patch there to change block(), unblock() interface
also (to take void *data pointers to identify the correct callback
to operate.


Cheers,
  Caio Marcelo

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


Re: [E-devel] [PATCH] Fix e_dbus handling of signals

2007-09-17 Thread Sebastian Dransfeld
Gustavo Sverzut Barbieri wrote:
 On 9/17/07, Ulisses Furquim [EMAIL PROTECTED] wrote:
 Hi,

 I created a python module to be able to use dbus-python with an ecore
 main loop using e_dbus. However, I had to fix the handling of D-Bus
 signals in e_dbus. We were returning to D-Bus that all signals were
 handled and this was preventing other filters from being called. IOW,
 we don't need to handle signals because they're for everyone who cares
 about them, so we just do what we want and return
 DBUS_HANDLER_RESULT_NOT_YET_HANDLED to D-Bus so other filters can be
 run.

 This patch also uses dbus_connection_ref (and later
 dbus_connection_unref) for storing a pointer to the DBusConnection
 structure and dbus_message_ref / dbus_message_unref to manage a
 reference to the D-Bus message.

 
 Looks fine to me, may I apply? Later I'll add python-ecore_dbus to
 proto/python-efl
 

Patch seems fine to me.

Sebastian


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


[E-devel] [PATCH] E Button Widget

2007-09-17 Thread lok

Hi,

I've got a small problem recently on a theme. If the theme use a min 
size for

it's buttons, way larger than the default theme's. It's impossible to
have the icon centered on a button with no text. (For exemple into the File
Properties dialog in EFM).

Currently the button theme only know when an icon is visible or not. My 
patch

replace the two e,action,show/hide,icon signals by e,state,icon/text/combo.
That way the theme knows how justify the icon.

Any comments is welcome.

lok
Index: e/data/themes/default_button.edc
===
RCS file: /cvs/e/e17/apps/e/data/themes/default_button.edc,v
retrieving revision 1.12
diff -u -r1.12 default_button.edc
--- e/data/themes/default_button.edc	7 Jul 2007 02:04:19 -	1.12
+++ e/data/themes/default_button.edc	18 Sep 2007 00:33:09 -
@@ -78,7 +78,7 @@
 	}
 	 }
 	 description {
-	state: visible 0.0;
+	state: combo 0.0;
 	inherit: default 0.0;
 	aspect: 1.0 1.0;
 	aspect_preference: VERTICAL;
@@ -94,6 +94,23 @@
 	   to: button_image;
 	}
 	 }
+	 description {
+	state: icon 0.0;
+	inherit: default 0.0;
+	aspect: 1.0 1.0;
+	aspect_preference: BOTH;
+	align: 0.5 0.5;
+	rel1 {
+	   relative: 0.0 0.0;
+	   offset:   8  8;
+	   to: button_image;
+	}
+	rel2 {
+	   relative: 1.0 1.0;
+	   offset:   -9   -9;
+	   to: button_image;
+	}
+	 }
   }
   part {
 	 name:  e.text.label;
@@ -117,7 +134,7 @@
 	color3: 255 255 255 128;
 	color_class: button_text;
 	text {
-	   text: OK;
+	   text: ;
 	   font: Edje-Vera;
 	   size: 10;
 	   min:  1 1;
@@ -132,6 +149,11 @@
 	color3: 255 255 255 64;
 	color_class: button_text_disabled;
 	 }
+	 description {
+	state:icon 0.0;
+	inherit:  default 0.0;
+	visible: 0;
+	 }
   }
   part {
 	 name: glint_clip;
@@ -330,18 +352,28 @@
 	 action: SIGNAL_EMIT e,action,click ;
   }
   program {
-	 name:   icon_visible;
-	 signal: e,action,show,icon;
+	 name: text_state;
+	 signal: e,state,text;
 	 source: e;
-	 action: STATE_SET visible 0.0;
+	 action: STATE_SET default 0.0;
 	 target: e.swallow.icon;
+	 target: e.text.label;
   }
   program {
-	 name:   icon_invisible;
-	 signal: e,action,hide,icon;
+	 name: icon_state;
+	 signal: e,state,icon;
 	 source: e;
-	 action: STATE_SET default 0.0;
+	 action: STATE_SET icon 0.0;
+	 target: e.swallow.icon;
+	 target: e.text.label;
+  }
+  program {
+	 name: combo_state;
+	 signal: e,state,combo;
+	 source: e;
+	 action: STATE_SET combo 0.0;
 	 target: e.swallow.icon;
+	 target: e.text.label;
   }
   program {
 	 name: button_in;
Index: e/src/bin/e_widget_button.c
===
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_button.c,v
retrieving revision 1.16
diff -u -r1.16 e_widget_button.c
--- e/src/bin/e_widget_button.c	7 Aug 2007 14:20:47 -	1.16
+++ e/src/bin/e_widget_button.c	18 Sep 2007 00:33:49 -
@@ -3,6 +3,13 @@
  */
 #include e.h
 
+typedef enum _E_Widget_Button_Type E_Widget_Button_Type;
+enum _E_Widget_Button_Type
+{
+   E_WIDGET_BUTTON_TEXT = 1  0,
+   E_WIDGET_BUTTON_ICON = 1  1
+};
+
 typedef struct _E_Widget_Data E_Widget_Data;
 struct _E_Widget_Data
 {
@@ -11,6 +18,7 @@
void (*func) (void *data, void *data2);
void *data;
void *data2;   
+   E_Widget_Button_Type type;
 };
 
 static void _e_wid_del_hook(Evas_Object *obj);
@@ -19,6 +27,7 @@
 static void _e_wid_disable_hook(Evas_Object *obj);
 static void _e_wid_signal_cb1(void *data, Evas_Object *obj, const char *emission, const char *source);
 static void _e_wid_focus_steal(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _e_wid_button_state_send(E_Widget_Data *wd);
 /* local subsystem functions */
 
 /* externally accessible functions */
@@ -46,7 +55,11 @@
e_theme_edje_object_set(o, base/theme/widgets,
 			   e/widgets/button);
edje_object_signal_callback_add(o, e,action,click, , _e_wid_signal_cb1, obj);
-   edje_object_part_text_set(o, e.text.label, label);
+   if (label  label[0] != 0)
+ {
+	edje_object_part_text_set(o, e.text.label, label);
+	wd-type |= E_WIDGET_BUTTON_TEXT;
+ }
evas_object_show(o);

e_widget_sub_object_add(obj, o);
@@ -59,12 +72,12 @@
 	wd-o_icon = o;
 	e_util_edje_icon_set(o, icon);
 	edje_object_part_swallow(wd-o_button, e.swallow.icon, o);
-	edje_object_signal_emit(wd-o_button, e,action,show,icon, e);
-	edje_object_message_signal_process(wd-o_button);
 	evas_object_show(o);
 	e_widget_sub_object_add(obj, o);
+	wd-type |= E_WIDGET_BUTTON_ICON;
  }
-   
+
+   _e_wid_button_state_send(wd);
edje_object_size_min_calc(wd-o_button, mw, mh);
e_widget_min_size_set(obj, mw, mh);

@@ -78,6 +91,11 @@
 
wd = e_widget_data_get(obj);
edje_object_part_text_set(wd-o_button, e.text.label, label);
+   if