Commit a91f4d3af590f896112da23484db4f2058169dda
- Diff rendering mode:
- inline
- side by side
src/amarok.desktop
(0 / 3)
|   | |||
| 16 | 16 | GenericName[pt]=Leitor de Áudio | |
| 17 | 17 | GenericName[pt_BR]=Tocador de Mídia | |
| 18 | 18 | GenericName[sv]=Ljudspelare | |
| 19 | GenericName[ta]=கேட்பொலி இயக்கி | ||
| 20 | 19 | GenericName[xx]=xxAudio Playerxx | |
| 21 | 20 | Exec=amarok -caption "%c" %U | |
| 22 | 21 | Comment=Uncle Rodney says, "10/10, amaroK is seriously super!" | |
| … | … | ||
| 28 | 28 | Comment[pt]=O Tio Rodney diz, "10/10, amaroK é excelente!" | |
| 29 | 29 | Comment[pt_BR]=O Tio Rodney disse: "10/10, amaroK é muito bom!" | |
| 30 | 30 | Comment[sv]=Farbror Rodney säger, "10/10, amaroK är verkligen fantastiskt!" | |
| 31 | Comment[ta]=Uncle Rodney கூறுவதாவது, "10/10, amaroK நிஜமாக அற்புதமானது!" | ||
| 32 | 31 | Comment[xx]=xxUncle Rodney says, "10/10, amaroK is seriously super!"xx | |
| 33 | 32 | Icon=amarok | |
| 34 | 33 | MimeType=application/x-ogg;audio/x-vorbis;audio/basic;audio/x-mod;audio/x-mp3;audio/x-scpls;audio/x-mpegurl;audio/x-sid;audio/x-wav | |
| … | … | ||
| 50 | 50 | Name[pt]=Colacar em fila no amaroK | |
| 51 | 51 | Name[pt_BR]=Enfileirar no amaroK | |
| 52 | 52 | Name[sv]=Köa i amaroK | |
| 53 | Name[ta]=amaroKகிலுள்ள Enqueue | ||
| 54 | 53 | Name[xx]=xxEnqueue in amaroKxx |
src/contextbrowser.cpp
(48 / 20)
|   | |||
| 32 | 32 | ContextBrowser::ContextBrowser( const char *name ) | |
| 33 | 33 | : QVBox( 0, name ) | |
| 34 | 34 | { | |
| 35 | sqlInit(); | ||
| 36 | |||
| 37 | 35 | setSpacing( 4 ); | |
| 38 | 36 | setMargin( 5 ); | |
| 39 | 37 | ||
| 40 | 38 | QHBox *hb1 = new QHBox( this ); | |
| 41 | 39 | hb1->setSpacing( 4 ); | |
| 42 | 40 | ||
| 41 | sqlInit(); | ||
| 42 | |||
| 43 | 43 | browser = new KHTMLPart( hb1 ); | |
| 44 | 44 | browser->begin(); | |
| 45 | 45 | browser->write( "<html></html>" ); | |
| … | … | ||
| 59 | 59 | ||
| 60 | 60 | void ContextBrowser::openURLRequest(const KURL &url, const KParts::URLArgs & ) | |
| 61 | 61 | { | |
| 62 | kdDebug() << url.path().latin1() << endl; | ||
| 63 | 62 | if ( url.protocol() == "album" ) | |
| 64 | 63 | { | |
| 65 | 64 | QStringList info = QStringList::split( "/", url.path() ); | |
| … | … | ||
| 86 | 86 | ||
| 87 | 87 | void ContextBrowser::showContextForItem( const MetaBundle &bundle ) | |
| 88 | 88 | { | |
| 89 | // take care of sql updates (schema changed errors) | ||
| 90 | delete m_db; | ||
| 91 | sqlInit(); | ||
| 92 | |||
| 93 | 89 | browser->begin(); | |
| 94 | 90 | ||
| 95 | 91 | QString styleSheet( "a { color:black; font-size:8px; text-decoration:none; }" | |
| … | … | ||
| 93 | 93 | "td { color:black; font-size:8px; text-decoration:none; }" | |
| 94 | 94 | ||
| 95 | 95 | ".song { color:black; font-size:8px; text-decoration:none; }" | |
| 96 | ".song:hover { cursor: default; color:black; font-weight: bold; text-decoration:underline; background-color:#cccccc; }" | ||
| 96 | ".song:hover { color:black; text-decoration:underline; background-color:#cccccc; }" | ||
| 97 | 97 | ".album { color:black; font-weight: bold; font-size:8px; text-decoration:none; }" | |
| 98 | 98 | ".title { font-size: 11px; font-weight: bold; }" | |
| 99 | 99 | ".head { font-size: 10px; font-weight: bold; }" | |
| 100 | 100 | ||
| 101 | 101 | ".rbalbum { border: solid #ffffff 1px; }" | |
| 102 | ".rbalbum:hover { cursor: default; background-color: #cccccc; border: solid #000000 1px; }" | ||
| 102 | ".rbalbum:hover { cursor: default; border: solid #000000 1px; }" | ||
| 103 | 103 | ||
| 104 | 104 | ".rbcontent { border: solid #cccccc 1px; }" | |
| 105 | 105 | ".rbcontent:hover { border: solid #000000 1px; }" ); | |
| … | … | ||
| 112 | 112 | QStringList values; | |
| 113 | 113 | QStringList names; | |
| 114 | 114 | ||
| 115 | browser->write( "<div class='head'><br>Other titles on this album:</div>" ); | ||
| 115 | browser->write( "<div class='head'><br>Other titles:</div>" ); | ||
| 116 | 116 | browser->write( "<div class='rbcontent'>" ); | |
| 117 | browser->write( "<table width='100%' border='0' cellspacing='1' cellpadding='1'>" ); | ||
| 117 | browser->write( "<table width='100%' border='0' cellspacing='1' cellpadding='1'><tr><td></td><td width='%100'>" ); | ||
| 118 | 118 | ||
| 119 | m_db->execSql( QString( "SELECT tags.title, tags.url, tags.track " | ||
| 119 | m_db->execSql( QString( "SELECT tags.title, tags.url " | ||
| 120 | 120 | "FROM tags, artist, album " | |
| 121 | 121 | "WHERE tags.album = album.id AND album.name LIKE '%1' AND " | |
| 122 | 122 | "tags.artist = artist.id AND artist.name LIKE '%2' " | |
| 123 | "ORDER BY tags.track;" ) | ||
| 123 | "ORDER BY random();" ) | ||
| 124 | 124 | .arg( m_db->escapeString( bundle.album() ) ) | |
| 125 | 125 | .arg( m_db->escapeString( bundle.artist() ) ), &values, &names ); | |
| 126 | 126 | ||
| 127 | for ( uint i = 0; i < ( values.count() / 3 ) && i < 10; i++ ) | ||
| 127 | for ( uint i = 0; i < ( values.count() / 2 ) && i < 10; i++ ) | ||
| 128 | 128 | { | |
| 129 | 129 | if ( values[i].isEmpty() ) continue; | |
| 130 | 130 | ||
| 131 | browser->write( QString ( "<tr><td class='song' onClick='window.location.href=\"file:%1\"'>%2%3</a></td></tr>" ) | ||
| 132 | .arg( values[i*3 + 1] ) | ||
| 133 | .arg( ( values[i*3 + 2] == "" ) ? "" : values[i*3 + 2] + ". " ) | ||
| 134 | .arg( values[i*3] ) ); | ||
| 131 | browser->write( QString ( "<a class='song' href=\"file:%1\">%2</a><br>" ) | ||
| 132 | .arg( values[i*2 + 1] ) | ||
| 133 | .arg( values[i*2] ) ); | ||
| 135 | 134 | } | |
| 136 | 135 | ||
| 137 | 136 | values.clear(); | |
| 138 | 137 | names.clear(); | |
| 139 | 138 | ||
| 140 | browser->write( "</table>" ); | ||
| 139 | browser->write( "</td><td></td></tr></table>" ); | ||
| 141 | 140 | browser->write( "</div>" ); | |
| 142 | 141 | browser->write( "<div class='head'><br>Other albums:</div>" ); | |
| 143 | 142 | browser->write( "<table width='100%' border='0' cellspacing='2' cellpadding='1'>" ); | |
| … | … | ||
| 161 | 161 | .arg( m_db->albumSongCount( values[i*3 + 2], values[i*3 + 1] ) ) ); | |
| 162 | 162 | } | |
| 163 | 163 | ||
| 164 | browser->write( "</table><br></html>" ); | ||
| 164 | browser->write( "</table><br>" ); | ||
| 165 | |||
| 166 | /* const KURL &url = bundle.url(); | ||
| 167 | QString tipBuf; | ||
| 168 | QStringList validExtensions; | ||
| 169 | validExtensions << "jpg" << "png" << "gif" << "jpeg"; | ||
| 170 | |||
| 171 | tipBuf = "<table width=108 align=center>"; | ||
| 172 | |||
| 173 | DIR *d = opendir( url.directory( FALSE, FALSE ).local8Bit() ); | ||
| 174 | if ( d ) | ||
| 175 | { | ||
| 176 | const QString td = "<td width=108><img width=100 src='%1%2'></td>"; | ||
| 177 | dirent *ent; | ||
| 178 | |||
| 179 | while ( ( ent = readdir( d ) ) ) | ||
| 180 | { | ||
| 181 | QString file( ent->d_name ); | ||
| 182 | |||
| 183 | if ( validExtensions.contains( file.mid( file.findRev('.')+1 ) ) ) | ||
| 184 | { | ||
| 185 | // we found an image, let's add it to the tooltip | ||
| 186 | tipBuf += "<tr>"; //extra row for spacing | ||
| 187 | tipBuf += td.arg( url.directory( FALSE, TRUE ), file ); | ||
| 188 | tipBuf += "</tr>"; | ||
| 189 | } | ||
| 190 | } | ||
| 191 | |||
| 192 | closedir( d ); | ||
| 193 | } | ||
| 194 | |||
| 195 | tipBuf += "</table>";*/ | ||
| 196 | |||
| 197 | QString tipBuf; | ||
| 198 | browser->write( QString( "%1</html>" ).arg( tipBuf ) ); | ||
| 165 | 199 | browser->end(); | |
| 166 | 200 | } | |
| 167 | 201 |
src/threadweaver.cpp
(1 / 0)
|   | |||
| 340 | 340 | ||
| 341 | 341 | if ( validExtensions.contains( url.filename().mid( url.filename().findRev('.')+1 ) ) ) | |
| 342 | 342 | { | |
| 343 | kdDebug() << url.directory() << " - " << url.filename() << endl; | ||
| 343 | 344 | insertdb->addImageToPath( url.directory(), url.filename(), true ); | |
| 344 | 345 | } | |
| 345 | 346 | } |

