Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-04 Thread Gerald Dachs
On Sat, 3 Dec 2005 09:13:55 +0200
Hisham Mardam Bey [EMAIL PROTECTED] wrote:

 On 12/3/05, Morten Nilsen [EMAIL PROTECTED] wrote:
  here's a patch I just whipped up.. it includes a bit I did when I
  implemented list, that nukes ecore_config config (path stuff)
 
 
 Please refrain from sending your patches inline with your emails. Use
 proper attachments.

You should consider to exchange your email client, it looks like it is broken.
I can recommend sylpheed and squirrelmail,  they both show Mortens patch
as an attachment.

Gerald


---
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://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-04 Thread Hisham Mardam Bey
 You should consider to exchange your email client, it looks like it is broken.
 I can recommend sylpheed and squirrelmail,  they both show Mortens patch
 as an attachment.


i'll tell that to gmail staff. (=

--
Hisham Mardam Bey
MSc (Computer Science)
http://hisham.cc/
+9613609386
Codito Ergo Sum (I Code Therefore I Am)


---
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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-04 Thread Jesse Luehrs
On Sun, 4 Dec 2005 15:46:08 +0200
Hisham Mardam Bey [EMAIL PROTECTED] wrote:

  You should consider to exchange your email client, it looks like it
  is broken. I can recommend sylpheed and squirrelmail,  they both
  show Mortens patch as an attachment.
 
 
 i'll tell that to gmail staff. (=

Sylpheed (well, sylpheed-claws) shows the patch inline with the message
when you view the entire email, since the attachment is plain text, but
also offers the option to view or save the patch separately as an
attachment. Are you sure gmail doesn't do the same thing?

Jesse


---
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://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-04 Thread David Seikel
On Sun, 4 Dec 2005 19:05:06 +0100 Gerald Dachs [EMAIL PROTECTED] wrote:

 problem that I never got an invitation from a gmailer :)

I just sent you one.  But I never use the gmail web front end to read
my gmail emails, I use their pop access.

BTW, gmail through POP has this strange feature that I work around by
using a write only account and a read only account.  So I'll send you a
second invite.


pgpJ1LJOpa740.pgp
Description: PGP signature


Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-03 Thread Morten Nilsen

Hisham Mardam Bey wrote:

On 12/3/05, Morten Nilsen [EMAIL PROTECTED] wrote:

here's a patch I just whipped up.. it includes a bit I did when I
implemented list, that nukes ecore_config config (path stuff)



Please refrain from sending your patches inline with your emails. Use
proper attachments.


what are you talking about? my patch is a base64-encoded attachment..

--
Morten


---
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://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users


[e-users] ecore_config del + entrance.cfg patch

2005-12-02 Thread xnowfall
is there currently no way to delete keys with ecore_config? i was trying 
to patch the entrance ebuild which still modifies entrance_config.db 
with edb_ed, but that needs to delete a few keys...


relatedly, with the switch to ecore_config is entrance no longer 
dependent on edb?


finally, i attached a patch to use entrance.cfg without the now 
superflous _config part left over from when it was a .db file
Index: e17/apps/entrance/entrance.spec
===
RCS file: /cvsroot/enlightenment/e17/apps/entrance/entrance.spec,v
retrieving revision 1.9
diff -u -r1.9 entrance.spec
--- e17/apps/entrance/entrance.spec	3 Nov 2005 04:49:27 -	1.9
+++ e17/apps/entrance/entrance.spec	28 Nov 2005 18:12:16 -
@@ -42,7 +42,7 @@
 %files   
 %defattr(-, root, root)  
 %doc AUTHORS COPYING* README
-%{_sysconfdir}/entrance_config.cfg
+%{_sysconfdir}/entrance.cfg
 %{_sysconfdir}/init.d/entrance
 %{_sysconfdir}/pam.d/entrance
 %{_bindir}/entrance
