Mercurial > pidgin.yaz
comparison src/conversation.c @ 6312:5e5959d7a85e
[gaim-migrate @ 6811]
I'm picky about a lot of things it seems.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 27 Jul 2003 09:33:23 +0000 |
parents | 6b4a12cd4caf |
children | 9cbf27b02094 |
comparison
equal
deleted
inserted
replaced
6311:eaeac660c17c | 6312:5e5959d7a85e |
---|---|
2230 add_conv_placement_fnc("account", _("By account"), | 2230 add_conv_placement_fnc("account", _("By account"), |
2231 conv_placement_by_account); | 2231 conv_placement_by_account); |
2232 } | 2232 } |
2233 } | 2233 } |
2234 | 2234 |
2235 GList *gaim_conv_placement_get_options(void) | 2235 GList * |
2236 gaim_conv_placement_get_options(void) | |
2236 { | 2237 { |
2237 GList *n, *list = NULL; | 2238 GList *n, *list = NULL; |
2238 ConvPlacementData *data; | 2239 ConvPlacementData *data; |
2239 | 2240 |
2240 ensure_default_funcs(); | 2241 ensure_default_funcs(); |
2241 | 2242 |
2242 for(n = conv_placement_fncs; n; n = n->next) { | 2243 for (n = conv_placement_fncs; n; n = n->next) { |
2243 data = n->data; | 2244 data = n->data; |
2244 list = g_list_append(list, data->name); | 2245 list = g_list_append(list, data->name); |
2245 list = g_list_append(list, data->id); | 2246 list = g_list_append(list, data->id); |
2246 } | 2247 } |
2247 | 2248 |
2248 return list; | 2249 return list; |
2249 } | 2250 } |
2250 | 2251 |
2251 | 2252 |
2252 void | 2253 void |
2253 gaim_conv_placement_add_fnc(const char *id, const char *name, GaimConvPlacementFunc fnc) | 2254 gaim_conv_placement_add_fnc(const char *id, const char *name, |
2254 { | 2255 GaimConvPlacementFunc fnc) |
2255 g_return_if_fail(id != NULL); | 2256 { |
2257 g_return_if_fail(id != NULL); | |
2256 g_return_if_fail(name != NULL); | 2258 g_return_if_fail(name != NULL); |
2257 g_return_if_fail(fnc != NULL); | 2259 g_return_if_fail(fnc != NULL); |
2258 | 2260 |
2259 ensure_default_funcs(); | 2261 ensure_default_funcs(); |
2260 | 2262 |
2264 void | 2266 void |
2265 gaim_conv_placement_remove_fnc(const char *id) | 2267 gaim_conv_placement_remove_fnc(const char *id) |
2266 { | 2268 { |
2267 ConvPlacementData *data = get_conv_placement_data(id); | 2269 ConvPlacementData *data = get_conv_placement_data(id); |
2268 | 2270 |
2269 if(!data) | 2271 if (data == NULL) |
2270 return; | 2272 return; |
2271 | 2273 |
2272 conv_placement_fncs = g_list_remove(conv_placement_fncs, data); | 2274 conv_placement_fncs = g_list_remove(conv_placement_fncs, data); |
2273 | 2275 |
2274 g_free(data->id); | 2276 g_free(data->id); |
2283 | 2285 |
2284 ensure_default_funcs(); | 2286 ensure_default_funcs(); |
2285 | 2287 |
2286 data = get_conv_placement_data(id); | 2288 data = get_conv_placement_data(id); |
2287 | 2289 |
2288 if (!data) | 2290 if (data == NULL) |
2289 return NULL; | 2291 return NULL; |
2290 | 2292 |
2291 return data->name; | 2293 return data->name; |
2292 } | 2294 } |
2293 | 2295 |
2305 | 2307 |
2306 return data->fnc; | 2308 return data->fnc; |
2307 } | 2309 } |
2308 | 2310 |
2309 static void | 2311 static void |
2310 conv_placement_pref_cb(const char *name, GaimPrefType type, gpointer value, | 2312 conv_placement_pref_cb(const char *name, GaimPrefType type, |
2311 gpointer data) | 2313 gpointer value, gpointer data) |
2312 { | 2314 { |
2313 GaimConvPlacementFunc fnc; | 2315 GaimConvPlacementFunc fnc; |
2314 | 2316 |
2315 if(strcmp(name, "/core/conversations/placement")) | 2317 if (strcmp(name, "/core/conversations/placement")) |
2316 return; | 2318 return; |
2317 | 2319 |
2318 ensure_default_funcs(); | 2320 ensure_default_funcs(); |
2319 | 2321 |
2320 fnc = gaim_conv_placement_get_fnc(value); | 2322 fnc = gaim_conv_placement_get_fnc(value); |
2324 | 2326 |
2325 place_conv = fnc; | 2327 place_conv = fnc; |
2326 } | 2328 } |
2327 | 2329 |
2328 static void | 2330 static void |
2329 update_titles_pref_cb(const char *name, GaimPrefType type, gpointer value, | 2331 update_titles_pref_cb(const char *name, GaimPrefType type, |
2330 gpointer data) | 2332 gpointer value, gpointer data) |
2331 { | 2333 { |
2332 /* | 2334 /* |
2333 * If the use_server_alias option was changed, and use_alias_for_title | 2335 * If the use_server_alias option was changed, and use_alias_for_title |
2334 * is false, then we don't have to do anything here. | 2336 * is false, then we don't have to do anything here. |
2335 */ | 2337 */ |