Changeset 3287

Show
Ignore:
Timestamp:
01/22/08 20:42:36
Author:
pvanhoof
Message:

2008-01-22 Philip Van Hoof <pvanhoof@gnome.org>

        • Added support for GtkHTML in libtinymailui-gtkhtml. This is highly

experimental and unfinished at this moment

        • Fixed several compiler warnings, and cleaned up some code
        • This was a minor API change
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3285 r3287  
     12008-01-22  Philip Van Hoof <pvanhoof@gnome.org> 
     2 
     3        * Added support for GtkHTML in libtinymailui-gtkhtml. This is highly 
     4        experimental and unfinished at this moment 
     5        * Fixed several compiler warnings, and cleaned up some code 
     6 
     7        * This was a minor API change 
     8 
    192008-01-21 Dirk-Jan C. Binnema <dirk-jan.binnema@nokia.com> 
    210         
  • trunk/Makefile.am

    r3189 r3287  
    1919if BUILD_WEBKIT 
    2020SUBDIRS += libtinymailui-webkit 
     21endif 
     22 
     23if BUILD_GTKHTML 
     24SUBDIRS += libtinymailui-gtkhtml 
    2125endif 
    2226 
  • trunk/configure.ac

    r3187 r3287  
    124124AC_ARG_WITH(html-component, 
    125125AC_HELP_STRING([--with-html-component], 
    126   [Set which html component to use (mozembed, gtkhtml, none)]), 
     126  [Set which html component to use (mozembed, gtkhtml, webkit, none)]), 
    127127[case "$with_html_component" in 
    128128  webkit) 
     
    140140        build_webkit=false 
    141141        build_mozembed=false 
    142         build_gtkhtml=fals
     142        build_gtkhtml=tru
    143143        build_demoui=true 
    144144  ;; 
     
    381381fi 
    382382AC_SUBST([MOZILLA_HOME]) 
     383 
     384dnl ### libtinymailui-gtkhtml, a library that wraps the GtkHtml widget ## 
     385if test x$build_gtkhtml = xtrue; then 
     386  extraplatpkgs="libgtkhtml-3.8" 
     387  extratnypkgs="$extratnypkgs $extraplatpkgs" 
     388  PKG_CHECK_MODULES(LIBTINYMAILUI_GTKHTML, $extraplatpkgs glib-2.0 >= 2.8 gobject-2.0 gtk+-2.0 $extragtkpkgs) 
     389else 
     390  LIBTINYMAILUI_GTKHTML_CFLAGS= 
     391  LIBTINYMAILUI_GTKHTML_LIBS= 
     392fi 
    383393 
    384394dnl ### libtinymail-gnome-desktop, a GNOME platform library implementation ## 
     
    507517libtinymailui-webkit/Makefile 
    508518libtinymailui-webkit/libtinymailui-webkit.pc 
     519libtinymailui-gtkhtml/Makefile 
     520libtinymailui-gtkhtml/libtinymailui-gtkhtml.pc 
    509521libtinymailui-mozembed/Makefile 
    510522libtinymailui-mozembed/libtinymailui-mozembed.pc 
  • trunk/libtinymail-camel/bs/bodystruct.c

    r3213 r3287  
    193193                                inptr++; /* My '(' */ 
    194194 
    195                                 if (!first) 
     195                                if (!first) { 
    196196                                        g_string_append (str, ", "); 
     197                                        first = FALSE; 
     198                                } 
    197199 
    198200                                name = decode_qstring (&inptr, inend, err); 
     
    341343 
    342344        if (!val) { 
     345                param = NULL; 
    343346                *in = inptr; 
    344347                g_free (name); 
  • trunk/libtinymail-camel/camel-lite/camel/camel-data-cache.c

    r3282 r3287  
    498498                if (boundary == NULL) 
    499499                { 
    500                            CamelContentType *ct = NULL; 
     500                           /* CamelContentType *ct = NULL; */ 
    501501                           const char *bound=NULL; 
    502502                           char *pstr = (char*)camel_strstrcase ((const char *) buffer, "boundary"); 
     
    516516                           } 
    517517 
    518                            if (ct) 
     518                        /*   if (ct) 
    519519                           { 
    520520                                bound = camel_content_type_param(ct, "boundary"); 
    521521                                if (bound && strlen (bound) > 0) 
    522522                                        boundary = g_strdup (bound); 
    523                            } 
     523                           } */ 
    524524                } else if (strstr ((const char*) buffer, (const char*) boundary)) 
    525525                { 
  • trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.c

    r3235 r3287  
    507507} 
    508508 
     509#if 0 
    509510void 
    510511camel_folder_summary_move_up (CamelFolderSummary *s) 
     
    518519        for (i = s->messages->len; i > 0 ; i--) 
    519520        { 
    520                 if (first) 
     521                if (first) { 
    521522                        g_ptr_array_add (s->messages, s->messages->pdata[i-1]); 
    522                 else 
     523                        first = FALSE; 
     524                } else 
    523525                        s->messages->pdata[i+1] = s->messages->pdata[i]; 
    524526        } 
     
    529531} 
    530532 
     533#endif 
    531534/** 
    532535 * camel_folder_summary_array: 
  • trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.h

    r3258 r3287  
    394394int camel_folder_summary_get_index_for (CamelFolderSummary *s, const char *uid); 
    395395 
     396#if 0 
    396397void camel_folder_summary_move_up (CamelFolderSummary *s); 
    397  
     398#endif 
    398399 
    399400G_END_DECLS 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c

    r3284 r3287  
    45484548                fil = fopen (path, "w"); 
    45494549 
    4550                 if (!fil || fd == -1) { 
     4550                if (!fil) { 
    45514551                        err = TRUE; 
    45524552                        ex_id = CAMEL_EXCEPTION_SYSTEM_IO_WRITE; 
     
    45564556 
    45574557                fd = fileno (fil); 
     4558 
     4559                if (fd == -1) { 
     4560                        err = TRUE; 
     4561                        ex_id = CAMEL_EXCEPTION_SYSTEM_IO_WRITE; 
     4562                        err_message = g_strdup_printf (_("Write to cache failed: %s"), g_strerror (errno)); 
     4563                        goto convert_errorhandler; 
     4564                } 
    45584565 
    45594566                if (store->capabilities & IMAP_CAPABILITY_CONVERT) 
     
    47964803                        fil = fopen (path, "w"); 
    47974804 
    4798                         if (!fil || fd == -1) { 
     4805                        if (!fil) { 
    47994806                                err = TRUE; 
    48004807                                ex_id = CAMEL_EXCEPTION_SYSTEM_IO_WRITE; 
     
    48044811 
    48054812                        fd = fileno (fil); 
     4813 
     4814                        if (fd == -1) { 
     4815                                err = TRUE; 
     4816                                ex_id = CAMEL_EXCEPTION_SYSTEM_IO_WRITE; 
     4817                                err_message = g_strdup_printf (_("Write to cache failed: %s"), g_strerror (errno)); 
     4818                                goto fetch_errorhandler; 
     4819                        } 
     4820 
    48064821 
    48074822                        if (binary && *binary && store->capabilities & IMAP_CAPABILITY_BINARY) 
     
    51415156        char *ptr = in; 
    51425157        gboolean open = FALSE; 
    5143         gint num
     5158        gint num = 99
    51445159 
    51455160        while (*ptr) { 
  • trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c

    r3282 r3287  
    275275        int i, hcnt = 0, lcnt = 0; 
    276276        CamelFolderChangeInfo *changes = NULL; 
    277         GList *deleted = NULL
     277        GList *deleted = NULL, *copy
    278278        gint max; 
    279279 
     
    472472        } 
    473473 
     474        copy = deleted; 
    474475        while (deleted) 
    475476        { 
     
    485486        } 
    486487 
    487         if (deleted
    488                 g_list_free (deleted); 
     488        if (copy
     489                g_list_free (copy); 
    489490 
    490491        if (changes && camel_folder_change_info_changed (changes)) { 
  • trunk/libtinymail-camel/camel-lite/summary/summary.c

    r3238 r3287  
    425425                { 
    426426                        SummaryItem *cur; 
    427                         char *uid = (char *) malloc(len); 
     427                        char *uid = (char *) malloc(len + 1); 
    428428                        gboolean do_add = FALSE; 
    429429 
     
    10231023        g_static_rec_mutex_init (summary->lock); 
    10241024 
    1025         fscanf (f, "%d", &items); 
     1025        if (f) { 
     1026                fscanf (f, "%d", &items); 
     1027                fclose (f); 
     1028        } else  
     1029                items = 0; 
    10261030 
    10271031        g_static_rec_mutex_lock (summary->lock); 
  • trunk/libtinymail-camel/tny-camel-send-queue.c

    r3286 r3287  
    354354                        TnyIterator *hdriter = NULL; 
    355355                        TnyList *headers = tny_simple_list_new (); 
    356                         GList *to_remove = NULL
     356                        GList *to_remove = NULL, *copy
    357357                        TnyIterator *giter = NULL; 
    358358 
     
    407407                        g_object_unref (giter); 
    408408 
     409                        copy = to_remove; 
     410 
    409411                        while (to_remove) { 
    410412                                tny_list_remove (headers, G_OBJECT (to_remove->data)); 
    411413                                to_remove = g_list_next (to_remove); 
    412414                        } 
    413                         if (to_remove) 
    414                                 g_list_free (to_remove); 
     415 
     416                        if (copy) 
     417                                g_list_free (copy); 
    415418 
    416419                        length = tny_list_get_length (headers); 
  • trunk/libtinymail-camel/tny-session-camel.c

    r3280 r3287  
    535535        CamelStore *store = NULL; 
    536536        CamelFolder *folder = NULL; 
    537         int offset = 0; 
     537        /*int offset = 0;*/ 
    538538        char *curi = NULL; 
    539539 
    540540        g_return_val_if_fail (uri != NULL, NULL); 
    541541         
    542         url = camel_url_new (uri + offset, ex); 
     542        url = camel_url_new (uri /*+ offset*/, ex); 
    543543 
    544544        if (G_UNLIKELY (!url)) 
     
    548548        } 
    549549 
    550         store = (CamelStore *)camel_session_get_service(session, uri+offset, CAMEL_PROVIDER_STORE, ex); 
     550        store = (CamelStore *)camel_session_get_service(session, uri /* + offset */, CAMEL_PROVIDER_STORE, ex); 
    551551        if (G_LIKELY (store)) 
    552552        { 
     
    563563                } 
    564564 
    565                 if (offset)  
     565                /*if (offset)  
    566566                { 
    567567                        if (offset == 7) 
     
    571571                        else 
    572572                                g_assert (FALSE); 
    573                 } else 
     573                } else*/ 
    574574                        folder = (CamelFolder*)camel_store_get_folder (store, name, flags, ex); 
    575575                camel_object_unref (store); 
  • trunk/libtinymail-gnome-desktop/Makefile.am

    r1783 r3287  
    1111if BUILD_MOZEMBED 
    1212INCLUDES += -I$(top_srcdir)/libtinymailui-mozembed -DMOZEMBED 
     13endif 
     14 
     15if BUILD_GTKHTML 
     16INCLUDES += -I$(top_srcdir)/libtinymailui-gtkhtml -DGTKHTML 
    1317endif 
    1418 
     
    4953endif 
    5054 
     55if BUILD_GTKHTML 
     56libtinymail_gnome_desktop_1_0_la_LIBADD += $(top_builddir)/libtinymailui-gtkhtml/libtinymailui-gtkhtml-$(API_VERSION).la 
     57endif 
     58 
    5159libtinymailgnomedesktopincludedir = $(includedir)/libtinymail-gnome-desktop-$(API_VERSION) 
    5260libtinymailgnomedesktopinclude_HEADERS = $(libtinymail_gnome_desktop_1_0_headers) 
  • trunk/libtinymail-gnome-desktop/tny-gnome-platform-factory.c

    r2825 r3287  
    2828#ifdef MOZEMBED 
    2929#include <tny-moz-embed-msg-view.h> 
    30 #else 
     30#endif 
     31 
     32#ifdef GTKHTML 
     33#include <tny-gtk-html-msg-view.h> 
     34#endif 
     35 
    3136#include <tny-gtk-msg-view.h> 
    32 #endif 
    3337 
    3438#ifdef GNOME 
     
    8791tny_gnome_platform_factory_new_msg_view (TnyPlatformFactory *self) 
    8892{ 
    89         TnyMsgView *retval
     93        TnyMsgView *retval = NULL
    9094                 
    9195#ifdef MOZEMBED 
    9296        retval = tny_moz_embed_msg_view_new (); 
    93 #else 
    94         retval = tny_gtk_msg_view_new (); 
    95 #endif 
     97#endif 
     98 
     99#ifdef GTKHTML 
     100        retval = tny_gtk_html_msg_view_new (); 
     101#endif 
     102 
     103        if (!retval) 
     104                retval = tny_gtk_msg_view_new (); 
    96105 
    97106        return retval; 
  • trunk/libtinymail/tny-list.c

    r3161 r3287  
    250250                TNY_LIST_GET_IFACE (self)->remove_matches_func (self, matcher, match_data); 
    251251        else { 
    252                 GList *to_remove = NULL
     252                GList *to_remove = NULL, *copy
    253253                TnyIterator *iter = tny_list_create_iterator (self); 
    254254 
     
    264264                g_object_unref (iter); 
    265265 
     266                copy = to_remove; 
    266267                while (to_remove) { 
    267268                        GObject *item = to_remove->data; 
     
    271272                } 
    272273 
    273                 if (to_remove
    274                         g_list_free (to_remove); 
     274                if (copy
     275                        g_list_free (copy); 
    275276        } 
    276277