discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=1727098387b42190b08745eaee491b54fc45953f

commit 1727098387b42190b08745eaee491b54fc45953f
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Mon Aug 7 14:43:37 2017 -0400

    set clock gadget id on creation
    
    fix T5851
---
 src/modules/time/clock.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/modules/time/clock.c b/src/modules/time/clock.c
index 99f3618ce..53d22ba8e 100644
--- a/src/modules/time/clock.c
+++ b/src/modules/time/clock.c
@@ -333,9 +333,11 @@ _conf_item_get(int *id, Eina_Bool digital)
 
    ci = E_NEW(Config_Item, 1);
    if (!*id)
-     ci->id = time_config->items ? eina_list_count(time_config->items) + 1 : 1;
-   else
+     *id = ci->id = time_config->items ? eina_list_count(time_config->items) + 
1 : 1;
+   else if (*id < 0)
      ci->id = -1;
+   else
+     ci->id = *id;
 
    ci->weekend.start = 6;
    ci->weekend.len = 2;

-- 


Reply via email to