Re: [E-devel] [patch] elm_genlist - add merging edc strings list

2012-03-25 Thread Daniel Juyung Seo
Question in  _item_content_realize().

I don't see a point to merge the list here.
 +*source = eina_list_merge(*source, cons);

*source must be NULL when you run _item_content_realize().
If it's not NULL, that's a huge problem.
Creating another list pointer(cons) and merging it with NULL is
unnecessary extra job.
We do not need to merge source(which is NULL) and cons here. Just use source.

Daniel Juyung Seo (SeoZ)


On Sat, Mar 24, 2012 at 8:15 PM, Carsten Haitzler ras...@rasterman.com wrote:
 On Fri, 23 Mar 2012 19:19:55 +0900 Hyoyoung Chang hyoyo...@gmail.com said:

 tnx! looked at it - in svn! :)

 Dear all

 I add like a routine in previous patch.
 It add merging routines to realize functions.
 also i removed elm_widget_stringlist_free(cons)
 because all of it is freed at item_unrealize.

 Thanks


 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)    ras...@rasterman.com


 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [patch] elm_genlist - add merging edc strings list

2012-03-25 Thread The Rasterman
On Sun, 25 Mar 2012 15:45:21 +0900 Daniel Juyung Seo seojuyu...@gmail.com
said:

 Question in  _item_content_realize().
 
 I don't see a point to merge the list here.
  +*source = eina_list_merge(*source, cons);
 
 *source must be NULL when you run _item_content_realize().
 If it's not NULL, that's a huge problem.
 Creating another list pointer(cons) and merging it with NULL is
 unnecessary extra job.
 We do not need to merge source(which is NULL) and cons here. Just use source.
 
 Daniel Juyung Seo (SeoZ)

ti looks cleaner though imho. :)

 On Sat, Mar 24, 2012 at 8:15 PM, Carsten Haitzler ras...@rasterman.com
 wrote:
  On Fri, 23 Mar 2012 19:19:55 +0900 Hyoyoung Chang hyoyo...@gmail.com said:
 
  tnx! looked at it - in svn! :)
 
  Dear all
 
  I add like a routine in previous patch.
  It add merging routines to realize functions.
  also i removed elm_widget_stringlist_free(cons)
  because all of it is freed at item_unrealize.
 
  Thanks
 
 
  --
  - Codito, ergo sum - I code, therefore I am --
  The Rasterman (Carsten Haitzler)    ras...@rasterman.com
 
 
  --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 
 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here 
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [patch] elm_genlist - add merging edc strings list

2012-03-25 Thread Hyoyoung Chang
in most of cases, Daniel is right.
But i added this for item_fields_update

   if ((!itf) || (itf  ELM_GENLIST_ITEM_FIELD_CONTENT))
 {
_it-content_objs = _item_content_unrealize(_it, VIEW(_it),
   _it-contents, parts);
_it-content_objs = _item_content_realize(_it, VIEW(_it),
 _it-contents, parts);
 }

as you know, in the field_update, individual items can be updated.

Also, i think it can be used at merging item_content_realize with
item_flip_realize in future.

On Sun, Mar 25, 2012 at 3:57 PM, Carsten Haitzler ras...@rasterman.com wrote:
 On Sun, 25 Mar 2012 15:45:21 +0900 Daniel Juyung Seo seojuyu...@gmail.com
 said:

 Question in  _item_content_realize().

 I don't see a point to merge the list here.
  +        *source = eina_list_merge(*source, cons);

 *source must be NULL when you run _item_content_realize().
 If it's not NULL, that's a huge problem.
 Creating another list pointer(cons) and merging it with NULL is
 unnecessary extra job.
 We do not need to merge source(which is NULL) and cons here. Just use source.

 Daniel Juyung Seo (SeoZ)

 ti looks cleaner though imho. :)

 On Sat, Mar 24, 2012 at 8:15 PM, Carsten Haitzler ras...@rasterman.com
 wrote:
  On Fri, 23 Mar 2012 19:19:55 +0900 Hyoyoung Chang hyoyo...@gmail.com 
  said:
 
  tnx! looked at it - in svn! :)
 
  Dear all
 
  I add like a routine in previous patch.
  It add merging routines to realize functions.
  also i removed elm_widget_stringlist_free(cons)
  because all of it is freed at item_unrealize.
 
  Thanks
 
 
  --
  - Codito, ergo sum - I code, therefore I am --
  The Rasterman (Carsten Haitzler)    ras...@rasterman.com
 
 
  --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)    ras...@rasterman.com


 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] removal of wrong elc_multibuttonentry APIs

