comparison src/modplug/modplugbmp.cxx @ 2388:2fe51f6ddb36

Trim whitespace on front of mod titles. (Bugzilla #175)
author BioHazard <biohazard@bak.rr.com>
date Thu, 14 Feb 2008 15:43:46 -0600
parents 62391135da44
children e67bce91d70c
comparison
equal deleted inserted replaced
2383:fd19014c3254 2388:2fe51f6ddb36
546 aud_tuple_associate_string(ti, FIELD_CODEC, NULL, tmps); 546 aud_tuple_associate_string(ti, FIELD_CODEC, NULL, tmps);
547 aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced"); 547 aud_tuple_associate_string(ti, FIELD_QUALITY, NULL, "sequenced");
548 aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000); 548 aud_tuple_associate_int(ti, FIELD_LENGTH, NULL, lSoundFile->GetSongTime() * 1000);
549 549
550 gchar *tmps2 = MODPLUG_CONVERT(lSoundFile->GetTitle()); 550 gchar *tmps2 = MODPLUG_CONVERT(lSoundFile->GetTitle());
551 aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmps2); 551 // Chop any leading spaces off. They are annoying in the playlist.
552 gchar *tmps3 = tmps2; // Make another pointer so tmps2 can still be free()d
553 while ( *tmps3 == ' ' ) tmps3++ ;
554 aud_tuple_associate_string(ti, FIELD_TITLE, NULL, tmps3);
552 g_free(tmps2); 555 g_free(tmps2);
553 556
554 //unload the file 557 //unload the file
555 lSoundFile->Destroy(); 558 lSoundFile->Destroy();
556 delete lSoundFile; 559 delete lSoundFile;