Changeset 3415

Show
Ignore:
Timestamp:
02/16/08 16:54:20
Author:
pvanhoof
Message:

2008-02-16 Philip Van Hoof <pvanhoof@gnome.org>

        • NAMESPACE vs. LIST separator for mail.h-farm.it
        • Get-Message cancels
        • Various smaller bugfixes
  • Added a cancel button to the demoui
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3412 r3415  
    22 
    33        * NAMESPACE vs. LIST separator for mail.h-farm.it 
     4        * Get-Message cancels 
     5        * Various smaller bugfixes 
    46 
    572008-02-15  Philip Van Hoof <pvanhoof@gnome.org> 
  • trunk/docs/devel/reference/tmpl/tny-account-store.sgml

    r3409 r3415  
    4949 
    5050</para> 
     51 
     52@: 
    5153 
    5254@tnyaccountstore: the object which received the signal. 
  • trunk/docs/devel/reference/tmpl/tny-account.sgml

    r3409 r3415  
    2828 
    2929</para> 
    30  
    31 @: 
    3230 
    3331@tnyaccount: the object which received the signal. 
  • trunk/docs/devel/reference/tmpl/tny-device.sgml

    r3409 r3415  
    3636 
    3737</para> 
     38 
     39@:  
     40@: 
    3841 
    3942@tnydevice: the object which received the signal. 
  • trunk/docs/devel/reference/tmpl/tny-send-queue.sgml

    r3409 r3415  
    4040</para> 
    4141 
    42 @:  
    43 @:  
    44 @:  
    45 @: 
    46  
    4742@tnysendqueue: the object which received the signal. 
    4843@arg1:  
     
    5449 
    5550</para> 
    56  
    57 @:  
    58 @:  
    59 @:  
    60 @:  
    61 @: 
    6251 
    6352@tnysendqueue: the object which received the signal. 
     
    7261</para> 
    7362 
    74 @:  
    75 @:  
    76 @:  
    77 @:  
    78 @: 
    79  
    8063@tnysendqueue: the object which received the signal. 
    8164@arg1:  
     
    8972</para> 
    9073 
     74@: 
     75 
    9176@tnysendqueue: the object which received the signal. 
    9277 
     
    9580 
    9681</para> 
     82 
     83@: 
    9784 
    9885@tnysendqueue: the object which received the signal. 
  • trunk/docs/devel/reference/tmpl/tny-shared.sgml

    r3409 r3415  
    5454</para> 
    5555 
    56 @:  
     56@tnyaccountstore: the object which received the signal. 
    5757 
    5858<!-- ##### STRUCT TnyAccountStoreIface ##### --> 
     
    262262</para> 
    263263 
    264 @tnyaccount: the object which received the signal. 
     264@:  
    265265 
    266266<!-- ##### SIGNAL TnyAccount::connection-status-changed ##### --> 
     
    321321</para> 
    322322 
    323 @:  
    324 @:  
     323@tnydevice: the object which received the signal. 
     324@arg1:  
    325325 
    326326<!-- ##### STRUCT TnyDeviceIface ##### --> 
     
    493493</para> 
    494494 
     495@:  
     496@:  
     497@:  
     498@:  
     499 
     500<!-- ##### SIGNAL TnySendQueue::msg-sending ##### --> 
     501<para> 
     502 
     503</para> 
     504 
     505@:  
     506@:  
     507@:  
     508@:  
     509@:  
     510 
     511<!-- ##### SIGNAL TnySendQueue::msg-sent ##### --> 
     512<para> 
     513 
     514</para> 
     515 
     516@:  
     517@:  
     518@:  
     519@:  
     520@:  
     521 
     522<!-- ##### SIGNAL TnySendQueue::queue-start ##### --> 
     523<para> 
     524 
     525</para> 
     526 
    495527@tnysendqueue: the object which received the signal. 
    496 @arg1:  
    497 @arg2:  
    498 @arg3:  
    499  
    500 <!-- ##### SIGNAL TnySendQueue::msg-sending ##### --> 
     528 
     529<!-- ##### SIGNAL TnySendQueue::queue-stop ##### --> 
    501530<para> 
    502531 
     
    504533 
    505534@tnysendqueue: the object which received the signal. 
    506 @arg1:  
    507 @arg2:  
    508 @arg3:  
    509 @arg4:  
    510  
    511 <!-- ##### SIGNAL TnySendQueue::msg-sent ##### --> 
    512 <para> 
    513  
    514 </para> 
    515  
    516 @tnysendqueue: the object which received the signal. 
    517 @arg1:  
    518 @arg2:  
    519 @arg3:  
    520 @arg4:  
    521  
    522 <!-- ##### SIGNAL TnySendQueue::queue-start ##### --> 
    523 <para> 
    524  
    525 </para> 
    526  
    527 @:  
    528  
    529 <!-- ##### SIGNAL TnySendQueue::queue-stop ##### --> 
    530 <para> 
    531  
    532 </para> 
    533  
    534 @:  
    535535 
    536536<!-- ##### STRUCT TnySendQueueIface ##### --> 
  • trunk/libtinymail-camel/tny-camel-account-priv.h

    r3125 r3415  
    6363        gboolean pass_func_set, forget_pass_func_set; 
    6464        CamelProviderType type; 
    65         CamelOperation *cancel
     65        CamelOperation *cancel, *getmsg_cancel
    6666        GStaticRecMutex *cancel_lock; 
    6767        gboolean inuse_spin, in_auth; 
  • trunk/libtinymail-camel/tny-camel-account.c

    r3389 r3415  
    12151215        if (priv->cancel) 
    12161216                camel_operation_cancel (priv->cancel); 
     1217        if (priv->getmsg_cancel) 
     1218                camel_operation_cancel (priv->getmsg_cancel); 
    12171219        g_static_rec_mutex_unlock (priv->cancel_lock); 
    12181220 
     
    12401242        { 
    12411243                TnyCamelStoreAccountPriv *priv = TNY_CAMEL_STORE_ACCOUNT_GET_PRIVATE (self); 
     1244                TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 
    12421245 
    12431246                _tny_camel_queue_cancel_remove_items (priv->queue,  
    12441247                        TNY_CAMEL_QUEUE_GET_HEADERS_ITEM|TNY_CAMEL_QUEUE_SYNC_ITEM| 
    12451248                        TNY_CAMEL_QUEUE_REFRESH_ITEM|TNY_CAMEL_QUEUE_CANCELLABLE_ITEM); 
     1249 
     1250                g_static_rec_mutex_lock (apriv->cancel_lock); 
     1251                if (apriv->getmsg_cancel) 
     1252                        camel_operation_cancel (apriv->getmsg_cancel); 
     1253                g_static_rec_mutex_unlock (apriv->cancel_lock); 
    12461254 
    12471255        } else { 
  • trunk/libtinymail-camel/tny-camel-bs-mime-part.c

    r3388 r3415  
    552552 
    553553        cancel = camel_operation_new (decode_async_status, info); 
     554 
     555        if (priv->folder && TNY_IS_CAMEL_FOLDER (priv->folder)) { 
     556                TnyCamelFolderPriv *fpriv = TNY_CAMEL_FOLDER_GET_PRIVATE (priv->folder); 
     557                if (fpriv->account && TNY_IS_CAMEL_ACCOUNT (fpriv->account)) { 
     558                        TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (fpriv->account); 
     559                        apriv->getmsg_cancel = cancel; 
     560                } 
     561        } 
     562 
    554563        camel_operation_ref (cancel); 
    555564        camel_operation_register (cancel); 
     
    573582        if (cancel) 
    574583                camel_operation_unref (cancel); 
     584 
     585 
     586        if (priv->folder && TNY_IS_CAMEL_FOLDER (priv->folder)) { 
     587                TnyCamelFolderPriv *fpriv = TNY_CAMEL_FOLDER_GET_PRIVATE (priv->folder); 
     588                if (fpriv->account && TNY_IS_CAMEL_ACCOUNT (fpriv->account)) { 
     589                        TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (fpriv->account); 
     590                        apriv->getmsg_cancel = NULL; 
     591                } 
     592        } 
    575593 
    576594        /* To disable parallel getting of messages while summary is being retreived, 
  • trunk/libtinymail-camel/tny-camel-folder.c

    r3373 r3415  
    22742274        cancel = camel_operation_new (tny_camel_folder_get_msg_async_status, info); 
    22752275 
     2276        if (priv->account && TNY_IS_CAMEL_ACCOUNT (priv->account)) { 
     2277                TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (priv->account); 
     2278                apriv->getmsg_cancel = cancel; 
     2279        } 
     2280 
    22762281        /* To disable parallel getting of messages while summary is being retreived, 
    22772282         * restore this lock (A) */ 
     
    22952300        if (cancel) 
    22962301                camel_operation_unref (cancel); 
     2302 
     2303        if (priv->account && TNY_IS_CAMEL_ACCOUNT (priv->account)) { 
     2304                TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (priv->account); 
     2305                apriv->getmsg_cancel = NULL; 
     2306        } 
    22972307 
    22982308        /* To disable parallel getting of messages while summary is being retreived, 
  • trunk/tests/c-demo/tny-demoui-summary-view.c

    r3304 r3415  
    13901390 
    13911391 
     1392 
     1393static void 
     1394cancel_button_clicked (GtkWidget *button, gpointer user_data) 
     1395{ 
     1396        TnyDemouiSummaryView *self = user_data; 
     1397        TnyDemouiSummaryViewPriv *priv = TNY_DEMOUI_SUMMARY_VIEW_GET_PRIVATE (self); 
     1398        GtkTreeIter iter; 
     1399        GtkTreeModel *model; 
     1400 
     1401        if (gtk_tree_selection_get_selected (priv->mailbox_select, &model, &iter)) 
     1402        { 
     1403                gint type; 
     1404                TnyAccount *account = NULL; 
     1405 
     1406                gtk_tree_model_get (model, &iter,  
     1407                        TNY_GTK_FOLDER_STORE_TREE_MODEL_TYPE_COLUMN,  
     1408                        &type, -1); 
     1409 
     1410                if (type != TNY_FOLDER_TYPE_ROOT)  
     1411                {  
     1412                        TnyFolder *folder; 
     1413 
     1414                        gtk_tree_model_get (model, &iter,  
     1415                                TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN,  
     1416                                &folder, -1); 
     1417 
     1418                        if (TNY_IS_FOLDER (folder)) 
     1419                                account = tny_folder_get_account (folder); 
     1420 
     1421                        g_object_unref (folder); 
     1422 
     1423                } else { 
     1424                        gtk_tree_model_get (model, &iter,  
     1425                                TNY_GTK_FOLDER_STORE_TREE_MODEL_INSTANCE_COLUMN,  
     1426                                &account, -1); 
     1427                } 
     1428 
     1429                if (account) { 
     1430                        tny_account_cancel (account); 
     1431                        g_object_unref (account); 
     1432                } 
     1433        } 
     1434} 
     1435 
     1436 
    13921437static void  
    13931438on_create_folder_activate (GtkMenuItem *mitem, gpointer user_data) 
     
    17311776        TnyPlatformFactory *platfact; 
    17321777        GtkVBox *vbox = GTK_VBOX (self); 
    1733         GtkWidget *mailbox_sw, *widget
     1778        GtkWidget *mailbox_sw, *widget, *cancel_button
    17341779        GtkWidget *header_sw; 
    17351780        GtkCellRenderer *renderer; 
     
    17531798        priv->killacc_button = gtk_button_new_with_label ("Kill account"); 
    17541799 
     1800        cancel_button = gtk_button_new_with_label ("Cancel"); 
     1801 
     1802 
    17551803        priv->current_accounts = NULL; 
    17561804 
     
    17601808        g_signal_connect (G_OBJECT (priv->poke_button), "clicked",  
    17611809                G_CALLBACK (poke_button_toggled), self); 
     1810 
     1811        g_signal_connect (G_OBJECT (cancel_button), "clicked",  
     1812                G_CALLBACK (cancel_button_clicked), self); 
    17621813 
    17631814        g_signal_connect (G_OBJECT (priv->sync_button), "clicked",  
     
    17961847        gtk_box_pack_start (GTK_BOX (priv->status), priv->sync_button, FALSE, FALSE, 0); 
    17971848        gtk_box_pack_start (GTK_BOX (priv->status), priv->killacc_button, FALSE, FALSE, 0); 
    1798  
     1849        gtk_box_pack_start (GTK_BOX (priv->status), cancel_button, FALSE, FALSE, 0); 
     1850 
     1851        gtk_widget_show (cancel_button); 
    17991852        gtk_widget_show (priv->online_button); 
    18001853        gtk_widget_show (priv->poke_button);