2012-03-25 Thread Daniel Juyung Seo
Hello all,
I just found that elc_multibuttonentry had wrong APIs.

elm_multibuttonentry_item_data_get
elm_multibuttonentry_item_data_set

They need to be removed and we need to use elm_object_item_data_get/set instead.
I guess multibuttonentry was not reviewed carefully.

Daniel Juyung Seo (SeoZ)

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [patch] elm_genlist - add merging edc strings list

2012-03-25 Thread Daniel Juyung Seo
Hello,

On Sun, Mar 25, 2012 at 4:42 PM, Hyoyoung Chang hyoyo...@gmail.com wrote:
 in most of cases, Daniel is right.
 But i added this for item_fields_update

   if ((!itf) || (itf  ELM_GENLIST_ITEM_FIELD_CONTENT))
     {
        _it-content_objs = _item_content_unrealize(_it, VIEW(_it),
                                                   _it-contents, parts);
        _it-content_objs = _item_content_realize(_it, VIEW(_it),
                                                 _it-contents, parts);
     }

 as you know, in the field_update, individual items can be updated.

Then it introduces a bigger problem. Whenever you call
elm_genlist_item_fields_update(), _it-contents will grow.
Anyhow this is an apparent bug. Please fix this.


 Also, i think it can be used at merging item_content_realize with
 item_flip_realize in future.

If this is the reason, it's acceptable but you can make the code
cleaner by separating the list for flips from normal contents.
Instead of using it-contents for many cases, just use a separate list
for each feature.
ex) mode_contents, edit_contents
You can create it-flips_contents or whatever. This will make code
cleaner/shorter and easier to understand/maintain.

Thanks.

Daniel Juyung Seo (Seoz)


 On Sun, Mar 25, 2012 at 3:57 PM, Carsten Haitzler ras...@rasterman.com 
 wrote:
 On Sun, 25 Mar 2012 15:45:21 +0900 Daniel Juyung Seo seojuyu...@gmail.com
 said:

 Question in  _item_content_realize().

 I don't see a point to merge the list here.
  +        *source = eina_list_merge(*source, cons);

 *source must be NULL when you run _item_content_realize().
 If it's not NULL, that's a huge problem.
 Creating another list pointer(cons) and merging it with NULL is
 unnecessary extra job.
 We do not need to merge source(which is NULL) and cons here. Just use 
 source.

 Daniel Juyung Seo (SeoZ)

 ti looks cleaner though imho. :)

 On Sat, Mar 24, 2012 at 8:15 PM, Carsten Haitzler ras...@rasterman.com
 wrote:
  On Fri, 23 Mar 2012 19:19:55 +0900 Hyoyoung Chang hyoyo...@gmail.com 
  said:
 
  tnx! looked at it - in svn! :)
 
  Dear all
 
  I add like a routine in previous patch.
  It add merging routines to realize functions.
  also i removed elm_widget_stringlist_free(cons)
  because all of it is freed at item_unrealize.
 
  Thanks
 
 
  --
  - Codito, ergo sum - I code, therefore I am --
  The Rasterman (Carsten Haitzler)    ras...@rasterman.com
 
 
  --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)    ras...@rasterman.com


 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [patch] elm_genlist - add merging edc strings list

