discomfitor pushed a commit to branch master.

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

commit baa7e85e61cafa71381d3810fd8dee2c6f291e2d
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Thu Oct 13 11:27:12 2016 -0400

    add EINTERN function for renaming gadget sites
---
 src/bin/e_gadget.c | 15 +++++++++++++++
 src/bin/e_gadget.h |  1 +
 2 files changed, 16 insertions(+)

diff --git a/src/bin/e_gadget.c b/src/bin/e_gadget.c
index f68d37a..4f4fe5c 100644
--- a/src/bin/e_gadget.c
+++ b/src/bin/e_gadget.c
@@ -1650,6 +1650,21 @@ e_gadget_save(void)
 }
 
 EINTERN void
+e_gadget_site_rename(const char *name, const char *newname)
+{
+   Eina_List *l;
+   E_Gadget_Site *zgs;
+
+   EINA_LIST_FOREACH(sites->sites, l, zgs)
+     if (eina_streq(zgs->name, name))
+       {
+          eina_stringshare_replace(&zgs->name, newname);
+          e_config_save_queue();
+          break;
+       }
+}
+
+EINTERN void
 e_gadget_init(void)
 {
    gadget_types = eina_hash_string_superfast_new(free);
diff --git a/src/bin/e_gadget.h b/src/bin/e_gadget.h
index 2304054..53945e3 100644
--- a/src/bin/e_gadget.h
+++ b/src/bin/e_gadget.h
@@ -110,6 +110,7 @@ typedef void (*E_Gadget_Style_Cb)(Evas_Object *owner, 
Eina_Stringshare *name, Ev
 
 EINTERN void e_gadget_init(void);
 EINTERN void e_gadget_shutdown(void);
+EINTERN void e_gadget_site_rename(const char *name, const char *newname);
 
 E_API Evas_Object *e_gadget_site_add(E_Gadget_Site_Orient orient, const char 
*name);
 E_API Evas_Object *e_gadget_site_auto_add(E_Gadget_Site_Orient orient, const 
char *name);

-- 


Reply via email to