(trunk gtk) add GTR_UNICODE_BULLET

This commit is contained in:
Charles Kerr 2010-12-22 07:00:25 +00:00
parent 057487d18e
commit a297cd328a
3 changed files with 14 additions and 15 deletions

View File

@ -1185,21 +1185,18 @@ wannaquit( gpointer vdata )
}
static void
flushAddTorrentErrors( GtkWindow * window,
const char * primary,
GSList ** files )
flushAddTorrentErrors( GtkWindow * window, const char * primary, GSList ** files )
{
GSList * l;
GtkWidget * w;
GString * s = g_string_new( NULL );
const char * leader = g_slist_length( *files ) > 1
? gtr_get_unicode_string( GTR_UNICODE_BULLET )
: "";
for( l=*files; l!=NULL; l=l->next )
g_string_append_printf( s, "%s %s\n", leader, (const char*)l->data );
if( g_slist_length( *files ) > 1 ) {
for( l=*files; l!=NULL; l=l->next )
g_string_append_printf( s, "\xE2\x88\x99 %s\n", (const char*)l->data );
} else {
for( l=*files; l!=NULL; l=l->next )
g_string_append_printf( s, "%s\n", (const char*)l->data );
}
w = gtk_message_dialog_new( window,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR,

View File

@ -135,10 +135,11 @@ const char*
gtr_get_unicode_string( int i )
{
switch( i ) {
case GTR_UNICODE_UP: return "\xE2\x86\x91";
case GTR_UNICODE_DOWN: return "\xE2\x86\x93";
case GTR_UNICODE_INF: return "\xE2\x88\x9E";
default: return "err";
case GTR_UNICODE_UP: return "\xE2\x86\x91";
case GTR_UNICODE_DOWN: return "\xE2\x86\x93";
case GTR_UNICODE_INF: return "\xE2\x88\x9E";
case GTR_UNICODE_BULLET: return "\xE2\x88\x99";
default: return "err";
}
}

View File

@ -55,7 +55,8 @@ enum
{
GTR_UNICODE_UP,
GTR_UNICODE_DOWN,
GTR_UNICODE_INF
GTR_UNICODE_INF,
GTR_UNICODE_BULLET
};
const char * gtr_get_unicode_string( int );