I often experience crashes when using eve, when I reload it no saved
informations (like favorites) or history are kept. Why not saving them
when something changes?

What about saving the configuration as soon as something has changed,
too?

Bye.
From ef308f5cab2d614570287127908186337592267c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= <m...@3v1n0.net>
Date: Wed, 1 Dec 2010 21:45:18 +0100
Subject: [PATCH] eve: save favorites as soon as they are added / deleted

---
 src/bin/eve_state.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/bin/eve_state.c b/src/bin/eve_state.c
index 499c2f4..0fe909a 100644
--- a/src/bin/eve_state.c
+++ b/src/bin/eve_state.c
@@ -787,6 +787,7 @@ fav_items_add(Fav *fav, const char * url, Fav_Item *fav_item)
 {
     EINA_SAFETY_ON_NULL_RETURN(fav);
     eina_hash_add(fav->items, url, fav_item);
+    fav_save(fav, NULL);
 }
 
 void
@@ -794,6 +795,7 @@ fav_items_del(Fav *fav, const char * url)
 {
     EINA_SAFETY_ON_NULL_RETURN(fav);
     eina_hash_del(fav->items, url, NULL);
+    fav_save(fav, NULL);
 }
 
 inline Fav_Item *
-- 
1.7.1

From 14a82488fa8ab6ad60748b11b68d9591372b94e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20(Trevi=C3=B1o)?= <m...@3v1n0.net>
Date: Wed, 1 Dec 2010 21:44:45 +0100
Subject: [PATCH] eve: save history on file when updated

---
 src/bin/eve_state.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/bin/eve_state.c b/src/bin/eve_state.c
index 65ac813..499c2f4 100644
--- a/src/bin/eve_state.c
+++ b/src/bin/eve_state.c
@@ -571,6 +571,7 @@ hist_items_add(Hist *hist, const char * url, Hist_Item *hist_item)
 {
     EINA_SAFETY_ON_NULL_RETURN(hist);
     eina_hash_add(hist->items, url, hist_item);
+    hist_save(hist, NULL);
 }
 
 void
@@ -578,6 +579,7 @@ hist_items_del(Hist *hist, const char * url)
 {
     EINA_SAFETY_ON_NULL_RETURN(hist);
     eina_hash_del(hist->items, url, NULL);
+    hist_save(hist, NULL);
 }
 
 inline Hist_Item *
@@ -599,6 +601,7 @@ hist_items_modify(Hist *hist, const char * key, void *value)
 {
     EINA_SAFETY_ON_NULL_RETURN(hist);
     eina_hash_modify(hist->items, key, value);
+    hist_save(hist, NULL);
 }
 
 Hist *
-- 
1.7.1

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to