2012-03-25 Thread Hyoyoung Chang
On Sun, Mar 25, 2012 at 5:19 PM, Daniel Juyung Seo seojuyu...@gmail.com wrote:
 Hello,

 On Sun, Mar 25, 2012 at 4:42 PM, Hyoyoung Chang hyoyo...@gmail.com wrote:
 in most of cases, Daniel is right.
 But i added this for item_fields_update

   if ((!itf) || (itf  ELM_GENLIST_ITEM_FIELD_CONTENT))
     {
        _it-content_objs = _item_content_unrealize(_it, VIEW(_it),
                                                   _it-contents, parts);
        _it-content_objs = _item_content_realize(_it, VIEW(_it),
                                                 _it-contents, parts);
     }

 as you know, in the field_update, individual items can be updated.

 Then it introduces a bigger problem. Whenever you call
 elm_genlist_item_fields_update(), _it-contents will grow.
 Anyhow this is an apparent bug. Please fix this.

Oh, it needs to fix. you're right.


 Also, i think it can be used at merging item_content_realize with
 item_flip_realize in future.

 If this is the reason, it's acceptable but you can make the code
 cleaner by separating the list for flips from normal contents.
 Instead of using it-contents for many cases, just use a separate list
 for each feature.
 ex) mode_contents, edit_contents
 You can create it-flips_contents or whatever. This will make code
 cleaner/shorter and easier to understand/maintain.
ok. i'll consider it. i think your suggestion is more clear way.


 Thanks.

 Daniel Juyung Seo (Seoz)


 On Sun, Mar 25, 2012 at 3:57 PM, Carsten Haitzler ras...@rasterman.com 
 wrote:
 On Sun, 25 Mar 2012 15:45:21 +0900 Daniel Juyung Seo seojuyu...@gmail.com
 said:

 Question in  _item_content_realize().

 I don't see a point to merge the list here.
  +        *source = eina_list_merge(*source, cons);

 *source must be NULL when you run _item_content_realize().
 If it's not NULL, that's a huge problem.
 Creating another list pointer(cons) and merging it with NULL is
 unnecessary extra job.
 We do not need to merge source(which is NULL) and cons here. Just use 
 source.

 Daniel Juyung Seo (SeoZ)

 ti looks cleaner though imho. :)

 On Sat, Mar 24, 2012 at 8:15 PM, Carsten Haitzler ras...@rasterman.com
 wrote:
  On Fri, 23 Mar 2012 19:19:55 +0900 Hyoyoung Chang hyoyo...@gmail.com 
  said:
 
  tnx! looked at it - in svn! :)
 
  Dear all
 
  I add like a routine in previous patch.
  It add merging routines to realize functions.
  also i removed elm_widget_stringlist_free(cons)
  because all of it is freed at item_unrealize.
 
  Thanks
 
 
  --
  - Codito, ergo sum - I code, therefore I am --
  The Rasterman (Carsten Haitzler)    ras...@rasterman.com
 
 
  --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)    ras...@rasterman.com


 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list

Re: [E-devel] removal of wrong elc_multibuttonentry APIs

2012-03-25 Thread The Rasterman
On Sun, 25 Mar 2012 16:47:13 +0900 Daniel Juyung Seo seojuyu...@gmail.com
said:

yes - need removing indeed.

 Hello all,
 I just found that elc_multibuttonentry had wrong APIs.
 
 elm_multibuttonentry_item_data_get
 elm_multibuttonentry_item_data_set
 
 They need to be removed and we need to use elm_object_item_data_get/set
 instead. I guess multibuttonentry was not reviewed carefully.
 
 Daniel Juyung Seo (SeoZ)
 
 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here 
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Battery Gadget Feature Request

2012-03-25 Thread thomasg
On Sat, Mar 24, 2012 at 15:21, Jeff Hoogland jeffhoogl...@linux.com wrote:
 Would it be possible to add a shut down below percentage to the battery
 gadget? Had a few users request this over the months as some of them don't
 care to hibernate their systems.

 --
 ~Jeff Hoogland http://jeffhoogland.com/
 Thoughts on Technology http://jeffhoogland.blogspot.com/, Tech Blog
 Bodhi Linux http://bodhilinux.com/, Enlightenment for your Desktop
 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Hello Jeff,

I took the liberty to write a patch to support multiple suspend methods.
I'm sitting on a desktop without battery here and can't test, it would
be nice if you could do that for me. If it works for you, I'll send
the patch to the list for official review.

