comparison mcabber/mcabber/modules.c @ 1831:78616d66a7f2

Make module info output slightly more readable
author Mikael Berthe <mikael@lilotux.net>
date Sat, 27 Mar 2010 13:40:42 +0100
parents 8f7d7c05f275
children f5402d705f67
comparison
equal deleted inserted replaced
1830:7befbd8e932d 1831:78616d66a7f2
370 } 370 }
371 371
372 module = lmod->data; 372 module = lmod->data;
373 info = module->info; 373 info = module->info;
374 374
375 scr_LogPrint(LPRINT_NORMAL, "Name: %s", module->name); 375 scr_LogPrint(LPRINT_NORMAL, "Module %s", module->name);
376 scr_LogPrint(LPRINT_NORMAL, "Location: %s", g_module_name(module->module)); 376 scr_LogPrint(LPRINT_NORMAL, " Location: %s", g_module_name(module->module));
377 scr_LogPrint(LPRINT_NORMAL, "Loaded: %s", 377 scr_LogPrint(LPRINT_NORMAL, " Loaded: %s",
378 module->locked ? "Manually" : "Automatically"); 378 module->locked ? "Manually" : "Automatically");
379 scr_LogPrint(LPRINT_NORMAL, "Reference count: %u", module->refcount); 379 scr_LogPrint(LPRINT_NORMAL, " Reference count: %u", module->refcount);
380 380
381 if (info) { 381 if (info) {
382 382
383 if (info->version) 383 if (info->version)
384 scr_LogPrint(LPRINT_NORMAL, "Version: %s", info->version); 384 scr_LogPrint(LPRINT_NORMAL, " Version: %s", info->version);
385 scr_LogPrint(LPRINT_NORMAL, "API: %s:%u", info->branch, info->api); 385 scr_LogPrint(LPRINT_NORMAL, " API: %s:%u", info->branch, info->api);
386 386
387 if (info->requires && *(info->requires)) { 387 if (info->requires && *(info->requires)) {
388 GString *message = g_string_new("Depends on: "); 388 GString *message = g_string_new("Depends on: ");
389 const gchar **dep; 389 const gchar **dep;
390 for (dep = info->requires; *dep; ++dep) { 390 for (dep = info->requires; *dep; ++dep) {
392 g_string_append(message, ", "); 392 g_string_append(message, ", ");
393 } 393 }
394 394
395 // Chop last ", " 395 // Chop last ", "
396 g_string_truncate(message, message->len - 2); 396 g_string_truncate(message, message->len - 2);
397 scr_LogPrint(LPRINT_NORMAL, "%s", message->str); 397 scr_LogPrint(LPRINT_NORMAL, " %s", message->str);
398 g_string_free(message, TRUE); 398 g_string_free(message, TRUE);
399 } 399 }
400 400
401 if (info->description) 401 if (info->description)
402 scr_LogPrint(LPRINT_NORMAL, "Description: %s", info->description); 402 scr_LogPrint(LPRINT_NORMAL, " Description: %s", info->description);
403 } 403 }
404 scr_setmsgflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE); 404 scr_setmsgflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE);
405 scr_setattentionflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE, 405 scr_setattentionflag_if_needed(SPECIAL_BUFFER_STATUS_ID, TRUE,
406 ROSTER_UI_PRIO_STATUS_WIN_MESSAGE, prio_max); 406 ROSTER_UI_PRIO_STATUS_WIN_MESSAGE, prio_max);
407 } 407 }