- Timestamp:
- 2010-03-12T01:47:44Z (15 years ago)
- Branches:
- master
- Children:
- 3330468
- Parents:
- 4dc6b8d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/purple/purple.c
r4dc6b8d r7c5affca 60 60 GList *i, *st; 61 61 set_t *s; 62 char help_title[64]; 63 GString *help; 64 65 help = g_string_new( "" ); 66 g_string_printf( help, "BitlBee libpurple module %s (%s).\n\nSupported settings:", 67 (char*) acc->prpl->name, prpl->info->name ); 62 68 63 69 /* Convert all protocol_options into per-account setting variables. */ … … 78 84 case PURPLE_PREF_STRING: 79 85 def = g_strdup( purple_account_option_get_default_string( o ) ); 86 87 g_string_append_printf( help, "\n* %s (%s), %s, default: %s", 88 name, purple_account_option_get_text( o ), 89 "string", def ); 90 80 91 break; 81 92 … … 83 94 def = g_strdup_printf( "%d", purple_account_option_get_default_int( o ) ); 84 95 eval = set_eval_int; 96 97 g_string_append_printf( help, "\n* %s (%s), %s, default: %s", 98 name, purple_account_option_get_text( o ), 99 "integer", def ); 100 85 101 break; 86 102 … … 91 107 def = g_strdup( "false" ); 92 108 eval = set_eval_bool; 109 110 g_string_append_printf( help, "\n* %s (%s), %s, default: %s", 111 name, purple_account_option_get_text( o ), 112 "boolean", def ); 113 93 114 break; 94 115 95 116 case PURPLE_PREF_STRING_LIST: 96 117 def = g_strdup( purple_account_option_get_default_list_value( o ) ); 118 119 g_string_append_printf( help, "\n* %s (%s), %s, default: %s", 120 name, purple_account_option_get_text( o ), 121 "list", def ); 122 g_string_append( help, "\n Possible values: " ); 123 97 124 for( io = purple_account_option_get_list( o ); io; io = io->next ) 98 125 { 99 126 PurpleKeyValuePair *kv = io->data; 100 127 opts = g_slist_append( opts, kv->key ); 128 g_string_append_printf( help, "%s, ", kv->key ); 101 129 } 130 g_string_truncate( help, help->len - 2 ); 102 131 eval = set_eval_list; 103 132 eval_data = opts; 133 104 134 break; 105 135 … … 118 148 } 119 149 } 150 151 g_snprintf( help_title, sizeof( help_title ), "purple %s", (char*) acc->prpl->name ); 152 help_add_mem( &global.help, help_title, help->str ); 153 g_string_free( help, TRUE ); 120 154 121 155 if( pi->options & OPT_PROTO_MAIL_CHECK ) … … 713 747 } 714 748 749 g_string_append( help, "\n\nFor used protocols, more information about available " 750 "settings can be found using \x02help purple <protocol name>\x02" ); 751 715 752 /* Add a simple dynamically-generated help item listing all 716 753 the supported protocols. */
Note: See TracChangeset
for help on using the changeset viewer.