Changeset 2297
- Timestamp:
- 06/28/07 17:58:05
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/libtinymail/tny-account.c (modified) (1 diff)
- trunk/tests/c-demo/tny-demoui-summary-view.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r2296 r2297 2 2 3 3 * Slowing down the STATUS commands 4 * Detecting connection changes 4 * Detecting connection changes with the connection_status_changed 5 signal on TnyAccount 5 6 6 7 * This was a major API change trunk/libtinymail/tny-account.c
r2225 r2297 900 900 NULL, NULL, 901 901 g_cclosure_marshal_VOID__INT, 902 G_TYPE_NONE, 0);902 G_TYPE_NONE, 1, G_TYPE_INT); 903 903 904 904 initialized = TRUE; trunk/tests/c-demo/tny-demoui-summary-view.c
r2267 r2297 243 243 } 244 244 245 static void 246 on_constatus_changed (TnyAccount *a, TnyConnectionStatus status, gpointer user_data) 247 { 248 gchar *str = NULL; 249 250 if (status == TNY_CONNECTION_STATUS_DISCONNECTED) 251 str = "disconnected"; 252 253 if (status == TNY_CONNECTION_STATUS_CONNECTED) 254 str = "connected"; 255 256 if (status == TNY_CONNECTION_STATUS_CONNECTED_BROKEN) 257 { 258 tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (a), FALSE, NULL); 259 str = "con broken"; 260 } 261 262 if (status == TNY_CONNECTION_STATUS_DISCONNECTED_BROKEN) 263 str = "discon broken"; 264 265 g_print ("CON EVENT FOR %s: %s\n", 266 tny_account_get_name (a), str); 267 268 } 269 245 270 static void 246 271 reload_accounts (TnySummaryView *self) … … 250 275 GtkTreeModel *sortable, *maccounts, *mailbox_model; 251 276 TnyFolderStoreQuery *query; 252 277 TnyIterator *aiter = NULL; 253 278 254 279 /* Show only subscribed folders */ … … 285 310 286 311 priv->current_accounts = TNY_LIST (g_object_ref (G_OBJECT (accounts))); 312 313 aiter = tny_list_create_iterator (accounts); 314 while (!tny_iterator_is_done (aiter)) 315 { 316 GObject *a = tny_iterator_get_current (aiter); 317 318 g_signal_connect (a, "connection-status-changed", 319 G_CALLBACK (on_constatus_changed), self); 320 321 g_object_unref (a); 322 tny_iterator_next (aiter); 323 } 324 325 g_object_unref (aiter); 287 326 288 327 tny_account_store_get_accounts (account_store, TNY_LIST (maccounts),
