Changeset 2835
- Timestamp:
- 10/15/07 02:17:59
- Files:
-
- trunk/config.h.in (modified) (2 diffs)
- trunk/configure.ac (modified) (2 diffs)
- trunk/libtinymail-camel/camel-lite/config.h.in (modified) (2 diffs)
- trunk/libtinymailui-gnome-keyring/tny-gnome-keyring-password-getter.c (modified) (1 diff)
- trunk/libtinymailui-mozembed/Makefile.am (modified) (1 diff)
- trunk/libtinymailui-mozembed/mozilla-preferences.cpp (added)
- trunk/libtinymailui-mozembed/mozilla-preferences.h (added)
- trunk/libtinymailui-mozembed/tny-moz-embed-html-mime-part-view.c (modified) (3 diffs)
- trunk/m4/moz.m4 (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/config.h.in
r2829 r2835 31 31 #undef HAVE_MEMORY_H 32 32 33 /* Define if we have mozilla api 1.8 */ 34 #undef HAVE_MOZILLA_1_8 35 36 /* Define if we have mozilla api 1.9 */ 37 #undef HAVE_MOZILLA_1_9 38 33 39 /* Define to 1 if you have the <stdint.h> header file. */ 34 40 #undef HAVE_STDINT_H … … 54 60 /* "Whether to hack the TnyMaemoConicDevice to somewhat work in sbox" */ 55 61 #undef MAEMO_CONIC_DUMMY 62 63 /* Detected mozilla engine version for mozembed */ 64 #undef MOZEMBED_MOZILLA_VERSION 56 65 57 66 /* "The path of the mozilla engine" */ trunk/configure.ac
r2829 r2835 375 375 AC_TNY_MOZ_CHECK 376 376 377 if test x$mozilla_nspr = xno; then 378 AC_MSG_ERROR("You need Mozilla's NSPR") 379 fi 380 381 if test x$mozilla_nss = xno; then 382 AC_MSG_ERROR("You need Mozilla's NSS") 383 fi 384 377 385 if test x$mozilla_xpcom = xno; then 378 386 AC_MSG_ERROR("You need Mozilla's XPCOM") … … 383 391 fi 384 392 385 extraplatpkgs="$mozilla_ xpcom $mozilla_gtkmozembed"393 extraplatpkgs="$mozilla_nspr $mozilla_nss $mozilla_xpcom $mozilla_gtkmozembed" 386 394 extratnypkgs="$extratnypkgs $extraplatpkgs" 387 395 PKG_CHECK_MODULES(LIBTINYMAILUI_MOZEMBED, $extraplatpkgs glib-2.0 >= 2.8 gobject-2.0 gtk+-2.0 $extragtkpkgs) trunk/libtinymail-camel/camel-lite/config.h.in
r1079 r2835 95 95 #undef HAVE_MKSTEMP 96 96 97 /* Define if we have mozilla api 1.8 */ 98 #undef HAVE_MOZILLA_1_8 99 100 /* Define if we have mozilla api 1.9 */ 101 #undef HAVE_MOZILLA_1_9 102 97 103 /* Define if you have NSS */ 98 104 #undef HAVE_NSS … … 163 169 /* Define to 1 if you have the <unistd.h> header file. */ 164 170 #undef HAVE_UNISTD_H 171 172 /* Detected mozilla engine version for mozembed */ 173 #undef MOZEMBED_MOZILLA_VERSION 165 174 166 175 /* Enable getaddrinfo emulation */ trunk/libtinymailui-gnome-keyring/tny-gnome-keyring-password-getter.c
r2825 r2835 41 41 "PLAIN", 0, &list); 42 42 43 if ( keyringret != GNOME_KEYRING_RESULT_OK)43 if ((keyringret != GNOME_KEYRING_RESULT_OK) || (list == NULL)) 44 44 { 45 45 gboolean canc = FALSE; trunk/libtinymailui-mozembed/Makefile.am
r2829 r2835 21 21 tny-moz-embed-html-mime-part-view.c \ 22 22 tny-moz-embed-msg-view.c \ 23 tny-moz-embed-stream.c 23 tny-moz-embed-stream.c \ 24 mozilla-preferences.cpp \ 25 mozilla-preferences.h 24 26 25 27 libtinymailui_mozembed_1_0_la_LIBADD = \ trunk/libtinymailui-mozembed/tny-moz-embed-html-mime-part-view.c
r2829 r2835 32 32 #include <gtk/gtk.h> 33 33 34 #include <gtkmozembed_common.h>34 #include "mozilla-preferences.h" 35 35 36 36 #include <tny-moz-embed-html-mime-part-view.h> … … 184 184 { 185 185 GObjectClass *object_class; 186 gint int_value;187 gboolean bool_value;188 const gchar *home_path;189 const gchar *full_path;190 const gchar *prgname;191 gchar *profile_path;192 gchar *useragent;193 186 194 187 parent_class = g_type_class_peek_parent (class); … … 199 192 g_type_class_add_private (object_class, sizeof (TnyMozEmbedHtmlMimePartViewPriv)); 200 193 201 gtk_moz_embed_set_path (MOZILLA_HOME); 202 203 home_path = getenv ("HOME"); 204 if (!home_path) 205 home_path = g_get_home_dir (); 206 prgname = g_get_prgname (); 207 if (!prgname) 208 prgname = "tinymail"; 209 full_path = g_strdup_printf("%s/%s", home_path, ".tinymail"); 210 profile_path = g_strconcat ("mozembed-", prgname, NULL); 211 gtk_moz_embed_set_profile_path (full_path, profile_path); 212 g_free (profile_path); 213 214 gtk_moz_embed_push_startup (); 215 216 int_value = 2; 217 gtk_moz_embed_common_set_pref (GTK_TYPE_INT, "permissions.default.image", &int_value); 218 gtk_moz_embed_common_set_pref (GTK_TYPE_INT, "permissions.default.script", &int_value); 219 220 bool_value = FALSE; 221 gtk_moz_embed_common_set_pref (GTK_TYPE_BOOL, "security.checkloaduri", &bool_value); 222 223 useragent = g_strconcat (prgname, "/", VERSION, NULL); 224 gtk_moz_embed_common_set_pref (GTK_TYPE_STRING, "general.useragent.misc", useragent); 225 g_free (useragent); 226 gtk_moz_embed_common_set_pref (GTK_TYPE_STRING, "network.proxy.no_proxies_on", "localhost"); 194 _mozilla_preference_init (); 227 195 228 196 return; trunk/m4/moz.m4
r2829 r2835 49 49 AC_MSG_RESULT($mozilla_gtkmozembed) 50 50 51 #Detect Mozilla XPCom version 52 if test x$mozilla_xpcom != x; then 53 54 AC_MSG_CHECKING(Mozilla xpcom engine version) 55 #The only real way to detect the MOZILLA engine version is using the version in mozilla-config.h 56 #of the engine we use. 57 mozilla_xpcom_includedir="`$PKG_CONFIG --variable=includedir $mozilla_xpcom`" 58 mozilla_version=`cat $mozilla_xpcom_includedir/mozilla-config.h | grep MOZILLA_VERSION_U | sed "s/.*_VERSION_U\ //"|tr ".abpre+" " "` 59 mozilla_major_version=`echo $mozilla_version | awk ' { print $[1]; } '` 60 mozilla_minor_version=`echo $mozilla_version | awk ' { print $[2]; } '` 61 62 if test "$mozilla_major_version" != "1"; then 63 AC_DEFINE([HAVE_MOZILLA_1_9],[1],[Define if we have mozilla api 1.9]) 64 AC_DEFINE([HAVE_MOZILLA_1_8],[1],[Define if we have mozilla api 1.8]) 65 fi 66 67 if test "$mozilla_major_version" = "1" -a "$mozilla_minor_version" -ge "8"; then 68 AC_DEFINE([HAVE_MOZILLA_1_8],[1],[Define if we have mozilla api 1.8]) 69 fi 70 71 if test "$mozilla_major_version" = "1" -a "$mozilla_minor_version" -ge "9"; then 72 AC_DEFINE([HAVE_MOZILLA_1_9],[1],[Define if we have mozilla api 1.9]) 73 fi 74 75 AC_MSG_RESULT($mozilla_version) 76 77 78 fi 79 80 81 AM_CONDITIONAL([HAVE_MOZILLA_1_8],[test "mozilla_major_version" = "1" -a "$mozilla_minor_version" -ge "8"]) 82 AM_CONDITIONAL([HAVE_MOZILLA_1_9],[test "$mozilla_major_version" = "1" -a "$mozilla_minor_version" -ge "9"]) 83 AC_DEFINE([MOZEMBED_MOZILLA_VERSION],["$mozilla_version"],[Detected mozilla engine version for mozembed]) 84 51 85 ]) 52 86