Index: e17/apps/entrance/data/config/.cvsignore
===
RCS file: /cvsroot/enlightenment/e17/apps/entrance/data/config/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- e17/apps/entrance/data/config/.cvsignore	16 Aug 2005 04:04:04 -	1.3
+++ e17/apps/entrance/data/config/.cvsignore	28 Nov 2005 18:12:16 -
@@ -1,4 +1,4 @@
 Makefile
 Makefile.in
 build_config.sh
-entrance_config.cfg
+entrance.cfg
Index: e17/apps/entrance/data/config/Makefile.am
===
RCS file: /cvsroot/enlightenment/e17/apps/entrance/data/config/Makefile.am,v
retrieving revision 1.4
diff -u -r1.4 Makefile.am
--- e17/apps/entrance/data/config/Makefile.am	16 Aug 2005 04:04:04 -	1.4
+++ e17/apps/entrance/data/config/Makefile.am	28 Nov 2005 18:12:16 -
@@ -1,4 +1,4 @@
-DB = entrance_config.cfg
+DB = entrance.cfg
 SCRIPT = build_config.sh
 
 CLEANFILES = $(DB)
Index: e17/apps/entrance/data/config/build_config.sh.in
===
RCS file: /cvsroot/enlightenment/e17/apps/entrance/data/config/build_config.sh.in,v
retrieving revision 1.11
diff -u -r1.11 build_config.sh.in
--- e17/apps/entrance/data/config/build_config.sh.in	8 Nov 2005 23:06:17 -	1.11
+++ e17/apps/entrance/data/config/build_config.sh.in	28 Nov 2005 18:12:16 -
@@ -1,5 +1,5 @@
 #!/bin/sh -e
-DB=./entrance_config.cfg
+DB=./entrance.cfg
 rm -f $DB
 
 # set auth to 1 for pam, 2 for shadow
Index: e17/apps/entrance/src/client/entrance_edit.c
===
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_edit.c,v
retrieving revision 1.14
diff -u -r1.14 entrance_edit.c
--- e17/apps/entrance/src/client/entrance_edit.c	5 Sep 2005 12:05:57 -	1.14
+++ e17/apps/entrance/src/client/entrance_edit.c	28 Nov 2005 18:12:24 -
@@ -787,7 +787,7 @@
   ecore_main_loop_quit();
else if (!strcmp(ecco,button,global,save, emission))
{
-  snprintf(buf, PATH_MAX, %s/entrance_config.cfg, PACKAGE_CFG_DIR);
+  snprintf(buf, PATH_MAX, %s/entrance.cfg, PACKAGE_CFG_DIR);
   if (!entrance_config_save(ecco.config, buf))
   {
  fprintf(stderr, Wrote %s\n, buf);
@@ -1917,9 +1917,9 @@
ecore_app_args_set(argc, (const char **) argv);
 
if ((ecco.config =
-entrance_config_load(PACKAGE_CFG_DIR /entrance_config.cfg)) == NULL)
+entrance_config_load(PACKAGE_CFG_DIR /entrance.cfg)) == NULL)
{
-  fprintf(stderr, Unable to open %s/entrance_config.cfg\n,
+  fprintf(stderr, Unable to open %s/entrance.cfg\n,
   PACKAGE_CFG_DIR);
   exit(1);
}
Index: e17/apps/entrance/src/client/entrance_session.c
===
RCS file: /cvsroot/enlightenment/e17/apps/entrance/src/client/entrance_session.c,v
retrieving revision 1.79
diff -u -r1.79 entrance_session.c
--- e17/apps/entrance/src/client/entrance_session.c	10 Nov 2005 14:44:25 -	1.79
+++ e17/apps/entrance/src/client/entrance_session.c	28 Nov 2005 18:12:24 -
@@ -43,7 +43,7 @@
if (config)
   e-db = strdup(config);
else
-  e-db = strdup(PACKAGE_CFG_DIR /entrance_config.cfg);
+  e-db = strdup(PACKAGE_CFG_DIR /entrance.cfg);
 
openlog(entrance, LOG_NOWAIT, LOG_DAEMON);
if (!display)


Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-02 Thread Morten Nilsen

xnowfall wrote:
is there currently no way to delete keys with ecore_config? i was trying 
to patch the entrance ebuild which still modifies entrance_config.db 
with edb_ed, but that needs to delete a few keys...


here's a patch I just whipped up.. it includes a bit I did when I 
implemented list, that nukes ecore_config config (path stuff)


Cheers,
--
Morten
Index: ecore_config.c
===
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/bin/ecore_config.c,v
retrieving revision 1.3
diff -u -r1.3 ecore_config.c
--- ecore_config.c  18 Sep 2005 12:48:24 -  1.3
+++ ecore_config.c  3 Dec 2005 00:59:01 -
@@ -35,6 +85,17 @@
 }
 
 int
