Changeset 2015

Show
Ignore:
Timestamp:
05/20/07 15:45:36
Author:
pvanhoof
Message:

Warnings

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libtinymail-camel/tny-camel-account.c

    r2007 r2015  
    11791179        GetSupportedAuthInfo *info = thr_user_data; 
    11801180        TnyCamelAccount *self = info->self; 
    1181         TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 
    11821181 
    11831182        /* thread reference */ 
     
    12031202        GetSupportedAuthInfo *info = thr_user_data; 
    12041203        TnyCamelAccount *self = info->self; 
    1205         TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 
    12061204 
    12071205        if (info->callback) { 
     
    13901388         * and also calls the idle main callback: */ 
    13911389        printf ("DEBUG: %s: before calling g_thread_create()\n", __FUNCTION__); 
    1392         GThread *thread = g_thread_create ( 
    1393                tny_camel_account_get_supported_secure_authentication_async_thread, 
     1390 
     1391        g_thread_create (tny_camel_account_get_supported_secure_authentication_async_thread, 
    13941392                info, FALSE, NULL); 
    13951393} 
  • trunk/libtinymail-camel/tny-camel-nntp-folder.c

    r1997 r2015  
    7575 
    7676        return NULL; 
    77 } 
    78  
    79 static void  
    80 tny_camel_nntp_folder_set_name (TnyFolder *self, const gchar *name, GError **err) 
    81 { 
    82         g_set_error (err, TNY_FOLDER_STORE_ERROR,  
    83                         TNY_FOLDER_STORE_ERROR_CREATE_FOLDER, 
    84                         "You can't use the tny_folder_set_name API on " 
    85                         "NNTP folders. This problem indicates a bug " 
    86                         "in the software."); 
    87         return; 
    8877} 
    8978 
  • trunk/libtinymail-camel/tny-session-camel.c

    r2013 r2015  
    159159 
    160160static gboolean 
    161 tny_session_camel_do_an_error (TnySessionCamel *self, TnyAlertType tnytype, GError *err) 
     161tny_session_camel_do_an_error (TnySessionCamel *self, TnyAlertType tnytype, gboolean question, GError *err) 
    162162{ 
    163163        return tny_account_store_alert ( 
    164164                (TnyAccountStore*) self->priv->account_store,  
    165                 tnytype, (const GError *) err); 
     165                tnytype, question, (const GError *) err); 
    166166} 
    167167 
     
    203203                tny_lockable_lock (self->priv->ui_lock); 
    204204 
    205                 retval = tny_session_camel_do_an_error (self, tnytype, err); 
     205                retval = tny_session_camel_do_an_error (self, tnytype, TRUE, err); 
    206206 
    207207                tny_lockable_unlock (self->priv->ui_lock); 
     
    427427                                        tny_lockable_lock (self->priv->ui_lock); 
    428428 
    429                                 tny_session_camel_do_an_error (self, TNY_ALERT_TYPE_ERROR, err); 
     429                                tny_session_camel_do_an_error (self, TNY_ALERT_TYPE_ERROR, FALSE, err); 
    430430 
    431431                                if (info->as_thread) 
  • trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c

    r1945 r2015  
    100100 
    101101static gboolean 
    102 tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     102tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
    103103{ 
    104104        GtkMessageType gtktype; 
  • trunk/libtinymail-gpe/tny-gpe-account-store.c

    r1945 r2015  
    9898 
    9999static gboolean 
    100 tny_gpe_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     100tny_gpe_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
    101101{ 
    102102        GtkMessageType gtktype; 
  • trunk/libtinymail-maemo/tny-maemo-account-store.c

    r1945 r2015  
    9999 
    100100static gboolean 
    101 tny_maemo_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     101tny_maemo_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
    102102{ 
    103103        GtkMessageType gtktype; 
  • trunk/libtinymail-olpc/tny-olpc-account-store.c

    r1945 r2015  
    9696 
    9797static gboolean 
    98 tny_olpc_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     98tny_olpc_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
    9999{ 
    100100        GtkMessageType gtktype; 
  • trunk/libtinymail/tny-account-store.c

    r2014 r2015  
    8181 * @self: a #TnyAccountStore object 
    8282 * @type: the message type (severity) 
     83 * @question: whether or not this is a question 
    8384 * @error: A GError, of domain TNY_ACCOUNT_ERROR or TNY_ACCOUNT_STORE_ERROR,  
    8485 * which should be used to determine what to show to the user. 
     
    9697 * "Accept Certificate" and "Reject Certificate". Likewise, the dialog should be  
    9798 * arranged according the the user interface guidelines of your target platform. 
     99 * 
     100 * Although there is a @question parameter, there is not always certainty about 
     101 * whether or not the warning actually is a question. It's save to say, however 
     102 * that in case @question is FALSE, that the return value of the function's  
     103 * implementation is not considered. In case of TRUE, it usually is. 
    98104 * 
    99105 * Example implementation for GTK+: 
     
    143149 **/ 
    144150gboolean  
    145 tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     151tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
    146152{ 
    147153        gboolean retval; 
     
    154160#endif 
    155161 
    156         retval = TNY_ACCOUNT_STORE_GET_IFACE (self)->alert_func (self, type, error); 
     162        retval = TNY_ACCOUNT_STORE_GET_IFACE (self)->alert_func (self, type, question, error); 
    157163 
    158164#ifdef DBC /* ensure */ 
  • trunk/libtinymail/tny-account-store.h

    r1911 r2015  
    7979        const gchar* (*get_cache_dir_func) (TnyAccountStore *self); 
    8080        TnyDevice* (*get_device_func) (TnyAccountStore *self); 
    81         gboolean (*alert_func) (TnyAccountStore *self, TnyAlertType type, const GError *error); 
     81        gboolean (*alert_func) (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error); 
    8282        TnyAccount* (*find_account_func) (TnyAccountStore *self, const gchar *url_string); 
    8383}; 
     
    9090const gchar*  tny_account_store_get_cache_dir (TnyAccountStore *self); 
    9191TnyDevice* tny_account_store_get_device (TnyAccountStore *self); 
    92 gboolean tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error); 
     92gboolean tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error); 
    9393TnyAccount* tny_account_store_find_account (TnyAccountStore *self, const gchar *url_string); 
    9494 
  • trunk/libtinymailui/tny-mime-part-saver.h

    r1136 r2015  
    4646}; 
    4747 
    48 GType tny_mime_part_saver_get_type(); 
     48GType tny_mime_part_saver_get_type(void); 
    4949 
    5050TnyMimePartSaveStrategy* tny_mime_part_saver_get_save_strategy (TnyMimePartSaver *self); 
  • trunk/libtinymailui/tny-mime-part-view.h

    r998 r2015  
    4545}; 
    4646 
    47 GType tny_mime_part_view_get_type(); 
     47GType tny_mime_part_view_get_type (void); 
    4848 
    4949void tny_mime_part_view_clear (TnyMimePartView *self); 
  • trunk/tests/functional/account-refresh.c

    r1950 r2015  
    162162        TnyStoreAccount *account; 
    163163        TnyIterator *iter; 
    164         gint i; 
    165164 
    166165        g_type_init (); 
  • trunk/tests/functional/folder-lister-async.c

    r1881 r2015  
    3131#include <account-store.h> 
    3232 
    33 static gint recursion_level=0; 
    3433static gchar *cachedir=NULL; 
    3534static gboolean online=FALSE, mainloop=FALSE; 
  • trunk/tests/functional/folder-lister.c

    r1712 r2015  
    8383        TnyAccountStore *account_store; 
    8484        TnyList *accounts; 
    85         TnyFolderStoreQuery *query; 
    8685        TnyStoreAccount *account; 
    8786        TnyIterator *iter; 
  • trunk/tests/functional/folder-transfer.c

    r1730 r2015  
    1616 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
    1717 */ 
     18 
     19#include <string.h> 
    1820 
    1921#include <glib.h> 
     
    100102        TnyAccountStore *account_store; 
    101103        TnyList *accounts; 
    102         TnyFolderStoreQuery *query; 
    103104        TnyStoreAccount *account; 
    104105        TnyIterator *iter; 
  • trunk/tests/functional/msg-sender.c

    r1701 r2015  
    5757time_s_up (gpointer data) 
    5858{ 
    59         gtk_main_quit (); 
     59        exit (0); 
    6060        return FALSE; 
    6161} 
     
    111111} 
    112112 
     113#if 0 
    113114static void 
    114115on_message_sent (TnySendQueue *queue, TnyMsg *msg, guint nth, guint total) 
     
    120121        g_object_unref (G_OBJECT (header)); 
    121122} 
     123#endif 
     124 
    122125 
    123126int  
     
    127130        TnyAccountStore *account_store; 
    128131        TnyList *accounts; 
    129         TnyFolderStoreQuery *query; 
    130132        TnyStoreAccount *account; 
    131133        TnyIterator *iter; 
    132     TnySendQueue *queue; 
     134       TnySendQueue *queue; 
    133135        TnyMsg *msg; 
    134136        TnyPlatformFactory *platfact; 
    135137 
    136138        free (malloc (10)); 
    137      
     139 
    138140        g_type_init (); 
    139141 
    140142        platfact = tny_test_platform_factory_get_instance (); 
    141143 
    142     context = g_option_context_new ("- The tinymail functional tester"); 
    143         g_option_context_add_main_entries (context, options, "tinymail"); 
    144     g_option_context_parse (context, &argc, &argv, NULL); 
     144       context = g_option_context_new ("- The tinymail functional tester"); 
     145               g_option_context_add_main_entries (context, options, "tinymail"); 
     146       g_option_context_parse (context, &argc, &argv, NULL); 
    145147 
    146148        account_store = tny_test_account_store_new (online, cachedir); 
     
    150152 
    151153        g_option_context_free (context); 
    152      
     154 
    153155        accounts = tny_simple_list_new (); 
    154156 
    155157        tny_account_store_get_accounts (account_store, accounts,  
    156               TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS); 
     158               TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS); 
    157159        /*g_object_unref (G_OBJECT (account_store));*/ 
    158      
     160 
    159161        iter = tny_list_create_iterator (accounts); 
    160162        account = (TnyStoreAccount*) tny_iterator_get_current (iter); 
     
    165167        tny_send_queue_add (queue, msg, NULL); 
    166168 
    167     if (mainloop) 
     169       if (mainloop) 
    168170        { 
    169171                g_print ("Using the Gtk+ mainloop (will wait 4 seconds in the loop)\n"); 
    170              
    171                 g_timeout_add (1, dance, account);           
    172                 g_timeout_add (1000 * 4, time_s_up, NULL); 
    173              
     172                g_timeout_add (1, dance, account);           
     173                g_timeout_add (1000 * 4, time_s_up, NULL); 
    174174                gtk_main (); 
    175              
    176175        } else { 
    177176                g_print ("Not using a mainloop (will sleep 4 seconds)\n"); 
    178              
    179177                dance (account); 
    180178                sleep (4); 
    181179        } 
    182      
     180 
    183181        g_object_unref (G_OBJECT (account)); 
    184182        g_object_unref (G_OBJECT (iter)); 
    185183        g_object_unref (G_OBJECT (accounts)); 
    186       g_object_unref (G_OBJECT (platfact)); 
     184      g_object_unref (G_OBJECT (platfact)); 
    187185 
    188186        return 0; 
  • trunk/tests/functional/msg-transfer.c

    r1437 r2015  
    1818 
    1919#include <glib.h> 
     20 
     21#include <string.h> 
    2022 
    2123#include <tny-list.h> 
     
    5355        { 
    5456                TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_get_current (iter); 
    55                 gint i=0; 
    5657                const gchar *folder_name = NULL; 
    5758 
     
    9495        GOptionContext *context; 
    9596        TnyAccountStore *account_store; 
    96         TnyList *accounts, *src_headers, *dst_headers
     97        TnyList *accounts, *src_headers
    9798        TnyFolderStoreQuery *query; 
    9899        TnyStoreAccount *account; 
     
    157158        tny_folder_get_headers (folder_src, src_headers, TRUE, NULL); 
    158159                 
    159         g_printf ("%s %d messages from %s to %s\n", 
     160        g_print ("%s %d messages from %s to %s\n", 
    160161                  move ? "Moving" : "Copying", 
    161162                  src_num_headers, 
     
    168169        /* Check that all the messages have been transferred */ 
    169170        tny_folder_refresh (folder_dst, NULL); 
    170         g_printf ("Transferred %d of %d messages\n", 
     171        g_print ("Transferred %d of %d messages\n", 
    171172                  tny_folder_get_all_count (folder_dst) - dst_num_headers, 
    172173                  src_num_headers); 
  • trunk/tests/memory/memory-test.c

    r1712 r2015  
    3535 
    3636typedef void (*performer_t) (TnyFolder *folder); 
    37 static gint recursion_level=0; 
    3837static gchar *cachedir=NULL; 
    3938static gboolean online=FALSE, justget=FALSE; 
     
    10099        TnyAccountStore *account_store; 
    101100        TnyList *accounts; 
    102         TnyFolderStoreQuery *query; 
    103101        TnyStoreAccount *account; 
    104102        TnyIterator *iter, *topiter; 
  • trunk/tests/shared/account-store.c

    r1911 r2015  
    6666 
    6767static gboolean 
    68 tny_test_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     68tny_test_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
    6969{ 
    7070        return TRUE;