~ubuntu-branches/ubuntu/jaunty/transmission/jaunty-security

« back to all changes in this revision

Viewing changes to gtk/tr-window.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2008-12-28 18:50:08 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20081228185008-2u8ac12dbckrwn7c
Tags: 1.42-0ubuntu1
* New upstream version (LP: #311959):
  - All platforms:
    - Better peer management in large swarms
    - Support BitTorrent Enhancement Proposal (BEP) #21 "Extension for 
      Partial Seeds"
    - Partial support for BEP #6 "Fast Extension" (reject, have all/none)
    - Honor the peer's BEP #10 reqq key, when available
    - Fix 1.40 "Got HTTP Status Code: 0" error message
    - Fix 1.40 "lazy bitfield" error
    - Fix 1.40 "jumpy upload speed" bug
    - Fix handshake peer_id error
    - Corrrectly handle Windows-style newlines in Bluetack blocklists
    - More accurate bandwidth measurement
    - File selection & priority was reset when editing a torrent's 
      tracker list
    - Fix autoconf/automake build warnings
  - GTK+:
    - In the Details dialog's peer tabs, rows were sometimes duplicated
    - Minor bugfixes, usability changes, and locale improvements
    - Three new translations: Afrikaans, Asturian, Bosnian
    - Sixteen updated translations
  - Daemon:
    - Fix 1.40 bug in handling IP whitelist
    - Minor bugfixes and output cleanup
    - Windows portability
  - CLI:
    - Fix minor free-memory-read bug

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: tr-window.c 7069 2008-11-08 02:49:04Z charles $
 
2
 * $Id: tr-window.c 7260 2008-12-03 15:59:51Z charles $
3
3
 *
4
4
 * Copyright (c) 2005-2008 Transmission authors and contributors
5
5
 *
274
274
***/
275
275
 
276
276
static int
277
 
checkFilterText( filter_text_mode_t filter_text_mode,
278
 
                 const tr_info *    torInfo,
279
 
                 const char *       text )
 
277
checkFilterText( filter_text_mode_t    filter_text_mode,
 
278
                 const tr_info       * torInfo,
 
279
                 const char          * text )
280
280
{
281
281
    tr_file_index_t i;
282
282
    int             ret = 0;
287
287
        case FILTER_TEXT_MODE_FILES:
288
288
            for( i = 0; i < torInfo->fileCount && !ret; ++i )
289
289
            {
290
 
                pch = g_ascii_strdown( torInfo->files[i].name, -1 );
 
290
                pch = g_utf8_casefold( torInfo->files[i].name, -1 );
291
291
                ret = !text || strstr( pch, text ) != NULL;
292
292
                g_free( pch );
293
293
            }
294
294
            break;
295
295
 
296
296
        case FILTER_TEXT_MODE_TRACKER:
297
 
            pch = g_ascii_strdown( torInfo->trackers[0].announce, -1 );
 
297
            pch = g_utf8_casefold( torInfo->trackers[0].announce, -1 );
298
298
            ret = !text || ( strstr( pch, text ) != NULL );
299
299
            g_free( pch );
300
300
            break;
301
301
 
302
302
        default: /* NAME */
303
 
            pch = g_ascii_strdown( torInfo->name, -1 );
 
303
            pch = g_utf8_casefold( torInfo->name, -1 );
304
304
            ret = !text || ( strstr( pch, text ) != NULL );
305
305
            g_free( pch );
306
306
            break;
354
354
    gtk_tree_model_get( model, iter, MC_TORRENT_RAW, &tor, -1 );
355
355
 
356
356
    return checkFilterMode( p->filter_mode, tor )
357
 
           && checkFilterText( p->filter_text_mode, tr_torrentInfo(
358
 
                                   tor ), p->filter_text );
 
357
           && checkFilterText( p->filter_text_mode, tr_torrentInfo( tor ), p->filter_text );
359
358
}
360
359
 
361
360
static void updateTorrentCount( PrivateData * p );
425
424
 
426
425
    pch = gtk_editable_get_chars( e, 0, -1 );
427
426
    g_free( p->filter_text );
428
 
    p->filter_text = g_ascii_strdown( pch, -1 );
 
427
    p->filter_text = g_utf8_casefold( pch, -1 );
429
428
    refilter( p );
430
429
    g_free( pch );
431
430
}