+del(const char *key)
+{
+   Ecore_Config_Prop *e;
+   e = ecore_config_get(key);
+   if(e == NULL) return -1;
+
+   ecore_config_dst(e);
+   return 0;
+}
+
+int
 get(const char *key)
 {
Ecore_Config_Prop *e;
@@ -143,8 +243,9 @@
 usage_and_exit(const char *prog, int ret, const char *msg)
 {
if (msg) fprintf(stderr, msg);
-   fprintf(stderr, Usage: %s config-file {get|set|type|list} 
[args...]\n, prog);
+   fprintf(stderr, Usage: %s config-file {get|del|set|type|list} 
[args...]\n, prog);
fprintf(stderr, LIST:   %s config-file list\n, prog);
+   fprintf(stderr, DEL:%s config-file del key\n, prog);
fprintf(stderr, GET:%s config-file get key\n, prog);
fprintf(stderr, GET TYPE:   %s config-file type key\n, prog);
fprintf(stderr, SET:%s config-file set key 
{nil|int|float|bool|str|rgb|theme} value\n, prog);
@@ -154,6 +255,8 @@
 int
 main(int argc, const char **argv)
 {
+   Ecore_Config_Bundle *t;
+   Ecore_Config_Prop *e;
const char *prog, *file, *cmd, *key, *type, *value;
int ec_type = -1;
int ret = 0;
@@ -169,13 +272,14 @@
if (strcmp(get, cmd) 
strcmp(type, cmd) 
strcmp(set, cmd) 
-   strcmp(list, cmd))
+   strcmp(list, cmd) 
+   strcmp(del, cmd))
{
usage_and_exit(prog, 2, Unrecognised command\n);
}

// Check for enough arguments
-   if ((*cmd == 's') || (*cmd == 'g') || (*cmd == 't')) {
+   if ((*cmd == 's') || (*cmd == 'g') || (*cmd == 't') || (*cmd == 'd')) {
if (argc  3) usage_and_exit(prog, 2, Not enough arguments\n);
key = argv[3];
}
@@ -194,8 +298,15 @@
}
}

-   // Load configuration from file
ecore_config_init(econfig);
+
+   // Remove any config not from the file
+   t = __ecore_config_bundle_local;
+   while((e = t-data)) {
+   ecore_config_dst(e);
+   }
+
+   // Load configuration from file
ecore_config_file_load(file);

// Execute command
@@ -208,6 +319,14 @@
ecore_config_file_save(file);
}
break;
+   case 'd':
+   if(del(key)) {
+   fprintf(stderr, Del failed\n);
+   ret = 4;
+   } else {
+   ecore_config_file_save(file);
+   }
+   break;
case 'g':
if (get(key)) ret = 4;
break;


Re: [e-users] ecore_config del + entrance.cfg patch

2005-12-02 Thread Hisham Mardam Bey
On 12/3/05, Morten Nilsen [EMAIL PROTECTED] wrote:
 here's a patch I just whipped up.. it includes a bit I did when I
 implemented list, that nukes ecore_config config (path stuff)


Please refrain from sending your patches inline with your emails. Use
proper attachments.

--
Hisham Mardam Bey
MSc (Computer Science)
http://hisham.cc/
+9613609386
Codito Ergo Sum (I Code Therefore I Am)


---
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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
enlightenment-users mailing list
enlightenment-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-users