Hiroyuki Ikezoe
ikezo****@users*****
Mon Jan 1 19:35:14 JST 2007
Index: kazehakase/src/kz-app.c diff -u kazehakase/src/kz-app.c:1.8 kazehakase/src/kz-app.c:1.9 --- kazehakase/src/kz-app.c:1.8 Mon Jan 1 10:08:44 2007 +++ kazehakase/src/kz-app.c Mon Jan 1 19:35:14 2007 @@ -36,6 +36,7 @@ #include "kz-actions-tab.h" #include "kz-ext.h" #include "kz-icons.h" +#include "kz-session.h" #include "kz-tab-label.h" #include "kz-window.h" #include "mozilla.h" @@ -133,6 +134,7 @@ gchar *accel_prefs_file; gchar *proxy_file, *sysproxy_file; gchar *search_engine; + gboolean save_session; KzAppPrivate *priv = KZ_APP_GET_PRIVATE(kzapp); priv->window_list = NULL; @@ -205,6 +207,9 @@ sys_bookmark_bar_file); kz_root_bookmark_add_current_session_file(priv->bookmarks, current_session_file); + kz_profile_get_value(priv->profile, "Session", "save", + &save_session, sizeof(gboolean), KZ_PROFILE_VALUE_TYPE_BOOL); + kz_session_set_auto_save(KZ_SESSION(priv->bookmarks->current_session), save_session); /* Load other prefs... */ accel_prefs_file = g_build_filename(g_get_home_dir(), @@ -368,14 +373,17 @@ kz_app_create_new_window (KzApp *app, const gchar *uri) { GtkWidget *window; - gboolean restore = FALSE; KzAppPrivate *priv = KZ_APP_GET_PRIVATE(app); window = kz_window_new(uri); - KZ_CONF_GET("Session", "restore", restore, BOOL); - if (!priv->window_list && restore) - restore_session (app, KZ_WINDOW(window)); + if (!priv->window_list) + { + gboolean restore = FALSE; + KZ_CONF_GET("Session", "restore", restore, BOOL); + if (restore) + restore_session (app, KZ_WINDOW(window)); + } g_signal_connect(window, "destroy", G_CALLBACK(cb_destroy_window), app);