Changeset 2829

Show
Ignore:
Timestamp:
10/11/07 11:38:42
Author:
jdapena
Message:

* m4/moz.m4: add support for gtkmozembed library using gtkembedmoz.pc.

Also export mozilla_home.
* debian/rules.maemo: compile with mozembed support.
* debian/control.maemo1: compile with mozembed support.
* tests/c-demo/tny-main.c: remove mozilla calls in main.
* configure.ac: some fixes for html module detection. Use mozilla home.
Now we only use detection of xpcom for being sure we've got an engine
path.
* Removed libtinymailui-mozembed/mozilla-preferences.{cpp,h}, as we now
use gtk moz embed api to set preferences.
* libtinymalui-mozembed/Makefile.am: removed mozilla preferences from
build.
* libtinymailui-mozembed/tny-moz-embed-html-mime-part-view.c:
Now we use gtk moz embed to set preferences. We also set properly the
component path (mozilla home from used engine), and the profile path
(using the progname). We set a default chrome without scrollbars.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2828 r2829  
     12007-10-10  Jose Dapena Paz  <jdapena@igalia.com> 
     2 
     3        * m4/moz.m4: add support for gtkmozembed library using gtkembedmoz.pc. 
     4        Also export mozilla_home. 
     5        * debian/rules.maemo: compile with mozembed support. 
     6        * debian/control.maemo1: compile with mozembed support. 
     7        * tests/c-demo/tny-main.c: remove mozilla calls in main. 
     8        * configure.ac: some fixes for html module detection. Use mozilla home. 
     9        Now we only use detection of xpcom for being sure we've got an engine 
     10        path. 
     11        * Removed libtinymailui-mozembed/mozilla-preferences.{cpp,h}, as we now 
     12        use gtk moz embed api to set preferences. 
     13        * libtinymalui-mozembed/Makefile.am: removed mozilla preferences from 
     14        build. 
     15        * libtinymailui-mozembed/tny-moz-embed-html-mime-part-view.c: 
     16        Now we use gtk moz embed to set preferences. We also set properly the 
     17        component path (mozilla home from used engine), and the profile path 
     18        (using the progname). We set a default chrome without scrollbars. 
     19 
    1202007-10-08  Philip Van Hoof  <pvanhoof@gnome.org> 
    221 
  • trunk/config.h.in

    r1793 r2829  
    5555#undef MAEMO_CONIC_DUMMY 
    5656 
     57/* "The path of the mozilla engine" */ 
     58#undef MOZILLA_HOME 
     59 
    5760/* Name of package */ 
    5861#undef PACKAGE 
  • trunk/configure.ac

    r2698 r2829  
    6161build_uigtk=true 
    6262build_demoui=true 
    63 build_mozembed=tru
     63build_mozembed=fals
    6464build_webkit=false 
    6565build_gtkhtml=false 
     
    8888        build_gnome=false 
    8989        build_maemo=true 
    90         with_html_component=none 
    9190        build_uigtk=true 
    9291        build_demoui=true 
     
    376375  AC_TNY_MOZ_CHECK 
    377376 
    378   if test x$mozilla_nspr = xno; then 
    379     AC_MSG_ERROR("You need Mozilla's NSPR")  
     377  if test x$mozilla_xpcom = xno; then 
     378   AC_MSG_ERROR("You need Mozilla's XPCOM") 
    380379  fi 
    381   if test x$mozilla_nss = xno; then 
    382     AC_MSG_ERROR("You need Mozilla's NSS") 
    383   fi 
    384   if test x$mozilla_xpcom = xno; then 
    385     AC_MSG_ERROR("You need Mozilla's XPCOM") 
    386   fi 
     380 
    387381  if test x$mozilla_gtkmozembed = xno; then 
    388382   AC_MSG_ERROR("You need Mozilla's GtkMozEmbed") 
    389383  fi 
    390384 
    391   extraplatpkgs="$mozilla_nspr $mozilla_nss $mozilla_xpcom $mozilla_gtkmozembed" 
     385  extraplatpkgs="$mozilla_xpcom $mozilla_gtkmozembed" 
    392386  extratnypkgs="$extratnypkgs $extraplatpkgs" 
    393387  PKG_CHECK_MODULES(LIBTINYMAILUI_MOZEMBED, $extraplatpkgs glib-2.0 >= 2.8 gobject-2.0 gtk+-2.0 $extragtkpkgs) 
     388  MOZILLA_HOME="$mozilla_home" 
     389  AC_DEFINE_UNQUOTED(MOZILLA_HOME,"$mozilla_home",["The path of the mozilla engine"]) 
    394390else 
    395391  LIBTINYMAILUI_MOZEMBED_CFLAGS= 
    396392  LIBTINYMAILUI_MOZEMBED_LIBS= 
    397 fi 
     393  MOZILLA_HOME= 
     394fi 
     395AC_SUBST([MOZILLA_HOME]) 
    398396 
    399397dnl ### libtinymail-gnome-desktop, a GNOME platform library implementation ## 
  • trunk/debian/control.maemo1

    r2801 r2829  
    33Priority: optional 
    44Maintainer: Oystein Gisnas <oystein@gisnas.net> 
    5 Build-Depends: debhelper (>=4), cdbs, dpkg-dev (>= 1.13.18), libglib2.0-dev (>= 2.6), libgtk2.0-dev, libosso-gnomevfs2-dev, libgconf2-dev, libosso-dev, libconic0-dev, gnome-common, gtk-doc-tools, microb-engine-dev  
     5Build-Depends: debhelper (>=4), cdbs, dpkg-dev (>= 1.13.18), libglib2.0-dev (>= 2.6), libgtk2.0-dev, libosso-gnomevfs2-dev, libgconf2-dev, libosso-dev, libconic0-dev, gnome-common, gtk-doc-tools, microb-engine-dev, libgtkmozembed-dev  
    66Standards-Version: 3.7.2 
    77 
     
    224224 This package contains the debug symbol files for libtinymail-gnomevfs. 
    225225 
     226Package: libtinymailui-mozembed-1.0-0 
     227Architecture: any 
     228Depends: ${shlibs:Depends} 
     229Description: memory-effective framework for accessing e-mail - Camel library 
     230 Tinymail is a development framework for accessing E-mail services using 
     231 devices with few memory resources. 
     232 . 
     233 It supports local mail storage (Maildir,mh,spool & mbox), IMAP, Exchange 
     234 and NNTP. It can be used to send messages over SMTP and by using sendmail. 
     235 . 
     236 This package contains the library for rendering HTML. 
     237 
     238Package: libtinymailui-mozembed-1.0-0-dev 
     239Architecture: any 
     240Depends: libtinymailui-mozembed-1.0-0 (= ${binary:Version}) 
     241Description: memory-effective framework for accessing e-mail - development files 
     242 Tinymail is a development framework for accessing E-mail services using 
     243 devices with few memory resources. 
     244 . 
     245 It supports local mail storage (Maildir,mh,spool & mbox), IMAP, Exchange 
     246 and NNTP. It can be used to send messages over SMTP and by using sendmail. 
     247 . 
     248 This package contains the development files for libtinymailui-mozembed. 
  • trunk/debian/rules.maemo

    r2801 r2829  
    3232        dh_testdir 
    3333        # Add here commands to configure the package. 
    34         CFLAGS="$(CFLAGS) -fPIC" ./configure --with-platform=maemo --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --with-ssl=nss --sysconfdir=/etc --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
     34        CFLAGS="$(CFLAGS) -fPIC" ./configure --with-platform=maemo --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --with-ssl=nss --sysconfdir=/etc --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-html-component=mozembed 
    3535 
    3636 
     
    9595#       dh_installman 
    9696        dh_link 
    97         dh_strip --keep-debug --dbg-package=libtinymail-1.0-0 --dbg-package=libtinymail-camel-1.0-0 --dbg-package=libtinymailui-1.0-0 --dbg-package=libtinymailui-gtk-1.0-0 --dbg-package=libtinymail-maemo-1.0-0 --dbg-package=libtinymail-gnomevfs-1.0-0 
     97        dh_strip --keep-debug --dbg-package=libtinymail-1.0-0 --dbg-package=libtinymail-camel-1.0-0 --dbg-package=libtinymailui-1.0-0 --dbg-package=libtinymailui-gtk-1.0-0 --dbg-package=libtinymail-maemo-1.0-0 --dbg-package=libtinymail-gnomevfs-1.0-0 --dbg-package=libtinymail-mozembed-1.0-0 
    9898        dh_compress 
    9999        dh_fixperms 
  • trunk/libtinymailui-mozembed/Makefile.am

    r1171 r2829  
    2121        tny-moz-embed-html-mime-part-view.c \ 
    2222        tny-moz-embed-msg-view.c \ 
    23         tny-moz-embed-stream.c \ 
    24         mozilla-preferences.cpp \ 
    25         mozilla-preferences.h 
     23        tny-moz-embed-stream.c 
    2624 
    2725libtinymailui_mozembed_1_0_la_LIBADD =  \ 
  • trunk/libtinymailui-mozembed/tny-moz-embed-html-mime-part-view.c

    r2825 r2829  
    2121#include <config.h> 
    2222#include <glib/gi18n-lib.h> 
    23  
    24 #include "mozilla-preferences.h" 
    2523 
    2624#include <unistd.h> 
     
    3331#include <string.h> 
    3432#include <gtk/gtk.h> 
     33 
     34#include <gtkmozembed_common.h> 
    3535 
    3636#include <tny-moz-embed-html-mime-part-view.h> 
     
    143143        priv->part = NULL; 
    144144        gtk_moz_embed_set_chrome_mask (GTK_MOZ_EMBED (self),  
    145                         GTK_MOZ_EMBED_FLAG_DEFAULTCHROME|GTK_MOZ_EMBED_FLAG_SCROLLBARSON); 
     145                        GTK_MOZ_EMBED_FLAG_DEFAULTCHROME | GTK_MOZ_EMBED_FLAG_WINDOWRESIZEON); 
    146146 
    147147        g_signal_connect (G_OBJECT (self), "new_window", 
     
    184184{ 
    185185        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; 
    186193 
    187194        parent_class = g_type_class_peek_parent (class); 
     
    192199        g_type_class_add_private (object_class, sizeof (TnyMozEmbedHtmlMimePartViewPriv)); 
    193200 
     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 
    194214        gtk_moz_embed_push_startup (); 
    195215 
    196         _mozilla_preference_set_int ("permissions.default.image", 2); 
    197         _mozilla_preference_set_int ("permissions.default.script", 2); 
    198         _mozilla_preference_set_boolean ("security.checkloaduri", FALSE); 
    199         _mozilla_preference_set ("general.useragent.misc", "Tinymail/" VERSION); 
    200         _mozilla_preference_set ("network.proxy.no_proxies_on", "localhost"); 
    201  
     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"); 
    202227 
    203228        return; 
  • trunk/m4/moz.m4

    r2078 r2829  
    2525 
    2626mozilla_xpcom="no" 
     27mozilla_home="no" 
    2728AC_MSG_CHECKING(Mozilla XPCOM pkg-config module name) 
    2829mozilla_xpcom_pcs="xpcom mozilla-xpcom firefox-xpcom xulrunner-xpcom microb-engine-xpcom" 
     
    3031        if $PKG_CONFIG --exists $pc; then 
    3132                mozilla_xpcom=$pc 
     33                mozilla_home="`$PKG_CONFIG --variable=libdir $pc`" 
    3234                break; 
    3335        fi 
    3436done 
    3537AC_MSG_RESULT($mozilla_xpcom) 
     38AC_MSG_RESULT($mozilla_home) 
    3639 
    3740mozilla_gtkmozembed="no" 
    3841AC_MSG_CHECKING(Mozilla gtkmozembed pkg-config module name) 
    39 mozilla_gtkmozembed_pcs="gtkmozembed mozilla-gtkmozembed firefox-gtkmozembed xulrunner-gtkmozembed microb-engine-gtkmozembed
     42mozilla_gtkmozembed_pcs="gtkmozembed mozilla-gtkmozembed firefox-gtkmozembed xulrunner-gtkmozembed microb-engine-gtkembedmoz gtkembedmoz
    4043for pc in $mozilla_gtkmozembed_pcs; do 
    4144        if $PKG_CONFIG --exists $pc; then 
  • trunk/tests/c-demo/tny-main.c

    r1631 r2829  
    4545#include <libgnomevfs/gnome-vfs.h> 
    4646#include <libgnomevfs/gnome-vfs-utils.h> 
    47 #endif 
    48  
    49 #ifdef MOZEMBED 
    50 #include <nspr.h> 
    51 #include <prthread.h> 
    5247#endif 
    5348 
     
    138133        gdk_threads_leave (); 
    139134 
    140 #ifdef MOZEMBED 
    141         PR_ProcessExit ((PRIntn)(long)0); 
    142 #endif 
    143  
    144135        return 0; 
    145136}