I hope the attachment reaches the list, alternatively it is available here:
http://gstaedtner.net/e_battery_suspend_methods.patch

~thomasg
From f1a375c7fd4683edeeb31646a496bb4cded64ad8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Gst=C3=A4dtner?= tho...@gstaedtner.net
Date: Sun, 25 Mar 2012 21:08:01 +0200
Subject: [PATCH] battery: add support for different suspend methods

Allow the user to select what to do when the battery runs low:
Suspend, Hibernate or Shutdown.

diff --git a/src/modules/battery/e_mod_config.c 
b/src/modules/battery/e_mod_config.c
index 048b6c6..75f8861 100644
--- a/src/modules/battery/e_mod_config.c
+++ b/src/modules/battery/e_mod_config.c
@@ -13,6 +13,7 @@ struct _E_Config_Dialog_Data
int dismiss_alert;
int alert_timeout;
int suspend_below;
+   int suspend_method;
int force_mode; // 0 == auto, 1 == batget, 2 == subsystem
 #ifdef HAVE_ENOTIFY
int desktop_notifications;
@@ -76,6 +77,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata-poll_interval = battery_config-poll_interval;
cfdata-alert_timeout = battery_config-alert_timeout;
cfdata-suspend_below = battery_config-suspend_below;
+   cfdata-suspend_method = battery_config-suspend_method;
cfdata-force_mode = battery_config-force_mode;
 #ifdef HAVE_EEZE
cfdata-fuzzy = battery_config-fuzzy;
@@ -236,11 +238,19 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, 
Evas *evas, E_Config_D
 NULL, (cfdata-poll_interval), 100);
e_widget_table_object_append(o, ob, 0, 1, 1, 1, 1, 0, 1, 0);

-   ob = e_widget_label_add(evas, _(Hibernate when below:));
+   rg = e_widget_radio_group_new((cfdata-suspend_method));
+   ob = e_widget_radio_add(evas, _(Suspend when below:), 0, rg);
+   e_widget_on_change_hook_set(ob, _cb_radio_changed, cfdata);
e_widget_table_object_append(o, ob, 0, 2, 1, 1, 1, 0, 1, 0);
+   ob = e_widget_radio_add(evas, _(Hibernate when below:), 1, rg);
+   e_widget_on_change_hook_set(ob, _cb_radio_changed, cfdata);
+   e_widget_table_object_append(o, ob, 0, 3, 1, 1, 1, 0, 1, 0);
+   ob = e_widget_radio_add(evas, _(Shutdown when below:), 2, rg);
+   e_widget_on_change_hook_set(ob, _cb_radio_changed, cfdata);
+   e_widget_table_object_append(o, ob, 0, 4, 1, 1, 1, 0, 1, 0);
ob = e_widget_slider_add(evas, 1, 0, _(%1.0f %%), 0, 50, 1, 0, 
 NULL, (cfdata-suspend_below), 100);
-   e_widget_table_object_append(o, ob, 0, 3, 1, 1, 1, 0, 1, 0);
+   e_widget_table_object_append(o, ob, 0, 5, 1, 1, 1, 0, 1, 0);

e_widget_toolbook_page_append(otb, NULL, _(Polling), o, 1, 0, 1, 0, 
  0.5, 0.0);
