Hiroyuki Ikezoe
ikezo****@users*****
Tue Jan 2 18:23:47 JST 2007
Index: kazehakase/src/mozilla/mozilla-prefs.cpp diff -u kazehakase/src/mozilla/mozilla-prefs.cpp:1.35 kazehakase/src/mozilla/mozilla-prefs.cpp:1.36 --- kazehakase/src/mozilla/mozilla-prefs.cpp:1.35 Tue Oct 11 10:54:18 2005 +++ kazehakase/src/mozilla/mozilla-prefs.cpp Tue Jan 2 18:23:47 2007 @@ -88,7 +88,7 @@ extern "C" void -mozilla_prefs_set (void) +mozilla_prefs_set (KzProfile *profile) { char *value; gchar user_agent[1024]; @@ -98,10 +98,15 @@ KzProxyItem *item = NULL; // set user agent name - KZ_CONF_GET("Global", "override_user_agent", override, BOOL); + kz_profile_get_value(profile, "Global", "override_user_agent", + &override, sizeof(gboolean), + KZ_PROFILE_VALUE_TYPE_BOOL); if (override) - override = KZ_CONF_GET("Global", "user_agent", - user_agent, STRING); + { + override = kz_profile_get_value(profile, "Global", "user_agent", + &user_agent, sizeof(user_agent), + KZ_PROFILE_VALUE_TYPE_STRING); + } if (!override) build_user_agent(user_agent, G_N_ELEMENTS(user_agent)); mozilla_prefs_set_string ("general.useragent.override", user_agent); @@ -132,10 +137,13 @@ g_free(value); } - use_proxy_exist = KZ_CONF_GET("Global", "use_proxy", use_proxy, BOOL); - - conf_exist = KZ_CONF_GET("Global", "proxy_name", - proxy_name, STRING); + use_proxy_exist = kz_profile_get_value(profile, "Global", "use_proxy", + &use_proxy, sizeof(gboolean), + KZ_PROFILE_VALUE_TYPE_BOOL); + conf_exist = kz_profile_get_value(profile, "Global" , "proxy_name", + &proxy_name, sizeof(proxy_name), + KZ_PROFILE_VALUE_TYPE_STRING); + if (!use_proxy_exist && conf_exist) use_proxy = TRUE; if (use_proxy) Index: kazehakase/src/mozilla/mozilla-prefs.h diff -u kazehakase/src/mozilla/mozilla-prefs.h:1.6 kazehakase/src/mozilla/mozilla-prefs.h:1.7 --- kazehakase/src/mozilla/mozilla-prefs.h:1.6 Sun Feb 20 21:52:09 2005 +++ kazehakase/src/mozilla/mozilla-prefs.h Tue Jan 2 18:23:47 2007 @@ -28,11 +28,12 @@ #include <glib.h> #include "kz-proxy-item.h" +#include "kz-profile.h" G_BEGIN_DECLS gboolean mozilla_prefs_init (void); -void mozilla_prefs_set (void); +void mozilla_prefs_set (KzProfile *profile); gboolean mozilla_prefs_get_string (const char *preference_name, char **value); gboolean mozilla_prefs_get_int (const char *preference_name, Index: kazehakase/src/mozilla/mozilla.cpp diff -u kazehakase/src/mozilla/mozilla.cpp:1.29 kazehakase/src/mozilla/mozilla.cpp:1.30 --- kazehakase/src/mozilla/mozilla.cpp:1.29 Sun Dec 31 10:36:04 2006 +++ kazehakase/src/mozilla/mozilla.cpp Tue Jan 2 18:23:47 2007 @@ -253,7 +253,7 @@ extern "C" void -mozilla_init (void) +mozilla_init (KzProfile *profile) { GtkMozEmbedSingle *single = NULL; @@ -263,7 +263,7 @@ gtk_moz_embed_push_startup(); - mozilla_prefs_set(); + mozilla_prefs_set(profile); // // get the singleton object and hook up to its new window callback @@ -278,7 +278,7 @@ g_signal_connect(single, "new_window_orphan", G_CALLBACK(new_window_orphan_cb), NULL); - g_signal_connect(KZ_GET_GLOBAL_PROFILE, "changed::Global", + g_signal_connect(profile, "changed::Global", G_CALLBACK(cb_profile_changed), NULL); Index: kazehakase/src/mozilla/mozilla.h diff -u kazehakase/src/mozilla/mozilla.h:1.7 kazehakase/src/mozilla/mozilla.h:1.8 --- kazehakase/src/mozilla/mozilla.h:1.7 Mon Jun 7 17:03:25 2004 +++ kazehakase/src/mozilla/mozilla.h Tue Jan 2 18:23:47 2007 @@ -22,10 +22,11 @@ #define __MOZILLA_H__ #include <gtk/gtk.h> +#include "kz-profile.h" G_BEGIN_DECLS -void mozilla_init (void); +void mozilla_init (KzProfile *profile); void mozilla_exit (void); gboolean mozilla_get_passwords (GList **passwords);