Changeset 2131

Show
Ignore:
Timestamp:
06/12/07 13:12:58
Author:
murrayc
Message:

2007-06-12 Murray Cumming <murrayc@murrayc.com>

        • libtinymail/tny-enums.h: Resynced the fake TnyFolderType? enum values

from tnyfolder.h and added comments explaining why we have these fake
uninstalled enums for gtk-doc, with a link to the gtk-doc bug.

        • libtinymail/tny-folder.c:
        • libtinymailui-gtk/tny-gtk-folder-store-tree-model.c: (updater),

(deleter), (find_store_iter): Use TnyFolderType? instead of gint when
using this column, and initialize it, rather than depending on
gtk_tree_model_get() to initialize it. The compiler can't detect these
possible unitialized uses.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2129 r2131  
     12007-06-12  Murray Cumming  <murrayc@murrayc.com> 
     2 
     3        * libtinymail/tny-enums.h: Resynced the fake TnyFolderType enum values  
     4        from tnyfolder.h and added comments explaining why we have these fake  
     5        uninstalled enums for gtk-doc, with a link to the gtk-doc bug. 
     6         
     7        * libtinymail/tny-folder.c: 
     8        * libtinymailui-gtk/tny-gtk-folder-store-tree-model.c: (updater), 
     9        (deleter), (find_store_iter): Use TnyFolderType instead of gint when  
     10        using this column, and initialize it, rather than depending on  
     11        gtk_tree_model_get() to initialize it. The compiler can't detect these  
     12        possible unitialized uses. 
     13 
    1142007-06-12  Philip Van Hoof  <pvanhoof@gnome.org> 
    215 
  • trunk/libtinymail/tny-enums.h

    r1965 r2131  
    11#ifdef TNY_ENUMS_H 
    22 
    3 /* These are fakes for gtk-doc */ 
     3/* These are fakes for gtk-doc. 
     4 * This file is not installed and should not be included. 
     5 *  
     6 * These are duplicates of the same enums from tny-folder.h, 
     7 * because gtk-doc does not like the (e.g. "enum _TnyFolderType")  
     8 * way that enum are defined in the main headers 
     9 * (http://bugzilla.gnome.org/show_bug.cgi?id=446648)  
     10 * and Philip prefers to duplicate it and try to keep it in sync 
     11 * rather than adapt to what gtk-doc demands, or it cannot be adapted. 
     12 */ 
    413 
    514G_BEGIN_DECLS 
     
    140149        TNY_FOLDER_TYPE_JUNK, 
    141150        TNY_FOLDER_TYPE_SENT, 
    142         TNY_FOLDER_TYPE_ROOT 
     151        TNY_FOLDER_TYPE_ROOT, 
     152        TNY_FOLDER_TYPE_NOTES, 
     153        TNY_FOLDER_TYPE_DRAFTS, 
     154        TNY_FOLDER_TYPE_CONTACTS, 
     155        TNY_FOLDER_TYPE_CALENDAR, 
     156        TNY_FOLDER_TYPE_ARCHIVE, 
     157        TNY_FOLDER_TYPE_MERGE, 
     158 
     159        TNY_FOLDER_TYPE_NUM 
    143160} TnyFolderType; 
    144161 
  • trunk/libtinymail/tny-folder.c

    r2070 r2131  
    12011201 *  
    12021202 * Get the type of @self (Inbox, Outbox etc.)  
     1203 * Most implementations decide the type by comparing the name of the folder  
     1204 * with some hardcoded values. 
     1205 * Some implementations (such as camel) might not provide precise information  
     1206 * before a connection has been made. For instance, the return value might  
     1207 * be TNY_FOLDER_TYPE_NORMAL rather than TNY_FOLDER_TYPE_SENT. 
    12031208 *  
    12041209 * Return value: The folder type as a #TnyFolderType enum 
  • trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c

    r2122 r2131  
    589589updater (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer user_data1) 
    590590{ 
    591         gint type
     591        TnyFolderType type = TNY_FOLDER_TYPE_UNKNOWN
    592592        TnyFolderChange *change = user_data1; 
    593593        TnyFolder *changed_folder = tny_folder_change_get_folder (change); 
     
    646646{ 
    647647        gboolean retval = FALSE; 
    648         gint type
     648        TnyFolderType type = TNY_FOLDER_TYPE_UNKNOWN
    649649        GObject *folder = user_data1; 
    650650 
     
    679679        { 
    680680                GtkTreeIter child; 
    681                 gint type
     681                TnyFolderType type = TNY_FOLDER_TYPE_UNKNOWN
    682682                TnyFolderStore *fol; 
    683683                gboolean found = FALSE;