Changeset 11552


Ignore:
Timestamp:
Dec 20, 2010, 12:26:18 PM (11 years ago)
Author:
charles
Message:

backport #3837, #3838, #3834, #3719, #3826 to the 2.1x branch

Location:
branches/2.1x
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1x/NEWS

    r11500 r11552  
     1=== Transmission 2.14 (xxxx/yy/zz) ===
     2Backport of bugfixes for a maintenance 2.0x release.
     3==== All Platforms ====
     4  * backport r11530 + r11531 from #3826 "don't use pread() or pwrite() on uClibc"
     5==== GTK+ ====
     6  * backport r11547 from #3837 "Dangling pointer after quit cancel"
     7  * backport r11546 from #3838 "Unselected active torrents not counted for quit check"
     8  * backport r11545 from #3834 "'Origin' field in Torrent Properties dialog should be ellipsized"
     9  * backport r11511 from #3719 "handle API changes to libnotify"
     10
    111=== Transmission 2.13 (2010/12/09) ===
    212[http://trac.transmissionbt.com/query?milestone=2.13&group=component&order=severity All tickets closed by this release]
  • branches/2.1x/gtk/details.c

    r11443 r11552  
    10071007
    10081008        /* origins */
    1009         l = gtk_label_new( NULL );
     1009        l = g_object_new( GTK_TYPE_LABEL, "selectable", TRUE,
     1010                                          "ellipsize", PANGO_ELLIPSIZE_END,
     1011                                          NULL );
    10101012        hig_workarea_add_row( t, &row, _( "Origin:" ), l, NULL );
    10111013        di->origin_lb = l;
  • branches/2.1x/gtk/main.c

    r11368 r11552  
    8686    GSList            * details;
    8787    GtkTreeSelection  * sel;
    88     GtkWidget         * quit_dialog;
     88    gpointer            quit_dialog;
    8989};
    9090
     
    337337
    338338    {
    339         const int total = tr_core_get_torrent_count( data->core );
    340         const int active = tr_core_get_active_torrent_count( data->core );
     339        const size_t total = tr_core_get_torrent_count( data->core );
     340        const size_t active = tr_core_get_active_torrent_count( data->core );
    341341        action_sensitize( "pause-all-torrents", active != 0 );
    342342        action_sensitize( "start-all-torrents", active != total );
     
    837837shouldConfirmBeforeExiting( struct cbdata * data )
    838838{
    839     if( !pref_flag_get( PREF_KEY_ASKQUIT ) )
    840         return FALSE;
    841     else {
    842         struct counts_data counts;
    843         getTorrentCounts( data, &counts );
    844         return counts.activeCount > 0;
    845     }
     839    return pref_flag_get( PREF_KEY_ASKQUIT )
     840        && tr_core_get_active_torrent_count( data->core );
    846841}
    847842
     
    852847        wannaquit( cbdata );
    853848    else {
    854         if( cbdata->quit_dialog == NULL )
     849        if( cbdata->quit_dialog == NULL ) {
    855850            cbdata->quit_dialog = askquit( cbdata->core, cbdata->wind, wannaquit, cbdata );
     851            g_object_add_weak_pointer( G_OBJECT( cbdata->quit_dialog ), &cbdata->quit_dialog );
     852        }
    856853        gtk_window_present( GTK_WINDOW( cbdata->quit_dialog ) );
    857854    }
  • branches/2.1x/gtk/notify.c

    r11387 r11552  
    161161    {
    162162        NotifyNotification * n = notify_notification_new(
    163             _( "Torrent Added" ), name, NULL, NULL );
     163            _( "Torrent Added" ), name, NULL
     164/* the fourth argument was removed in libnotify 0.7.0 */
     165#if !defined(NOTIFY_VERSION_MINOR) || (NOTIFY_VERSION_MAJOR == 0 && NOTIFY_VERSION_MINOR < 7)
     166            , NULL
     167#endif
     168            );
    164169        addIcon( n );
    165170        notify_notification_set_timeout( n, NOTIFY_EXPIRES_DEFAULT );
  • branches/2.1x/gtk/tr-core.c

    r11446 r11552  
    17651765}
    17661766
    1767 int
     1767size_t
    17681768tr_core_get_torrent_count( TrCore * core )
    17691769{
     
    17711771}
    17721772
    1773 int
     1773size_t
    17741774tr_core_get_active_torrent_count( TrCore * core )
    17751775{
    17761776    GtkTreeIter iter;
    17771777    GtkTreeModel * model = tr_core_model( core );
    1778     int activeCount = 0;
     1778    size_t activeCount = 0;
    17791779
    17801780    if( gtk_tree_model_get_iter_first( model, &iter ) ) do
  • branches/2.1x/gtk/tr-core.h

    r11114 r11552  
    8484tr_session *   tr_core_session( TrCore * self );
    8585
    86 int            tr_core_get_active_torrent_count( TrCore * self );
    87 
    88 int            tr_core_get_torrent_count( TrCore * self );
     86size_t         tr_core_get_active_torrent_count( TrCore * self );
     87
     88size_t         tr_core_get_torrent_count( TrCore * self );
    8989
    9090/******
  • branches/2.1x/libtransmission/fdlimit.c

    r11398 r11552  
    199199/* Like pread and pwrite, except that the position is undefined afterwards.
    200200   And of course they are not thread-safe. */
     201
     202/* https://trac.transmissionbt.com/ticket/3826 */
     203#ifdef __UCLIBC__
     204 #undef HAVE_PREAD
     205 #undef HAVE_PWRITE
     206#endif
    201207
    202208#ifdef SYS_DARWIN
Note: See TracChangeset for help on using the changeset viewer.