Hiroyuki Ikezoe
ikezo****@users*****
Mon Jan 22 12:57:31 JST 2007
Index: kazehakase/src/kz-app.c diff -u kazehakase/src/kz-app.c:1.23 kazehakase/src/kz-app.c:1.24 --- kazehakase/src/kz-app.c:1.23 Tue Jan 16 09:29:43 2007 +++ kazehakase/src/kz-app.c Mon Jan 22 12:57:31 2007 @@ -237,22 +237,22 @@ "proxyrc", NULL); priv->proxy = kz_profile_open(proxy_file, sysproxy_file); -#if USE_MIGEMO - priv->migemo = kz_migemo_new(); -#endif - kz_icons_init(); + kz_ext_init(app); + + /* make dirs */ + prepare_dir(); + #ifdef USE_SSL /* initialize gnutls. this function should be called once. */ gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); gnutls_global_init(); #endif - kz_ext_init(app); - - /* make dirs */ - prepare_dir(); +#if USE_MIGEMO + priv->migemo = kz_migemo_new(); +#endif #ifdef HAVE_LIBSM /* session management */ @@ -320,10 +320,6 @@ gtk_accel_map_save(accel_prefs_file); g_free(accel_prefs_file); -#ifdef HAVE_LIBSM - SmcCloseConnection ((SmcConn) priv->smc_conn, 0, NULL); -#endif /* HAVE_LIBSM */ - /* clean history cache */ clean_history_cache(); @@ -351,6 +347,11 @@ priv->migemo = NULL; } #endif + +#ifdef HAVE_LIBSM + SmcCloseConnection ((SmcConn) priv->smc_conn, 0, NULL); +#endif /* HAVE_LIBSM */ + priv->profile = NULL; priv->proxy = NULL; priv->bookmarks = NULL; @@ -586,14 +587,6 @@ return NULL; } -#if USE_MIGEMO -KzMigemo * -kz_app_get_migemo (KzApp *app) -{ - return KZ_APP_GET_PRIVATE(app)->migemo; -} -#endif - static void cb_destroy_window (GtkObject *object, gpointer data) { @@ -614,6 +607,14 @@ } } +#if USE_MIGEMO +KzMigemo * +kz_app_get_migemo (KzApp *app) +{ + return KZ_APP_GET_PRIVATE(app)->migemo; +} +#endif + #ifdef HAVE_LIBSM /* these codes are taken from libgnomeui.*/ @@ -750,11 +751,11 @@ } static void -session_set_value (SmcConn smc_conn, - gchar *name, - char *type, - int num_vals, - SmPropValue *vals) +session_set_value (SmcConn smc_conn, + gchar *name, + char *type, + int num_vals, + SmPropValue *vals) { SmProp *proplist[1]; SmProp prop; @@ -819,6 +820,7 @@ callbacks.save_complete.client_data = callbacks.shutdown_cancelled.client_data = (SmPointer) app; + priv->session_id = NULL; priv->smc_conn= (gpointer) SmcOpenConnection(NULL, app, SmProtoMajor, SmProtoMinor, @@ -852,7 +854,33 @@ session_set_gchar(priv->smc_conn, SmRestartStyleHint, (gchar) SmRestartIfRunning); session_set_string(priv->smc_conn, SmProgram, g_get_prgname()); +#if 0 +{ + GList *list; + gint argc; + gchar *ptr; + gint i = 0; + + SmPropValue *vals; + + ptr="/home/zoe/kazehakase/src/kazehakase"; + + if (!ptr) + return; + argc = 1; + + vals = g_new (SmPropValue, argc); + + ptr="/home/zoe/kazehakase/src/kazehakase"; + + vals[i].length = strlen(ptr); + vals[i++].value = ptr; + session_set_value(priv->smc_conn, SmCloneCommand, SmLISTofARRAY8, i, vals); + + g_free (vals); +} +#endif g_free(session_id); } }