[kazehakase-svn] [3135] Remove needless session freezing.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Wed Apr 4 12:49:39 JST 2007


Revision: 3135
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3135
Author:   makeinu
Date:     2007-04-04 12:49:37 +0900 (Wed, 04 Apr 2007)

Log Message:
-----------
Remove needless session freezing.

Modified Paths:
--------------
    kazehakase/trunk/src/actions/kz-actions.c
    kazehakase/trunk/src/kz-app.c
    kazehakase/trunk/src/kz-window.c

Modified: kazehakase/trunk/src/actions/kz-actions.c
===================================================================
--- kazehakase/trunk/src/actions/kz-actions.c	2007-04-04 03:16:12 UTC (rev 3134)
+++ kazehakase/trunk/src/actions/kz-actions.c	2007-04-04 03:49:37 UTC (rev 3135)
@@ -105,9 +105,7 @@
 {
 	g_return_if_fail(KZ_IS_WINDOW(kz));
 
-	kz_app_freeze_session(kz_app);
 	gtk_widget_destroy(GTK_WIDGET(kz));
-	kz_app_thaw_session(kz_app);
 }
 
 

Modified: kazehakase/trunk/src/kz-app.c
===================================================================
--- kazehakase/trunk/src/kz-app.c	2007-04-04 03:16:12 UTC (rev 3134)
+++ kazehakase/trunk/src/kz-app.c	2007-04-04 03:49:37 UTC (rev 3135)
@@ -873,14 +873,6 @@
 	KzAppPrivate *priv = KZ_APP_GET_PRIVATE(app);
 	KzWindow *kz = KZ_WINDOW (object);
 
-	if (kz->tabs)
-	{
-		/* CAUTION: make KzApp sure to remove tabs before freeing it. */
-		kz_app_freeze_session(app);
-		kz_bookmark_remove(priv->bookmarks->current_session, kz->tabs);
-		kz_app_thaw_session(app);
-	}
-
 	g_signal_handlers_disconnect_by_func(object,
 					     G_CALLBACK(cb_destroy_window), data);
 	priv->window_list = g_list_remove(priv->window_list, object);
@@ -893,6 +885,14 @@
 			gtk_main_quit();
 			main_quited = TRUE;
 		}
+	} 
+	else
+	{
+		/* If the window is last window, keep its tabs for saving the
+		 * session. */
+		if (kz->tabs)
+			kz_bookmark_remove(priv->bookmarks->current_session,
+					   kz->tabs);
 	}
 }
 

Modified: kazehakase/trunk/src/kz-window.c
===================================================================
--- kazehakase/trunk/src/kz-window.c	2007-04-04 03:16:12 UTC (rev 3134)
+++ kazehakase/trunk/src/kz-window.c	2007-04-04 03:49:37 UTC (rev 3135)
@@ -973,12 +973,10 @@
 
 	kztab = KZ_TAB_LABEL(gtk_notebook_get_tab_label(GTK_NOTEBOOK(kz->notebook), widget));
 	g_object_ref(kztab->history);
-	kz_app_freeze_session(kz_app);
 	kz_bookmark_remove(kz->tabs, kztab->history);
 	kz_bookmark_insert_before(kz->tabs, 
 				  kztab->history,
 				  sib_bookmark);
-	kz_app_thaw_session(kz_app);
 	g_object_unref(kztab->history);
 
 	g_signal_emit(kz, kz_window_signals[REORDER_TAB_SIGNAL],




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