[Kazehakase-cvs] CVS update: kazehakase/src/bookmarks

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Mon Jan 1 21:40:32 JST 2007


Index: kazehakase/src/bookmarks/kz-session.c
diff -u kazehakase/src/bookmarks/kz-session.c:1.3 kazehakase/src/bookmarks/kz-session.c:1.4
--- kazehakase/src/bookmarks/kz-session.c:1.3	Mon Jan  1 21:17:52 2007
+++ kazehakase/src/bookmarks/kz-session.c	Mon Jan  1 21:40:32 2007
@@ -18,7 +18,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  *
- *  $Id: kz-session.c,v 1.3 2007/01/01 12:17:52 ikezoe Exp $
+ *  $Id: kz-session.c,v 1.4 2007/01/01 12:40:32 ikezoe Exp $
  */
 
 #include "kz-session.h"
@@ -210,6 +210,18 @@
 }
 
 static void
+cb_tab_notify (GObject *object, GParamSpec *spec, KzBookmark *session)
+{
+	KzSessionPrivate *priv = KZ_SESSION_GET_PRIVATE(session);
+
+	if (priv->frozen)
+		return;
+
+	if (priv->auto_save)
+		kz_bookmark_file_save(KZ_BOOKMARK_FILE(session));
+}
+
+static void
 cb_tab_created (KzBookmark *folder, KzBookmark *child, KzBookmark *sibling, KzBookmark *session)
 {
 	g_signal_connect(child, "insert-child",
@@ -218,6 +230,9 @@
 	g_signal_connect(child, "remove-child",
 			 G_CALLBACK(cb_remove_child),
 			 session);	
+	g_signal_connect_after(child, "notify",
+			       G_CALLBACK(cb_tab_notify),
+			       session);
 }
 
 static void
@@ -229,6 +244,9 @@
 	g_signal_handlers_disconnect_by_func
 		(child,
 		 G_CALLBACK(cb_remove_child), session);
+	g_signal_handlers_disconnect_by_func
+		(child,
+		 G_CALLBACK(cb_tab_notify), session);
 }
 
 static void


More information about the Kazehakase-cvs mailing list
Back to archive index