Changeset 2813

Show
Ignore:
Timestamp:
10/03/07 14:01:47
Author:
jdapena
Message:

* libtinymail/tny-merge-folder.c:
(tny_merge_folder_get_id): fixed id generation. We
were setting this with a fixed value always due to
an error in initialisation. Now we calculate an
id with the merged folder id's and their account
id's.
(tny_merge_folder_get_url_string): created
implementation. Now it gets the merge folder id
as part of the url string with this format:
"merge://ID"

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2811 r2813  
     12007-10-03  Jose Dapena Paz  <jdapena@igalia.com> 
     2 
     3        * libtinymail/tny-merge-folder.c: 
     4        (tny_merge_folder_get_id): fixed id generation. We 
     5        were setting this with a fixed value always due to 
     6        an error in initialisation. Now we calculate an 
     7        id with the merged folder id's and their account 
     8        id's. 
     9        (tny_merge_folder_get_url_string): created  
     10        implementation. Now it gets the merge folder id 
     11        as part of the url string with this format: 
     12        "merge://ID" 
     13 
    1142007-09-28  Philip Van Hoof  <pvanhoof@gnome.org> 
    215 
  • trunk/libtinymail/tny-merge-folder.c

    r2730 r2813  
    651651                { 
    652652                        TnyFolder *cur = TNY_FOLDER (tny_iterator_get_current (iter)); 
     653                        TnyAccount *account = tny_folder_get_account (cur); 
    653654                        if (!first) 
    654655                                g_string_append_c (ids, '&'); 
     656                        if (TNY_IS_ACCOUNT (account)) { 
     657                                g_string_append (ids, tny_account_get_id (account)); 
     658                                g_string_append_c (ids, '+'); 
     659                        } 
    655660                        g_string_append (ids, tny_folder_get_id (cur)); 
    656661                        g_object_unref (cur); 
     
    12721277tny_merge_folder_get_url_string (TnyFolder *self) 
    12731278{ 
    1274         g_warning ("tny_merge_folder_get_url_string not reliable. " 
    1275                    "Please don't use this functionality\n"); 
    1276  
    1277         return "not://implemented"; 
     1279        return g_strdup_printf ("merge://%s", tny_folder_get_id (self)); 
    12781280} 
    12791281 
     
    14681470        TnyMergeFolderPriv *priv = TNY_MERGE_FOLDER_GET_PRIVATE (self); 
    14691471 
    1470         /* The get_id_func() DBC contract does not allow this to be NULL or "": */ 
    1471         priv->id = g_strdup ("unknown_mergefolder"); 
    1472          
     1472        priv->id = NULL; 
    14731473        priv->mothers = tny_simple_list_new (); 
    14741474        priv->lock = g_new0 (GStaticRecMutex, 1);