"DefaultShortcut.png" is it used?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
floink Offline
Senior Member
Posts: 383
Joined: Oct 2003
Reputation: 0
Location: Sweden
Post: #1
checking the xme skin there's a png called "defaultshortcut.png" and another called "default shortcut.png". but none of them seem to be used. and another icon problem i have is the "defaultplaylist.png" and "defaultplaylistbig.png" that don't work either.

am i right in this? or might i be doing something wrong? tested xms and pm and both seem to give the same problem for me.
/floink
find quote
pin87a Offline
Senior Member
Posts: 179
Joined: Mar 2004
Reputation: 5
Post: #2
"defaultshortcut.png" is used.
it is the icon that goes to the left of a shortcut in list mode.
same with "defaultplaylist.png" but with playlists.

the default filetype icons are all defined in util.cpp.

"default shortcut.png" appears to be an unused duplicate of "defaultshortcut.png."
find quote
floink Offline
Senior Member
Posts: 383
Joined: Oct 2003
Reputation: 0
Location: Sweden
Post: #3
well after using and skinning xbmc for a couple of months now i know what theyre supposed to do Smile thing is ... in my build from the 9th of may, images don't show up at those places. fex instead of playlist icon i get sound/music icon. but again i might be doing something wrong?

the way to edit default icons you mention don't seem to be the most user friendly? wouldn't it be nice to have a icon.xml file for each skin where filetypes=icon image would be defined?
something like:
<defaulticons>
  <icon>
    <filetype>pls</filetype>
    <imagebig>defaultplsbig.png</imagebig>
    <imagemed>defaultplsmed.png</imagemed>
    <imagesmall>defaultplssmall.png</imagesmall>
  </icon>
  <icon>
    <filetype>mp3</filetype>
    <imagebig>defaultmp3big.png</imagebig>
    <imagemed>defaultmp3med.png</imagemed>
    <imagesmall>defaultmp3small.png</imagesmall>
  </icon>
</defaulticons>
find quote
pin87a Offline
Senior Member
Posts: 179
Joined: Mar 2004
Reputation: 5
Post: #4
your're right.
the defaultplaylist icons do not work.

all of the playlist filetypes (m3u, b4s, pls, strm) are defined as both audio files and video files (as they should be).
in util.cpp the check for audio files comes before the check for playlist files so the playlists are assigned the defaultaudio icon instead.

the solution (if any of the developers are watching) is to put the check for playlist files first.

Quote: cstdstring strthumb;
bool bonlydefaultxbe=g_stsettings.m_bmyprogramsdefaultxbe;
if (!pitem->m_bisfolder)
{
if (cutil::ispicture(pitem->m_strpath) )
{
// picture
pitem->seticonimage("defaultpicture.png");
}
else if (cutil::isplaylist(pitem->m_strpath) )
{
// playlist
cstdstring strdir;
cstdstring strfilename;
pitem->seticonimage("defaultplaylist.png");
cplaylistfactory factory;
auto_ptr<cplaylist> pplaylist (factory.create(pitem->m_strpath) );
if (null != pplaylist.get() )
{
if (pplaylist->load(pitem->m_strpath))
{
strfilename=cutil::getfilename(pitem->m_strpath);
strdir.format("%s\\playlists\\%s",g_stsettings.m_szalbumdirectory,strfilename.c_​str());
if ( strdir != pitem->m_strpath )
{
pplaylist->save(strdir);
}
}
}
}
else if ( cutil::isaudio(pitem->m_strpath) )
{
// album database
pitem->seticonimage("defaultaudio.png");
}

etc...

personally i think it is easier just to replace all of the default* icons instead of defining new ones in an xml file.
find quote
floink Offline
Senior Member
Posts: 383
Joined: Oct 2003
Reputation: 0
Location: Sweden
Post: #5
nice that u found the 'bug'. i'll post a note in the bug discussion forum as this thread turned in to be both a feature req and a bug report/fix Smile

the thought with the icons.xml was that one could add more or/and different icons then the 'default' ones. so fex different icons for m3u, b4s, pls and strm. just like there are different icons for different types of cd/dvd media. and being a skinner i see this as a part of the work i could do for my retro skin.
find quote