1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-21 21:57:01 +00:00

(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 static void
flushAddTorrentErrors( GtkWindow * window, flushAddTorrentErrors( GtkWindow * window, const char * primary, GSList ** files )
const char * primary,
GSList ** files )
{ {
GSList * l; GSList * l;
GtkWidget * w; GtkWidget * w;
GString * s = g_string_new( NULL ); 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, w = gtk_message_dialog_new( window,
GTK_DIALOG_DESTROY_WITH_PARENT, GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_ERROR, GTK_MESSAGE_ERROR,

View file

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

View file

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