@@ -334,6 +344,7 @@ _advanced_apply_data(E_Config_Dialog *cfd __UNUSED__, 
E_Config_Dialog_Data *cfda
 
battery_config-force_mode = cfdata-force_mode;
battery_config-suspend_below = cfdata-suspend_below;
+   battery_config-suspend_method = cfdata-suspend_method;
 
_battery_config_updated();
e_config_save_queue();
@@ -352,6 +363,7 @@ _advanced_check_changed(E_Config_Dialog *cfd __UNUSED__, 
E_Config_Dialog_Data *c
   (cfdata-poll_interval != battery_config-poll_interval) ||
   (cfdata-alert_timeout != battery_config-alert_timeout) ||
   (cfdata-suspend_below != battery_config-suspend_below) ||
+  (cfdata-suspend_method != battery_config-suspend_method) ||
 #ifdef HAVE_EEZE
(cfdata-fuzzy != battery_config-fuzzy) ||
 #endif   
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c
index 3cf9671..b29a1aa 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -610,7 +610,14 @@ _battery_update(int full, int time_left, int time_full, 
Eina_Bool have_battery,
 if ((have_battery)  (!have_power)  (full = 0) 
 (battery_config-suspend_below  0) 
 (full  

[E-devel] [PATCH] battery: add support for different suspend methods

2012-03-25 Thread Thomas Gstädtner
Allow the user to select what to do when the battery runs low:
Suspend, Hibernate or Shutdown.

Signed-off-by: Thomas Gstädtner tho...@gstaedtner.net
---
 src/modules/battery/e_mod_config.c |   16 ++--
 src/modules/battery/e_mod_main.c   |9 -
 src/modules/battery/e_mod_main.h   |7 ++-
 3 files changed, 28 insertions(+), 4 deletions(-)

diff --git a/src/modules/battery/e_mod_config.c 
b/src/modules/battery/e_mod_config.c
index 048b6c6..75f8861 100644
--- a/src/modules/battery/e_mod_config.c
+++ b/src/modules/battery/e_mod_config.c
@@ -13,6 +13,7 @@ struct _E_Config_Dialog_Data
int dismiss_alert;
int alert_timeout;
int suspend_below;
+   int suspend_method;
int force_mode; // 0 == auto, 1 == batget, 2 == subsystem
 #ifdef HAVE_ENOTIFY
int desktop_notifications;
@@ -76,6 +77,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
cfdata-poll_interval = battery_config-poll_interval;
cfdata-alert_timeout = battery_config-alert_timeout;
cfdata-suspend_below = battery_config-suspend_below;
+   cfdata-suspend_method = battery_config-suspend_method;
cfdata-force_mode = battery_config-force_mode;
 #ifdef HAVE_EEZE
cfdata-fuzzy = battery_config-fuzzy;
@@ -236,11 +238,19 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, 
Evas *evas, E_Config_D
 NULL, (cfdata-poll_interval), 100);
e_widget_table_object_append(o, ob, 0, 1, 1, 1, 1, 0, 1, 0);

-   ob = e_widget_label_add(evas, _(Hibernate when below:));
+   rg = e_widget_radio_group_new((cfdata-suspend_method));
+   ob = e_widget_radio_add(evas, _(Suspend when below:), 0, rg);
+   e_widget_on_change_hook_set(ob, _cb_radio_changed, cfdata);
e_widget_table_object_append(o, ob, 0, 2, 1, 1, 1, 0, 1, 0);
+   ob = e_widget_radio_add(evas, _(Hibernate when below:), 1, rg);
+   e_widget_on_change_hook_set(ob, _cb_radio_changed, cfdata);
+   e_widget_table_object_append(o, ob, 0, 3, 1, 1, 1, 0, 1, 0);
+   ob = e_widget_radio_add(evas, _(Shutdown when below:), 2, rg);
+   e_widget_on_change_hook_set(ob, _cb_radio_changed, cfdata);
+   e_widget_table_object_append(o, ob, 0, 4, 1, 1, 1, 0, 1, 0);
ob = e_widget_slider_add(evas, 1, 0, _(%1.0f %%), 0, 50, 1, 0, 
 NULL, (cfdata-suspend_below), 100);
-   e_widget_table_object_append(o, ob, 0, 3, 1, 1, 1, 0, 1, 0);
+   e_widget_table_object_append(o, ob, 0, 5, 1, 1, 1, 0, 1, 0);

e_widget_toolbook_page_append(otb, NULL, _(Polling), o, 1, 0, 1, 0, 
  0.5, 0.0);
@@ -334,6 +344,7 @@ _advanced_apply_data(E_Config_Dialog *cfd __UNUSED__, 
E_Config_Dialog_Data *cfda
 
battery_config-force_mode = cfdata-force_mode;
battery_config-suspend_below = cfdata-suspend_below;
+   battery_config-suspend_method = cfdata-suspend_method;
 
_battery_config_updated();
e_config_save_queue();
@@ -352,6 +363,7 @@ _advanced_check_changed(E_Config_Dialog *cfd __UNUSED__, 
E_Config_Dialog_Data *c
   (cfdata-poll_interval != battery_config-poll_interval) ||
   (cfdata-alert_timeout != battery_config-alert_timeout) ||
   (cfdata-suspend_below != battery_config-suspend_below) ||
+  (cfdata-suspend_method != battery_config-suspend_method) ||
 #ifdef HAVE_EEZE
(cfdata-fuzzy != battery_config-fuzzy) ||
 #endif   
diff --git a/src/modules/battery/e_mod_main.c b/src/modules/battery/e_mod_main.c
index 3cf9671..b29a1aa 100644
--- a/src/modules/battery/e_mod_main.c
+++ b/src/modules/battery/e_mod_main.c
@@ -610,7 +610,14 @@ _battery_update(int full, int time_left, int time_full, 
Eina_Bool have_battery,
 if ((have_battery)  (!have_power)  (full = 0) 
 (battery_config-suspend_below  0) 
 (full  battery_config-suspend_below))
-   e_sys_action_do(E_SYS_HIBERNATE, NULL);
+ {
+if (battery_config-suspend_method == SUSPEND) 
+   e_sys_action_do(E_SYS_SUSPEND, NULL);
+else if (battery_config-suspend_method == HIBERNATE)
+  e_sys_action_do(E_SYS_HIBERNATE, NULL);
+else if (battery_config-suspend_method == SHUTDOWN)
+  e_sys_action_do(E_SYS_HALT, NULL);
+ }
  }
if (!have_battery)
  e_powersave_mode_set(E_POWERSAVE_MODE_LOW);
diff --git a/src/modules/battery/e_mod_main.h b/src/modules/battery/e_mod_main.h
index 6f347c8..d1bf8ec 100644
--- a/src/modules/battery/e_mod_main.h
+++ b/src/modules/battery/e_mod_main.h
@@ -19,6 +19,10 @@ typedef struct _Config   Config;
 #define NOSUBSYSTEM 1
 #define SUBSYSTEM 2
 
+#define SUSPEND 0
+#define HIBERNATE 1
+#define SHUTDOWN 2
+
 #define POPUP_DEBOUNCE_CYCLES  2
 
 struct _Config
@@ -28,7 +32,8 @@ struct _Config
int  alert; /* Alert on minutes remaining */
int alert_p;/* Alert on percentage remaining */
int  alert_timeout;  /* Popup dismissal timeout */
-   int  suspend_below;  /* Suspend if 

Re: [E-devel] removal of wrong elc_multibuttonentry APIs

2012-03-25 Thread Daniel Juyung Seo
Just deprecated them.
I added them to elm_deprecated.h so it'll be removed later before 1.0.

Daniel Juyung Seo (SeoZ)


On Sun, Mar 25, 2012 at 7:57 PM, Carsten Haitzler ras...@rasterman.com wrote:
 On Sun, 25 Mar 2012 16:47:13 +0900 Daniel Juyung Seo seojuyu...@gmail.com
 said:

 yes - need removing indeed.

 Hello all,
 I just found that elc_multibuttonentry had wrong APIs.

 elm_multibuttonentry_item_data_get
 elm_multibuttonentry_item_data_set

 They need to be removed and we need to use elm_object_item_data_get/set
 instead. I guess multibuttonentry was not reviewed carefully.

 Daniel Juyung Seo (SeoZ)

 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)    ras...@rasterman.com


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[E-devel] Using emotion in a 3D world.

2012-03-25 Thread David Seikel
I'm wondering if emotion would be suitable for use in a 3D
environment?  Where a particular texture marks where the video has to
go?  That's how the 3D world is already set up, and I'd have to be
compatible with that.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


signature.asc
Description: PGP signature
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Using emotion in a 3D world.

2012-03-25 Thread The Rasterman
On Mon, 26 Mar 2012 12:22:48 +1000 David Seikel onef...@gmail.com said:

 I'm wondering if emotion would be suitable for use in a 3D
 environment?  Where a particular texture marks where the video has to
 go?  That's how the 3D world is already set up, and I'd have to be
 compatible with that.

probably not useful as you'd want emotion to produce textures directly, which
it does not. emotion handles pushing out yuv data and evas handles pushing that
to textures or though software conversion if/when needed.

-- 
- Codito, ergo sum - I code, therefore I am --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Battery Gadget Feature Request

2012-03-25 Thread Jeff Hoogland
Thank you very much for this! I don't have time to try a fresh build till
later this week (Thursday is my normal build day) will report back then
(also I see this is in the SVN already - awesome!)

On Sun, Mar 25, 2012 at 2:20 PM, thomasg tho...@gstaedtner.net wrote:

 On Sat, Mar 24, 2012 at 15:21, Jeff Hoogland jeffhoogl...@linux.com
 wrote:
  Would it be possible to add a shut down below percentage to the battery
  gadget? Had a few users request this over the months as some of them
 don't
  care to hibernate their systems.
 
  --
  ~Jeff Hoogland http://jeffhoogland.com/
  Thoughts on Technology http://jeffhoogland.blogspot.com/, Tech Blog
  Bodhi Linux http://bodhilinux.com/, Enlightenment for your Desktop
 
 --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

 Hello Jeff,

 I took the liberty to write a patch to support multiple suspend methods.
 I'm sitting on a desktop without battery here and can't test, it would
 be nice if you could do that for me. If it works for you, I'll send
 the patch to the list for official review.

 I hope the attachment reaches the list, alternatively it is available here:
 http://gstaedtner.net/e_battery_suspend_methods.patch

 ~thomasg


 --
 This SF email is sponsosred by:
 Try Windows Azure free for 90 days Click Here
 http://p.sf.net/sfu/sfd2d-msazure
 ___
 enlightenment-devel mailing list
 enlightenment-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/enlightenment-devel




-- 
~Jeff Hoogland http://jeffhoogland.com/
Thoughts on Technology http://jeffhoogland.blogspot.com/, Tech Blog
Bodhi Linux http://bodhilinux.com/, Enlightenment for your Desktop
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [Question][Windows] Shift/Alt/Ctrl key press operation

2012-03-25 Thread cnook
Thanks for your response.
I have attached a patch upon  your comments.
The meaning of bit 30(0x4000 in the patch) is as bellows
The previous key state. The value is 1 if the key is down before the
message is sent, or it is 0 if the key is up.
The Evas_CALLBACK_KEY_DOWN event will occur once even though you hold down
Shift/Ctrl/Alt key, If  you keep the patch.

Sincerely,
Shinwoo Kim.



2012/3/21 Carsten Haitzler ras...@rasterman.com

 On Wed, 21 Mar 2012 19:53:30 +0900 cnook kimci...@gmail.com said:

  Dear All, Hello.
 
  I have a question about shift/alt/ctrl key press operation.
  On the X environment, shift/alt/ctrl key press
  event(EVAS_CALLBACK_KEY_DOWN) does not occur repeatedly .
  But on the Windows, shift/alt/ctrl key press event occurs repeatedly.
 
  Now let's suppose you have an application which takes care of
  shift/alt/ctrl key press event.
  The application would work improperly if there is not enough handling for
  those key events.

 correct.

  So how about your opinion on this.
  Should I change ecore_win32_things to occur EVAS_CALLBACK_KEY_DOWN event
  once (not repeatedly)
  Or should I change the Application?

 for modifiers (and locks - like capslock, numlock etc.) - yes, ecore_win32
 should be3 changed to weed out key repeats of these. :(

  Would you ENLIGHTEN me on this question?
 
  Sincerely,
  Shinwoo Kim.
 
 --
  This SF email is sponsosred by:
  Try Windows Azure free for 90 days Click Here
  http://p.sf.net/sfu/sfd2d-msazure
  ___
  enlightenment-devel mailing list
  enlightenment-devel@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
 


 --
 - Codito, ergo sum - I code, therefore I am --
 The Rasterman (Carsten Haitzler)ras...@rasterman.com




ecore_winxx_event.c.using.previous.key.state
Description: Binary data
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel