Changeset 2015
- Timestamp:
- 05/20/07 15:45:36
- Files:
-
- trunk/libtinymail-camel/tny-camel-account.c (modified) (3 diffs)
- trunk/libtinymail-camel/tny-camel-nntp-folder.c (modified) (1 diff)
- trunk/libtinymail-camel/tny-session-camel.c (modified) (3 diffs)
- trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c (modified) (1 diff)
- trunk/libtinymail-gpe/tny-gpe-account-store.c (modified) (1 diff)
- trunk/libtinymail-maemo/tny-maemo-account-store.c (modified) (1 diff)
- trunk/libtinymail-olpc/tny-olpc-account-store.c (modified) (1 diff)
- trunk/libtinymail/tny-account-store.c (modified) (4 diffs)
- trunk/libtinymail/tny-account-store.h (modified) (2 diffs)
- trunk/libtinymailui/tny-mime-part-saver.h (modified) (1 diff)
- trunk/libtinymailui/tny-mime-part-view.h (modified) (1 diff)
- trunk/tests/functional/account-refresh.c (modified) (1 diff)
- trunk/tests/functional/folder-lister-async.c (modified) (1 diff)
- trunk/tests/functional/folder-lister.c (modified) (1 diff)
- trunk/tests/functional/folder-transfer.c (modified) (2 diffs)
- trunk/tests/functional/msg-sender.c (modified) (6 diffs)
- trunk/tests/functional/msg-transfer.c (modified) (5 diffs)
- trunk/tests/memory/memory-test.c (modified) (2 diffs)
- trunk/tests/shared/account-store.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libtinymail-camel/tny-camel-account.c
r2007 r2015 1179 1179 GetSupportedAuthInfo *info = thr_user_data; 1180 1180 TnyCamelAccount *self = info->self; 1181 TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self);1182 1181 1183 1182 /* thread reference */ … … 1203 1202 GetSupportedAuthInfo *info = thr_user_data; 1204 1203 TnyCamelAccount *self = info->self; 1205 TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self);1206 1204 1207 1205 if (info->callback) { … … 1390 1388 * and also calls the idle main callback: */ 1391 1389 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, 1394 1392 info, FALSE, NULL); 1395 1393 } trunk/libtinymail-camel/tny-camel-nntp-folder.c
r1997 r2015 75 75 76 76 return NULL; 77 }78 79 static void80 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;88 77 } 89 78 trunk/libtinymail-camel/tny-session-camel.c
r2013 r2015 159 159 160 160 static gboolean 161 tny_session_camel_do_an_error (TnySessionCamel *self, TnyAlertType tnytype, GError *err)161 tny_session_camel_do_an_error (TnySessionCamel *self, TnyAlertType tnytype, gboolean question, GError *err) 162 162 { 163 163 return tny_account_store_alert ( 164 164 (TnyAccountStore*) self->priv->account_store, 165 tnytype, (const GError *) err);165 tnytype, question, (const GError *) err); 166 166 } 167 167 … … 203 203 tny_lockable_lock (self->priv->ui_lock); 204 204 205 retval = tny_session_camel_do_an_error (self, tnytype, err);205 retval = tny_session_camel_do_an_error (self, tnytype, TRUE, err); 206 206 207 207 tny_lockable_unlock (self->priv->ui_lock); … … 427 427 tny_lockable_lock (self->priv->ui_lock); 428 428 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); 430 430 431 431 if (info->as_thread) trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c
r1945 r2015 100 100 101 101 static gboolean 102 tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error)102 tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 103 103 { 104 104 GtkMessageType gtktype; trunk/libtinymail-gpe/tny-gpe-account-store.c
r1945 r2015 98 98 99 99 static gboolean 100 tny_gpe_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error)100 tny_gpe_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 101 101 { 102 102 GtkMessageType gtktype; trunk/libtinymail-maemo/tny-maemo-account-store.c
r1945 r2015 99 99 100 100 static gboolean 101 tny_maemo_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error)101 tny_maemo_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 102 102 { 103 103 GtkMessageType gtktype; trunk/libtinymail-olpc/tny-olpc-account-store.c
r1945 r2015 96 96 97 97 static gboolean 98 tny_olpc_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error)98 tny_olpc_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 99 99 { 100 100 GtkMessageType gtktype; trunk/libtinymail/tny-account-store.c
r2014 r2015 81 81 * @self: a #TnyAccountStore object 82 82 * @type: the message type (severity) 83 * @question: whether or not this is a question 83 84 * @error: A GError, of domain TNY_ACCOUNT_ERROR or TNY_ACCOUNT_STORE_ERROR, 84 85 * which should be used to determine what to show to the user. … … 96 97 * "Accept Certificate" and "Reject Certificate". Likewise, the dialog should be 97 98 * 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. 98 104 * 99 105 * Example implementation for GTK+: … … 143 149 **/ 144 150 gboolean 145 tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error)151 tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 146 152 { 147 153 gboolean retval; … … 154 160 #endif 155 161 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); 157 163 158 164 #ifdef DBC /* ensure */ trunk/libtinymail/tny-account-store.h
r1911 r2015 79 79 const gchar* (*get_cache_dir_func) (TnyAccountStore *self); 80 80 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); 82 82 TnyAccount* (*find_account_func) (TnyAccountStore *self, const gchar *url_string); 83 83 }; … … 90 90 const gchar* tny_account_store_get_cache_dir (TnyAccountStore *self); 91 91 TnyDevice* tny_account_store_get_device (TnyAccountStore *self); 92 gboolean tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error);92 gboolean tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error); 93 93 TnyAccount* tny_account_store_find_account (TnyAccountStore *self, const gchar *url_string); 94 94 trunk/libtinymailui/tny-mime-part-saver.h
r1136 r2015 46 46 }; 47 47 48 GType tny_mime_part_saver_get_type( );48 GType tny_mime_part_saver_get_type(void); 49 49 50 50 TnyMimePartSaveStrategy* tny_mime_part_saver_get_save_strategy (TnyMimePartSaver *self); trunk/libtinymailui/tny-mime-part-view.h
r998 r2015 45 45 }; 46 46 47 GType tny_mime_part_view_get_type ();47 GType tny_mime_part_view_get_type (void); 48 48 49 49 void tny_mime_part_view_clear (TnyMimePartView *self); trunk/tests/functional/account-refresh.c
r1950 r2015 162 162 TnyStoreAccount *account; 163 163 TnyIterator *iter; 164 gint i;165 164 166 165 g_type_init (); trunk/tests/functional/folder-lister-async.c
r1881 r2015 31 31 #include <account-store.h> 32 32 33 static gint recursion_level=0;34 33 static gchar *cachedir=NULL; 35 34 static gboolean online=FALSE, mainloop=FALSE; trunk/tests/functional/folder-lister.c
r1712 r2015 83 83 TnyAccountStore *account_store; 84 84 TnyList *accounts; 85 TnyFolderStoreQuery *query;86 85 TnyStoreAccount *account; 87 86 TnyIterator *iter; trunk/tests/functional/folder-transfer.c
r1730 r2015 16 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 */ 18 19 #include <string.h> 18 20 19 21 #include <glib.h> … … 100 102 TnyAccountStore *account_store; 101 103 TnyList *accounts; 102 TnyFolderStoreQuery *query;103 104 TnyStoreAccount *account; 104 105 TnyIterator *iter; trunk/tests/functional/msg-sender.c
r1701 r2015 57 57 time_s_up (gpointer data) 58 58 { 59 gtk_main_quit ();59 exit (0); 60 60 return FALSE; 61 61 } … … 111 111 } 112 112 113 #if 0 113 114 static void 114 115 on_message_sent (TnySendQueue *queue, TnyMsg *msg, guint nth, guint total) … … 120 121 g_object_unref (G_OBJECT (header)); 121 122 } 123 #endif 124 122 125 123 126 int … … 127 130 TnyAccountStore *account_store; 128 131 TnyList *accounts; 129 TnyFolderStoreQuery *query;130 132 TnyStoreAccount *account; 131 133 TnyIterator *iter; 132 TnySendQueue *queue;134 TnySendQueue *queue; 133 135 TnyMsg *msg; 134 136 TnyPlatformFactory *platfact; 135 137 136 138 free (malloc (10)); 137 139 138 140 g_type_init (); 139 141 140 142 platfact = tny_test_platform_factory_get_instance (); 141 143 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); 145 147 146 148 account_store = tny_test_account_store_new (online, cachedir); … … 150 152 151 153 g_option_context_free (context); 152 154 153 155 accounts = tny_simple_list_new (); 154 156 155 157 tny_account_store_get_accounts (account_store, accounts, 156 TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS);158 TNY_ACCOUNT_STORE_TRANSPORT_ACCOUNTS); 157 159 /*g_object_unref (G_OBJECT (account_store));*/ 158 160 159 161 iter = tny_list_create_iterator (accounts); 160 162 account = (TnyStoreAccount*) tny_iterator_get_current (iter); … … 165 167 tny_send_queue_add (queue, msg, NULL); 166 168 167 if (mainloop)169 if (mainloop) 168 170 { 169 171 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); 174 174 gtk_main (); 175 176 175 } else { 177 176 g_print ("Not using a mainloop (will sleep 4 seconds)\n"); 178 179 177 dance (account); 180 178 sleep (4); 181 179 } 182 180 183 181 g_object_unref (G_OBJECT (account)); 184 182 g_object_unref (G_OBJECT (iter)); 185 183 g_object_unref (G_OBJECT (accounts)); 186 g_object_unref (G_OBJECT (platfact));184 g_object_unref (G_OBJECT (platfact)); 187 185 188 186 return 0; trunk/tests/functional/msg-transfer.c
r1437 r2015 18 18 19 19 #include <glib.h> 20 21 #include <string.h> 20 22 21 23 #include <tny-list.h> … … 53 55 { 54 56 TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_get_current (iter); 55 gint i=0;56 57 const gchar *folder_name = NULL; 57 58 … … 94 95 GOptionContext *context; 95 96 TnyAccountStore *account_store; 96 TnyList *accounts, *src_headers , *dst_headers;97 TnyList *accounts, *src_headers; 97 98 TnyFolderStoreQuery *query; 98 99 TnyStoreAccount *account; … … 157 158 tny_folder_get_headers (folder_src, src_headers, TRUE, NULL); 158 159 159 g_print f("%s %d messages from %s to %s\n",160 g_print ("%s %d messages from %s to %s\n", 160 161 move ? "Moving" : "Copying", 161 162 src_num_headers, … … 168 169 /* Check that all the messages have been transferred */ 169 170 tny_folder_refresh (folder_dst, NULL); 170 g_print f("Transferred %d of %d messages\n",171 g_print ("Transferred %d of %d messages\n", 171 172 tny_folder_get_all_count (folder_dst) - dst_num_headers, 172 173 src_num_headers); trunk/tests/memory/memory-test.c
r1712 r2015 35 35 36 36 typedef void (*performer_t) (TnyFolder *folder); 37 static gint recursion_level=0;38 37 static gchar *cachedir=NULL; 39 38 static gboolean online=FALSE, justget=FALSE; … … 100 99 TnyAccountStore *account_store; 101 100 TnyList *accounts; 102 TnyFolderStoreQuery *query;103 101 TnyStoreAccount *account; 104 102 TnyIterator *iter, *topiter; trunk/tests/shared/account-store.c
r1911 r2015 66 66 67 67 static gboolean 68 tny_test_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error)68 tny_test_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 69 69 { 70 70 return TRUE;
