(trunk gtk) #3491 "Magnet links don't appear until download of metadata." -- fixed.
This commit is contained in:
parent
711fb98126
commit
1c0d149c12
11
gtk/filter.c
11
gtk/filter.c
|
@ -842,8 +842,15 @@ activity_combo_box_new( GtkTreeModel * tmodel )
|
||||||
static gboolean
|
static gboolean
|
||||||
testText( const tr_torrent * tor, const char * key )
|
testText( const tr_torrent * tor, const char * key )
|
||||||
{
|
{
|
||||||
tr_file_index_t i;
|
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
|
|
||||||
|
if( !key || !*key )
|
||||||
|
{
|
||||||
|
ret = TRUE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tr_file_index_t i;
|
||||||
const tr_info * inf = tr_torrentInfo( tor );
|
const tr_info * inf = tr_torrentInfo( tor );
|
||||||
|
|
||||||
for( i=0; i<inf->fileCount && !ret; ++i )
|
for( i=0; i<inf->fileCount && !ret; ++i )
|
||||||
|
@ -852,6 +859,7 @@ testText( const tr_torrent * tor, const char * key )
|
||||||
ret = !key || strstr( pch, key ) != NULL;
|
ret = !key || strstr( pch, key ) != NULL;
|
||||||
g_free( pch );
|
g_free( pch );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -870,6 +878,7 @@ filter_entry_changed( GtkEditable * e, gpointer filter_model )
|
||||||
|
|
||||||
pch = gtk_editable_get_chars( e, 0, -1 );
|
pch = gtk_editable_get_chars( e, 0, -1 );
|
||||||
folded = g_utf8_casefold( pch, -1 );
|
folded = g_utf8_casefold( pch, -1 );
|
||||||
|
g_strstrip( folded );
|
||||||
g_object_set_data_full( filter_model, TEXT_KEY, folded, g_free );
|
g_object_set_data_full( filter_model, TEXT_KEY, folded, g_free );
|
||||||
g_free( pch );
|
g_free( pch );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue