mplinuxman/po/german compiled/mplinuxman.mo0000644000175000006300000002076710000243502020445 0ustar boskoboskoy8 09 Vj J - I X c w      : I U d p             8 ? .G v   ) +  #)BUg~N   &  1A R ]gp     & 1? NZj  "7 P[ tEC # 5%?e mw|  4?~Dr-6$d  $5 DP Wd}  "' 6CK S ^j& A$2 Wa6A9"\{"_6J^ww #)   $<A_h z (  )?Pd# %+.Kj$jS  G '!82!k! s!}! !!!!!!!!!!v*V?tR>2(X% [ JF/6<m`)N]AQEThuqC_bg s&K+xP :GH1kW#8BZY-3,pf9\.lD"@i;IoO0cjdw!aLr=$M54 e^S7y'nU%s Make sure the USB device is working properly%s Make sure the device is plugged into the USB port, or try reloading the USB module%s Make sure the requested directory or temporary directory is accessible%s The device reported an error/Edit/Select _All Ctrl+A/Edit/_Options/Edit/sep1/File/Add/Directory/File/Add/File/File/Send non mp3 file/File/_Add/File/_Properties/File/_Quit/File/_Remove/File/_Send/File/sep1/Help/Help/About/Mpman/Format Internal Memory/Mpman/Format SmartMedia card/Mpman/_Delete/Mpman/_Get/Mpman/_Rfresh/Mpman/sep1/Playlist/Sa_ve as/Playlist/Save as Default/Playlist/_Add/Playlist/_Load/Playlist/sep1/_Edit/_File/_Mpman/_PlaylistAddAdd DirectoryAdd FileAdd files to listAlbumAn unkown error occurredArtistBitrateCommand to play mp3 (%f = selected filenames)Command to stop playing mp3CommentConnect/Refresh indexContgratulations you found an easter egg!Create random list to fill available memoryDeleteDelete selected filesErrorError Connecting Device Error Copying FileError From DeviceError Loading PlaylistError Saving PlaylistExit program when device is unplugged requires hotplug support (/sbin/hotplug)File Info File PropertiesFlash MemoryFormatting Internal MemoryFound /tmp/mplinuxman.pid. Mplinuxman might be already running. If the program crashed before. Please report it to http://mplinuxman.sourceforge.net Do you want to continue loading anyway?ID3 TagInterfaceInternal memory selectedLoad default playlist on startupLoaded PlaylistLoading PlaylistMP3 playerMPEG InfoMinimizeMplinuxman is already runningNameNo device detectedOptionsPlay FilesPropertiesRandomReading DirectoryRefresh ListRemoveRemove FilesRemove selected files from listReorderSamplerateSave PlaylistSaved PlaylistSelect FileSelect PlaylistSelect SmartMedia card memorySelect directorySelect internal flash memorySendSend Files to MpmanSend selected files to Mpman F60Send selected files to PCShow Hidden DirectoriesShow file propertiesShow toolbar text labelsSmartMediaSmartMedia card selectedStop playingThis will delete all data in Flash Memory Would you like to continue?This will delete all data in SmartMedia Would you like to continue?TitleTry to connect to device on startupUSB ErrorUpdate MP3 player with reordered listVersioncopyrightfreegthreads not supportedlayernosending %ssending filesizestereototalusedyesProject-Id-Version: de POT-Creation-Date: 2003-03-14 15:17+1300 PO-Revision-Date: 2003-11-06 19:31+0100 Last-Translator: Thomas Ritter Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.0 %s Vergewissere dich, dass das USB-Gerät richtig funktioniert%s Vergewissere dich, dass du das Gerät an den USB-Anschluss angeschlossen hast, oder versuche, das USB-Modul neu zu starten%s Vergewissere dich, dass du Zugriffsrechte auf das betreffende Verzeichnis oder das temporäre Verzeichnis hast%s Das Gerät hat einen Fehler protokolliert/Bearbeiten/Alle Markieren Ctrl+A/Edit/_Optionen/Edit/sep1/Datei/Hinzufügen/Verzeichnis/Datei/Hinzufügen/Datei/Datei/Sende /Datei/_Hinzufügen/Datei/_Eigenschaften/Datei/_Beenden/Datei/_Löschen/Datei/_Senden/Datei/sep1/Hilfe/Hilfe/Über/Mpman/Speicher löschen//Mpman/_Löschen/Mpman/_Lade/Mpman/_Aktualisieren/Mpman/sep1/Playlist/Speichern unter.../Playlist/Speichern unter Standard/Playlist/_Hinzufügen/Playlist/_Laden/Playlist/sep1/_Bearbeiten/_Datei/_Mpman/_PlaylistHinzufügenVerzeichnis hinzufügenDatei HinzufügenFüge Datei in die Liste einAlbumEin unbekannter Fehler ist aufgetretenInterpretBitrateBefehl um die MP3-Dateien abzuspielen (%f = markierte Dateinamen)Befehl um die MP3-Dateien zu stoppenKommentarVerbinden/Index aktualisierenHerzlichen Glückwunsch, du hast ein Osterei gefunden!Erstelle Zufallsliste um den noch vorhandenen Speicher zu füllenLöschenLösche markierte DateienFehlerDie Verbindung zum Gerät konnte nicht hergestellt werdenFehler beim Kopieren der DateiFehlermeldung vom GerätFehler beim Laden der PlaylistFehler beim Speichern der PlaylistVerlasse das Programm wenn das Gerät nicht angeschlossen ist Benötigt hotplug (/sbin/hotplug)Datei-InformationenDatei-EigenschaftenMP3-Player-SpeicherplatzFormatiert den Speicher/tmp/mplinuxman.pid wurde gefunden. Mplinuxman wird vielleicht gerade ausgeführt Wenn das Programm zuvor schon abgestürzt ist, bitte sende das Problem an: http://mplinuxman.sourceforge.net Willst du das Programm trotzdem laden?ID3-TagInterfaceMP3-Player-Speicherplatz angewähltLade Standard-Playlist beim ProgrammstartGeladene PlaylistLadet PlaylistMP3-PlayerMPEG InfoMinimiereMplinuxman wird bereits ausgeführt NameEs wurde kein Gerät gefundenOptionenSpiele Dateien abEigenschaftenZufallslisteLese-VerzeichnisAktualisiere die ListeEntferneEntferne DateienEntferne markierte Dateien aus der ListeNeu ordnenSamplerateSpeichere PlaylistPlayliste gespeichertWähle Datei ausWähle Playlist ausWähle SmartMedia-Karte ausWähe ein Verzeichnis ausWähle MP3-Player-Speicherplatz ausÜbertragenÜbertrage die Dateien auf den PlayerÜbertrage markierte Dateien auf den PlayerÜbertrage die ausgwählten Dateien auf den PCZeige versteckte VerzeichnisseZeige Datei-EigenschaftenZeige Text zu den IkonenSmartMedia-KarteSmartMedia-Kartenspeicher angewähltStoppe das AbspielenDiese Aktion wird alle Daten auf dem Player löschen Willst du den gesamten Inhalt des Speichers löschen?Diese Aktion wird alle deine Daten auf der SmartMedia-Karte löschen Willst du den gesamten Inhalt auf der SmartMedia-Karte löschen?TitelVersuche eine Verbindung mit dem Gerät herzustellen beim ProgrammstartUSB-FehlerAktualisiere den MP3-Player mit der neu geordneten ListeVersionCopyrightunbelegtgthreads wird nicht unterstütztlayerNeinÜberträgt %sÜberträgt die DateiGrösseStereoGesamtbelegtJamplinuxman/po/mplinuxman.pot0000644000175000006300000002321710517750470015623 0ustar boskobosko# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-25 23:01+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: main.c:156 msgid "Mplinuxman is already running\n" msgstr "" #: main.c:161 msgid "" "Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n" "\n" "If the program crashed before. Please report it to\n" "http://mplinuxman.sourceforge.net\n" "\n" "Do you want to continue loading anyway?" msgstr "" #: main.c:171 msgid "gthreads not supported\n" msgstr "" #: miscwindow.c:59 msgid "File Info " msgstr "" #: miscwindow.c:76 msgid "ID3 Tag" msgstr "" #: miscwindow.c:84 msgid "MPEG Info" msgstr "" #: miscwindow.c:93 miscwindow.c:234 msgid "Title" msgstr "" #: miscwindow.c:93 msgid "Artist" msgstr "" #: miscwindow.c:93 msgid "Album" msgstr "" #: miscwindow.c:93 msgid "Comment" msgstr "" #: miscwindow.c:111 msgid "Version" msgstr "" #: miscwindow.c:111 msgid "layer" msgstr "" #: miscwindow.c:111 msgid "Bitrate" msgstr "" #: miscwindow.c:111 msgid "Samplerate" msgstr "" #: miscwindow.c:111 msgid "stereo" msgstr "" #: miscwindow.c:111 msgid "copyright" msgstr "" #: miscwindow.c:111 mainwindow.c:1740 mainwindow.c:1810 mainwindow.c:1847 msgid "size" msgstr "" #: miscwindow.c:124 miscwindow.c:126 msgid "no" msgstr "" #: miscwindow.c:124 miscwindow.c:126 msgid "yes" msgstr "" #: miscwindow.c:197 msgid "Options" msgstr "" #: miscwindow.c:207 msgid "Interface" msgstr "" #: miscwindow.c:208 msgid "Show toolbar text labels" msgstr "" #: miscwindow.c:210 msgid "Try to connect to device on startup" msgstr "" #: miscwindow.c:212 msgid "Load default playlist on startup" msgstr "" #: miscwindow.c:214 msgid "" "Exit program when device is unplugged\n" "requires hotplug support (/sbin/hotplug)" msgstr "" #: miscwindow.c:219 msgid "MP3 player" msgstr "" #: miscwindow.c:220 #, c-format msgid "Command to play mp3 (%f = selected filenames)" msgstr "" #: miscwindow.c:226 msgid "Command to stop playing mp3" msgstr "" #: miscwindow.c:235 msgid "Use customized track title format" msgstr "" #: miscwindow.c:237 msgid "Title format" msgstr "" #: miscwindow.c:244 #, c-format msgid "%f File name" msgstr "" #: miscwindow.c:247 #, c-format msgid "%p Performer/artist" msgstr "" #: miscwindow.c:250 #, c-format msgid "%a Album" msgstr "" #: miscwindow.c:253 msgid "%t Track name" msgstr "" #: miscwindow.c:256 #, c-format msgid "%c Comment" msgstr "" #: miscwindow.c:263 msgid "Advanced" msgstr "" #: miscwindow.c:264 msgid "Specify vendor / product ID" msgstr "" #: miscwindow.c:267 msgid "Device ID" msgstr "" #: miscwindow.c:284 msgid "Enable logging" msgstr "" #: miscwindow.c:527 msgid "Contgratulations you found an easter egg!" msgstr "" #: miscwindow.c:555 msgid "Lead developers:" msgstr "" #: miscwindow.c:560 msgid "Testing and patches:" msgstr "" #: miscwindow.c:575 msgid "" "Mplinuxman is a file manager program for the MPMan F60,F55,F50, and d-link " "dmp-220 USB portable MP3 players." msgstr "" #: mainwindow.c:139 #, c-format msgid "Error Connecting Device " msgstr "" #: mainwindow.c:140 #, c-format msgid "" "%s\n" "\n" "Make sure the device is plugged into the USB port, or try reloading the USB " "module" msgstr "" #: mainwindow.c:145 msgid "No device detected" msgstr "" #: mainwindow.c:148 #, c-format msgid "Error From Device" msgstr "" #: mainwindow.c:149 #, c-format msgid "" "%s\n" "\n" "The device reported an error" msgstr "" #: mainwindow.c:152 mainwindow.c:167 #, c-format msgid "Error" msgstr "" #: mainwindow.c:153 #, c-format msgid "" "%s\n" "\n" "Make sure the requested directory or temporary directory is accessible" msgstr "" #: mainwindow.c:156 #, c-format msgid "USB Error" msgstr "" #: mainwindow.c:157 #, c-format msgid "" "%s\n" "\n" "Make sure the USB device is working properly" msgstr "" #: mainwindow.c:160 #, c-format msgid "Error Copying File" msgstr "" #: mainwindow.c:161 #, c-format msgid "" "%s\n" "\n" "Make the device is not full" msgstr "" #: mainwindow.c:168 #, c-format msgid "An unkown error occurred" msgstr "" #: mainwindow.c:246 #, c-format msgid "%d File(s) selected %d,%03d k" msgstr "" #: mainwindow.c:328 msgid "free" msgstr "" #: mainwindow.c:328 msgid "total" msgstr "" #: mainwindow.c:328 msgid "used" msgstr "" #: mainwindow.c:426 msgid "Internal memory selected" msgstr "" #: mainwindow.c:447 msgid "SmartMedia card selected" msgstr "" #: mainwindow.c:469 msgid "Add directory..." msgstr "" #: mainwindow.c:486 mainwindow.c:1562 msgid "Reading Directory" msgstr "" #: mainwindow.c:531 msgid "Add file..." msgstr "" #: mainwindow.c:534 msgid "Music Files" msgstr "" #: mainwindow.c:586 msgid "Send non-Mp3 file..." msgstr "" #: mainwindow.c:596 msgid "sending file" msgstr "" #: mainwindow.c:702 mainwindow.c:1576 #, c-format msgid "sending %s" msgstr "" #: mainwindow.c:894 msgid "Select save directory..." msgstr "" #: mainwindow.c:1066 msgid "Select playlist..." msgstr "" #: mainwindow.c:1068 mainwindow.c:1132 msgid "Playlists" msgstr "" #: mainwindow.c:1085 msgid "Loading Playlist" msgstr "" #: mainwindow.c:1106 msgid "Loaded Playlist" msgstr "" #: mainwindow.c:1110 msgid "Error Loading Playlist" msgstr "" #: mainwindow.c:1130 msgid "Save playlist..." msgstr "" #: mainwindow.c:1168 msgid "Saved Playlist" msgstr "" #: mainwindow.c:1171 msgid "Error Saving Playlist" msgstr "" #: mainwindow.c:1215 msgid "" "This will delete all data in Flash Memory\n" "Would you like to continue?" msgstr "" #: mainwindow.c:1219 msgid "Formatting Internal Memory" msgstr "" #: mainwindow.c:1223 msgid "" "This will delete all data in SmartMedia\n" "Would you like to continue?" msgstr "" #: mainwindow.c:1228 msgid "Formatting SmartMedia" msgstr "" #: mainwindow.c:1232 msgid "" "This will format SmartMedia for camera\n" "Would you like to continue?" msgstr "" #: mainwindow.c:1237 msgid "Formatting SmartMedia for camera" msgstr "" #: mainwindow.c:1255 msgid "/_File" msgstr "" #: mainwindow.c:1256 msgid "/File/_Add" msgstr "" #: mainwindow.c:1257 msgid "/File/Add/Directory..." msgstr "" #: mainwindow.c:1258 msgid "/File/Add/File..." msgstr "" #: mainwindow.c:1259 mainwindow.c:1263 mainwindow.c:1265 msgid "/File/sep1" msgstr "" #: mainwindow.c:1260 msgid "/File/_Send..." msgstr "" #: mainwindow.c:1261 msgid "/File/_Remove" msgstr "" #: mainwindow.c:1262 msgid "/File/_Properties" msgstr "" #: mainwindow.c:1264 msgid "/File/Send non mp3 file..." msgstr "" #: mainwindow.c:1266 msgid "/File/_Quit" msgstr "" #: mainwindow.c:1267 msgid "/_Mpman" msgstr "" #: mainwindow.c:1268 msgid "/Mpman/_Rfresh" msgstr "" #: mainwindow.c:1269 msgid "/Mpman/_Get..." msgstr "" #: mainwindow.c:1270 msgid "/Mpman/_Delete" msgstr "" #: mainwindow.c:1271 msgid "/Mpman/sep1" msgstr "" #: mainwindow.c:1272 msgid "/Mpman/Format Internal Memory" msgstr "" #: mainwindow.c:1273 msgid "/Mpman/Format SmartMedia card" msgstr "" #: mainwindow.c:1274 msgid "/Mpman/Format SmartMedia for camera" msgstr "" #: mainwindow.c:1275 msgid "/_Edit" msgstr "" #: mainwindow.c:1276 msgid "/Edit/Select _All Ctrl+A" msgstr "" #: mainwindow.c:1277 msgid "/Edit/sep1" msgstr "" #: mainwindow.c:1278 msgid "/Edit/_Options" msgstr "" #: mainwindow.c:1279 msgid "/_Playlist" msgstr "" #: mainwindow.c:1280 msgid "/Playlist/_Load..." msgstr "" #: mainwindow.c:1281 msgid "/Playlist/_Add..." msgstr "" #: mainwindow.c:1282 msgid "/Playlist/sep1" msgstr "" #: mainwindow.c:1283 msgid "/Playlist/Sa_ve as..." msgstr "" #: mainwindow.c:1284 msgid "/Playlist/Save as Default" msgstr "" #: mainwindow.c:1285 msgid "/Help" msgstr "" #: mainwindow.c:1286 msgid "/Help/About" msgstr "" #: mainwindow.c:1321 mainwindow.c:1386 msgid "Send" msgstr "" #: mainwindow.c:1322 msgid "Send selected files to Mpman F60" msgstr "" #: mainwindow.c:1330 msgid "Add Directory" msgstr "" #: mainwindow.c:1334 msgid "Add File" msgstr "" #: mainwindow.c:1341 msgid "Add" msgstr "" #: mainwindow.c:1342 msgid "Add files to list" msgstr "" #: mainwindow.c:1352 msgid "Remove" msgstr "" #: mainwindow.c:1353 msgid "Remove selected files from list" msgstr "" #: mainwindow.c:1361 msgid "Properties" msgstr "" #: mainwindow.c:1362 msgid "Show file properties" msgstr "" #: mainwindow.c:1373 msgid "Random" msgstr "" #: mainwindow.c:1374 msgid "Create random list to fill available memory" msgstr "" #: mainwindow.c:1387 msgid "Send selected files to PC" msgstr "" #: mainwindow.c:1395 msgid "Refresh List" msgstr "" #: mainwindow.c:1396 msgid "Connect/Refresh index" msgstr "" #: mainwindow.c:1404 msgid "Reorder" msgstr "" #: mainwindow.c:1405 msgid "Update MP3 player with reordered list" msgstr "" #: mainwindow.c:1413 msgid "Delete" msgstr "" #: mainwindow.c:1414 msgid "Delete selected files" msgstr "" #: mainwindow.c:1636 msgid "Flash Memory" msgstr "" #: mainwindow.c:1639 msgid "Select internal flash memory" msgstr "" #: mainwindow.c:1672 msgid "SmartMedia" msgstr "" #: mainwindow.c:1675 msgid "Select SmartMedia card memory" msgstr "" #: mainwindow.c:1726 mainwindow.c:1799 mainwindow.c:1836 msgid "Name" msgstr "" #: mainwindow.c:1760 msgid "Play Files" msgstr "" #: mainwindow.c:1764 msgid "Stop playing" msgstr "" #: mainwindow.c:1768 msgid "Send Files to Mpman" msgstr "" #: mainwindow.c:1772 msgid "Remove Files" msgstr "" #: mainwindow.c:1776 msgid "File Properties" msgstr "" #: waitdialog.c:84 msgid "Minimize" msgstr "" mplinuxman/po/install.sh0000755000175000006300000000066210003155620014675 0ustar boskobosko#!/bin/sh # Install locale mo files in /usr/local/share/locale # call this from makefile cd `dirname $0` for name in `find *.po 2> /dev/null`; do MOFILE=`echo $name | sed s/po/mo/` msgfmt $name -o $MOFILE mv -v $MOFILE $LOCALE_DIR/`echo $MOFILE | sed s/.mo//`/LC_MESSAGES/$LOCALE_PACKAGE.mo done # copy binary version of german translation, (no source available) cp -v "german compiled"/mplinuxman.mo $LOCALE_DIR/de/LC_MESSAGES mplinuxman/po/nl.po0000644000175000006300000003257310520460404013652 0ustar boskobosko# Nederlandse vertaling van MpLinuxMan # This file is distributed under the same license as the mplinuxman package. # Boško Andjelković , 2006. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: 1.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2006-10-25 23:01+0200\n" "PO-Revision-Date: 2006-10-27 19:45+1\n" "Last-Translator: Boško Andjelković \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: main.c:156 msgid "Mplinuxman is already running\n" msgstr "Mplinuxman draait reeds\n" #: main.c:161 msgid "" "Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n" "\n" "If the program crashed before. Please report it to\n" "http://mplinuxman.sourceforge.net\n" "\n" "Do you want to continue loading anyway?" msgstr "" "/tmp/mplinuxman.pid. gevonden Wellicht draait Mplinuxman reeds.\n" "\n" "Indien het programma de vorige keer is vastgelopen, meld het dan a.u.b. aan\n" "http://mplinuxman.sourceforge.net\n" "\n" #: main.c:171 msgid "gthreads not supported\n" msgstr "gthreads is niet ondersteund\n" #: miscwindow.c:59 msgid "File Info " msgstr "Bestands Informatie" #: miscwindow.c:76 msgid "ID3 Tag" msgstr "ID3 Tag" #: miscwindow.c:84 msgid "MPEG Info" msgstr "MPEG Informatie" #: miscwindow.c:93 miscwindow.c:234 msgid "Title" msgstr "Titel" #: miscwindow.c:93 msgid "Artist" msgstr "Artiest" #: miscwindow.c:93 msgid "Album" msgstr "Album" #: miscwindow.c:93 msgid "Comment" msgstr "Commentaar" #: miscwindow.c:111 msgid "Version" msgstr "Versie" #: miscwindow.c:111 msgid "layer" msgstr "laag" #: miscwindow.c:111 msgid "Bitrate" msgstr "Bitrate" #: miscwindow.c:111 msgid "Samplerate" msgstr "Samplerate" #: miscwindow.c:111 msgid "stereo" msgstr "stereo" #: miscwindow.c:111 msgid "copyright" msgstr "copyright" #: miscwindow.c:111 mainwindow.c:1740 mainwindow.c:1810 mainwindow.c:1847 msgid "size" msgstr "grootte" #: miscwindow.c:124 miscwindow.c:126 msgid "no" msgstr "nee" #: miscwindow.c:124 miscwindow.c:126 msgid "yes" msgstr "ja" #: miscwindow.c:197 msgid "Options" msgstr "Voorkeuren" #: miscwindow.c:207 msgid "Interface" msgstr "Interface" #: miscwindow.c:208 msgid "Show toolbar text labels" msgstr "Toon werkbalk tekst" #: miscwindow.c:210 msgid "Try to connect to device on startup" msgstr "Probeer te verbinden met het apparaat bij het opstarten" #: miscwindow.c:212 msgid "Load default playlist on startup" msgstr "Laad standaard afspeellijst bij het opstarten" #: miscwindow.c:214 msgid "" "Exit program when device is unplugged\n" "requires hotplug support (/sbin/hotplug)" msgstr "" "Programma afsluiten wanneer het apparaat niet is aangesloten\n" "hotplug ondersteuning (/sbin/hotplug) is vereist" #: miscwindow.c:219 msgid "MP3 player" msgstr "MP3 speler" #: miscwindow.c:220 #, c-format msgid "Command to play mp3 (%f = selected filenames)" msgstr "Opdracht om mp3 af te spelen (%f = geselecteerde bestanden)" #: miscwindow.c:226 msgid "Command to stop playing mp3" msgstr "Opdracht om te stoppen met het afspelen van mp3" #: miscwindow.c:235 msgid "Use customized track title format" msgstr "Gebruik aangepast nummer titel formaat" #: miscwindow.c:237 msgid "Title format" msgstr "Titel formaat" #: miscwindow.c:244 #, c-format msgid "%f File name" msgstr "%f Bestandsnaam" #: miscwindow.c:247 #, c-format msgid "%p Performer/artist" msgstr "%p Artiest" #: miscwindow.c:250 #, c-format msgid "%a Album" msgstr "%a Album" #: miscwindow.c:253 msgid "%t Track name" msgstr "%t Nummer naam" #: miscwindow.c:256 #, c-format msgid "%c Comment" msgstr "%c Commentaar" #: miscwindow.c:263 msgid "Advanced" msgstr "Geavanceerd" #: miscwindow.c:264 msgid "Specify vendor / product ID" msgstr "Specificeer fabrikant /product ID" #: miscwindow.c:267 msgid "Device ID" msgstr "Apparaat ID" #: miscwindow.c:284 msgid "Enable logging" msgstr "Houd logboek bij" #: miscwindow.c:527 msgid "Contgratulations you found an easter egg!" msgstr "Gefeliciteerd, u heeft een easter egg gevonden!" #: miscwindow.c:555 msgid "Lead developers:" msgstr "Hoofd ontwikkelaars:" #: miscwindow.c:560 msgid "Testing and patches:" msgstr "Testen en patches:" #: miscwindow.c:575 msgid "" "Mplinuxman is a file manager program for the MPMan F60,F55,F50, and d-link " "dmp-220 USB portable MP3 players." msgstr "" "Mplinuxman is een bestandsbeheer programma voor de MPMan F60,F55,F50, en d-link " "dmp-220 USB draagbare MP3 spelers." #: mainwindow.c:139 #, c-format msgid "Error Connecting Device " msgstr "Fout tijdens het verbinden met het apparaat" #: mainwindow.c:140 #, c-format msgid "" "%s\n" "\n" "Make sure the device is plugged into the USB port, or try reloading the USB " "module" msgstr "" "%s\n" "\n" "Controleer of het apparaat aangesloten is op de USB poort, of probeer de USB " "module opnieuwte laden" #: mainwindow.c:145 msgid "No device detected" msgstr "Apparaat niet gevonden" #: mainwindow.c:148 #, c-format msgid "Error From Device" msgstr "Fout van apparaat" #: mainwindow.c:149 #, c-format msgid "" "%s\n" "\n" "The device reported an error" msgstr "" "%s\n" "\n" "Het apparaat heeft een fout gemeld" #: mainwindow.c:152 mainwindow.c:167 #, c-format msgid "Error" msgstr "Fout" #: mainwindow.c:153 #, c-format msgid "" "%s\n" "\n" "Make sure the requested directory or temporary directory is accessible" msgstr "" "%s\n" "\n" "Controleer of de geselecteerde map of tijdelijke map toegankelijk is." #: mainwindow.c:156 #, c-format msgid "USB Error" msgstr "USB fout" #: mainwindow.c:157 #, c-format msgid "" "%s\n" "\n" "Make sure the USB device is working properly" msgstr "" "%s\n" "\n" "Controleer of het USB apparaat correct werkt" #: mainwindow.c:160 #, c-format msgid "Error Copying File" msgstr "Fout bij kopiëren van bestand" #: mainwindow.c:161 #, c-format msgid "" "%s\n" "\n" "Make the device is not full" msgstr "" "%s\n" "\n" "Controleer of het apparaat niet vol is" #: mainwindow.c:168 #, c-format msgid "An unkown error occurred" msgstr "Een onbekende fout heeft plaatsgevonden" #: mainwindow.c:246 #, c-format msgid "%d File(s) selected %d,%03d k" msgstr "%d Bestand(en) geselecteerd %d,%03d k" #: mainwindow.c:328 msgid "free" msgstr "vrij" #: mainwindow.c:328 msgid "total" msgstr "totaal" #: mainwindow.c:328 msgid "used" msgstr "gebruikt" #: mainwindow.c:426 msgid "Internal memory selected" msgstr "Intern geheugen geselecteerd" #: mainwindow.c:447 msgid "SmartMedia card selected" msgstr "SmartMedia kaart geselecteerd" #: mainwindow.c:469 msgid "Add directory..." msgstr "Map toevoegen..." #: mainwindow.c:486 mainwindow.c:1562 msgid "Reading Directory" msgstr "Map aan het lezen" #: mainwindow.c:531 msgid "Add file..." msgstr "Bestand toevoegen..." #: mainwindow.c:534 msgid "Music Files" msgstr "Muziek bestanden" #: mainwindow.c:586 msgid "Send non-Mp3 file..." msgstr "Non-mp3 bestand verzenden..." #: mainwindow.c:596 msgid "sending file" msgstr "bestand aan het verzenden" #: mainwindow.c:702 mainwindow.c:1576 #, c-format msgid "sending %s" msgstr "%s aan het verzenden" #: mainwindow.c:894 msgid "Select save directory..." msgstr "Selecteer map voor opslag..." #: mainwindow.c:1066 msgid "Select playlist..." msgstr "Selecteer afspeellijst..." #: mainwindow.c:1068 mainwindow.c:1132 msgid "Playlists" msgstr "Afspeellijsten" #: mainwindow.c:1085 msgid "Loading Playlist" msgstr "Afspeellijst aan het laden" #: mainwindow.c:1106 msgid "Loaded Playlist" msgstr "Afspeellijst geladen" #: mainwindow.c:1110 msgid "Error Loading Playlist" msgstr "Fout bij het van laden afspeelijst" #: mainwindow.c:1130 msgid "Save playlist..." msgstr "Afspeellijst opslaan..." #: mainwindow.c:1168 msgid "Saved Playlist" msgstr "Afspeellijst opgeslagen" #: mainwindow.c:1171 msgid "Error Saving Playlist" msgstr "Fout bij het opslaan van afspeellijst" #: mainwindow.c:1215 msgid "" "This will delete all data in Flash Memory\n" "Would you like to continue?" msgstr "" "Dit zal alle data in het Flash Geheugen wissen\n" "Wilt u doorgaan?" #: mainwindow.c:1219 msgid "Formatting Internal Memory" msgstr "Intern geheugen aan het formateren" #: mainwindow.c:1223 msgid "" "This will delete all data in SmartMedia\n" "Would you like to continue?" msgstr "" "Dit zal alle data in de SmartMedia kaart wifssen\n" "Wilt u doorgaan?" #: mainwindow.c:1228 msgid "Formatting SmartMedia" msgstr "SmartMedia aan het formateren" #: mainwindow.c:1232 msgid "" "This will format SmartMedia for camera\n" "Would you like to continue?" msgstr "" "Dit zal SmartMedia formateren voor een camera\n" "Wilt u doorgaan?" #: mainwindow.c:1237 msgid "Formatting SmartMedia for camera" msgstr "SmartMedia aan het formateren voor een camera" #: mainwindow.c:1255 msgid "/_File" msgstr "/_Bestand" #: mainwindow.c:1256 msgid "/File/_Add" msgstr "/Bestand/_Toevoegen" #: mainwindow.c:1257 msgid "/File/Add/Directory..." msgstr "/Bestand/Toevoegen/Map toevoegen..." #: mainwindow.c:1258 msgid "/File/Add/File..." msgstr "/Bestand/Toevoegen/Bestand toevoegen..." #: mainwindow.c:1259 mainwindow.c:1263 mainwindow.c:1265 msgid "/File/sep1" msgstr "/Bestand/sep1" #: mainwindow.c:1260 msgid "/File/_Send..." msgstr "/Bestand/_Verzenden..." #: mainwindow.c:1261 msgid "/File/_Remove" msgstr "/Bestand/Ve_rwijderen" #: mainwindow.c:1262 msgid "/File/_Properties" msgstr "/Bestand/_Eigenschappen" #: mainwindow.c:1264 msgid "/File/Send non mp3 file..." msgstr "/Bestand/Non-mp3 bestand verzenden..." #: mainwindow.c:1266 msgid "/File/_Quit" msgstr "/Bestand/_Afsluiten" #: mainwindow.c:1267 msgid "/_Mpman" msgstr "/_Mpman" #: mainwindow.c:1268 msgid "/Mpman/_Refresh" msgstr "/Mpman/_Verversen" #: mainwindow.c:1269 msgid "/Mpman/_Get..." msgstr "/Mpman/_Overzetten..." #: mainwindow.c:1270 msgid "/Mpman/_Delete" msgstr "/Mpman/Ve_rwijderen" #: mainwindow.c:1271 msgid "/Mpman/sep1" msgstr "/Mpman/sep1" #: mainwindow.c:1272 msgid "/Mpman/Format Internal Memory" msgstr "/Mpman/Intern Geheugen formateren" #: mainwindow.c:1273 msgid "/Mpman/Format SmartMedia card" msgstr "/Mpman/SmartMedia kaart formateren" #: mainwindow.c:1274 msgid "/Mpman/Format SmartMedia for camera" msgstr "/Mpman/SmartMedia formateren voor camera" #: mainwindow.c:1275 msgid "/_Edit" msgstr "/Be_werken" #: mainwindow.c:1276 msgid "/Edit/Select _All Ctrl+A" msgstr "/Bewerken/_Alles selecteren Ctrl+A" #: mainwindow.c:1277 msgid "/Edit/sep1" msgstr "/Bewerken/sep1" #: mainwindow.c:1278 msgid "/Edit/_Options" msgstr "/Bewerken/_Voorkeuren" #: mainwindow.c:1279 msgid "/_Playlist" msgstr "/_Afspeellijst" #: mainwindow.c:1280 msgid "/Playlist/_Load..." msgstr "/Afspeellijst/_Laden" #: mainwindow.c:1281 msgid "/Playlist/_Add..." msgstr "/Afspeellijst/_Toevoegen" #: mainwindow.c:1282 msgid "/Playlist/sep1" msgstr "/Afspeellijst/sep1" #: mainwindow.c:1283 msgid "/Playlist/Sa_ve as..." msgstr "/Afspeellijst/O_pslaan als..." #: mainwindow.c:1284 msgid "/Playlist/Save as Default" msgstr "/Afspeellijst/Opslaan als standaard" #: mainwindow.c:1285 msgid "/Help" msgstr "/_Hulp" #: mainwindow.c:1286 msgid "/Help/About" msgstr "/Hulp/Over" #: mainwindow.c:1321 mainwindow.c:1386 msgid "Send" msgstr "Verzenden" #: mainwindow.c:1322 msgid "Send selected files to Mpman F60" msgstr "Geselecteerde bestanden verzenden naar de Mpman F60" #: mainwindow.c:1330 msgid "Add Directory" msgstr "Map toevoegen" #: mainwindow.c:1334 msgid "Add File" msgstr "Map toevoegen" #: mainwindow.c:1341 msgid "Add" msgstr "Toevoegen" #: mainwindow.c:1342 msgid "Add files to list" msgstr "Bestanden toevoegen aan de lijst" #: mainwindow.c:1352 msgid "Remove" msgstr "Verwijderen" #: mainwindow.c:1353 msgid "Remove selected files from list" msgstr "Geselecteerde bestanden verwijderen uit de lijst" #: mainwindow.c:1361 msgid "Properties" msgstr "Eigenschappen" #: mainwindow.c:1362 msgid "Show file properties" msgstr "Toon bestands eigenschappen" #: mainwindow.c:1373 msgid "Random" msgstr "Willekeurig" #: mainwindow.c:1374 msgid "Create random list to fill available memory" msgstr "Creër willekeurige lijst om het beschikbare geheugen te vullen" #: mainwindow.c:1387 msgid "Send selected files to PC" msgstr "Verzend geselecteerde bestanden naar de PC" #: mainwindow.c:1395 msgid "Refresh List" msgstr "Ververs lijst" #: mainwindow.c:1396 msgid "Connect/Refresh index" msgstr "Verbind/Ververs index" #: mainwindow.c:1404 msgid "Reorder" msgstr "Opnieuw ordenen" #: mainwindow.c:1405 msgid "Update MP3 player with reordered list" msgstr "MP3 speler bijwerken met de opnieuw geordende lijst" #: mainwindow.c:1413 msgid "Delete" msgstr "Verwijderen" #: mainwindow.c:1414 msgid "Delete selected files" msgstr "Verwijder geselecteerde bestanden" #: mainwindow.c:1636 msgid "Flash Memory" msgstr "Flash Geheugen" #: mainwindow.c:1639 msgid "Select internal flash memory" msgstr "Selecteer intern flash geheugen" #: mainwindow.c:1672 msgid "SmartMedia" msgstr "SmartMedia" #: mainwindow.c:1675 msgid "Select SmartMedia card memory" msgstr "Selecteer SmartMedia kaart geheugen" #: mainwindow.c:1726 mainwindow.c:1799 mainwindow.c:1836 msgid "Name" msgstr "Naam" #: mainwindow.c:1760 msgid "Play Files" msgstr "Speel bestanden af" #: mainwindow.c:1764 msgid "Stop playing" msgstr "Stop met afspelen" #: mainwindow.c:1768 msgid "Send Files to Mpman" msgstr "Verzend bestanden naar de Mpman" #: mainwindow.c:1772 msgid "Remove Files" msgstr "Verwijder bestanden" #: mainwindow.c:1776 msgid "File Properties" msgstr "Bestands Eigenschappen" #: waitdialog.c:84 msgid "Minimize" msgstr "Minimaliseer" mplinuxman/po/ja.po0000644000175000006300000003230310000243225013613 0ustar boskobosko# translation of mplinuxman.po to Japanese # Copyright (C) 2003 Free Software Foundation, Inc. # Shimada "Misya" Hirofumi , 2003. # Shimada Misya Hirofumi , 2003. # msgid "" msgstr "" "Project-Id-Version: ja\n" "POT-Creation-Date: 2004-01-12 01:29+1300\n" "PO-Revision-Date: 2003-12-28 23:54+0900\n" "Last-Translator: Shimada Misya Hirofumi \n" "Language-Team: Japanese\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.0.2\n" #: main.c:156 msgid "Mplinuxman is already running\n" msgstr "Mplinuxmanは既に実行しています\n" #: main.c:161 msgid "" "Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n" "\n" "If the program crashed before. Please report it to\n" "http://mplinuxman.sourceforge.net\n" "\n" "Do you want to continue loading anyway?" msgstr "" "/tmp/mplinuxman.pidを見つけました。Mplinuxmanは既に実行していると思われま" "す。\n" "\n" "もし、それ以前にプログラムがクラッシュしたのなら、そのことを下記にレポートし" "てください。\n" "http://mplinuxman.sourceforge.net\n" "\n" "このまま継続して読み込みを続けますか?" #: main.c:171 msgid "gthreads not supported\n" msgstr "gthreadsをサポートしていません\n" #: dirdialog.c:388 msgid "Select directory" msgstr "ディレクトリを選択" #: dirdialog.c:413 msgid "Show Hidden Directories" msgstr "隠されたディレクトリを表示" #: miscwindow.c:59 msgid "File Info " msgstr "ファイル情報" #: miscwindow.c:76 msgid "ID3 Tag" msgstr "ID3タグ" #: miscwindow.c:84 msgid "MPEG Info" msgstr "MPEG情報" #: miscwindow.c:93 miscwindow.c:234 msgid "Title" msgstr "タイトル" #: miscwindow.c:93 msgid "Artist" msgstr "アーティスト" #: miscwindow.c:93 msgid "Album" msgstr "アルバム" #: miscwindow.c:93 msgid "Comment" msgstr "コメント" #: miscwindow.c:111 msgid "Version" msgstr "バージョン" #: miscwindow.c:111 msgid "layer" msgstr "レイヤー" #: miscwindow.c:111 msgid "Bitrate" msgstr "ビットレート" #: miscwindow.c:111 msgid "Samplerate" msgstr "サンプルレート" #: miscwindow.c:111 msgid "stereo" msgstr "ステレオ" #: miscwindow.c:111 msgid "copyright" msgstr "著作権" #: mainwindow.c:1689 mainwindow.c:1759 mainwindow.c:1796 miscwindow.c:111 msgid "size" msgstr "サイズ" #: miscwindow.c:124 miscwindow.c:126 msgid "no" msgstr "いいえ" #: miscwindow.c:124 miscwindow.c:126 msgid "yes" msgstr "はい" #: miscwindow.c:197 msgid "Options" msgstr "オプション" #: miscwindow.c:207 msgid "Interface" msgstr "インターフェイス" #: miscwindow.c:208 msgid "Show toolbar text labels" msgstr "ツールバーのテキストラベルを表示" #: miscwindow.c:210 msgid "Try to connect to device on startup" msgstr "起動時に接続を試みる" #: miscwindow.c:212 msgid "Load default playlist on startup" msgstr "起動時にデフォルトのプレイリストを読み込む" #: miscwindow.c:214 msgid "" "Exit program when device is unplugged\n" "requires hotplug support (/sbin/hotplug)" msgstr "" "デバイスの切断時、プログラムを終了\n" "ホットプラグのサポートが必要(/sbin/hotplug)" #: miscwindow.c:219 msgid "MP3 player" msgstr "MP3プレーヤー" #: miscwindow.c:220 #, c-format msgid "Command to play mp3 (%f = selected filenames)" msgstr "mp3を再生するコマンド (%f = 選択されたファイル名)" #: miscwindow.c:226 msgid "Command to stop playing mp3" msgstr "mp3の再生を止めるコマンド" #: miscwindow.c:235 msgid "Use customized track title format" msgstr "カスタマイズされたトラック名フォーマットを使用" #: miscwindow.c:237 msgid "Title format" msgstr "タイトルフォーマット" #: miscwindow.c:244 #, c-format msgid "%f File name" msgstr "%f ファイル名" #: miscwindow.c:247 #, c-format msgid "%p Performer/artist" msgstr "%p 演奏者/アーティスト" #: miscwindow.c:250 msgid "%a Album" msgstr "%a アルバム" #: miscwindow.c:253 msgid "%t Track name" msgstr "%t トラック名" #: miscwindow.c:256 #, c-format msgid "%c Comment" msgstr "%c コメント" #: miscwindow.c:263 msgid "Advanced" msgstr "高度" #: miscwindow.c:264 msgid "Specify vendor / product ID" msgstr "ベンダー/プロダクトIDを指定" #: miscwindow.c:267 msgid "Device ID" msgstr "デバイスID" #: miscwindow.c:284 msgid "Enable logging" msgstr "ログを取る" #: miscwindow.c:528 msgid "Contgratulations you found an easter egg!" msgstr "イースターエッグ発見おめでとにょ!" #: mainwindow.c:116 msgid "Error Connecting Device " msgstr "デバイス接続エラー" #: mainwindow.c:117 #, c-format msgid "" "%s\n" "\n" "Make sure the device is plugged into the USB port, or try reloading the USB " "module" msgstr "" "%s\n" "\n" "USBポートにデバイスが繋がっているか確認するか、USBモジュールの再読込を試して" "ください" #: mainwindow.c:122 msgid "No device detected" msgstr "デバイスが見つかりません" #: mainwindow.c:125 msgid "Error From Device" msgstr "デバイスからのエラー" #: mainwindow.c:126 #, c-format msgid "" "%s\n" "\n" "The device reported an error" msgstr "" "%s\n" "\n" "デバイスはエラーを返しました" #: mainwindow.c:129 mainwindow.c:144 msgid "Error" msgstr "エラー" #: mainwindow.c:130 #, c-format msgid "" "%s\n" "\n" "Make sure the requested directory or temporary directory is accessible" msgstr "" "%s\n" "\n" "要求されたディレクトリかテンポラリディレクトリがアクセス可能か確認してくださ" "い" #: mainwindow.c:133 msgid "USB Error" msgstr "USBエラー" #: mainwindow.c:134 #, c-format msgid "" "%s\n" "\n" "Make sure the USB device is working properly" msgstr "" "%s\n" "\n" "USBデバイスが正しく動作しているか確認してください" #: mainwindow.c:137 msgid "Error Copying File" msgstr "ファイルコピー中のエラー" #: mainwindow.c:138 #, c-format msgid "" "%s\n" "\n" "Make the device is not full" msgstr "" "%s\n" "\n" "デバイスがいっぱいでないか確認してください" #: mainwindow.c:145 msgid "An unkown error occurred" msgstr "不明なエラーが発生" #: mainwindow.c:175 mainwindow.c:1512 msgid "Reading Directory" msgstr "フォルダを読み込み" #: mainwindow.c:236 msgid "sending file" msgstr "ファイルの送信" #: mainwindow.c:307 #, c-format msgid "%d File(s) selected %d,%03d k" msgstr "%d ファイルを選択 %d,%03d k" #: mainwindow.c:389 msgid "free" msgstr "フリー" #: mainwindow.c:389 msgid "total" msgstr "合計" #: mainwindow.c:389 msgid "used" msgstr "使用済" #: mainwindow.c:487 msgid "Internal memory selected" msgstr "内蔵メモリを選択" #: mainwindow.c:508 msgid "SmartMedia card selected" msgstr "スマートメディアカードを選択" #: mainwindow.c:546 mainwindow.c:575 msgid "Select File" msgstr "ファイルを選択" #: mainwindow.c:689 mainwindow.c:1525 #, c-format msgid "sending %s" msgstr "送信中 %s" #: mainwindow.c:1054 msgid "Select Playlist" msgstr "プレイリストを選択" #: mainwindow.c:1069 msgid "Loading Playlist" msgstr "プレイリストを読み込み" #: mainwindow.c:1089 msgid "Loaded Playlist" msgstr "読み込んだプレイリスト" #: mainwindow.c:1092 msgid "Error Loading Playlist" msgstr "プレイリストの読み込み中にエラー" #: mainwindow.c:1112 msgid "Save Playlist" msgstr "プレイリストの保存" #: mainwindow.c:1143 msgid "Saved Playlist" msgstr "保存したプレイリスト" #: mainwindow.c:1146 msgid "Error Saving Playlist" msgstr "プレイリストの保存中にエラー" #: mainwindow.c:1186 msgid "" "This will delete all data in Flash Memory\n" "Would you like to continue?" msgstr "" "フラッシュメモリー内のデータは全て削除されます。\n" "継続しますか?" #: mainwindow.c:1189 msgid "" "This will delete all data in SmartMedia\n" "Would you like to continue?" msgstr "" "スマートメディア内のデータは全て削除されます。\n" "継続しますか?" #: mainwindow.c:1194 msgid "Formatting Internal Memory" msgstr "内蔵メモリのフォーマット" #: mainwindow.c:1206 msgid "/_File" msgstr "/ファイル(_F)" #: mainwindow.c:1207 msgid "/File/_Add" msgstr "/ファイル(_F)/追加(_A)" #: mainwindow.c:1208 msgid "/File/Add/Directory" msgstr "/ファイル(_F)/追加(_A)/ディレクトリ(_D)" #: mainwindow.c:1209 msgid "/File/Add/File" msgstr "/ファイル(_F)/追加(_A)/ファイル(_F)" #: mainwindow.c:1210 mainwindow.c:1214 mainwindow.c:1216 msgid "/File/sep1" msgstr "/ファイル(_F)/sep1" #: mainwindow.c:1211 msgid "/File/_Send" msgstr "/ファイル(_F)/送信(_S)" #: mainwindow.c:1212 msgid "/File/_Remove" msgstr "/ファイル(_F)/削除(_R)" #: mainwindow.c:1213 msgid "/File/_Properties" msgstr "/ファイル(_F)/プロパティ(_P)" #: mainwindow.c:1215 msgid "/File/Send non mp3 file" msgstr "/ファイル(_F)/mp3以外のファイルを送信" #: mainwindow.c:1217 msgid "/File/_Quit" msgstr "/ファイル(_F)/終了(_Q)" #: mainwindow.c:1218 msgid "/_Mpman" msgstr "/_Mpman" #: mainwindow.c:1219 msgid "/Mpman/_Rfresh" msgstr "/Mpman/更新(_R)" #: mainwindow.c:1220 msgid "/Mpman/_Get" msgstr "/Mpman/獲得(_G)" #: mainwindow.c:1221 msgid "/Mpman/_Delete" msgstr "/Mpman/削除(_D)" #: mainwindow.c:1222 msgid "/Mpman/sep1" msgstr "/Mpman/sep1" #: mainwindow.c:1223 msgid "/Mpman/Format Internal Memory" msgstr "/Mpman/内蔵メモリをフォーマット" #: mainwindow.c:1224 msgid "/Mpman/Format SmartMedia card" msgstr "/Mpman/スマートメディアカードをフォーマット" #: mainwindow.c:1225 msgid "/_Edit" msgstr "/編集(_E)" #: mainwindow.c:1226 msgid "/Edit/Select _All Ctrl+A" msgstr "/編集(_E)/すべて選択(_A) Ctrl+A" #: mainwindow.c:1227 msgid "/Edit/sep1" msgstr "/編集(_E)/sep1" #: mainwindow.c:1228 msgid "/Edit/_Options" msgstr "/編集(_E)/オプション(_O)" #: mainwindow.c:1229 msgid "/_Playlist" msgstr "/プレイリスト(_P)" #: mainwindow.c:1230 msgid "/Playlist/_Load" msgstr "/プレイリスト(_P)/読み込み(_L)" #: mainwindow.c:1231 msgid "/Playlist/_Add" msgstr "/プレイリスト(_P)/追加(_A)" #: mainwindow.c:1232 msgid "/Playlist/sep1" msgstr "/プレイリスト(_P)/sep1" #: mainwindow.c:1233 msgid "/Playlist/Sa_ve as" msgstr "/プレイリスト(_P)/名前を付けて保存(_V)" #: mainwindow.c:1234 msgid "/Playlist/Save as Default" msgstr "/プレイリスト(_P)/デフォルトとして保存" #: mainwindow.c:1235 msgid "/Help" msgstr "/ヘルプ" #: mainwindow.c:1236 msgid "/Help/About" msgstr "/ヘルプ/アバウト" #: mainwindow.c:1271 mainwindow.c:1336 msgid "Send" msgstr "送信" #: mainwindow.c:1272 msgid "Send selected files to Mpman F60" msgstr "選択したファイルをMpman F60へ送信" #: mainwindow.c:1280 msgid "Add Directory" msgstr "フォルダを追加" #: mainwindow.c:1284 msgid "Add File" msgstr "ファイルを追加" #: mainwindow.c:1291 msgid "Add" msgstr "追加" #: mainwindow.c:1292 msgid "Add files to list" msgstr "ファイルをリストへ追加" #: mainwindow.c:1302 msgid "Remove" msgstr "削除" #: mainwindow.c:1303 msgid "Remove selected files from list" msgstr "リストから選択されたファイルを削除" #: mainwindow.c:1311 msgid "Properties" msgstr "プロパティ" #: mainwindow.c:1312 msgid "Show file properties" msgstr "ファイルのプロパティを表示" #: mainwindow.c:1323 msgid "Random" msgstr "ランダム" #: mainwindow.c:1324 msgid "Create random list to fill available memory" msgstr "使用可能メモリを埋め、ランダムリストを作成" #: mainwindow.c:1337 msgid "Send selected files to PC" msgstr "選択したファイルをPCへ送信" #: mainwindow.c:1345 msgid "Refresh List" msgstr "リストを更新" #: mainwindow.c:1346 msgid "Connect/Refresh index" msgstr "接続/インデックスを更新" #: mainwindow.c:1354 msgid "Reorder" msgstr "リローダー" #: mainwindow.c:1355 msgid "Update MP3 player with reordered list" msgstr "録音済リストを含めMP3プレーヤーを更新" #: mainwindow.c:1363 msgid "Delete" msgstr "削除" #: mainwindow.c:1364 msgid "Delete selected files" msgstr "選択されたファイルを削除" #: mainwindow.c:1585 msgid "Flash Memory" msgstr "フラッシュメモリ" #: mainwindow.c:1588 msgid "Select internal flash memory" msgstr "内蔵フラッシュメモリを選択" #: mainwindow.c:1621 msgid "SmartMedia" msgstr "スマートメディア" #: mainwindow.c:1624 msgid "Select SmartMedia card memory" msgstr "スマートメディアカードメモリを選択" #: mainwindow.c:1675 mainwindow.c:1748 mainwindow.c:1785 msgid "Name" msgstr "名前" #: mainwindow.c:1709 msgid "Play Files" msgstr "ファイルを再生" #: mainwindow.c:1713 msgid "Stop playing" msgstr "再生を停止する" #: mainwindow.c:1717 msgid "Send Files to Mpman" msgstr "ファイルをMpmanへ送る" #: mainwindow.c:1721 msgid "Remove Files" msgstr "ファイルを削除" #: mainwindow.c:1725 msgid "File Properties" msgstr "ファイルのプロパティ" #: waitdialog.c:84 msgid "Minimize" msgstr "最小化" mplinuxman/po/fr.po0000644000175000006300000003064010000243325013633 0ustar boskobosko# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2004-01-12 01:29+1300\n" "PO-Revision-Date: 2003-03-12 22:36+0100\n" "Last-Translator: Thomas Jost \n" "Language-Team: Français (French) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.6\n" #: main.c:156 msgid "Mplinuxman is already running\n" msgstr "Mplinuxman est déjà lancé\n" #: main.c:161 msgid "" "Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n" "\n" "If the program crashed before. Please report it to\n" "http://mplinuxman.sourceforge.net\n" "\n" "Do you want to continue loading anyway?" msgstr "" "/tmp/mplinuxman.pid a été trouvé. Il est possible que Mplinuxman soit déjà " "lancé.\n" "\n" "Si le programme a planté, veuillez le signaler à\n" "http://mplinuxman.sourceforge.net\n" "\n" "Voulez-vous continuer le chargement quand même ?" #: main.c:171 msgid "gthreads not supported\n" msgstr "gthreads non supporté\n" #: dirdialog.c:388 msgid "Select directory" msgstr "Choisissez un répertoire" #: dirdialog.c:413 msgid "Show Hidden Directories" msgstr "Afficher les répertoires cachés" #: miscwindow.c:59 msgid "File Info " msgstr "Infos du fichier" #: miscwindow.c:76 msgid "ID3 Tag" msgstr "Tag ID3" #: miscwindow.c:84 msgid "MPEG Info" msgstr "Infos MPEG" #: miscwindow.c:93 miscwindow.c:234 msgid "Title" msgstr "Titre" #: miscwindow.c:93 msgid "Artist" msgstr "Artiste" #: miscwindow.c:93 msgid "Album" msgstr "Album" #: miscwindow.c:93 msgid "Comment" msgstr "Commentaire" #: miscwindow.c:111 msgid "Version" msgstr "Version" #: miscwindow.c:111 msgid "layer" msgstr "Couche (layer)" #: miscwindow.c:111 msgid "Bitrate" msgstr "Taux" #: miscwindow.c:111 msgid "Samplerate" msgstr "Taux d'échantillonage" #: miscwindow.c:111 msgid "stereo" msgstr "Stéréo" #: miscwindow.c:111 msgid "copyright" msgstr "Copyright" #: mainwindow.c:1689 mainwindow.c:1759 mainwindow.c:1796 miscwindow.c:111 msgid "size" msgstr "Taille" #: miscwindow.c:124 miscwindow.c:126 msgid "no" msgstr "non" #: miscwindow.c:124 miscwindow.c:126 msgid "yes" msgstr "oui" #: miscwindow.c:197 msgid "Options" msgstr "Options" #: miscwindow.c:207 msgid "Interface" msgstr "Interface" #: miscwindow.c:208 msgid "Show toolbar text labels" msgstr "Afficher les étiquettes dans la barre d'outils" #: miscwindow.c:210 msgid "Try to connect to device on startup" msgstr "Essayer de se connecter au périphérique au démarrage" #: miscwindow.c:212 msgid "Load default playlist on startup" msgstr "Charger la liste de lecture par défaut au démarrage" #: miscwindow.c:214 msgid "" "Exit program when device is unplugged\n" "requires hotplug support (/sbin/hotplug)" msgstr "" "Quitter le programme quand le périphérique est débranché\n" "requiert le support de la connection à chaud \"hotplug\" (/sbin/hotplug)" #: miscwindow.c:219 msgid "MP3 player" msgstr "Lecteur MP3" #: miscwindow.c:220 #, c-format msgid "Command to play mp3 (%f = selected filenames)" msgstr "Commande pour jouer les MP3 (%f = noms des fichiers sélectionnés)" #: miscwindow.c:226 msgid "Command to stop playing mp3" msgstr "Commande pour arrêter la lecture des MP3" #: miscwindow.c:235 msgid "Use customized track title format" msgstr "" #: miscwindow.c:237 msgid "Title format" msgstr "" #: miscwindow.c:244 #, c-format msgid "%f File name" msgstr "" #: miscwindow.c:247 #, c-format msgid "%p Performer/artist" msgstr "" #: miscwindow.c:250 #, fuzzy msgid "%a Album" msgstr "Album" #: miscwindow.c:253 msgid "%t Track name" msgstr "" #: miscwindow.c:256 #, fuzzy, c-format msgid "%c Comment" msgstr "Commentaire" #: miscwindow.c:263 msgid "Advanced" msgstr "" #: miscwindow.c:264 msgid "Specify vendor / product ID" msgstr "" #: miscwindow.c:267 msgid "Device ID" msgstr "" #: miscwindow.c:284 msgid "Enable logging" msgstr "" #: miscwindow.c:528 msgid "Contgratulations you found an easter egg!" msgstr "Félicitations, vous avez trouvé un oeuf de Pâques !" #: mainwindow.c:116 msgid "Error Connecting Device " msgstr "Erreur lors de la connexion au périphérique" #: mainwindow.c:117 #, c-format msgid "" "%s\n" "\n" "Make sure the device is plugged into the USB port, or try reloading the USB " "module" msgstr "" "%s\n" "\n" "Assurez-vous que le périphérique est branché sur le port USB, ou essayez de " "recharger le module USB." #: mainwindow.c:122 msgid "No device detected" msgstr "Aucun périphérique détecté" #: mainwindow.c:125 msgid "Error From Device" msgstr "Erreur du périphérique" #: mainwindow.c:126 #, c-format msgid "" "%s\n" "\n" "The device reported an error" msgstr "" "%s\n" "\n" "Le périphérique a signalé une erreur" #: mainwindow.c:129 mainwindow.c:144 msgid "Error" msgstr "Erreur" #: mainwindow.c:130 #, c-format msgid "" "%s\n" "\n" "Make sure the requested directory or temporary directory is accessible" msgstr "" "%s\n" "\n" "Assurez-vous que le répertoire demandé ou que le répertoire temporaire est " "accessible" #: mainwindow.c:133 msgid "USB Error" msgstr "Erreur USB" #: mainwindow.c:134 #, c-format msgid "" "%s\n" "\n" "Make sure the USB device is working properly" msgstr "" "%s\n" "\n" "Assurez-vous que le périphérique USB fonctionne correctement" #: mainwindow.c:137 msgid "Error Copying File" msgstr "Erreur lors de la copie du fichier" #: mainwindow.c:138 #, c-format msgid "" "%s\n" "\n" "Make the device is not full" msgstr "" "%s\n" "\n" "Assurez-vous que le périphérique n'est pas plein" #: mainwindow.c:145 msgid "An unkown error occurred" msgstr "Une erreur inconnue est survenue" #: mainwindow.c:175 mainwindow.c:1512 msgid "Reading Directory" msgstr "Lecture du répertoire" #: mainwindow.c:236 msgid "sending file" msgstr "Envoi du fichier" #: mainwindow.c:307 #, c-format msgid "%d File(s) selected %d,%03d k" msgstr "%d fichier(s) sélectionné(s) %d %03d k" #: mainwindow.c:389 msgid "free" msgstr "libres" #: mainwindow.c:389 #, fuzzy msgid "total" msgstr "Titre" #: mainwindow.c:389 msgid "used" msgstr "utilisés" #: mainwindow.c:487 msgid "Internal memory selected" msgstr "Mémoire interne sélectionnée" #: mainwindow.c:508 msgid "SmartMedia card selected" msgstr "Carte SmartMedia sélectionnée" #: mainwindow.c:546 mainwindow.c:575 msgid "Select File" msgstr "Sélectionnez un fichier" #: mainwindow.c:689 mainwindow.c:1525 #, c-format msgid "sending %s" msgstr "Envoi de %s" #: mainwindow.c:1054 msgid "Select Playlist" msgstr "Sélectionnez une liste de lecture" #: mainwindow.c:1069 msgid "Loading Playlist" msgstr "Chargement de la liste de lecture" #: mainwindow.c:1089 msgid "Loaded Playlist" msgstr "Liste de lecture chargée" #: mainwindow.c:1092 msgid "Error Loading Playlist" msgstr "Erreur lors du chargement de la liste de lecture" #: mainwindow.c:1112 msgid "Save Playlist" msgstr "Enregistrer la liste de lecture" #: mainwindow.c:1143 msgid "Saved Playlist" msgstr "Liste de lecture enregistrée" #: mainwindow.c:1146 msgid "Error Saving Playlist" msgstr "Erreur lors de l'enregistrement de la liste de lecture" #: mainwindow.c:1186 msgid "" "This will delete all data in Flash Memory\n" "Would you like to continue?" msgstr "" "Ceci effacera toutes les données de la mémoire interne\n" "Voulez-vous vraiment continuer ?" #: mainwindow.c:1189 msgid "" "This will delete all data in SmartMedia\n" "Would you like to continue?" msgstr "" "Ceci effacera toutes les données de la carte SmartMedia\n" "Voulez-vous vraiment continuer ?" #: mainwindow.c:1194 msgid "Formatting Internal Memory" msgstr "Formatage de la mémoire interne" # This next part is the tree layout of the menus (eg /menu/submenu) # The _ underscores are for keyboard shortcuts, they are not needed #: mainwindow.c:1206 msgid "/_File" msgstr "/_Fichier" #: mainwindow.c:1207 msgid "/File/_Add" msgstr "/Fichier/_Ajouter" #: mainwindow.c:1208 msgid "/File/Add/Directory" msgstr "/Fichier/Ajouter/Répertoire" #: mainwindow.c:1209 msgid "/File/Add/File" msgstr "/Fichier/Ajouter/Fichier" #: mainwindow.c:1210 mainwindow.c:1214 mainwindow.c:1216 msgid "/File/sep1" msgstr "/Fichier/sep1" #: mainwindow.c:1211 msgid "/File/_Send" msgstr "/Fichier/_Envoyer" #: mainwindow.c:1212 msgid "/File/_Remove" msgstr "/Fichier/E_ffacer" #: mainwindow.c:1213 msgid "/File/_Properties" msgstr "/Fichier/_Propriétés" #: mainwindow.c:1215 msgid "/File/Send non mp3 file" msgstr "/Fichier/Envoyer un fichier non-MP3" #: mainwindow.c:1217 msgid "/File/_Quit" msgstr "/Fichier/_Quitter" #: mainwindow.c:1218 msgid "/_Mpman" msgstr "/_Mpman" #: mainwindow.c:1219 msgid "/Mpman/_Rfresh" msgstr "/Mpman/_Rafraîchir" #: mainwindow.c:1220 msgid "/Mpman/_Get" msgstr "/Mpman/_Envoyer" #: mainwindow.c:1221 msgid "/Mpman/_Delete" msgstr "/Mpman/_Effacer" #: mainwindow.c:1222 msgid "/Mpman/sep1" msgstr "/Mpman/sep1" #: mainwindow.c:1223 msgid "/Mpman/Format Internal Memory" msgstr "/Mpman/Formater la mémoire interne" #: mainwindow.c:1224 msgid "/Mpman/Format SmartMedia card" msgstr "/Mpman/Formater la carte SmartMedia" #: mainwindow.c:1225 msgid "/_Edit" msgstr "/_Édition" #: mainwindow.c:1226 msgid "/Edit/Select _All Ctrl+A" msgstr "/Édition/Sélectionner _tout Ctrl+A" #: mainwindow.c:1227 msgid "/Edit/sep1" msgstr "/Édition/sep1" #: mainwindow.c:1228 msgid "/Edit/_Options" msgstr "/Édition/_Options" #: mainwindow.c:1229 msgid "/_Playlist" msgstr "/_Liste de lecture" #: mainwindow.c:1230 msgid "/Playlist/_Load" msgstr "/Liste de lecture/_Charger" #: mainwindow.c:1231 msgid "/Playlist/_Add" msgstr "/Liste de lecture/_Ajouter" #: mainwindow.c:1232 msgid "/Playlist/sep1" msgstr "/Liste de lecture/sep1" #: mainwindow.c:1233 msgid "/Playlist/Sa_ve as" msgstr "/Liste de lecture/Enregistrer _sous" #: mainwindow.c:1234 msgid "/Playlist/Save as Default" msgstr "/Liste de lecture/Enregistrer comme liste par défaut" #: mainwindow.c:1235 msgid "/Help" msgstr "/Aide" #: mainwindow.c:1236 msgid "/Help/About" msgstr "/Aide/A propos" #: mainwindow.c:1271 mainwindow.c:1336 msgid "Send" msgstr "Envoyer" #: mainwindow.c:1272 msgid "Send selected files to Mpman F60" msgstr "Envoyer les fichiers sélectionnés au Mpman F60" #: mainwindow.c:1280 msgid "Add Directory" msgstr "Ajouter un répertoire" #: mainwindow.c:1284 msgid "Add File" msgstr "Ajouter un fichier" #: mainwindow.c:1291 msgid "Add" msgstr "Ajouter" #: mainwindow.c:1292 msgid "Add files to list" msgstr "Ajouter les fichiers à la liste" #: mainwindow.c:1302 msgid "Remove" msgstr "Effacer" #: mainwindow.c:1303 msgid "Remove selected files from list" msgstr "Effacer les fichiers sélectionnés de la liste" #: mainwindow.c:1311 msgid "Properties" msgstr "Propriétés" #: mainwindow.c:1312 msgid "Show file properties" msgstr "Montrer les propriétés du fichier" #: mainwindow.c:1323 msgid "Random" msgstr "Aléatoire" #: mainwindow.c:1324 msgid "Create random list to fill available memory" msgstr "Créer une liste aléatoire pour remplir la mémoire disponible" #: mainwindow.c:1337 msgid "Send selected files to PC" msgstr "Transférer les fichiers sélectionnés sur le PC" #: mainwindow.c:1345 msgid "Refresh List" msgstr "Rafraîchir la liste" #: mainwindow.c:1346 msgid "Connect/Refresh index" msgstr "Connecter/Rafraîchir l'index" #: mainwindow.c:1354 msgid "Reorder" msgstr "Trier" #: mainwindow.c:1355 msgid "Update MP3 player with reordered list" msgstr "Mettre à jour le lecteur MP3 avec la liste triée" #: mainwindow.c:1363 msgid "Delete" msgstr "Effacer" #: mainwindow.c:1364 msgid "Delete selected files" msgstr "Effacer les fichiers sélectionnés" #: mainwindow.c:1585 msgid "Flash Memory" msgstr "Mémoire interne" #: mainwindow.c:1588 msgid "Select internal flash memory" msgstr "Sélectionner la mémoire interne" #: mainwindow.c:1621 msgid "SmartMedia" msgstr "SmartMedia" #: mainwindow.c:1624 msgid "Select SmartMedia card memory" msgstr "Sélectionner la carte SmartMedia" #: mainwindow.c:1675 mainwindow.c:1748 mainwindow.c:1785 msgid "Name" msgstr "Nom" #: mainwindow.c:1709 msgid "Play Files" msgstr "Lire les fichiers" #: mainwindow.c:1713 msgid "Stop playing" msgstr "Arrêter la lecture" #: mainwindow.c:1717 msgid "Send Files to Mpman" msgstr "Envoyer les fichiers au Mpman" #: mainwindow.c:1721 msgid "Remove Files" msgstr "Effacer les fichiers" #: mainwindow.c:1725 msgid "File Properties" msgstr "Propriétés du fichier" #: waitdialog.c:84 msgid "Minimize" msgstr "Réduire" mplinuxman/po/es.po0000644000175000006300000002766210000243325013645 0ustar boskobosko# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Free Software Foundation, Inc. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "POT-Creation-Date: 2004-01-12 01:29+1300\n" "PO-Revision-Date: 2003-06-22 21:31+0100\n" "Last-Translator: Marcos Mainar Lalmolda \n" "Language-Team: Español (Spanish) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: main.c:156 msgid "Mplinuxman is already running\n" msgstr "Mplinuxman ya está funcionando\n" #: main.c:161 msgid "" "Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n" "\n" "If the program crashed before. Please report it to\n" "http://mplinuxman.sourceforge.net\n" "\n" "Do you want to continue loading anyway?" msgstr "" "/tmp/mplinuxman.pid ha sido encontrado. Puede que Mplinuxman ya funcione. \n" "\n" "Si el programa falló antes, por favor contar lo sucedido a\n" "http://mplinuxman.sourceforge.net\n" "\n" "¿Quiere continuar con la carga de todos modos?" #: main.c:171 msgid "gthreads not supported\n" msgstr "gthreads no soportado\n" #: dirdialog.c:388 msgid "Select directory" msgstr "Seleccione directorio" #: dirdialog.c:413 msgid "Show Hidden Directories" msgstr "Mostrando directorios ocultos" #: miscwindow.c:59 msgid "File Info " msgstr "Información del archivo" #: miscwindow.c:76 msgid "ID3 Tag" msgstr "Tag ID3" #: miscwindow.c:84 msgid "MPEG Info" msgstr "Información MPEG" #: miscwindow.c:93 miscwindow.c:234 msgid "Title" msgstr "Título" #: miscwindow.c:93 msgid "Artist" msgstr "Artista" #: miscwindow.c:93 msgid "Album" msgstr "Album" #: miscwindow.c:93 msgid "Comment" msgstr "Comentarios" #: miscwindow.c:111 msgid "Version" msgstr "Versión" #: miscwindow.c:111 msgid "layer" msgstr "Compresión" #: miscwindow.c:111 msgid "Bitrate" msgstr "Bitrate" #: miscwindow.c:111 msgid "Samplerate" msgstr "Samplerate" #: miscwindow.c:111 msgid "stereo" msgstr "Estéreo" #: miscwindow.c:111 msgid "copyright" msgstr "Copyright" #: mainwindow.c:1689 mainwindow.c:1759 mainwindow.c:1796 miscwindow.c:111 msgid "size" msgstr "Tamaño" #: miscwindow.c:124 miscwindow.c:126 msgid "no" msgstr "no" #: miscwindow.c:124 miscwindow.c:126 msgid "yes" msgstr "si" #: miscwindow.c:197 msgid "Options" msgstr "Opciones" #: miscwindow.c:207 msgid "Interface" msgstr "Interfaz" #: miscwindow.c:208 msgid "Show toolbar text labels" msgstr "Mostrar las etiquetas en la barra de herramientas" #: miscwindow.c:210 msgid "Try to connect to device on startup" msgstr "Intentar conectar al periférico al iniciar" #: miscwindow.c:212 msgid "Load default playlist on startup" msgstr "Cargar la lista de lectura por defecto al iniciar" #: miscwindow.c:214 msgid "" "Exit program when device is unplugged\n" "requires hotplug support (/sbin/hotplug)" msgstr "" "Salir del programa cuando se desconecte el periférico\n" "Requiere conexión instantánea (/sbin/hotplug)" #: miscwindow.c:219 msgid "MP3 player" msgstr "Reproductor de MP3" #: miscwindow.c:220 #, c-format msgid "Command to play mp3 (%f = selected filenames)" msgstr "Comando para reproducir MP3 (%f = archivos seleccionados)" #: miscwindow.c:226 msgid "Command to stop playing mp3" msgstr "Comando para detener la reproducción de MP3" #: miscwindow.c:235 msgid "Use customized track title format" msgstr "" #: miscwindow.c:237 msgid "Title format" msgstr "" #: miscwindow.c:244 #, c-format msgid "%f File name" msgstr "" #: miscwindow.c:247 #, c-format msgid "%p Performer/artist" msgstr "" #: miscwindow.c:250 #, fuzzy msgid "%a Album" msgstr "Album" #: miscwindow.c:253 msgid "%t Track name" msgstr "" #: miscwindow.c:256 #, fuzzy, c-format msgid "%c Comment" msgstr "Comentarios" #: miscwindow.c:263 msgid "Advanced" msgstr "" #: miscwindow.c:264 msgid "Specify vendor / product ID" msgstr "" #: miscwindow.c:267 msgid "Device ID" msgstr "" #: miscwindow.c:284 msgid "Enable logging" msgstr "" #: miscwindow.c:528 msgid "Contgratulations you found an easter egg!" msgstr "¡Enhorabuena, has encontrado un huevo de Pascua!" #: mainwindow.c:116 msgid "Error Connecting Device " msgstr "Error conectando al periférico" #: mainwindow.c:117 #, c-format msgid "" "%s\n" "\n" "Make sure the device is plugged into the USB port, or try reloading the USB " "module" msgstr "" "%s\n" "\n" "Asegúrese de que el cable USB está conectado o intente recargar el módulo USB" #: mainwindow.c:122 msgid "No device detected" msgstr "Ningún periférico detectado" #: mainwindow.c:125 msgid "Error From Device" msgstr "Error del periférico" #: mainwindow.c:126 #, c-format msgid "" "%s\n" "\n" "The device reported an error" msgstr "" "%s\n" "\n" "El periférico informó de un error" #: mainwindow.c:129 mainwindow.c:144 msgid "Error" msgstr "Error" #: mainwindow.c:130 #, c-format msgid "" "%s\n" "\n" "Make sure the requested directory or temporary directory is accessible" msgstr "" "%s\n" "\n" "Asegúrese de que el directorio pedido o el directorio temporal estáaccesible" #: mainwindow.c:133 msgid "USB Error" msgstr "Error del USB" #: mainwindow.c:134 #, c-format msgid "" "%s\n" "\n" "Make sure the USB device is working properly" msgstr "" "%s\n" "\n" "Asegúrese de que el periférico USB funciona perfectamente" #: mainwindow.c:137 msgid "Error Copying File" msgstr "Error copiando archivo" #: mainwindow.c:138 #, c-format msgid "" "%s\n" "\n" "Make the device is not full" msgstr "" "%s\n" "\n" "Asegúrese de que la unidad no esté llena" #: mainwindow.c:145 msgid "An unkown error occurred" msgstr "Ocurrió un error desconocido" #: mainwindow.c:175 mainwindow.c:1512 msgid "Reading Directory" msgstr "Leyendo directorio" #: mainwindow.c:236 msgid "sending file" msgstr "Enviando archivo" #: mainwindow.c:307 #, c-format msgid "%d File(s) selected %d,%03d k" msgstr "%d Archivos(s) seleccionados %d,%03d k" #: mainwindow.c:389 msgid "free" msgstr "libres" #: mainwindow.c:389 msgid "total" msgstr "total" #: mainwindow.c:389 msgid "used" msgstr "usado" #: mainwindow.c:487 msgid "Internal memory selected" msgstr "Memoria interna seleccionada" #: mainwindow.c:508 msgid "SmartMedia card selected" msgstr "SmartMedia Card seleccionada" #: mainwindow.c:546 mainwindow.c:575 msgid "Select File" msgstr "Seleccione Archivo" #: mainwindow.c:689 mainwindow.c:1525 #, c-format msgid "sending %s" msgstr "Enviando %s" #: mainwindow.c:1054 msgid "Select Playlist" msgstr "Seleccione lista de lectura" #: mainwindow.c:1069 msgid "Loading Playlist" msgstr "Cargando lista de lectura" #: mainwindow.c:1089 msgid "Loaded Playlist" msgstr "Cargada lista de lectura" #: mainwindow.c:1092 msgid "Error Loading Playlist" msgstr "Error cargando la lista de lectura" #: mainwindow.c:1112 msgid "Save Playlist" msgstr "Guardar la lista de lectura" #: mainwindow.c:1143 msgid "Saved Playlist" msgstr "Lista de lectura guardada" #: mainwindow.c:1146 msgid "Error Saving Playlist" msgstr "Error guardando lista de lectura" #: mainwindow.c:1186 msgid "" "This will delete all data in Flash Memory\n" "Would you like to continue?" msgstr "" "Esto borrará todos los datos en su Memoria Interna\n" "¿Quiere continuar?" #: mainwindow.c:1189 msgid "" "This will delete all data in SmartMedia\n" "Would you like to continue?" msgstr "" "Esto borrará todos los datos en su SmartMedia\n" "¿Quiere continuar?" #: mainwindow.c:1194 msgid "Formatting Internal Memory" msgstr "Formateando memoria interna" #: mainwindow.c:1206 msgid "/_File" msgstr "/_Archivo" #: mainwindow.c:1207 msgid "/File/_Add" msgstr "/Archivo/_Añadir" #: mainwindow.c:1208 msgid "/File/Add/Directory" msgstr "/Archivo/Añadir/Directorio" #: mainwindow.c:1209 msgid "/File/Add/File" msgstr "/Archivo/Añadir/Archivo" #: mainwindow.c:1210 mainwindow.c:1214 mainwindow.c:1216 msgid "/File/sep1" msgstr "/Archivo/sep1" #: mainwindow.c:1211 msgid "/File/_Send" msgstr "/Archivo/_Enviar" #: mainwindow.c:1212 msgid "/File/_Remove" msgstr "/Archivo/_Borrar" #: mainwindow.c:1213 msgid "/File/_Properties" msgstr "/Archivo/_Propiedades" #: mainwindow.c:1215 msgid "/File/Send non mp3 file" msgstr "/Archivo/Enviar un archivo no-mp3" #: mainwindow.c:1217 msgid "/File/_Quit" msgstr "/Archivo/_Quitar" #: mainwindow.c:1218 msgid "/_Mpman" msgstr "/_Mpman" #: mainwindow.c:1219 msgid "/Mpman/_Rfresh" msgstr "/Mpman/_Actualizar" #: mainwindow.c:1220 msgid "/Mpman/_Get" msgstr "/Mpman/_Enviar" #: mainwindow.c:1221 msgid "/Mpman/_Delete" msgstr "/Mpman/_Borrar" #: mainwindow.c:1222 msgid "/Mpman/sep1" msgstr "/Mpman/sep1" #: mainwindow.c:1223 msgid "/Mpman/Format Internal Memory" msgstr "/Mpman/Borrar Memoria Interna" #: mainwindow.c:1224 msgid "/Mpman/Format SmartMedia card" msgstr "/Mpman/Borrar SmartMedia card" #: mainwindow.c:1225 msgid "/_Edit" msgstr "/_Edición" #: mainwindow.c:1226 msgid "/Edit/Select _All Ctrl+A" msgstr "/Edición/Seleccionar_todo Ctrl+A" #: mainwindow.c:1227 msgid "/Edit/sep1" msgstr "/Edición/sep1" #: mainwindow.c:1228 msgid "/Edit/_Options" msgstr "/Edición/_Opciones" #: mainwindow.c:1229 msgid "/_Playlist" msgstr "/_Lista de lectura" #: mainwindow.c:1230 msgid "/Playlist/_Load" msgstr "/Lista de lectura/_Cargar" #: mainwindow.c:1231 msgid "/Playlist/_Add" msgstr "/Lista de lectura/_Añadir" #: mainwindow.c:1232 msgid "/Playlist/sep1" msgstr "/Lista de lectura/sep1" #: mainwindow.c:1233 msgid "/Playlist/Sa_ve as" msgstr "/Lista de lectura/Guardar_como" #: mainwindow.c:1234 msgid "/Playlist/Save as Default" msgstr "/Lista de lectura/Guardar como lista de lectura por defecto" #: mainwindow.c:1235 msgid "/Help" msgstr "/Ayuda" #: mainwindow.c:1236 msgid "/Help/About" msgstr "/Ayuda/Acerca" #: mainwindow.c:1271 mainwindow.c:1336 msgid "Send" msgstr "Enviar" #: mainwindow.c:1272 msgid "Send selected files to Mpman F60" msgstr "Enviar los archivos seleccionados al Mpman F60" #: mainwindow.c:1280 msgid "Add Directory" msgstr "Añadir directorio" #: mainwindow.c:1284 msgid "Add File" msgstr "Añadir archivo" #: mainwindow.c:1291 msgid "Add" msgstr "Añadir" #: mainwindow.c:1292 msgid "Add files to list" msgstr "Añadir archivos a la lista" #: mainwindow.c:1302 msgid "Remove" msgstr "Borrar" #: mainwindow.c:1303 msgid "Remove selected files from list" msgstr "Borrar los archivos seleccionados de la lista" #: mainwindow.c:1311 msgid "Properties" msgstr "Propiedades" #: mainwindow.c:1312 msgid "Show file properties" msgstr "Mostrar propiedades del archivo" #: mainwindow.c:1323 msgid "Random" msgstr "Aleatorio" #: mainwindow.c:1324 msgid "Create random list to fill available memory" msgstr "Crear una lista aleatoria para remplazar la memoria disponible" #: mainwindow.c:1337 msgid "Send selected files to PC" msgstr "Enviar los archivos seleccionados al PC" #: mainwindow.c:1345 msgid "Refresh List" msgstr "Actualizar Lista" #: mainwindow.c:1346 msgid "Connect/Refresh index" msgstr "Conectar/Actualizar index" #: mainwindow.c:1354 msgid "Reorder" msgstr "Reordenar" #: mainwindow.c:1355 msgid "Update MP3 player with reordered list" msgstr "Actualizar el reproductor MP3 con la lista reordenada" #: mainwindow.c:1363 msgid "Delete" msgstr "Borrar" #: mainwindow.c:1364 msgid "Delete selected files" msgstr "Borrar archivos seleccionados" #: mainwindow.c:1585 msgid "Flash Memory" msgstr "Memoria interna" #: mainwindow.c:1588 msgid "Select internal flash memory" msgstr "Seleccionar la memoria interna" #: mainwindow.c:1621 msgid "SmartMedia" msgstr "SmartMedia" #: mainwindow.c:1624 msgid "Select SmartMedia card memory" msgstr "Seleccionar la memoria SmartMedia card" #: mainwindow.c:1675 mainwindow.c:1748 mainwindow.c:1785 msgid "Name" msgstr "Nombre" #: mainwindow.c:1709 msgid "Play Files" msgstr "Reproducir archivos" #: mainwindow.c:1713 msgid "Stop playing" msgstr "Detener reproducción" #: mainwindow.c:1717 msgid "Send Files to Mpman" msgstr "Enviar archivos al Mpman" #: mainwindow.c:1721 msgid "Remove Files" msgstr "Borrar archivos" #: mainwindow.c:1725 msgid "File Properties" msgstr "Propiedades del archivo" #: waitdialog.c:84 msgid "Minimize" msgstr "Minimizar" mplinuxman/po/de.po0000644000175000006300000003000110155313515013615 0ustar boskobosko# translation of de.po to # translation of de.po to # Copyright (C) 2004 Free Software Foundation, Inc. # Thomas Ritter , 2004. # msgid "" msgstr "" "Project-Id-Version: de\n" "POT-Creation-Date: 2004-01-12 01:29+1300\n" "PO-Revision-Date: 2004-12-05 17:08+0100\n" "Last-Translator: Thomas Ritter \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.9.1\n" #: main.c:156 msgid "Mplinuxman is already running\n" msgstr "Mplinuxman läuft bereits\n" #: main.c:161 msgid "" "Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n" "\n" "If the program crashed before. Please report it to\n" "http://mplinuxman.sourceforge.net\n" "\n" "Do you want to continue loading anyway?" msgstr "" "/tmp/mplinuxman.pid wurde gefunden. Mplinuxman könnte bereits gestartet sein\n" "\n" "Wenn das Programm zuvor abstürzte, schreiben Sie bitte an\n" "http://mplinuxman.sourceforge.net\n" "\n" "Wollen Sie trotzdem weiter machen?" #: main.c:171 msgid "gthreads not supported\n" msgstr "gthreads werden nicht unterstützt\n" #: dirdialog.c:388 msgid "Select directory" msgstr "Wähle einen Ordner aus" #: dirdialog.c:413 msgid "Show Hidden Directories" msgstr "Zeige versteckte Ordner" #: miscwindow.c:59 msgid "File Info " msgstr "Datei-Info" #: miscwindow.c:76 msgid "ID3 Tag" msgstr "ID3 Tag" #: miscwindow.c:84 msgid "MPEG Info" msgstr "MPEG Info" #: miscwindow.c:93 miscwindow.c:234 msgid "Title" msgstr "Titel" #: miscwindow.c:93 msgid "Artist" msgstr "Interpret" #: miscwindow.c:93 msgid "Album" msgstr "Album" #: miscwindow.c:93 msgid "Comment" msgstr "Kommentar" #: miscwindow.c:111 msgid "Version" msgstr "Version" #: miscwindow.c:111 msgid "layer" msgstr "layer" #: miscwindow.c:111 msgid "Bitrate" msgstr "Bit-Rate" #: miscwindow.c:111 msgid "Samplerate" msgstr "Sample-Rate" #: miscwindow.c:111 msgid "stereo" msgstr "Stereo" #: miscwindow.c:111 msgid "copyright" msgstr "Copyright" #: mainwindow.c:1689 mainwindow.c:1759 mainwindow.c:1796 miscwindow.c:111 msgid "size" msgstr "Grösse" #: miscwindow.c:124 miscwindow.c:126 msgid "no" msgstr "Nein" #: miscwindow.c:124 miscwindow.c:126 msgid "yes" msgstr "Ja" #: miscwindow.c:197 msgid "Options" msgstr "Optionen" #: miscwindow.c:207 msgid "Interface" msgstr "Interface" #: miscwindow.c:208 msgid "Show toolbar text labels" msgstr "Zeige Toolbar Text-Beschriftungen" #: miscwindow.c:210 msgid "Try to connect to device on startup" msgstr "Versuche, das Gerät beim Programmstart zu verbinden" #: miscwindow.c:212 msgid "Load default playlist on startup" msgstr "Lade Standard-Playlist beim Programmstart" #: miscwindow.c:214 msgid "" "Exit program when device is unplugged\n" "requires hotplug support (/sbin/hotplug)" msgstr "" "Beende das Programm, wenn das Gerät nicht angeschlossen ist\n" "benötigt hotplug-Unterstützung (/sbin/hotplug)" #: miscwindow.c:219 msgid "MP3 player" msgstr "MP3-Player" #: miscwindow.c:220 #, c-format msgid "Command to play mp3 (%f = selected filenames)" msgstr "Befehl um MP3s abzuspielen (%F = ausgewählte Dateinamen)" #: miscwindow.c:226 msgid "Command to stop playing mp3" msgstr "Befehl, um das abspielende MP3 zu stoppen" #: miscwindow.c:235 msgid "Use customized track title format" msgstr "Benutze eigenes Track-Titel-Format" #: miscwindow.c:237 msgid "Title format" msgstr "Titel-Format" #: miscwindow.c:244 #, c-format msgid "%f File name" msgstr "%f Dateiname" #: miscwindow.c:247 #, c-format msgid "%p Performer/artist" msgstr "%p Interpret" #: miscwindow.c:250 msgid "%a Album" msgstr "%a Album" #: miscwindow.c:253 msgid "%t Track name" msgstr "%t Dateiname" #: miscwindow.c:256 #, c-format msgid "%c Comment" msgstr "%c Kommentar" #: miscwindow.c:263 msgid "Advanced" msgstr "Fortgeschritten" #: miscwindow.c:264 msgid "Specify vendor / product ID" msgstr "Spezifiziere Verkäufer / Produkt-ID" #: miscwindow.c:267 msgid "Device ID" msgstr "Geräte-ID" #: miscwindow.c:284 msgid "Enable logging" msgstr "Aktiviere Aufzeichnung" #: miscwindow.c:528 msgid "Contgratulations you found an easter egg!" msgstr "Herzlichen Glückwunsch, du hast ein Osterei gefunden!" #: mainwindow.c:116 msgid "Error Connecting Device " msgstr "Fehler beim Verbinden des Geräts" #: mainwindow.c:117 #, c-format msgid "" "%s\n" "\n" "Make sure the device is plugged into the USB port, or try reloading the USB " "module" msgstr "" "%s\n" "\n" "Stellen Sie sicher, dass das Gerät am USB-Port angeschlossen ist, oder versuchen Sie, das USB-Modul erneut zu laden" #: mainwindow.c:122 msgid "No device detected" msgstr "Kein Gerät gefunden" #: mainwindow.c:125 msgid "Error From Device" msgstr "Fehler vom Gerät" #: mainwindow.c:126 #, c-format msgid "" "%s\n" "\n" "The device reported an error" msgstr "" "%s\n" "\n" "Das Gerät schickte eine Fehlermeldung" #: mainwindow.c:129 mainwindow.c:144 msgid "Error" msgstr "Fehler" #: mainwindow.c:130 #, c-format msgid "" "%s\n" "\n" "Make sure the requested directory or temporary directory is accessible" msgstr "" "%s\n" "\n" "Stellen Sie sicher, dass Sie auf den betreffenden Ordner zugreifen können" #: mainwindow.c:133 msgid "USB Error" msgstr "USB Fehler" #: mainwindow.c:134 #, c-format msgid "" "%s\n" "\n" "Make sure the USB device is working properly" msgstr "" "%s\n" "\n" "Stellen Sie sicher, dass das Gerät funktionstüchtig ist" #: mainwindow.c:137 msgid "Error Copying File" msgstr "Fehler beim Kopieren der Datei" #: mainwindow.c:138 #, c-format msgid "" "%s\n" "\n" "Make the device is not full" msgstr "" "%s\n" "\n" "Stellen Sie sicher, dass das Gerät nicht voll ist" #: mainwindow.c:145 msgid "An unkown error occurred" msgstr "Ein unbekannter Fehler trat auf" #: mainwindow.c:175 mainwindow.c:1512 msgid "Reading Directory" msgstr "Durchsuche Verzeichnis" #: mainwindow.c:236 msgid "sending file" msgstr "Schicke Datei" #: mainwindow.c:307 #, c-format msgid "%d File(s) selected %d,%03d k" msgstr "%d Datei(en) ausgewählt %d,%30d KB" #: mainwindow.c:389 msgid "free" msgstr "frei" #: mainwindow.c:389 msgid "total" msgstr "gesamt" #: mainwindow.c:389 msgid "used" msgstr "gefüllt" #: mainwindow.c:487 msgid "Internal memory selected" msgstr "Geräte-Speicher ausgewählt" #: mainwindow.c:508 msgid "SmartMedia card selected" msgstr "SmartMedia-Karte ausgewählt" #: mainwindow.c:546 mainwindow.c:575 msgid "Select File" msgstr "Ausgewählte Datei" #: mainwindow.c:689 mainwindow.c:1525 #, c-format msgid "sending %s" msgstr "sende %s" #: mainwindow.c:1054 msgid "Select Playlist" msgstr "Wähle Playlist aus" #: mainwindow.c:1069 msgid "Loading Playlist" msgstr "Lade Playlist" #: mainwindow.c:1089 msgid "Loaded Playlist" msgstr "Geladene Playlist" #: mainwindow.c:1092 msgid "Error Loading Playlist" msgstr "Fehler beim Laden der Playlist" #: mainwindow.c:1112 msgid "Save Playlist" msgstr "Speichere Playlist" #: mainwindow.c:1143 msgid "Saved Playlist" msgstr "Gespeicherte Playlist" #: mainwindow.c:1146 msgid "Error Saving Playlist" msgstr "Fehler beim Speichern der Playlist" #: mainwindow.c:1186 msgid "" "This will delete all data in Flash Memory\n" "Would you like to continue?" msgstr "" "Dies wird alle Daten im Geräte-Speicher löschen\n" "Möchten Sie weiterfahren?" #: mainwindow.c:1189 msgid "" "This will delete all data in SmartMedia\n" "Would you like to continue?" msgstr "" "Dies wird alle Daten auf der SmartMedia-Karte löschen\n" "Möchten Sie weiterfahren?" #: mainwindow.c:1194 msgid "Formatting Internal Memory" msgstr "Lösche Geräte-Speicher" #: mainwindow.c:1206 msgid "/_File" msgstr "/_Datei" #: mainwindow.c:1207 msgid "/File/_Add" msgstr "/Datei/_Hinzufügen" #: mainwindow.c:1208 msgid "/File/Add/Directory" msgstr "/Datei/Hinzufügen/Ordner" #: mainwindow.c:1209 msgid "/File/Add/File" msgstr "/Datei/Hinzufügen/Datei" #: mainwindow.c:1210 mainwindow.c:1214 mainwindow.c:1216 msgid "/File/sep1" msgstr "/Datei/sep1 " #: mainwindow.c:1211 msgid "/File/_Send" msgstr "/Datei/_Senden" #: mainwindow.c:1212 msgid "/File/_Remove" msgstr "/Datei/_Entfernen" #: mainwindow.c:1213 msgid "/File/_Properties" msgstr "/Datei/_Eigenschaften" #: mainwindow.c:1215 msgid "/File/Send non mp3 file" msgstr "/Datei/Senden sonstiger Daten" #: mainwindow.c:1217 msgid "/File/_Quit" msgstr "/Datei/_Beenden" #: mainwindow.c:1218 msgid "/_Mpman" msgstr "/_Mpman" #: mainwindow.c:1219 msgid "/Mpman/_Rfresh" msgstr "/Mpman/_Aktualisieren" #: mainwindow.c:1220 msgid "/Mpman/_Get" msgstr "/Mpman/_Holen" #: mainwindow.c:1221 msgid "/Mpman/_Delete" msgstr "/Mpman/_Löschen" #: mainwindow.c:1222 msgid "/Mpman/sep1" msgstr "/Mpman/sep1" #: mainwindow.c:1223 msgid "/Mpman/Format Internal Memory" msgstr "/Mpman/Geräte-Speicher löschen" #: mainwindow.c:1224 msgid "/Mpman/Format SmartMedia card" msgstr "/Mpman/SmartMedia-Karte löschen" #: mainwindow.c:1225 msgid "/_Edit" msgstr "/_Bearbeiten" #: mainwindow.c:1226 msgid "/Edit/Select _All Ctrl+A" msgstr "/Bearbeiten/Alles auswählen Ctrl+A" #: mainwindow.c:1227 msgid "/Edit/sep1" msgstr "/Bearbeiten/sep1" #: mainwindow.c:1228 msgid "/Edit/_Options" msgstr "/Bearbeiten/_Einstellungen" #: mainwindow.c:1229 msgid "/_Playlist" msgstr "/_Playlist" #: mainwindow.c:1230 msgid "/Playlist/_Load" msgstr "/Playlist/_Laden" #: mainwindow.c:1231 msgid "/Playlist/_Add" msgstr "/Playlist/_Hinzufügen" #: mainwindow.c:1232 msgid "/Playlist/sep1" msgstr "/Playlist/sep1 " #: mainwindow.c:1233 msgid "/Playlist/Sa_ve as" msgstr "/Playlist/Speichern unter" #: mainwindow.c:1234 msgid "/Playlist/Save as Default" msgstr "/Playlist/Speichern unter Standard" #: mainwindow.c:1235 msgid "/Help" msgstr "/Hilfe" #: mainwindow.c:1236 msgid "/Help/About" msgstr "/Hilfe/Über" #: mainwindow.c:1271 mainwindow.c:1336 msgid "Send" msgstr "Schicken" #: mainwindow.c:1272 msgid "Send selected files to Mpman F60" msgstr "Schicke ausgewählte Dateien auf den Mpman F60" #: mainwindow.c:1280 msgid "Add Directory" msgstr "Ordner hinzufügen" #: mainwindow.c:1284 msgid "Add File" msgstr "Datei hinzufügen" #: mainwindow.c:1291 msgid "Add" msgstr "Hinzufügen" #: mainwindow.c:1292 msgid "Add files to list" msgstr "Dateien zur Liste hinzufügen" #: mainwindow.c:1302 msgid "Remove" msgstr "Entfernen" #: mainwindow.c:1303 msgid "Remove selected files from list" msgstr "Ausgewählte Dateien von der Liste entfernen" #: mainwindow.c:1311 msgid "Properties" msgstr "Eigenschaften" #: mainwindow.c:1312 msgid "Show file properties" msgstr "Zeige Datei-Eigenschaften" #: mainwindow.c:1323 msgid "Random" msgstr "Zufallsliste" #: mainwindow.c:1324 msgid "Create random list to fill available memory" msgstr "Erzeuge Zufallsliste, die den noch freien Platz auffüllt" #: mainwindow.c:1337 msgid "Send selected files to PC" msgstr "Sende die ausgewählten Dateien auf den PC" #: mainwindow.c:1345 msgid "Refresh List" msgstr "Aktualisiere Liste" #: mainwindow.c:1346 msgid "Connect/Refresh index" msgstr "Verbinde/Aktualisiere Index" #: mainwindow.c:1354 msgid "Reorder" msgstr "Ordne neu" #: mainwindow.c:1355 msgid "Update MP3 player with reordered list" msgstr "Erneuere den MP3-Player mit der neu geordneten Liste" #: mainwindow.c:1363 msgid "Delete" msgstr "Löschen" #: mainwindow.c:1364 msgid "Delete selected files" msgstr "Lösche ausgewählte Dateien" #: mainwindow.c:1585 msgid "Flash Memory" msgstr "Geräte-Speicher" #: mainwindow.c:1588 msgid "Select internal flash memory" msgstr "Wähle den Geräte-Speicher aus" #: mainwindow.c:1621 msgid "SmartMedia" msgstr "SmartMedia-Karte" #: mainwindow.c:1624 msgid "Select SmartMedia card memory" msgstr "Wähle die SmartMedia-Karte aus" #: mainwindow.c:1675 mainwindow.c:1748 mainwindow.c:1785 msgid "Name" msgstr "Name" #: mainwindow.c:1709 msgid "Play Files" msgstr "Spiele Dateien ab" #: mainwindow.c:1713 msgid "Stop playing" msgstr "Abspielen stoppen" #: mainwindow.c:1717 msgid "Send Files to Mpman" msgstr "Sende Dateien zum Mpman" #: mainwindow.c:1721 msgid "Remove Files" msgstr "Entferne Dateien" #: mainwindow.c:1725 msgid "File Properties" msgstr "Datei-Eigenschaften" #: waitdialog.c:84 msgid "Minimize" msgstr "Minimiere" mplinuxman/ini/ini.h0000644000175000006300000000150207662770363014003 0ustar boskoboskostruct stringlist_s; struct stringlist_s { struct stringlist_s* next; char* string; }; typedef struct stringlist_s stringlist_t; struct section_s; struct section_s{ unsigned int count; stringlist_t* name; stringlist_t* value; struct section_s* next; char* sectionname; }; typedef struct section_s section_t; typedef struct { unsigned int count; section_t* sections; } inifile_t; void ini_DeleteSection(int filenum, char* secname); int ini_NewFile(); char* ini_ReadKeysValues(int filenum,char* secname,char** keyname); char* ini_ReadSections(int filenum); char* ini_ReadValue(int filenum,char* secname,char* key); int ini_Save(int filenum,char* filename); void ini_WriteString(int filenum, char* secname,char* key,char* value); void ini_Free(int filedex); void ini_Init(); int ini_ReadFile(char *buffer); mplinuxman/ini/ini.c0000644000175000006300000002264210364257066013777 0ustar boskobosko #include #include #include "ini.h" inifile_t openfiles[10]; int maxfiles = 10; char init = 1; stringlist_t* nextstr(stringlist_t* in) { return in->next; } section_t* nextsec(section_t* in) { return in->next; } void printsection(section_t* in) { stringlist_t* p; stringlist_t* p2; p = in->name; p2 = in->value; while(p) { printf("\"%s\"=\"%s\"\n",p->string,p2->string); p = nextstr(p); p2 = nextstr(p2); } } section_t* addsection(int fileno,section_t* current,char* name) { inifile_t* ini; section_t* sec; if (strlen(name) == 0) return NULL; ini = &openfiles[fileno]; if (ini->sections == 0) { sec = ini->sections = (section_t*) malloc(sizeof(section_t)); } else { sec = current->next = (section_t*) malloc(sizeof(section_t)); } ini->count++; sec->count = 0; sec->next = 0; sec->name = 0; sec->value = 0; sec->sectionname = (char*) malloc(strlen(name)+1); strcpy(sec->sectionname,name); return sec; } void addkeyvalue(section_t* sec,char* name,char* value) { int c; char* ptr; char* ptr2; stringlist_t* strl; int found = -1; if (strlen(name) == 0) return; if (strlen(value) == 0) return; c = sec->count; sec->count++; ptr = (char*) malloc(strlen(name)+1); strcpy(ptr,name); ptr2 = (char*) malloc(strlen(value)+1); strcpy(ptr2,value); if (!sec->name) { strl = sec->name = (stringlist_t*) malloc(sizeof(stringlist_t)); strl->string = ptr; strl->next = 0; } else { int i = 0; for(strl = sec->name;;strl=strl->next,i++) { if (strcmp(strl->string,ptr) == 0) { free(strl->string); strl->string = ptr; found = i; } if (strl->next == 0) break; } if (found < 0) { strl->next = (stringlist_t*) malloc(sizeof(stringlist_t)); strl = strl->next; strl->string = ptr; strl->next = 0; } } if (!sec->value) { strl = sec->value = (stringlist_t*) malloc(sizeof(stringlist_t)); strl->string = ptr2; strl->next = 0; } else { int i = 0; for(strl = sec->value;;strl=strl->next,i++) { if (i == found) { free(strl->string); strl->string = ptr2; } if (strl->next == 0) break; } if (found < 0) { strl->next = (stringlist_t*) malloc(sizeof(stringlist_t)); strl = strl->next; strl->string = ptr2; strl->next = 0; } } } void ini_Init() { int i; for(i=0;iname; while(p) { p2 = nextstr(p); free(p->string); free(p); p = p2; } p = in->value; while(p) { p2 = nextstr(p); free(p->string); free(p); p = p2; } } void ini_Free(int filedex) { section_t* del; section_t* tmp; del = openfiles[filedex].sections; if (!del) return; if (filedex >= maxfiles) return; do{ tmp = nextsec(del); deletesection(del); free(del->sectionname); free(del); } while(del = tmp); openfiles[filedex].count = 0; openfiles[filedex].sections = 0; } section_t* ini_FindSection(int filenum,char* name) { section_t* ptr; ptr = openfiles[filenum].sections; if (ptr == 0) return 0; do { if (strcmp(ptr->sectionname,name) == 0) return ptr; } while(ptr = nextsec(ptr)); return 0; } char* findvalue(section_t* sec,char* name) { stringlist_t* ptr; stringlist_t* ptr2; if (sec == 0) return 0; ptr = sec->name; ptr2 = sec->value; if ( (ptr == NULL) || (ptr2 == NULL)) return 0; do { if (strcmp(ptr->string,name) == 0) return ptr2->string; ptr2 = nextstr(ptr2); } while(ptr = nextstr(ptr)); return 0; } char* ini_ReadValue(int filenum,char* secname,char* key) { return findvalue(ini_FindSection(filenum,secname),key); } char* ini_ReadSections(int filenum){ static section_t* current = 0; char* retval; if (!current) { current = openfiles[filenum].sections; } if ((unsigned int)current == 1) { current = 0; return 0; } if (openfiles[filenum].count == 0) { current = 0; return 0; } retval = current->sectionname; current = current->next; if (!current) current = (section_t*)1; return retval; } char* ini_ReadKeysValues(int filenum,char* secname,char** keyname) { static section_t* current = 0; static stringlist_t* ptr = 0; static stringlist_t* ptr2 = 0; char* retval; if (!current) { current = ini_FindSection(filenum,secname); ptr = current->name; ptr2 = current->value; } if (!ptr) current = (section_t*)1; if ((unsigned int)current == 1) { current = 0; return 0; } *keyname = ptr->string; retval = ptr2->string; ptr = nextstr(ptr); ptr2 = nextstr(ptr2); return retval; } void ini_DeleteSection(int filenum, char* secname) { section_t* sec; section_t* t; sec = ini_FindSection(filenum,secname); if (!sec) return; deletesection(sec); if (sec == openfiles[filenum].sections) openfiles[filenum].sections = sec->next; else { for(t = openfiles[filenum].sections;t->next != sec;t = nextsec(t)); t->next = sec->next; } free(sec->sectionname); free(sec); openfiles[filenum].count--; } void ini_WriteString(int filenum, char* secname,char* key,char* value) { section_t* p; if (!(p = ini_FindSection(filenum,secname))) { if (openfiles[filenum].sections) for(p = openfiles[filenum].sections;p->next != 0;p = p->next); p = addsection(filenum,p,secname); } if (key) addkeyvalue(p,key,value); } int ini_Save(int filenum,char* filename) { FILE* fp; section_t* p; stringlist_t* str; stringlist_t* str2; char* comment = ";options file\n"; fp = fopen(filename,"wb"); if (!fp) return 0; fwrite(comment,1,strlen(comment),fp); for(p=openfiles[filenum].sections;p;p = nextsec(p)) { fwrite("[",1,1,fp); fwrite(p->sectionname,1,strlen(p->sectionname),fp); fwrite("]\n",1,2,fp); for(str=p->name,str2=p->value; str; str= nextstr(str),str2=nextstr(str2)) { fwrite(str->string,1,strlen(str->string),fp); fwrite("=",1,1,fp); fwrite(str2->string,1,strlen(str2->string),fp); fwrite("\n",1,1,fp); } fwrite("\n",1,1,fp); } fclose(fp); return 1; } /* int main() { int filedex; section_t* print; char input[64]; char input2[64]; char* c; ini_init(); filedex = ini_readfile("blah.ini"); printf("ini_readfile returned %d\n",filedex); print = openfiles[filedex].sections; do{ printf("\nsection \"%s\"\n",print->sectionname); printsection(print); } while(print = nextsec(print)); printf("there are %d sections\n",openfiles[filedex].count); while(c = ini_ReadSections(filedex)) printf("%s\n",c); while(c = ini_ReadSections(filedex)) printf("%s\n",c); printf("enter section to search"); gets(input); printf("enter key to get"); gets(input2); printf("result %s\n",ini_ReadValue(filedex,input,input2)); } */ mplinuxman/extra/mp_util/mputil.c0000644000175000006300000000603707662770361016554 0ustar boskobosko#include #include #include "f60lib.h" #include "mp3util.h" void file_ext_to_mpm(char* c) { if (strlen(c) < 5) return; c[strlen(c) - 1] = 'm'; c[strlen(c) - 2] = 'p'; c[strlen(c) - 3] = 'm'; c[strlen(c) - 4] = '.'; } void file_ext_to_mp3(char* c) { if (strlen(c) < 5) return; c[strlen(c) - 1] = '3'; c[strlen(c) - 2] = 'p'; c[strlen(c) - 3] = 'm'; c[strlen(c) - 4] = '.'; } int main(int argc,char** argv) { struct f60_dir* dirptr; int i; int filesize; char txt[51]; char filename[280]; usb_dev_handle *usb_hand = NULL; struct mp3_info* info; char *c; usb_init(); usb_find_busses(); usb_find_devices(); usb_hand = f60_init(); if (!usb_hand) goto error; if (strcmp("smart",argv[0] + (strlen(argv[0]) - 5)) == 0) f60_select_memory(SMARTMEDIA_MEMORY); if (argc == 1) goto end; if (strcmp("del",argv[1]) == 0 && argc == 3) { if (!f60_delete_file(usb_hand,atoi(argv[2]))) goto error; printf("deleted file\n"); goto end; } if (strcmp("send",argv[1]) == 0 && argc == 3) { strcpy(filename,"/tmp/"); strncat(filename,f60_strip_path(argv[2]),256); file_ext_to_mpm(filename); printf("encoding file...\n"); fflush(stdout); if (!f60_encode_file(argv[2],filename)) goto error; printf("uploading file...\n"); fflush(stdout); if (mp3_valid(argv[2])) { info = mp3_get_info(); if (info->hastag) { strncpy(txt,info->artist,24); strcat(txt," "); strncat(txt,info->title,24); if (!f60_send_file(usb_hand,filename,txt) ) goto error; } else if (!f60_send_file(usb_hand,filename,f60_strip_path(argv[2])) ) goto error; } else if (!f60_send_file(usb_hand,filename,f60_strip_path(argv[2])) ) goto error; unlink(filename); printf("done!\n"); goto end; } if (strcmp("get",argv[1]) == 0 && argc == 3) { printf("downloading file\n"); fflush(stdout); c = f60_get_file(usb_hand,atoi(argv[2]),"/tmp/"); if (c == NULL) goto error; printf("decoding file\n"); fflush(stdout); strncpy(filename,f60_strip_path(c),256); file_ext_to_mp3(filename); if (!f60_decode_file(c,filename)) goto error; unlink(c); goto end; } printf("usage %s del # | send filename | get #\n",argv[0]); f60_close(usb_hand); exit(1); end: dirptr = f60_get_dir(usb_hand); if (dirptr == NULL) { if (argc == 1) printf("usage %s del # | send filename | get #\n",argv[0]); goto error; } printf("index of MPMAN F60\n"); for(i=0;isize;i++) { f60_big2little_endian((int*)&dirptr->contents[i*256],&filesize); printf("%i] %9d %s\n",i,filesize,f60_strip_path(&dirptr->contents[i*256 + 21])); } printf("Total memory %dk Free Memory %dk\n", dirptr->total_memory /1024, dirptr->free_memory/1024); f60_close(usb_hand); exit(0); error: printf("%s\n",f60_strerror); f60_close(usb_hand); } mplinuxman/extra/mp_util/makefile0000644000175000006300000000046507662770361016575 0ustar boskoboskomputil: mputil.c ../../f60lib/f60lib.c ../../mp3util.c gcc -I../../ -I../../f60lib -I../../libusb mputil.c ../../f60lib/f60lib.c ../../mp3util.c ../../libusb/linux.c ../../libusb/descriptors.c ../../libusb/usb.c ../../libusb/error.c -o mputil ln -s mputil mputil_smart clean: rm mputil_smart rm mputil mplinuxman/extra/mp_util/USAGE.txt0000644000175000006300000000045007662770361016474 0ustar boskoboskomputil is command line utility for mpman (works with mp3 files only) usage ./mputil del # | send filename | get # or ./mputil_smart del # | send filename | get # for smartcard media with no arguments , prints file list on mpman ./mputil help to display help type make to compile it mplinuxman/extra/mplinuxman0000755000175000006300000000016607662770361015540 0ustar boskobosko#!/bin/sh export USBUSER=root chmod 0666 $DEVICE sudo -u $USBUSER -H sh --login -c "/usr/local/bin/mplinuxman &" & mplinuxman/extra/mpf60.usermap0000644000175000006300000000006007662770361015741 0ustar boskoboskomplinuxman 0x03 0x0a62 0x0006 0 0 0 0 0 0 0 0 0 mplinuxman/extra/mpf50.usermap0000644000175000006300000000006007662770361015740 0ustar boskoboskomplinuxman 0x03 0x0a62 0x0004 0 0 0 0 0 0 0 0 0 mplinuxman/f60lib/oldfont.h0000644000175000006300000005301007662770363015175 0ustar boskoboskounsigned char mpman_font[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0, 0x3, 0x28, 0x4, 0x64, 0x8, 0x84, 0xa, 0x84, 0xa, 0x64, 0x8, 0x28, 0x4, 0xf0, 0x3, 0xf0, 0x3, 0xd8, 0x7, 0x9c, 0xf, 0x7c, 0xd, 0x7c, 0xd, 0x9c, 0xf, 0xd8, 0x7, 0xf0, 0x3, 0xf0, 0x1, 0xf8, 0x3, 0xf8, 0x7, 0xf0, 0xf, 0xf8, 0x7, 0xf8, 0x3, 0xf0, 0x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e0, 0x4f, 0x8, 0x48, 0xc, 0x48, 0x6, 0x68, 0xe2, 0x3f, 0xe0, 0x1f, 0x0, 0x0, 0x4, 0x20, 0xfc, 0x3f, 0xfc, 0x3f, 0x24, 0x24, 0x20, 0x4, 0xe0, 0x7, 0xc0, 0x3, 0x0, 0x0, 0xe0, 0x47, 0xe8, 0x4f, 0x8, 0x48, 0x0, 0x48, 0x8, 0x68, 0xe8, 0x3f, 0xe0, 0x1f, 0x0, 0x0}; mplinuxman/f60lib/f60error.h0000644000175000006300000000027707662770361015202 0ustar boskobosko #define F60_ERROR_NONE 0 #define F60_ERROR_USB 1 #define F60_ERROR_CMD 2 #define F60_ERROR_OTHER 3 #define F60_ERROR_NO_DEVICE 4 #define F60_ERROR_DEVICE_FULL 5 #define F60_ERROR_UNKOWN 255 mplinuxman/f60lib/f60lib.h0000644000175000006300000000354510155317703014604 0ustar boskobosko#include "usb.h" #define F60_MAX_FILES 256 #define F60_MAX_FILENAME 128 #define F60_MAX_RESPONSE 512 #include "f60error.h" #define F60_VENDOR_ID 0x0a62 #define F60_PRODUCT_ID 0x0006 // Looks like the F50 can be supported just by checking for a different PRODUCT ID #define F50_VENDOR_ID F60_VENDOR_ID #define F50_PRODUCT_ID 0x0004 #define F55_VENDOR_ID F60_VENDOR_ID #define F55_PRODUCT_ID 0x000b #define F60_EPA_1 0x01 #define F60_EPA_2 0x82 #define FLASH_MEMORY 1 #define SMARTMEDIA_MEMORY 2 #define MPMAN_F50 1 #define MPMAN_F60 2 struct f60_dir { unsigned char size; int total_memory; int free_memory; char contents[F60_MAX_FILES * 256]; }; extern char f60_strerror[512]; extern int f60_error; extern unsigned char response[F60_MAX_RESPONSE]; extern int response_size; int f60_delete_file(usb_dev_handle *dev,unsigned char index); int f60_move_file(usb_dev_handle *dev,char* order,unsigned char size); char* f60_get_file(usb_dev_handle *dev,unsigned char index,char* path); int f60_send_file(usb_dev_handle *dev,char* filename,char* text); struct f60_dir* f60_get_dir(usb_dev_handle *dev); int f60_get_firmware_version(usb_dev_handle* dev); int f60_format_media(usb_dev_handle *dev, char x); int get_filename_offset(); struct usb_device* f60_get_device_by_id(short vendor,short product); void f60_set_debug(int level); char* f60_strip_path(char* filename); void f60_big2little_endian(int* from,int* to); void f60_little2big_endian(int* from,int* to); struct usb_dev_handle* f60_init(); void f60_close(struct usb_dev_handle* usb_hand); int f60_encode_file(char* source,char* dest); int f60_decode_file(char* source,char* dest); void f60_select_memory(int a); //int f60_check_for_device(); float f60_get_rw_progress(); struct usb_dev_handle* f60_init_with_id(unsigned short vendor, unsigned short product ); mplinuxman/f60lib/f60lib.c0000644000175000006300000005017410155317703014577 0ustar boskobosko#include #include #include #include /* Try to find endianess , standard C header? */ #ifndef USE_OSX #include #else #include #endif #include "font.h" #include "f60lib.h" char f60_strerror[512] = ""; int f60_error = F60_ERROR_NONE; unsigned char response[F60_MAX_RESPONSE]; int response_size; int debug = 0; int ep_addr_write = F60_EPA_1; int ep_addr_read = F60_EPA_2; int selected_memory = FLASH_MEMORY; int mpman_type = MPMAN_F60; int filename_offset = 21; struct usb_device *f60_dev = NULL; const char F60_CmdTerminator = 0x04; const char F60_GetFirmwareVersion[] = {0x05,0x30}; const char F60_GetDirectory[] = {0x05,0x10,0x43}; const char F60_DownloadFile[] = {0x05,0x50}; const char F60_DownloadFileInfo[] = {0x05,0x14,0x43}; const char F60_UploadFile[] = {0x05,0x16,0x43}; const char F60_DeleteFile[] = {0x05,0x18,0x43}; const char F60_MoveFiles[] = {0x05,0x1a,0x43}; const char F60_FormatMedia[] = {0x05,0x12,0x43}; const char F60_FormatMediaParam[] = {0x4e}; /* Smartmedia support thanks to Tholom Kiely */ const char SMF60_GetDirectory[] = {0x05,0x10,0x41}; //***Same as above, seems to work fine if do SMF60_DownloadFileInfo 1st! const char SMF60_DownloadFile[] = {0x05,0x50}; const char SMF60_DownloadFileInfo[] = {0x05,0x14,0x41}; const char SMF60_UploadFile[] = {0x05,0x16,0x41}; const char SMF60_DeleteFile[] = {0x05,0x18,0x41}; const char SMF60_MoveFiles[] = {0x05,0x1a,0x41}; const char SMF60_FormatMedia[] = {0x05,0x12,0x41}; char* f60_strip_path(char* filename) { char* c; c = filename + strlen(filename); while (c != filename) { c--; if (*c == '/' || *c == '\\') { c++; break; } } return c; } #ifndef BYTE_ORDER #error "BYTE_ORDER not defined" #endif // byteswap should only be done on little endian machines. should rename functions void f60_big2little_endian(int* from,int* to) { #if BYTE_ORDER == LITTLE_ENDIAN char* f; char* t; f = (char*) from; t = (char*) to; t[3] = f[0]; t[2] = f[1]; t[1] = f[2]; t[0] = f[3]; #else *to = *from; #endif } void f60_little2big_endian(int* from,int* to) { #if BYTE_ORDER == LITTLE_ENDIAN char* f; char* t; f = (char*) from; t = (char*) to; t[0] = f[3]; t[1] = f[2]; t[2] = f[1]; t[3] = f[0]; #else *to = *from; #endif } void f60_set_error(int error, char *fmt, ...) { va_list argptr; char msg[512]; va_start(argptr, fmt); vsprintf(msg, fmt, argptr); va_end(argptr); switch (error) { case F60_ERROR_USB: snprintf(f60_strerror, 512, "%s : %s", msg,usb_strerror()); break; case F60_ERROR_OTHER: snprintf(f60_strerror, 512, "%s : %s", msg,strerror(errno)); break; default: snprintf(f60_strerror, 512, "%s",msg); } f60_error = error; if (debug) printf("%s\n",f60_strerror); } void f60_print_data(char* buffer,int len) { int i; if (len > debug) len = debug; for(i=0;inext) for(dev = bus->devices; dev; dev = dev->next) if (dev->descriptor.idVendor == vendor) if (dev->descriptor.idProduct == product) return dev; return NULL; } /* int f60_check_for_device() { struct usb_device *dev; dev = f60_get_device_by_id(F60_VENDOR_ID,F60_PRODUCT_ID); if (dev == NULL) { f60_set_error(F60_ERROR_NO_DEVICE,"cannot find device"); return 0; } return 1; } */ // patch by Lewis Jardine, to fix a difference in the F50 void mpman_specific_setup() { if (mpman_type == MPMAN_F50) {filename_offset = 18;} else {filename_offset = 21;} } struct usb_dev_handle* f60_init() { struct usb_dev_handle* ret; if (debug) printf("Initializing\n"); f60_dev = f60_get_device_by_id(F60_VENDOR_ID,F60_PRODUCT_ID); if (debug && f60_dev) printf("Found MP-Man F60\n"); // Check for F50 product ID if (!f60_dev) { f60_dev = f60_get_device_by_id(F50_VENDOR_ID,F50_PRODUCT_ID); if (f60_dev) mpman_type == MPMAN_F50; if (debug && f60_dev) printf("Found MP-Man F50\n"); } // Check for F55 product ID if (!f60_dev) { f60_dev = f60_get_device_by_id(F55_VENDOR_ID, F55_PRODUCT_ID); if (debug && f60_dev) printf("Found MP-Man F55\n"); } if (!f60_dev) { f60_set_error(F60_ERROR_NO_DEVICE,"cannot find device"); return NULL; } ret = usb_open(f60_dev); if (!ret) { f60_set_error(F60_ERROR_NO_DEVICE,"cannot open device"); return NULL; } usb_set_configuration(ret,f60_dev->config->bConfigurationValue); usb_claim_interface(ret,f60_dev->config->interface->altsetting->bInterfaceNumber); usb_set_altinterface(ret,f60_dev->config->interface->altsetting->bAlternateSetting); mpman_specific_setup(); return ret; } struct usb_dev_handle* f60_init_with_id(unsigned short vendor, unsigned short product) { struct usb_dev_handle* ret; if (debug) printf("Initializing\nUsing Vendor ID: %x , Product ID: %x\n",vendor,product); f60_dev = f60_get_device_by_id(vendor,product); if (!f60_dev) { f60_set_error(F60_ERROR_NO_DEVICE,"cannot find device (with vendor id: %x , product id: %x)",vendor,product); return NULL; } else { if (debug) printf("Found device with vendor id %x , product id %x\n",vendor,product); } ret = usb_open(f60_dev); if (!ret) { f60_set_error(F60_ERROR_NO_DEVICE,"cannot open device"); return NULL; } usb_set_configuration(ret,f60_dev->config->bConfigurationValue); usb_claim_interface(ret,f60_dev->config->interface->altsetting->bInterfaceNumber); usb_set_altinterface(ret,f60_dev->config->interface->altsetting->bAlternateSetting); mpman_specific_setup(); return ret; } void f60_close(struct usb_dev_handle* usb_hand) { if (!usb_hand) return; if (f60_dev) usb_release_interface(usb_hand,f60_dev->config->interface->altsetting->bInterfaceNumber); usb_close(usb_hand); f60_dev=NULL; } int progress_size = 0; float f60_get_rw_progress() { if (progress_size == 0) return 0.0f; if (progress_size == -1) return 1.0f; #ifdef USE_SYSTEM_LIBUSB return 1; #else return (float) ((float)usb_rw_progress() / (float)progress_size); #endif } int f60_write(usb_dev_handle* dev, char* buffer, int size, int timeout) { int ret; progress_size = size; if (debug) printf("writing\n"); if (debug) f60_print_data((char*) buffer,size); ret = usb_bulk_write(dev,ep_addr_write,buffer,size,timeout); progress_size = 0; if (ret < 0) goto error; return 1; error: f60_set_error(F60_ERROR_USB,"F60_Write failed"); return 0; } int f60_read(usb_dev_handle* dev, char* buffer, int size, int timeout) { int ret; progress_size = size; if (debug) printf("reading\n"); ret = usb_bulk_read(dev,ep_addr_read,buffer,size,timeout); progress_size = 0; if (ret < 0) goto error; if (debug) f60_print_data((char*) buffer,size); return 1; error: f60_set_error(F60_ERROR_USB,"F60_Read failed"); return 0; } int f60_check_response(const char* cmd) { if ((cmd[0] + 1 != response[0]) || (cmd[1] != response[1])) { f60_set_error(F60_ERROR_CMD,"command was not successful"); return 0; } return 1; } int mysizeof(const char* cmd) { if (cmd == F60_GetFirmwareVersion) return sizeof(F60_GetFirmwareVersion); if (cmd == F60_GetDirectory) return sizeof(F60_GetDirectory); if (cmd == F60_DownloadFile) return sizeof(F60_DownloadFile); if (cmd == F60_DownloadFileInfo) return sizeof(F60_DownloadFileInfo); if (cmd == F60_UploadFile) return sizeof(F60_UploadFile); if (cmd == F60_DeleteFile) return sizeof(F60_DeleteFile); if (cmd == F60_MoveFiles) return sizeof(F60_MoveFiles); if (cmd == F60_FormatMedia) return sizeof(F60_FormatMedia); if (cmd == SMF60_GetDirectory) return sizeof(SMF60_GetDirectory); if (cmd == SMF60_DownloadFile) return sizeof(SMF60_DownloadFile); if (cmd == SMF60_DownloadFileInfo) return sizeof(SMF60_DownloadFileInfo); if (cmd == SMF60_UploadFile) return sizeof(SMF60_UploadFile); if (cmd == SMF60_DeleteFile) return sizeof(SMF60_DeleteFile); if (cmd == SMF60_MoveFiles) return sizeof(SMF60_MoveFiles); return 0; } int f60_send_command(usb_dev_handle* dev,const char* cmd,char* param, int param_size,int resp_size) { char command[F60_MAX_FILES + 5]; char* c; bzero(response,F60_MAX_RESPONSE); if (resp_size > F60_MAX_RESPONSE) { f60_set_error(F60_ERROR_CMD,"command response size to big"); return 0; } if (debug) printf("sending command\n"); c = command; memcpy(c,cmd,mysizeof(cmd)); // if this is a 3 byte command and we are using smartmedia, change command if ( (mysizeof(cmd) == 3) && (selected_memory == SMARTMEDIA_MEMORY)) { if (debug) printf("SMARTMEDIA command\n"); c[2] = 0x41; } c = c + mysizeof(cmd); if (param != NULL) { memcpy(c,param,param_size); c = c + param_size; } *c = F60_CmdTerminator; c++; if (! f60_write(dev,command,c - command,2000)) return 0; if (!f60_read(dev, response,resp_size,30000)) return 0; response_size = resp_size; if (!f60_check_response(cmd)) return 0; return 1; } int f60_get_firmware_version(usb_dev_handle* dev) { int ret; if (debug) printf("getting firmware version\n"); ret = f60_send_command(dev,F60_GetFirmwareVersion,NULL,0,7); if (!ret) return 0; ret = response[4] * 256; ret += response[5]; return ret; } struct f60_dir* f60_get_dir(usb_dev_handle *dev) { int ret; static struct f60_dir dir; if (debug) printf("getting directory\n"); ret = f60_send_command(dev,F60_GetDirectory,NULL,0,12); if (!ret) return NULL; dir.size = response[10]; f60_big2little_endian((int*)&response[2],&dir.total_memory); f60_big2little_endian((int*)&response[6],&dir.free_memory); if (debug) printf("dir size = %d total mem = %d free mem = %d\n", dir.size,dir.total_memory,dir.free_memory); if (dir.size == 0) ret = 1; else ret = f60_read(dev,dir.contents,dir.size * 256,3000); if (!ret) return NULL; return &dir; } int f60_send_file(usb_dev_handle *dev,char* filename,char* text) { int ret; FILE* fp = NULL; char* filemap = NULL; int filesize; int bytesread; char fileinfo[1540]; int fileinfo_size; static struct f60_dir* dir; if (debug) { printf("sending file %s\n",filename); if (selected_memory == SMARTMEDIA_MEMORY) printf("SMARTMEDIA command\n"); } dir = f60_get_dir(dev); fp = fopen(filename,"r"); if (!fp) { f60_set_error(F60_ERROR_OTHER,"cant open file %s",filename); goto error; } fseek(fp,0,SEEK_END); filesize = ftell(fp); if (filesize > dir->free_memory) { f60_set_error(F60_ERROR_DEVICE_FULL,"Not enough memory to write file"); goto error; } fseek(fp,0,SEEK_SET); filemap = (char*) malloc(filesize); if (!filemap) { f60_set_error(F60_ERROR_OTHER,"cant malloc %d",filesize); goto error; } bytesread = fread(filemap,1,filesize,fp); fclose(fp); fp = NULL; if (bytesread != filesize) { f60_set_error(F60_ERROR_OTHER,"read error file size = %d read =%d",filesize,bytesread); goto error; } ret = f60_send_command(dev,F60_DownloadFile,NULL,0,19); if (!ret) goto error; if (strlen(text) > 48) text[48] = '\0'; fileinfo_size = 256 + strlen(text) * 16; fileinfo_size = (256 - (fileinfo_size % 256) ) + fileinfo_size + 4; if (debug) printf("fileinfo size = %d\n",fileinfo_size); bzero(fileinfo,fileinfo_size); if (selected_memory == SMARTMEDIA_MEMORY) memcpy(fileinfo,(char*) SMF60_DownloadFileInfo,sizeof(SMF60_DownloadFileInfo)); else memcpy(fileinfo,(char*) F60_DownloadFileInfo,sizeof(F60_DownloadFileInfo)); f60_little2big_endian(&filesize,(int*)&fileinfo[3]); fileinfo[7] = (fileinfo_size / 256) - 1; fileinfo[8] = 0x00; fileinfo[9] = 0x1a; fileinfo[10] = 0x1a; memcpy(&fileinfo[11],"12345-678-",10); snprintf(&fileinfo[21],F60_MAX_FILENAME,"C:\\%s",f60_strip_path(filename)); ret = f60_write_font_string(&fileinfo[259],text); if (!ret) goto error; fileinfo[fileinfo_size - 1] = 0x04; ret = f60_write(dev,fileinfo,fileinfo_size,3000); if (!ret) goto error; ret = f60_read(dev,response,3,1000); if (!ret) goto error; ret = f60_check_response(F60_DownloadFileInfo); if (!ret) goto error; ret = f60_write(dev,filemap,filesize,30000); if (!ret) goto error; ret = f60_read(dev,response,3,1000); if (!ret) goto error; ret = f60_check_response(F60_DownloadFileInfo); if (!ret) goto error; free(filemap); return 1; error: if (fp) fclose(fp); if (filemap) free(filemap); return 0; } char* f60_get_file(usb_dev_handle *dev,unsigned char index,char* path) { FILE* fp = NULL; char* filemap = NULL; int filesize; int nbytes; int ret; char* filename; static char fullpath[256]; if (debug) printf("getting file number %d to path %s",index,path); ret = f60_send_command(dev,F60_UploadFile,&index,1,3); if (!ret) goto error; ret = f60_read(dev,response,256,1000); if (!ret) goto error; f60_big2little_endian((int*) response,&filesize); filemap = malloc (filesize); if (!filemap) { f60_set_error(F60_ERROR_OTHER,"could not malloc %d",filesize); goto error; } ret = f60_read(dev,filemap,filesize,20000); if (!ret) goto error; filename = f60_strip_path(&response[filename_offset]); if (path[strlen(path) - 1] == '/') snprintf(fullpath,256,"%s%s",path,filename); else snprintf(fullpath,256,"%s/%s",path,filename); fp = fopen(fullpath,"w"); if (!fp) { f60_set_error(F60_ERROR_OTHER,"could not create %s",fullpath); goto error; } nbytes = fwrite(filemap,1,filesize,fp); if (nbytes != filesize) { f60_set_error(F60_ERROR_OTHER,"write error"); goto error; } fclose(fp); fp = NULL; free(filemap); return fullpath; error: if (fp) fclose(fp); if (filemap) free(filemap); return NULL; } int f60_delete_file(usb_dev_handle *dev,unsigned char index) { int ret; if (debug) printf("deleteing file no %d\n",index); ret = f60_send_command(dev,F60_DownloadFile,NULL,0,19); if (!ret) return 0; ret = f60_send_command(dev,F60_DeleteFile,&index,1,3); if (!ret) return 0; return 1; } // first array element must contain number(num) of files so command size is (num + 1) bytes int f60_move_file(usb_dev_handle *dev,char* order,unsigned char num) { if (debug) printf("moving files"); return f60_send_command(dev,F60_MoveFiles,order,num + 1,3); } int f60_format_media(usb_dev_handle *dev, char x1) { char x2; if (debug) printf("formatting media"); //printf("formatting media -- x=%d",(int)x1); x2=x1; return f60_send_command(dev,F60_FormatMedia,(char*)&x2, /*F60_FormatMediaParam*/ 1, 3); } /* This was originally based on code from the 'globecom jukebox', however the only thing it has in common is the names of the variables. The first half was re-written by me to fit the architecture of f60lib, and the second half was re-written by me to actually detect id3v2s, and calculate the size correctly. There is no globecom jukebox code remaining in this function, however the overall structure is similar. I believe that there are very few sensible ways to find the size of an id3v2, and reading the header into an array which is then tested is too obvious an idea to copyright. patch by Lewis Jardine */ int getV2Size(char* id3head) { int toreturn; if ((id3head[0] != 0x49) || (id3head[1] != 0x44) || (id3head[2] != 0x33)) { printf("no V2 header\n"); return 0; } toreturn = 10+id3head[9]+id3head[8]*128+id3head[7]*128*128+id3head[6]*128*128*128; return toreturn; } int f60_encode_file(char* source,char* dest) { FILE* src = NULL; FILE* dst = NULL; int i; int ii; int id3v2size; char id3head[10]; int byteswritten; unsigned char buffer[512]; char inchar; if (debug) printf("encoding file\n"); src = fopen(source,"r"); if (!src) { f60_set_error(F60_ERROR_OTHER,"cant open encode input file"); goto error; } dst = fopen(dest,"w"); if (!dst) { f60_set_error(F60_ERROR_OTHER,"cant open encode output file"); goto error; } /* Skip ID3v2, as it confuses the mpman */ id3v2size = 0; i = 0; /* Copy header into a buffer for jukebox code to parse */ while (!feof(src)) {id3head[i] = fgetc(src); if (i == 9) break; i++;} /* getv2size will return 0 if it does not understand the header, which will reset the file pointer to the start, just as if we'd never tried to read the header.*/ id3v2size = getV2Size(id3head); if (debug) printf("ID3v2 tag is %d bytes\n", id3v2size); fseek (src, id3v2size, SEEK_SET); /* Skip ID3v2, as it confuses the mpman */ i=0; ii=0; while (!feof(src)) { inchar = fgetc(src); if (feof(src)) break; buffer[(ii * 32) +i] = inchar ^ 1; if (++ii == 16) { ii = 0; if (++i == 32) { i = 0; byteswritten = fwrite(buffer,512,1,dst); if (!byteswritten) { f60_set_error(F60_ERROR_OTHER,"write error to encode output file"); goto error; } } } } if (i || ii) { byteswritten = fwrite(buffer, 1,ii + (i * 16),dst); if (!byteswritten) { f60_set_error(F60_ERROR_OTHER,"write error to encode output file"); goto error; } } for(i=0;i<3;i++) { fputc(0x00,dst); fputc(0x5b,dst); for(ii=0;ii<10;ii++) fputc(0x5a,dst); fputc(0x4d,dst); fputc(0x4b,dst); fputc(0x4c,dst); fputc(0x02,dst); } fputc(0x00,dst); fputc(0x5b,dst); for(i=0;i<29;i++) fputc(0x5a,dst); fputc(0x5b,dst); fclose(src); fclose(dst); return 1; error: if (src) fclose(src); if (dst) fclose(dst); return 0; } int f60_decode_file(char* source,char* dest) { FILE* src = NULL; FILE* dst = NULL; int i; int ii; int bytesread; unsigned char buffer[512]; int srcsize; if (debug) printf("decoding file\n"); src = fopen(source,"r"); if (!src) { f60_set_error(F60_ERROR_OTHER,"cant open decode input file"); goto error; } fseek(src,0,SEEK_END); srcsize = ftell(src); fclose(src); if ( truncate(source,srcsize - (5 * 16)) == -1) { f60_set_error(F60_ERROR_OTHER,"cant truncate decode input file"); goto error; } src = fopen(source,"r"); dst = fopen(dest,"w"); if (!dst) { f60_set_error(F60_ERROR_OTHER,"cant open decode output file"); goto error; } while ( (bytesread = fread(buffer,1,512,src) == 512) ) for(i=0;i<32;i++) for (ii=0;ii<16;ii++) fputc(buffer[(ii *32) + i] ^ 1,dst); if (bytesread) for(i=0;i<32;i++) for (ii=0;ii<16;ii++) { if ( (ii*32) + i >= bytesread) continue; fputc(buffer[(ii *32) + i] ^ 1,dst); } fclose(src); fclose(dst); return 1; error: if (src) fclose(src); if (dst) fclose(dst); return 0; } void f60_select_memory(int a) { if (a == SMARTMEDIA_MEMORY) selected_memory = SMARTMEDIA_MEMORY; else selected_memory = FLASH_MEMORY; } mplinuxman/libusb/AUTHORS0000644000175000006300000000012007662770365014621 0ustar boskoboskoJohannes Erdfelt, Thomas Sailer, mplinuxman/libusb/usbi.h0000644000175000006300000000225707662770364014700 0ustar boskobosko#ifndef _USBI_H_ #define _USBI_H_ #include "usb.h" #include "error.h" extern int usb_debug; /* Some quick and generic macros for the simple kind of lists we use */ #define LIST_ADD(begin, ent) \ do { \ if (begin) { \ ent->next = begin; \ ent->next->prev = ent; \ } else \ ent->next = NULL; \ ent->prev = NULL; \ begin = ent; \ } while(0) #define LIST_DEL(begin, ent) \ do { \ if (ent->prev) { \ ent->prev->next = ent->next; \ ent->prev = NULL; \ } else \ begin = ent->next; \ if (ent->next) { \ ent->next->prev = ent->prev; \ ent->next = NULL; \ } \ } while (0) struct usb_dev_handle { int fd; struct usb_bus *bus; struct usb_device *device; int config; int interface; int altsetting; /* Added by RMT so implementations can store other per-open-device data */ void *impl_info; }; void usb_fetch_descriptors(usb_dev_handle *udev); /* OS specific routines */ int usb_find_devices_on_bus(struct usb_bus *bus, struct usb_device **devices); void usb_os_init(void); int usb_os_open(usb_dev_handle *dev); int usb_os_close(usb_dev_handle *dev); void usb_free_dev(struct usb_device *dev); #endif /* _USBI_H_ */ mplinuxman/libusb/error.h0000644000175000006300000000131407662770364015060 0ustar boskobosko#ifndef _ERROR_H_ #define _ERROR_H_ typedef enum { USB_ERROR_TYPE_NONE = 0, USB_ERROR_TYPE_STRING, USB_ERROR_TYPE_ERRNO, } usb_error_type_t; extern char usb_error_str[1024]; extern int usb_error_errno; extern usb_error_type_t usb_error_type; #define USB_ERROR(x) \ do { \ usb_error_type = USB_ERROR_TYPE_ERRNO; \ usb_error_errno = x; \ return x; \ } while (0) #define USB_ERROR_STR(x, format, args...) \ do { \ usb_error_type = USB_ERROR_TYPE_STRING; \ snprintf(usb_error_str, sizeof(usb_error_str) - 1, format, ## args); \ if (usb_debug >= 2) \ fprintf(stderr, "USB error: %s\n", usb_error_str); \ return x; \ } while (0) #endif /* _ERROR_H_ */ mplinuxman/libusb/error.c0000644000175000006300000000136707662770365015064 0ustar boskobosko/* * USB Error messages * * Copyright (c) 2000-2001 Johannes Erdfelt * * This library is covered by the LGPL, read LICENSE for details. */ #include #include #include "usb.h" #include "error.h" char usb_error_str[1024] = ""; int usb_error_errno = 0; usb_error_type_t usb_error_type = USB_ERROR_TYPE_NONE; char *usb_strerror(void) { switch (usb_error_type) { case USB_ERROR_TYPE_NONE: return "No error"; case USB_ERROR_TYPE_STRING: return usb_error_str; case USB_ERROR_TYPE_ERRNO: if (usb_error_errno > -USB_ERROR_BEGIN) return strerror(usb_error_errno); else /* Any error we don't know falls under here */ return "Unknown error"; } return "Unknown error"; } mplinuxman/libusb/linux.h0000644000175000006300000000222707662770365015073 0ustar boskobosko#ifndef __LINUX_H__ #define __LINUX_H__ #include #include #include struct usb_ctrltransfer { /* keep in sync with usb.h:usb_proc_ctrltransfer */ u_int8_t bRequestType; u_int8_t bRequest; u_int16_t wValue; u_int16_t wIndex; u_int16_t wLength; u_int32_t timeout; /* in milliseconds */ /* pointer to data */ void *data; }; struct usb_bulktransfer { /* keep in sync with usb.h:usb_proc_bulktransfer */ unsigned int ep; unsigned int len; unsigned int timeout; /* in milliseconds */ /* pointer to data */ void *data; }; struct usb_setinterface { unsigned int interface; unsigned int altsetting; }; #define IOCTL_USB_CONTROL _IOWR('U', 0, struct usb_ctrltransfer) #define IOCTL_USB_BULK _IOWR('U', 2, struct usb_bulktransfer) #define IOCTL_USB_RESETEP _IOR('U', 3, unsigned int) #define IOCTL_USB_SETINTF _IOR('U', 4, struct usb_setinterface) #define IOCTL_USB_SETCONFIG _IOR('U', 5, unsigned int) #define IOCTL_USB_CLAIMINTF _IOR('U', 15, unsigned int) #define IOCTL_USB_RELEASEINTF _IOR('U', 16, unsigned int) #define IOCTL_USB_RESET _IO('U', 20) #define IOCTL_USB_CLEAR_HALT _IOR('U', 21, unsigned int) #endif mplinuxman/libusb/linux.c0000644000175000006300000002731207662770365015070 0ustar boskobosko/* * Linux USB support * * Copyright (c) 2000-2001 Johannes Erdfelt * * This library is covered by the LGPL, read LICENSE for details. */ #include /* getenv, etc */ #include #include #include #include #include #include #include #include "linux.h" #include "usbi.h" static char usb_path[PATH_MAX + 1] = ""; int usb_os_open(usb_dev_handle *dev) { char filename[PATH_MAX + 1]; snprintf(filename, sizeof(filename) - 1, "%s/%s/%s", usb_path, dev->bus->dirname, dev->device->filename); dev->fd = open(filename, O_RDWR); if (dev->fd < 0) { dev->fd = open(filename, O_RDONLY); if (dev->fd < 0) USB_ERROR_STR(-errno, "failed to open %s: %s", filename, strerror(errno)); } return 0; } int usb_os_close(usb_dev_handle *dev) { if (dev->fd < 0) return 0; if (close(dev->fd) == -1) /* Failing trying to close a file really isn't an error, so return 0 */ USB_ERROR_STR(0, "tried to close device fd %d: %s", dev->fd, strerror(errno)); return 0; } int usb_set_configuration(usb_dev_handle *dev, int configuration) { int ret; ret = ioctl(dev->fd, IOCTL_USB_SETCONFIG, &configuration); if (ret < 0) USB_ERROR_STR(-errno, "could not set config %d: %s", configuration, strerror(errno)); dev->config = configuration; return 0; } int usb_claim_interface(usb_dev_handle *dev, int interface) { int ret; ret = ioctl(dev->fd, IOCTL_USB_CLAIMINTF, &interface); if (ret < 0) { if (errno == EBUSY && usb_debug > 0) fprintf(stderr, "Check that you have permissions to write to %s/%s and, if you don't, that you set up hotplug (http://linux-hotplug.sourceforge.net/) correctly.\n", dev->bus->dirname, dev->device->filename); USB_ERROR_STR(-errno, "could not claim interface %d: %s", interface, strerror(errno)); } dev->interface = interface; return 0; } int usb_release_interface(usb_dev_handle *dev, int interface) { int ret; ret = ioctl(dev->fd, IOCTL_USB_RELEASEINTF, &interface); if (ret < 0) USB_ERROR_STR(-errno, "could not release intf %d: %s\n", interface, strerror(errno)); dev->interface = -1; return 0; } int usb_set_altinterface(usb_dev_handle *dev, int alternate) { int ret; struct usb_setinterface setintf; if (dev->interface < 0) USB_ERROR(-EINVAL); setintf.interface = dev->interface; setintf.altsetting = alternate; ret = ioctl(dev->fd, IOCTL_USB_SETINTF, &setintf); if (ret < 0) USB_ERROR_STR(ret, "could not set alt intf %d/%d: %s", dev->interface, alternate, strerror(errno)); dev->altsetting = alternate; return 0; } #define MAX_READ_WRITE 4096 int sent_received; int usb_rw_progress() { return sent_received; } int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int length, int timeout) { struct usb_bulktransfer bulk; int ret; sent_received = 0; /* Ensure the endpoint address is correct */ ep &= ~USB_ENDPOINT_IN; do { bulk.ep = ep; bulk.len = length - sent_received; if (bulk.len > MAX_READ_WRITE) bulk.len = MAX_READ_WRITE; bulk.timeout = timeout; bulk.data = (unsigned char *)bytes + sent_received; ret = ioctl(dev->fd, IOCTL_USB_BULK, &bulk); if (ret < 0) USB_ERROR_STR(ret, "error writing to bulk endpoint %d: %s", ep, strerror(errno)); sent_received += ret; } while (ret > 0 && sent_received < length); return sent_received; } int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, int timeout) { struct usb_bulktransfer bulk; int ret, requested; sent_received = 0; /* Ensure the endpoint address is correct */ ep |= USB_ENDPOINT_IN; do { bulk.ep = ep; requested = size - sent_received; if (requested > MAX_READ_WRITE) requested = MAX_READ_WRITE; bulk.len = requested; bulk.timeout = timeout; bulk.data = (unsigned char *)bytes + sent_received; ret = ioctl(dev->fd, IOCTL_USB_BULK, &bulk); if (ret < 0) USB_ERROR_STR(ret, "error reading from bulk endpoint 0x%x: %s", ep, strerror(errno)); sent_received += ret; } while (ret > 0 && sent_received < size && ret == requested); return sent_received; } int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout) { struct usb_ctrltransfer ctrl; int ret; ctrl.bRequestType = requesttype; ctrl.bRequest = request; ctrl.wValue = value; ctrl.wIndex = index; ctrl.wLength = size; ctrl.data = bytes; ctrl.timeout = timeout; ret = ioctl(dev->fd, IOCTL_USB_CONTROL, &ctrl); if (ret < 0) USB_ERROR_STR(ret, "error sending control message: %s", strerror(errno)); return ret; } int usb_find_devices_on_bus(struct usb_bus *bus, struct usb_device **devices) { struct usb_device *fdev = NULL; DIR *dir; struct dirent *entry; char dirpath[PATH_MAX + 1]; snprintf(dirpath, PATH_MAX, "%s/%s", usb_path, bus->dirname); dir = opendir(dirpath); if (!dir) USB_ERROR_STR(-errno, "couldn't opendir(%s): %s", dirpath, strerror(errno)); while ((entry = readdir(dir)) != NULL) { char filename[PATH_MAX + 1]; struct usb_device *dev; int i, fd, ret; /* Skip anything starting with a . */ if (entry->d_name[0] == '.') continue; dev = malloc(sizeof(*dev)); if (!dev) USB_ERROR(-ENOMEM); memset((void *)dev, 0, sizeof(*dev)); dev->bus = bus; strncpy(dev->filename, entry->d_name, sizeof(dev->filename) - 1); dev->filename[sizeof(dev->filename) - 1] = 0; snprintf(filename, sizeof(filename) - 1, "%s/%s", dirpath, entry->d_name); fd = open(filename, O_RDONLY); if (fd < 0) { if (usb_debug >= 2) fprintf(stderr, "usb_find_devices_on_bus: Couldn't open %s\n", filename); free(dev); continue; } ret = read(fd, (void *)&dev->descriptor, sizeof(dev->descriptor)); if (ret < 0) { if (usb_debug) fprintf(stderr, "usb_find_devices_on_bus: Couldn't read descriptor\n"); free(dev); goto err; } LIST_ADD(fdev, dev); if (usb_debug >= 2) fprintf(stderr, "usb_find_devices_on_bus: Found %s on %s\n", dev->filename, bus->dirname); /* Now try to fetch the rest of the descriptors */ if (dev->descriptor.bNumConfigurations > USB_MAXCONFIG) /* Silent since we'll try again later */ goto err; if (dev->descriptor.bNumConfigurations < 1) /* Silent since we'll try again later */ goto err; dev->config = (struct usb_config_descriptor *)malloc(dev->descriptor.bNumConfigurations * sizeof(struct usb_config_descriptor)); if (!dev->config) /* Silent since we'll try again later */ goto err; memset(dev->config, 0, dev->descriptor.bNumConfigurations * sizeof(struct usb_config_descriptor)); for (i = 0; i < dev->descriptor.bNumConfigurations; i++) { char buffer[8], *bigbuffer; struct usb_config_descriptor *desc = (struct usb_config_descriptor *)buffer; /* Get the first 8 bytes so we can figure out what the total length is */ ret = read(fd, (void *)buffer, 8); if (ret < 8) { if (usb_debug >= 1) { if (ret < 0) fprintf(stderr, "Unable to get descriptor (%d)\n", ret); else fprintf(stderr, "Config descriptor too short (expected %d, got %d)\n", 8, ret); } goto err; } USB_LE16_TO_CPU(desc->wTotalLength); bigbuffer = malloc(desc->wTotalLength); if (!bigbuffer) { if (usb_debug >= 1) fprintf(stderr, "Unable to allocate memory for descriptors\n"); goto err; } /* Copy over the first 8 bytes we read */ memcpy(bigbuffer, buffer, 8); ret = read(fd, (void *)(bigbuffer + 8), desc->wTotalLength - 8); if (ret < desc->wTotalLength - 8) { if (usb_debug >= 1) { if (ret < 0) fprintf(stderr, "Unable to get descriptor (%d)\n", ret); else fprintf(stderr, "Config descriptor too short (expected %d, got %d)\n", desc->wTotalLength, ret); } free(bigbuffer); goto err; } ret = usb_parse_configuration(&dev->config[i], bigbuffer); if (usb_debug >= 2) { if (ret > 0) fprintf(stderr, "Descriptor data still left\n"); else if (ret < 0) fprintf(stderr, "Unable to parse descriptors\n"); } free(bigbuffer); } err: close(fd); } closedir(dir); *devices = fdev; return 0; } int usb_find_busses(void) { DIR *dir; struct dirent *entry; dir = opendir(usb_path); if (!dir) USB_ERROR_STR(-errno, "couldn't opendir(%s): %s", usb_path, strerror(errno)); while ((entry = readdir(dir)) != NULL) { struct usb_bus *bus; int skip = 0; /* Skip anything starting with a . */ if (entry->d_name[0] == '.') continue; if (!strchr("0123456789", entry->d_name[strlen(entry->d_name) - 1])) { if (usb_debug >= 2) fprintf(stderr, "usb_find_busses: Skipping non bus directory %s\n", entry->d_name); continue; } /* Don't readd it if we were called multiple times */ for (bus = usb_busses; bus; bus = bus->next) { if (!strcmp(bus->dirname, entry->d_name)) { skip = 1; break; } } if (skip) continue; bus = malloc(sizeof(*bus)); if (!bus) USB_ERROR(-ENOMEM); memset((void *)bus, 0, sizeof(*bus)); strncpy(bus->dirname, entry->d_name, sizeof(bus->dirname) - 1); bus->dirname[sizeof(bus->dirname) - 1] = 0; if (usb_busses) { bus->next = usb_busses; bus->next->prev = bus; } usb_busses = bus; if (usb_debug >= 2) fprintf(stderr, "usb_find_busses: Found %s\n", bus->dirname); } closedir(dir); return 0; } static int check_usb_vfs(const unsigned char *dirname) { DIR *dir; struct dirent *entry; int found = 0; dir = opendir(dirname); if (!dir) return 0; while ((entry = readdir(dir)) != NULL) { /* Skip anything starting with a . */ if (entry->d_name[0] == '.') continue; /* We assume if we find any files that it must be the right place */ found = 1; break; } closedir(dir); return found; } void usb_os_init(void) { /* Find the path to the virtual filesystem */ if (getenv("USB_DEVFS_PATH")) { if (check_usb_vfs(getenv("USB_DEVFS_PATH"))) { strncpy(usb_path, getenv("USB_DEVFS_PATH"), sizeof(usb_path) - 1); usb_path[sizeof(usb_path) - 1] = 0; } else if (usb_debug) fprintf(stderr, "usb_os_init: couldn't find USB VFS in USB_DEVFS_PATH\n"); } if (!usb_path[0]) { if (check_usb_vfs("/proc/bus/usb")) { strncpy(usb_path, "/proc/bus/usb", sizeof(usb_path) - 1); usb_path[sizeof(usb_path) - 1] = 0; } else if (check_usb_vfs("/dev/usb")) { strncpy(usb_path, "/dev/usb", sizeof(usb_path) - 1); usb_path[sizeof(usb_path) - 1] = 0; } else usb_path[0] = 0; /* No path, no USB support */ } if (usb_debug) { if (usb_path[0]) fprintf(stderr, "usb_os_init: Found USB VFS at %s\n", usb_path); else fprintf(stderr, "usb_os_init: No USB VFS found, is it mounted?\n"); } } int usb_resetep (usb_dev_handle *dev, unsigned int ep) { int ret; ret = ioctl(dev->fd, IOCTL_USB_RESETEP, &ep); if (ret) USB_ERROR_STR(ret, "could not reset ep %d : %s", ep, strerror(errno)); return 0; } int usb_clear_halt (usb_dev_handle *dev, unsigned int ep) { int ret; ret = ioctl(dev->fd, IOCTL_USB_CLEAR_HALT, &ep); if (ret) USB_ERROR_STR(ret, "could not clear/halt ep %d : %s", ep, strerror(errno)); return 0; } int usb_reset (usb_dev_handle *dev) { int ret; ret = ioctl(dev->fd, IOCTL_USB_RESET, NULL); if (ret) USB_ERROR_STR(ret, "could not reset : %s", strerror(errno)); return 0; } mplinuxman/libusb/README0000644000175000006300000000357207662770365014447 0ustar boskoboskoGeneral Information =================== This is libusb version 0.1.6a. libusb is a library which allows userspace access to USB devices. The official ftp site is: ftp://ftp.libusb.sourceforge.net/pub/libusb The official web site is: http://libusb.sourceforge.net/ A mailing list is located at: libusb-general@sourceforge.net Installation ============ See the file 'INSTALL' How to report bugs ================== To report a bug, visit http://libusb.sourceforge.net and fill out a bug report form. Please make sure to include: * The version of libusb * Information about your system. For instance: - What operating system and version - What version of X - For Linux, what version of the C library And anything else you think is relevant. * How to reproduce the bug. If you can reproduce it with the testlibusb program that is built in the libusb/ directory, that will be most convenient. Otherwise, please include a short test program that exhibits the behavior. As a last resort, you can also provide a pointer to a larger piece of software that can be downloaded. * If the bug was a crash, the exact text that was printed out when the crash occured. * Further information such as stack traces may be useful, but is not necessary. Patches ======= Patches can be sent to libusb-devel@sourceforge.net. If the patch fixes a bug, it is usually a good idea to include all the information described in "How to Report Bugs". Building ======== It should be as simple as running these two commands: ./configure make One common problem is building the SGML documentation. On some systems, like SuSE, you will need to set the SGML_CATALOG_FILES environment variable to something similar to this (varies on actual location): SGML_CATALOG_FILES="/usr/share/sgml/CATALOG.docbook_3:/usr/share/sgml/CATALOG.docbook-dsssl-stylesheets:/usr/share/sgml/openjade/catalog" mplinuxman/libusb/usb.h0000644000175000006300000001456707662770364014536 0ustar boskobosko#ifndef __USB_H__ #define __USB_H__ #include #include #include #include /* * USB spec information * * This is all stuff grabbed from various USB specs and is pretty much * not subject to change */ /* * Device and/or Interface Class codes */ #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ #define USB_CLASS_AUDIO 1 #define USB_CLASS_COMM 2 #define USB_CLASS_HID 3 #define USB_CLASS_PRINTER 7 #define USB_CLASS_MASS_STORAGE 8 #define USB_CLASS_HUB 9 #define USB_CLASS_DATA 10 #define USB_CLASS_VENDOR_SPEC 0xff /* * Descriptor types */ #define USB_DT_DEVICE 0x01 #define USB_DT_CONFIG 0x02 #define USB_DT_STRING 0x03 #define USB_DT_INTERFACE 0x04 #define USB_DT_ENDPOINT 0x05 #define USB_DT_HID 0x21 #define USB_DT_REPORT 0x22 #define USB_DT_PHYSICAL 0x23 #define USB_DT_HUB 0x29 /* * Descriptor sizes per descriptor type */ #define USB_DT_DEVICE_SIZE 18 #define USB_DT_CONFIG_SIZE 9 #define USB_DT_INTERFACE_SIZE 9 #define USB_DT_ENDPOINT_SIZE 7 #define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ #define USB_DT_HUB_NONVAR_SIZE 7 /* All standard descriptors have these 2 fields in common */ struct usb_descriptor_header { u_int8_t bLength; u_int8_t bDescriptorType; }; /* String descriptor */ struct usb_string_descriptor { u_int8_t bLength; u_int8_t bDescriptorType; u_int16_t wData[1]; }; /* HID descriptor */ struct usb_hid_descriptor { u_int8_t bLength; u_int8_t bDescriptorType; u_int16_t bcdHID; u_int8_t bCountryCode; u_int8_t bNumDescriptors; }; /* Endpoint descriptor */ #define USB_MAXENDPOINTS 32 struct usb_endpoint_descriptor { u_int8_t bLength; u_int8_t bDescriptorType; u_int8_t bEndpointAddress; u_int8_t bmAttributes; u_int16_t wMaxPacketSize; u_int8_t bInterval; u_int8_t bRefresh; u_int8_t bSynchAddress; unsigned char *extra; /* Extra descriptors */ int extralen; }; #define USB_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ #define USB_ENDPOINT_DIR_MASK 0x80 #define USB_ENDPOINT_TYPE_MASK 0x03 /* in bmAttributes */ #define USB_ENDPOINT_TYPE_CONTROL 0 #define USB_ENDPOINT_TYPE_ISOCHRONOUS 1 #define USB_ENDPOINT_TYPE_BULK 2 #define USB_ENDPOINT_TYPE_INTERRUPT 3 /* Interface descriptor */ #define USB_MAXINTERFACES 32 struct usb_interface_descriptor { u_int8_t bLength; u_int8_t bDescriptorType; u_int8_t bInterfaceNumber; u_int8_t bAlternateSetting; u_int8_t bNumEndpoints; u_int8_t bInterfaceClass; u_int8_t bInterfaceSubClass; u_int8_t bInterfaceProtocol; u_int8_t iInterface; struct usb_endpoint_descriptor *endpoint; unsigned char *extra; /* Extra descriptors */ int extralen; }; #define USB_MAXALTSETTING 128 /* Hard limit */ struct usb_interface { struct usb_interface_descriptor *altsetting; int num_altsetting; }; /* Configuration descriptor information.. */ #define USB_MAXCONFIG 8 struct usb_config_descriptor { u_int8_t bLength; u_int8_t bDescriptorType; u_int16_t wTotalLength; u_int8_t bNumInterfaces; u_int8_t bConfigurationValue; u_int8_t iConfiguration; u_int8_t bmAttributes; u_int8_t MaxPower; struct usb_interface *interface; unsigned char *extra; /* Extra descriptors */ int extralen; }; /* Device descriptor */ struct usb_device_descriptor { u_int8_t bLength; u_int8_t bDescriptorType; u_int16_t bcdUSB; u_int8_t bDeviceClass; u_int8_t bDeviceSubClass; u_int8_t bDeviceProtocol; u_int8_t bMaxPacketSize0; u_int16_t idVendor; u_int16_t idProduct; u_int16_t bcdDevice; u_int8_t iManufacturer; u_int8_t iProduct; u_int8_t iSerialNumber; u_int8_t bNumConfigurations; }; /* * Standard requests */ #define USB_REQ_GET_STATUS 0x00 #define USB_REQ_CLEAR_FEATURE 0x01 /* 0x02 is reserved */ #define USB_REQ_SET_FEATURE 0x03 /* 0x04 is reserved */ #define USB_REQ_SET_ADDRESS 0x05 #define USB_REQ_GET_DESCRIPTOR 0x06 #define USB_REQ_SET_DESCRIPTOR 0x07 #define USB_REQ_GET_CONFIGURATION 0x08 #define USB_REQ_SET_CONFIGURATION 0x09 #define USB_REQ_GET_INTERFACE 0x0A #define USB_REQ_SET_INTERFACE 0x0B #define USB_REQ_SYNCH_FRAME 0x0C #define USB_TYPE_STANDARD (0x00 << 5) #define USB_TYPE_CLASS (0x01 << 5) #define USB_TYPE_VENDOR (0x02 << 5) #define USB_TYPE_RESERVED (0x03 << 5) #define USB_RECIP_DEVICE 0x00 #define USB_RECIP_INTERFACE 0x01 #define USB_RECIP_ENDPOINT 0x02 #define USB_RECIP_OTHER 0x03 /* * Various libusb API related stuff */ #define USB_ENDPOINT_IN 0x80 #define USB_ENDPOINT_OUT 0x00 /* Error codes */ #define USB_ERROR_BEGIN 500000 /* * This is supposed to look weird. This file is generated from autoconf * and I didn't want to make this too complicated. */ #if 0 #define USB_LE16_TO_CPU(x) do { x = ((x & 0xff) << 8) | ((x & 0xff00) >> 8); } while(0) #else #define USB_LE16_TO_CPU(x) #endif /* Data types */ struct usb_device; struct usb_bus; struct usb_device { struct usb_device *next, *prev; char filename[PATH_MAX + 1]; struct usb_bus *bus; struct usb_device_descriptor descriptor; struct usb_config_descriptor *config; void *dev; /* Darwin support */ }; struct usb_bus { struct usb_bus *next, *prev; char dirname[PATH_MAX + 1]; struct usb_device *devices; }; struct usb_dev_handle; typedef struct usb_dev_handle usb_dev_handle; /* Variables */ extern struct usb_bus *usb_busses; #ifdef __cplusplus extern "C" { #endif /* Function prototypes */ usb_dev_handle *usb_open(struct usb_device *dev); int usb_close(usb_dev_handle *dev); int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, int size, int timeout); int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, int size, int timeout); int usb_control_msg(usb_dev_handle *dev, int requesttype, int request, int value, int index, char *bytes, int size, int timeout); int usb_set_configuration(usb_dev_handle *dev, int configuration); int usb_claim_interface(usb_dev_handle *dev, int interface); int usb_release_interface(usb_dev_handle *dev, int interface); int usb_set_altinterface(usb_dev_handle *dev, int alternate); int usb_resetep(usb_dev_handle *dev, unsigned int ep); int usb_clear_halt(usb_dev_handle *dev, unsigned int ep); int usb_reset(usb_dev_handle *dev); int usb_rw_progress(); char *usb_strerror(void); void usb_init(void); void usb_set_debug(int level); int usb_find_busses(void); int usb_find_devices(void); struct usb_device *usb_device(usb_dev_handle *dev); struct usb_bus *usb_get_busses(void); #ifdef __cplusplus } #endif #endif /* __USB_H__ */ mplinuxman/libusb/usb.c0000644000175000006300000000626707662770364014527 0ustar boskobosko/* * Main API entry point * * Copyright (c) 2000-2001 Johannes Erdfelt * * This library is covered by the LGPL, read LICENSE for details. */ #include /* getenv */ #include /* stderr */ #include "usbi.h" int usb_debug = 0; struct usb_bus *usb_busses = NULL; int usb_find_devices(void) { struct usb_bus *bus; int ret; for (bus = usb_busses; bus; bus = bus->next) { struct usb_device *devices, *dev, *ndev, *tdev; /* Find all of the devices and put them into a temporary list */ ret = usb_find_devices_on_bus(bus, &devices); if (ret < 0) return ret; /* * Now walk through all of the devices we know about and compare * against this new list. Any duplicates will be removed from the new * list. If we don't find it in the new list, the device was removed. * Any devices still in the new list, are new to us. */ dev = bus->devices; while (dev) { int found = 0; struct usb_device *tdev = dev->next; ndev = devices; while (ndev) { struct usb_device *tndev = ndev->next; if (!strcmp(dev->filename, ndev->filename)) { /* Remove it from the new devices list */ LIST_DEL(devices, ndev); usb_free_dev(ndev); found = 1; break; } ndev = tndev; } if (!found) /* The device was removed from the system */ LIST_DEL(bus->devices, dev); dev = tdev; } /* Anything on the *devices list is new. So add them to bus->devices */ /* and process them like the new device they are */ dev = devices; while (dev) { struct usb_device *tdev = dev->next; /* Remove it from the temporary list first and add it to the real */ /* bus->devices list */ LIST_DEL(devices, dev); LIST_ADD(bus->devices, dev); /* Some ports fetch the descriptors on scanning (like Linux) so we */ /* don't need to fetch them again */ if (!dev->config) { usb_dev_handle *udev; udev = usb_open(dev); if (udev) { usb_fetch_and_parse_descriptors(udev); usb_close(udev); } } dev = tdev; } } return 0; } void usb_set_debug(int level) { if (usb_debug || level) fprintf(stderr, "usb_set_debug: Setting debugging level to %d (%s)\n", level, level ? "on" : "off"); usb_debug = level; } void usb_init(void) { if (getenv("USB_DEBUG")) usb_set_debug(atoi(getenv("USB_DEBUG"))); usb_os_init(); } usb_dev_handle *usb_open(struct usb_device *dev) { usb_dev_handle *udev; udev = malloc(sizeof(*udev)); if (!udev) return NULL; udev->fd = -1; udev->device = dev; udev->bus = dev->bus; udev->config = udev->interface = udev->altsetting = -1; if (usb_os_open(udev) < 0) { free(udev); return NULL; } return udev; } int usb_close(usb_dev_handle *dev) { int ret; ret = usb_os_close(dev); free(dev); return ret; } struct usb_device *usb_device(usb_dev_handle *dev) { return dev->device; } void usb_free_dev(struct usb_device *dev) { usb_destroy_configuration(dev); free(dev); } struct usb_bus *usb_get_busses(void) { return usb_busses; } mplinuxman/libusb/descriptors.c0000644000175000006300000003222107662770365016265 0ustar boskobosko/* * Parses descriptors * * Copyright (c) 2001 Johannes Erdfelt * * This library is covered by the LGPL, read LICENSE for details. */ #include #include "usbi.h" int usb_get_descriptor(usb_dev_handle *udev, unsigned char type, unsigned char index, void *buf, int size) { memset(buf, 0, size); return usb_control_msg(udev, USB_ENDPOINT_IN, USB_REQ_GET_DESCRIPTOR, (type << 8) + index, 0, buf, size, 1000); } /* * This code looks surprisingly similar to the code I wrote for the Linux * kernel. It's not a coincidence :) */ static int usb_parse_endpoint(struct usb_endpoint_descriptor *endpoint, unsigned char *buffer, int size) { struct usb_descriptor_header *header; unsigned char *begin; int parsed = 0, len, numskipped; header = (struct usb_descriptor_header *)buffer; /* Everything should be fine being passed into here, but we sanity */ /* check JIC */ if (header->bLength > size) { if (usb_debug >= 1) fprintf(stderr, "ran out of descriptors parsing\n"); return -1; } if (header->bDescriptorType != USB_DT_ENDPOINT) { if (usb_debug >= 2) fprintf(stderr, "unexpected descriptor 0x%X, expecting endpoint descriptor, type 0x%X\n", endpoint->bDescriptorType, USB_DT_ENDPOINT); return parsed; } if (header->bLength == USB_DT_ENDPOINT_AUDIO_SIZE) memcpy(endpoint, buffer, USB_DT_ENDPOINT_AUDIO_SIZE); else memcpy(endpoint, buffer, USB_DT_ENDPOINT_SIZE); USB_LE16_TO_CPU(endpoint->wMaxPacketSize); buffer += header->bLength; size -= header->bLength; parsed += header->bLength; /* Skip over the rest of the Class Specific or Vendor Specific */ /* descriptors */ begin = buffer; numskipped = 0; while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2) { if (usb_debug >= 1) fprintf(stderr, "invalid descriptor length of %d\n", header->bLength); return -1; } /* If we find another "proper" descriptor then we're done */ if ((header->bDescriptorType == USB_DT_ENDPOINT) || (header->bDescriptorType == USB_DT_INTERFACE) || (header->bDescriptorType == USB_DT_CONFIG) || (header->bDescriptorType == USB_DT_DEVICE)) break; if (usb_debug >= 1) fprintf(stderr, "skipping descriptor 0x%X\n", header->bDescriptorType); numskipped++; buffer += header->bLength; size -= header->bLength; parsed += header->bLength; } if (numskipped && usb_debug >= 2) fprintf(stderr, "skipped %d class/vendor specific endpoint descriptors\n", numskipped); /* Copy any unknown descriptors into a storage area for drivers */ /* to later parse */ len = (int)(buffer - begin); if (!len) { endpoint->extra = NULL; endpoint->extralen = 0; return parsed; } endpoint->extra = malloc(len); if (!endpoint->extra) { if (usb_debug >= 1) fprintf(stderr, "couldn't allocate memory for endpoint extra descriptors\n"); endpoint->extralen = 0; return parsed; } memcpy(endpoint->extra, begin, len); endpoint->extralen = len; return parsed; } static int usb_parse_interface(struct usb_interface *interface, unsigned char *buffer, int size) { int i, len, numskipped, retval, parsed = 0; struct usb_descriptor_header *header; struct usb_interface_descriptor *ifp; unsigned char *begin; interface->num_altsetting = 0; while (size > 0) { interface->altsetting = realloc(interface->altsetting, sizeof(struct usb_interface_descriptor) * (interface->num_altsetting + 1)); if (!interface->altsetting) { if (usb_debug >= 1) fprintf(stderr, "couldn't malloc interface->altsetting\n"); return -1; } ifp = interface->altsetting + interface->num_altsetting; interface->num_altsetting++; memcpy(ifp, buffer, USB_DT_INTERFACE_SIZE); /* Skip over the interface */ buffer += ifp->bLength; parsed += ifp->bLength; size -= ifp->bLength; begin = buffer; numskipped = 0; /* Skip over any interface, class or vendor descriptors */ while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if (header->bLength < 2) { if (usb_debug >= 1) fprintf(stderr, "invalid descriptor length of %d\n", header->bLength); return -1; } /* If we find another "proper" descriptor then we're done */ if ((header->bDescriptorType == USB_DT_INTERFACE) || (header->bDescriptorType == USB_DT_ENDPOINT) || (header->bDescriptorType == USB_DT_CONFIG) || (header->bDescriptorType == USB_DT_DEVICE)) break; numskipped++; buffer += header->bLength; parsed += header->bLength; size -= header->bLength; } if (numskipped && usb_debug >= 2) fprintf(stderr, "skipped %d class/vendor specific interface descriptors\n", numskipped); /* Copy any unknown descriptors into a storage area for */ /* drivers to later parse */ len = (int)(buffer - begin); if (!len) { ifp->extra = NULL; ifp->extralen = 0; } else { ifp->extra = malloc(len); if (!ifp->extra) { if (usb_debug >= 1) fprintf(stderr, "couldn't allocate memory for interface extra descriptors\n"); ifp->extralen = 0; return -1; } memcpy(ifp->extra, begin, len); ifp->extralen = len; } /* Did we hit an unexpected descriptor? */ header = (struct usb_descriptor_header *)buffer; if ((size >= sizeof(struct usb_descriptor_header)) && ((header->bDescriptorType == USB_DT_CONFIG) || (header->bDescriptorType == USB_DT_DEVICE))) return parsed; if (ifp->bNumEndpoints > USB_MAXENDPOINTS) { if (usb_debug >= 1) fprintf(stderr, "too many endpoints\n"); return -1; } ifp->endpoint = (struct usb_endpoint_descriptor *) malloc(ifp->bNumEndpoints * sizeof(struct usb_endpoint_descriptor)); if (!ifp->endpoint) { if (usb_debug >= 1) fprintf(stderr, "couldn't allocate memory for ifp->endpoint\n"); return -1; } memset(ifp->endpoint, 0, ifp->bNumEndpoints * sizeof(struct usb_endpoint_descriptor)); for (i = 0; i < ifp->bNumEndpoints; i++) { header = (struct usb_descriptor_header *)buffer; if (header->bLength > size) { if (usb_debug >= 1) fprintf(stderr, "ran out of descriptors parsing\n"); return -1; } retval = usb_parse_endpoint(ifp->endpoint + i, buffer, size); if (retval < 0) return retval; buffer += retval; parsed += retval; size -= retval; } /* We check to see if it's an alternate to this one */ ifp = (struct usb_interface_descriptor *)buffer; if (size < USB_DT_INTERFACE_SIZE || ifp->bDescriptorType != USB_DT_INTERFACE || !ifp->bAlternateSetting) return parsed; } return parsed; } int usb_parse_configuration(struct usb_config_descriptor *config, char *buffer) { int i, retval, size; struct usb_descriptor_header *header; memcpy(config, buffer, USB_DT_CONFIG_SIZE); USB_LE16_TO_CPU(config->wTotalLength); size = config->wTotalLength; if (config->bNumInterfaces > USB_MAXINTERFACES) { if (usb_debug >= 1) fprintf(stderr, "too many interfaces\n"); return -1; } config->interface = (struct usb_interface *) malloc(config->bNumInterfaces * sizeof(struct usb_interface)); if (!config->interface) { if (usb_debug >= 1) fprintf(stderr, "out of memory\n"); return -1; } memset(config->interface, 0, config->bNumInterfaces * sizeof(struct usb_interface)); buffer += config->bLength; size -= config->bLength; config->extra = NULL; config->extralen = 0; for (i = 0; i < config->bNumInterfaces; i++) { int numskipped, len; char *begin; /* Skip over the rest of the Class Specific or Vendor */ /* Specific descriptors */ begin = buffer; numskipped = 0; while (size >= sizeof(struct usb_descriptor_header)) { header = (struct usb_descriptor_header *)buffer; if ((header->bLength > size) || (header->bLength < 2)) { if (usb_debug >= 1) fprintf(stderr, "invalid descriptor length of %d\n", header->bLength); return -1; } /* If we find another "proper" descriptor then we're done */ if ((header->bDescriptorType == USB_DT_ENDPOINT) || (header->bDescriptorType == USB_DT_INTERFACE) || (header->bDescriptorType == USB_DT_CONFIG) || (header->bDescriptorType == USB_DT_DEVICE)) break; if (usb_debug >= 2) fprintf(stderr, "skipping descriptor 0x%X\n", header->bDescriptorType); numskipped++; buffer += header->bLength; size -= header->bLength; } if (numskipped && usb_debug >= 2) fprintf(stderr, "skipped %d class/vendor specific endpoint descriptors\n", numskipped); /* Copy any unknown descriptors into a storage area for */ /* drivers to later parse */ len = (int)(buffer - begin); if (len) { /* FIXME: We should realloc and append here */ if (!config->extralen) { config->extra = malloc(len); if (!config->extra) { if (usb_debug >= 1) fprintf(stderr, "couldn't allocate memory for config extra descriptors\n"); config->extralen = 0; return -1; } memcpy(config->extra, begin, len); config->extralen = len; } } retval = usb_parse_interface(config->interface + i, buffer, size); if (retval < 0) return retval; buffer += retval; size -= retval; } return size; } void usb_destroy_configuration(struct usb_device *dev) { int c, i, j, k; if (!dev->config) return; for (c = 0; c < dev->descriptor.bNumConfigurations; c++) { struct usb_config_descriptor *cf = &dev->config[c]; if (!cf->interface) break; for (i = 0; i < cf->bNumInterfaces; i++) { struct usb_interface *ifp = &cf->interface[i]; if (!ifp->altsetting) break; for (j = 0; j < ifp->num_altsetting; j++) { struct usb_interface_descriptor *as = &ifp->altsetting[j]; if (as->extra) free(as->extra); if (!as->endpoint) break; for (k = 0; k < as->bNumEndpoints; k++) { if (as->endpoint[k].extra) free(as->endpoint[k].extra); } free(as->endpoint); } free(ifp->altsetting); } free(cf->interface); } free(dev->config); } void usb_fetch_and_parse_descriptors(usb_dev_handle *udev) { struct usb_device *dev = udev->device; int i; if (dev->descriptor.bNumConfigurations > USB_MAXCONFIG) { if (usb_debug >= 1) fprintf(stderr, "Too many configurations (%d > %d)\n", dev->descriptor.bNumConfigurations, USB_MAXCONFIG); return; } if (dev->descriptor.bNumConfigurations < 1) { if (usb_debug >= 1) fprintf(stderr, "Not enough configurations (%d < %d)\n", dev->descriptor.bNumConfigurations, 1); return; } dev->config = (struct usb_config_descriptor *)malloc(dev->descriptor.bNumConfigurations * sizeof(struct usb_config_descriptor)); if (!dev->config) { if (usb_debug >= 1) fprintf(stderr, "Unable to allocate memory for config descriptor\n"); return; } memset(dev->config, 0, dev->descriptor.bNumConfigurations * sizeof(struct usb_config_descriptor)); for (i = 0; i < dev->descriptor.bNumConfigurations; i++) { char buffer[8], *bigbuffer; struct usb_config_descriptor *desc = (struct usb_config_descriptor *)buffer; int res; /* Get the first 8 bytes so we can figure out what the total length is */ res = usb_get_descriptor(udev, USB_DT_CONFIG, i, buffer, 8); if (res < 8) { if (usb_debug >= 1) { if (res < 0) fprintf(stderr, "Unable to get descriptor (%d)\n", res); else fprintf(stderr, "Config descriptor too short (expected %d, got %d)\n", 8, res); } goto err; } USB_LE16_TO_CPU(desc->wTotalLength); bigbuffer = malloc(desc->wTotalLength); if (!bigbuffer) { if (usb_debug >= 1) fprintf(stderr, "Unable to allocate memory for descriptors\n"); goto err; } res = usb_get_descriptor(udev, USB_DT_CONFIG, i, bigbuffer, desc->wTotalLength); if (res < desc->wTotalLength) { if (usb_debug >= 1) { if (res < 0) fprintf(stderr, "Unable to get descriptor (%d)\n", res); else fprintf(stderr, "Config descriptor too short (expected %d, got %d)\n", desc->wTotalLength, res); } free(bigbuffer); goto err; } res = usb_parse_configuration(&dev->config[i], bigbuffer); if (usb_debug >= 2) { if (res > 0) fprintf(stderr, "Descriptor data still left\n"); else if (res < 0) fprintf(stderr, "Unable to parse descriptors\n"); } free(bigbuffer); } return; err: free(dev->config); dev->config = NULL; } mplinuxman/dirdialog.h0000644000175000006300000000021007662770341014372 0ustar boskobosko typedef void (*dirsel_callback)(gchar* filename,gint button); GtkWindow* dirsel_create_dialog(dirsel_callback user_func,gchar* path); mplinuxman/dirdialog.c0000644000175000006300000000215310517747425014375 0ustar boskobosko#include #include #include #include #ifdef NLS #include #include #define _(String) gettext (String) #endif #ifndef NLS #define _(String) String #endif #define gettext_noop(String) String #define N_(String) gettext_noop (String) #include "dirdialog.h" #ifdef NLS // if not a valid utf-8 string try to convert from current locale charset to utf-8 // fallback to iso8859-1 charset gchar* dirsel_convert_if_needed(gchar* text) { gint bytes_read; gint bytes_written; gchar* conv_text; GError* gerror = NULL; static gchar* free_text = NULL; if (g_utf8_validate(text,-1,NULL)) return text; conv_text = g_locale_to_utf8(text,-1,&bytes_read,&bytes_written,NULL); if (conv_text != NULL) return conv_text; if (free_text) g_free(free_text); free_text = g_convert(text,strlen(text),"UTF-8","ISO-8859-1",&bytes_read,&bytes_written,&gerror); if (!free_text) { g_print("%s\bn",gerror->message); // if we still cant convert return original string, will likely produce an error message return text; } return free_text; } #endif mplinuxman/COPYING0000644000175000006300000004311007662770330013322 0ustar boskobosko GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. mplinuxman/CHANGES0000644000175000006300000000430410542516010013244 0ustar boskobosko21/12/06 Version 1.5 * Ported open/save/about dialogs to the new stock Gtk dialogs * Files played with a external player are now added to the list of recent files. * Added a launcher (.desktop file) for Mplinuxman * Improved the GUI to be more GNOME HIG compliant * Updated the Dutch translation 19/01/04 Version 1.4 * Added support for building on Mac OS X , thanks to Kris Meeusen for getting this to work * Added Japanese (by Shimada Hirofumi) and German (by Thomas Ritter) translations * Added format for camera, to format the SMC for other devices, eg. camera and usb card reader. (patch by Tholom Kiely) * Support for MP-F55, changed the find devices routine to find F55 * Decreased playlist/directory loading times. 26/11/03 Version 1.4 beta * Added drag and drop of files/directories from file manager * Configurable track titles on player * Added Advanced options; changing device id / enable logging * Fixed/improved many parts of the interface * Made compiled binary smaller * Added Dutch translation by Bosko Andjelkovic 23/06/03 Version 1.31 * Fixed some more interface problems * Added Spanish translation thanks to Marcos Mainar 18/03/03 Version 1.3 * Fixed timeout when formatting Smartmedia cards * Fixed translation strings * Fixed reading UTF-8 / ISO8859 filenames / ID3 Tags * Added drag and drop from playlist * Added command line utility * Added French translation, thanks to Thomas Jost for this and testing * Minor interface changes 10/03/03 Version 1.3 beta * Support for formatting of internal memory and Smartmedia cards * upload/download non mp3 files * I18n, support for language translations (gettext) * Fixed iso8859 filenames/ID3 tags not being displayed correctly in list * Added iso8859-1 font for mpman * nicer progress bar! 16/11/02 Version 1.2 * Support for smartmedia cards, thanks to Tholom for testing * Stopped sending window from popping up when mainwindow is iconified * Minor interface improvements 10/10/02 Version 1.1 * Support for MP-F50, changed the find devices routine to find f50, thanks to Christian von Eichel-Streiber * Fixed empty player usb error bug, thanks to Kazutaka Manabe for reporting this * fixed playlist save as cancel button mplinuxman/useful.h0000644000175000006300000000031107662770361013743 0ustar boskobosko struct s_WDesktopInfo { gint width; gint height; gint depth; }; typedef struct s_WDesktopInfo WDesktopInfo; WDesktopInfo* w_get_desktop_info(); void w_center_window(GtkWindow *in); mplinuxman/useful.c0000644000175000006300000000115507662770361013745 0ustar boskobosko#include #include "useful.h" WDesktopInfo* w_get_desktop_info() { GdkWindow* p; static WDesktopInfo info; p = gdk_get_default_root_window(); gdk_window_get_geometry(p,NULL,NULL,&info.width,&info.height,&info.depth); return &info; } void w_center_window(GtkWindow *in) { WDesktopInfo* d; gint w; gint h; gint x; gint y; d = w_get_desktop_info(); // gdk_window_get_geometry(in->frame,NULL,NULL,&w,&h,NULL); gtk_window_get_size(in,&w,&h); x = (d->width / 2) - (w /2); y = (d->height /2) - (h /2); gtk_window_move(in,x,y); } mplinuxman/logo.xpm0000644000175000006300000006500107662770344013765 0ustar boskobosko/* XPM */ static char * logo[] = { "48 48 1393 2", " c None", ". c #9FA3A2", "+ c #6D7170", "@ c #C9CDCC", "# c #BDC1C0", "$ c #C6C8C7", "% c #C7C9C8", "& c #CCCECD", "* c #D0D2D1", "= c #CBCFD0", "- c #C9CDCE", "; c #C8CCCD", "> c #C9CFCF", ", c #CAD0D0", "' c #CDD3D3", ") c #C8CECE", "! c #CBD1D1", "~ c #C6CCCC", "{ c #C8D1CE", "] c #CAD0CE", "^ c #CBCDCC", "/ c #C5CECB", "( c #C1CDC9", "_ c #626E6A", ": c #AAB2B1", "< c #656E6D", "[ c #CACFD1", "} c #CDD0D5", "| c #C9C6C7", "1 c #CDCDCB", "2 c #C6CBCE", "3 c #CCD0D1", "4 c #C7CCCD", "5 c #C4CCCD", "6 c #C8D2D1", "7 c #C4CECE", "8 c #C7D1D3", "9 c #C5CED0", "0 c #C3CDCF", "a c #CACFD2", "b c #C5CACC", "c c #C3CCCB", "d c #C4CCCA", "e c #C7D0CF", "f c #C4CBCD", "g c #C5CBD1", "h c #C2CBCD", "i c #C4CED0", "j c #C4CCCF", "k c #C8CDD0", "l c #C2C5CF", "m c #C4C9CE", "n c #BFC9C9", "o c #C5CBCB", "p c #CACBC9", "q c #C3C7C6", "r c #BEC7C8", "s c #C8CED0", "t c #C1CBCA", "u c #576361", "v c #A9B3B2", "w c #666F6E", "x c #C7CCD0", "y c #C5C8CF", "z c #CDD0D9", "A c #9BA7AF", "B c #738894", "C c #728698", "D c #798998", "E c #7A8B98", "F c #798E9B", "G c #7B91A0", "H c #798F9E", "I c #758B9A", "J c #738999", "K c #768C9C", "L c #7B8FA1", "M c #8291A5", "N c #8A96A9", "O c #8B9EAC", "P c #8EA3AF", "Q c #8A9FAB", "R c #8094A4", "S c #7B8FA2", "T c #798EA0", "U c #788E9F", "V c #798B9E", "W c #77879A", "X c #7C8A9D", "Y c #778999", "Z c #728897", "` c #6B818E", " . c #6C7D88", ".. c #87999F", "+. c #BFCDD2", "@. c #BEC2C6", "#. c #BFC8C7", "$. c #5B6765", "%. c #A8B2B1", "&. c #636C6B", "*. c #C5CACE", "=. c #C9CCD3", "-. c #9CABBA", ";. c #455F77", ">. c #416689", ",. c #3B6489", "'. c #3B6182", "). c #3E627C", "!. c #3A5F71", "~. c #3D6177", "{. c #3E6376", "]. c #3F6476", "^. c #3E6275", "/. c #406577", "(. c #40647C", "_. c #425D76", ":. c #4A5F78", "<. c #486177", "[. c #395870", "}. c #3B5D74", "|. c #406277", "1. c #3C5F73", "2. c #3D6276", "3. c #406579", "4. c #416378", "5. c #46657B", "6. c #3D5B70", "7. c #40637D", "8. c #3F698B", "9. c #3D6788", "0. c #3B5F74", "a. c #A1B4BB", "b. c #C6C7CB", "c. c #C2CBCA", "d. c #677371", "e. c #ACB6B5", "f. c #C8CDD1", "g. c #C6C9D0", "h. c #98A6B4", "i. c #405C78", "j. c #28527D", "k. c #285781", "l. c #2E587E", "m. c #719AAD", "n. c #6A938F", "o. c #70988F", "p. c #6D958F", "q. c #709793", "r. c #6E9692", "s. c #709794", "t. c #6F9698", "u. c #7C999F", "v. c #7F959C", "w. c #7E9297", "x. c #76989E", "y. c #73979C", "z. c #74999B", "A. c #709594", "B. c #6F9895", "C. c #6E9794", "D. c #6C908F", "E. c #739596", "F. c #78979C", "G. c #5B8098", "H. c #2A5781", "I. c #2A5987", "J. c #24577F", "K. c #416680", "L. c #98AAB0", "M. c #C9CACD", "N. c #667270", "O. c #ADB8B5", "P. c #67706F", "Q. c #C5CCCF", "R. c #C3C7CE", "S. c #96A2AE", "T. c #3E5876", "U. c #29527E", "V. c #2C577E", "W. c #335772", "X. c #7DA2A5", "Y. c #60896D", "Z. c #5B8666", "`. c #5B8566", " + c #547F62", ".+ c #527C60", "++ c #547E64", "@+ c #507960", "#+ c #688370", "$+ c #1E2A1F", "%+ c #050F05", "&+ c #3B4F44", "*+ c #728F81", "=+ c #5E8571", "-+ c #5F836C", ";+ c #5B836B", ">+ c #5D876E", ",+ c #618870", "'+ c #658A73", ")+ c #5F8276", "!+ c #628896", "~+ c #305680", "{+ c #2B5583", "]+ c #27587E", "^+ c #3E6479", "/+ c #9FB0B2", "(+ c #C4C7C9", "_+ c #C1C9CB", ":+ c #6A7676", "<+ c #ACB8B5", "[+ c #66706F", "}+ c #C3CBCE", "|+ c #C2C7CD", "1+ c #96A6B3", "2+ c #3C5B78", "3+ c #27547E", "4+ c #265279", "5+ c #2F5469", "6+ c #7EA59F", "7+ c #5D8B6A", "8+ c #5C8D6A", "9+ c #5E8F6B", "0+ c #65936F", "a+ c #659373", "b+ c #628F72", "c+ c #55856D", "d+ c #6F8B7D", "e+ c #0F1510", "f+ c #090C08", "g+ c #0E180F", "h+ c #66816E", "i+ c #639074", "j+ c #619073", "k+ c #5F8F71", "l+ c #679578", "m+ c #628C70", "n+ c #55806D", "o+ c #6A949D", "p+ c #2E577F", "q+ c #26587C", "r+ c #3D6379", "s+ c #9AACB0", "t+ c #C2C6C7", "u+ c #BFC7CA", "v+ c #ADB8B9", "w+ c #677172", "x+ c #C4C9CC", "y+ c #95A6B6", "z+ c #385B79", "A+ c #26577F", "B+ c #27577F", "C+ c #2E586E", "D+ c #74A29C", "E+ c #588D6B", "F+ c #5B926F", "G+ c #588F6C", "H+ c #59906D", "I+ c #5B9271", "J+ c #5C9374", "K+ c #578C73", "L+ c #709279", "M+ c #657259", "N+ c #6B725B", "O+ c #51574A", "P+ c #68806E", "Q+ c #5E9073", "R+ c #5B9674", "S+ c #5C9373", "T+ c #588F6F", "U+ c #5D9071", "V+ c #5D8E70", "W+ c #568571", "X+ c #64939B", "Y+ c #2A577E", "Z+ c #265780", "`+ c #285980", " @ c #3E647D", ".@ c #9CADB4", "+@ c #C4C7CC", "@@ c #ADB8BD", "#@ c #677074", "$@ c #C0C8CA", "%@ c #C4CAC9", "&@ c #93A2B6", "*@ c #375675", "=@ c #28557C", "-@ c #2C5783", ";@ c #2F5570", ">@ c #76A19F", ",@ c #5C8D6F", "'@ c #5D9172", ")@ c #5A8E6E", "!@ c #5B8F6F", "~@ c #5A8E70", "{@ c #598D70", "]@ c #65917C", "^@ c #709072", "/@ c #7B8D62", "(@ c #7C9065", "_@ c #535B4B", ":@ c #4F6453", "<@ c #59866A", "[@ c #588D6D", "}@ c #5F9374", "|@ c #5B8F70", "1@ c #5E8D70", "2@ c #5B8673", "3@ c #69929C", "4@ c #2D557E", "5@ c #29547F", "6@ c #285982", "7@ c #3E637E", "8@ c #9CADB5", "9@ c #C4C7CD", "0@ c #C0C8CB", "a@ c #6B7777", "b@ c #AFB7BD", "c@ c #657375", "d@ c #C1C7CA", "e@ c #C1C6C6", "f@ c #94A2B5", "g@ c #3B567C", "h@ c #2B5680", "i@ c #315576", "j@ c #7EA7A1", "k@ c #5C8C6F", "l@ c #5D8E71", "m@ c #5D8D6E", "n@ c #5E8F71", "o@ c #609274", "p@ c #5F8E73", "q@ c #658B7E", "r@ c #425F4D", "s@ c #849D7A", "t@ c #73946B", "u@ c #7F8F7D", "v@ c #05160A", "w@ c #6F8F7D", "x@ c #689478", "y@ c #5F9073", "z@ c #5D8D70", "A@ c #5E8E6F", "B@ c #598571", "C@ c #6A919B", "D@ c #30557F", "E@ c #2B5480", "F@ c #3C617C", "G@ c #9BADB5", "H@ c #C2C8CD", "I@ c #BDC7C9", "J@ c #6C7878", "K@ c #B0B5BB", "L@ c #627474", "M@ c #C0C1C3", "N@ c #93A3B2", "O@ c #39557C", "P@ c #29567D", "Q@ c #31547A", "R@ c #80A9A1", "S@ c #5A8B6E", "T@ c #588A6D", "U@ c #629171", "V@ c #5A8D6E", "W@ c #619475", "X@ c #5F8C6F", "Y@ c #577768", "Z@ c #4A6557", "`@ c #789A80", " # c #77A57F", ".# c #85A48D", "+# c #314239", "@# c #091A10", "## c #64846F", "$# c #5E8D71", "%# c #5E8F6F", "&# c #588570", "*# c #6A959E", "=# c #2F567F", "-# c #2C5581", ";# c #295882", "># c #99ACB3", ",# c #C2CACD", "'# c #BEC8CA", ")# c #B0B6BC", "!# c #C4CACC", "~# c #BEBFC1", "{# c #96A6B5", "]# c #3C587F", "^# c #33567C", "/# c #7FA8A0", "(# c #5E8F72", "_# c #5A8C6F", ":# c #5D8E6E", "<# c #5E9172", "[# c #659678", "}# c #668D72", "|# c #304539", "1# c #91A8A0", "2# c #709684", "3# c #6AA07F", "4# c #75A185", "5# c #7B9184", "6# c #0D1710", "7# c #849B8B", "8# c #618C73", "9# c #5E8E71", "0# c #5E8E70", "a# c #5E8E6E", "b# c #5A8772", "c# c #6C98A0", "d# c #305780", "e# c #2D5682", "f# c #3C627C", "g# c #98ABB2", "h# c #C0CACC", "i# c #B1B6BC", "j# c #C2C7CA", "k# c #BDBEC0", "l# c #3D5980", "m# c #32557B", "n# c #5D8F72", "o# c #5A8B6B", "p# c #5F9273", "q# c #5C896C", "r# c #74967D", "s# c #142917", "t# c #7A9587", "u# c #77A291", "v# c #699E7E", "w# c #6F9A7B", "x# c #829386", "y# c #0D0F0C", "z# c #63796D", "A# c #618B73", "B# c #608C71", "C# c #608D70", "D# c #5F8C6D", "E# c #5B8873", "F# c #6F9AA3", "G# c #3B607B", "H# c #697575", "I# c #B2B9BD", "J# c #617373", "K# c #BFC6C9", "L# c #BDC0C4", "M# c #94A4AF", "N# c #3B587A", "O# c #29567F", "P# c #305476", "Q# c #7BA3A0", "R# c #5E8C71", "S# c #5E9275", "T# c #578B6D", "U# c #598B6F", "V# c #5B886C", "W# c #25482B", "X# c #6E8E70", "Y# c #476954", "Z# c #77A18E", "`# c #739E84", " $ c #789D81", ".$ c #475E49", "+$ c #000900", "@$ c #152F21", "#$ c #638777", "$$ c #618C77", "%$ c #608D74", "&$ c #5F8C70", "*$ c #5D8870", "=$ c #72999F", "-$ c #30567D", ";$ c #295982", ">$ c #395F79", ",$ c #C0C7CB", "'$ c #657171", ")$ c #B5BDC0", "!$ c #5F7372", "~$ c #BEC6C9", "{$ c #BFC2C7", "]$ c #96A7AE", "^$ c #3A5872", "/$ c #295680", "($ c #2E5370", "_$ c #789E9F", ":$ c #568E6A", "<$ c #58906E", "[$ c #58896A", "}$ c #567E60", "|$ c #7C9C77", "1$ c #75936E", "2$ c #2B482C", "3$ c #77937E", "4$ c #7E9A86", "5$ c #779278", "6$ c #5A7555", "7$ c #6D8B67", "8$ c #708E6F", "9$ c #2E5034", "0$ c #658E71", "a$ c #5E8C6E", "b$ c #618E70", "c$ c #5D866D", "d$ c #71979C", "e$ c #2E547B", "f$ c #275B83", "g$ c #38607A", "h$ c #97AAB1", "i$ c #BDC2C6", "j$ c #677373", "k$ c #5D7170", "l$ c #BCC4C7", "m$ c #C0C3C8", "n$ c #97A8AF", "o$ c #3C5A74", "p$ c #2E5373", "q$ c #789DA1", "r$ c #618B6F", "s$ c #609270", "t$ c #558B66", "u$ c #629172", "v$ c #193C20", "w$ c #657E5F", "x$ c #758D6C", "y$ c #799076", "z$ c #001200", "A$ c #203523", "B$ c #041503", "C$ c #53674C", "D$ c #718D66", "E$ c #2B4E28", "F$ c #4D734E", "G$ c #628C69", "H$ c #61906F", "I$ c #608D71", "J$ c #567F75", "K$ c #7197A5", "L$ c #2E567A", "M$ c #2C5782", "N$ c #92A5AC", "O$ c #BCC1C5", "P$ c #BAC4C6", "Q$ c #667272", "R$ c #B8C0C3", "S$ c #5C706F", "T$ c #BBC3C6", "U$ c #2B5882", "V$ c #2D5A84", "W$ c #294F73", "X$ c #789CAB", "Y$ c #6A8D85", "Z$ c #648B83", "`$ c #608B80", " % c #628B83", ".% c #60837F", "+% c #64847E", "@% c #48665C", "#% c #2D4A47", "$% c #5F7B81", "%% c #658186", "&% c #768F93", "*% c #223B3A", "=% c #3B5751", "-% c #6D8B89", ";% c #6A8988", ">% c #6A8E8B", ",% c #67918C", "'% c #678F8B", ")% c #5B8288", "!% c #668FA4", "~% c #2E597C", "{% c #2C5983", "]% c #91A4AB", "^% c #636F6F", "/% c #BDC5C9", "(% c #607474", "_% c #BEC1C7", ":% c #98A8B1", "<% c #3D5B75", "[% c #275680", "}% c #275580", "|% c #32577E", "1% c #355772", "2% c #446472", "3% c #45687A", "4% c #426778", "5% c #416779", "6% c #416878", "7% c #3C6371", "8% c #41677B", "9% c #3D6279", "0% c #3E6379", "a% c #45667A", "b% c #426276", "c% c #3E5D74", "d% c #415C7D", "e% c #3D5A80", "f% c #3C5D7E", "g% c #3C627B", "h% c #3C6475", "i% c #375E6F", "j% c #315974", "k% c #2D597F", "l% c #2B5A83", "m% c #275A83", "n% c #375E78", "o% c #BBC1C5", "p% c #BAC4C5", "q% c #5F6B6A", "r% c #BEC5CA", "s% c #BFC2C8", "t% c #9AA7B0", "u% c #3E5C75", "v% c #2B5988", "w% c #325482", "x% c #33557C", "y% c #365A7C", "z% c #32597B", "A% c #2E5679", "B% c #2F577A", "C% c #305877", "D% c #2B546F", "E% c #345B78", "F% c #3C637E", "G% c #416881", "H% c #396177", "I% c #395F75", "J% c #426681", "K% c #385A7D", "L% c #395A85", "M% c #355785", "N% c #335781", "O% c #30577C", "P% c #325B78", "Q% c #2E5C75", "R% c #2C5B7C", "S% c #2C5982", "T% c #2D5882", "U% c #395E79", "V% c #90A3AA", "W% c #B9C3C4", "X% c #586462", "Y% c #BFC7C9", "Z% c #BEC6C8", "`% c #97A9AD", " & c #3B5D70", ".& c #285981", "+& c #265082", "@& c #315586", "#& c #476E99", "$& c #416D94", "%& c #406D97", "&& c #416893", "*& c #426990", "=& c #436D93", "-& c #436D95", ";& c #476B8C", ">& c #5B7F9B", ",& c #6287A1", "'& c #567A93", ")& c #648CA6", "!& c #688FAC", "~& c #446B8F", "{& c #40668D", "]& c #3D6589", "^& c #3D6689", "/& c #3E688E", "(& c #366388", "_& c #35698F", ":& c #306088", "<& c #2F5983", "[& c #2D5A83", "}& c #275881", "|& c #3A5F7A", "1& c #B9C3C5", "2& c #546060", "3& c #5B706B", "4& c #BBC4C3", "5& c #BFC3C4", "6& c #94A7AE", "7& c #365A71", "8& c #2C5C80", "9& c #325C83", "0& c #33547C", "a& c #35597C", "b& c #315C7D", "c& c #295B80", "d& c #30587E", "e& c #325A80", "f& c #305B84", "g& c #2F5E88", "h& c #2E5A7F", "i& c #2E577A", "j& c #335C7C", "k& c #305978", "l& c #2E5A7A", "m& c #2D597A", "n& c #325D80", "o& c #2D587D", "p& c #305C82", "q& c #2F5D82", "r& c #2C5C82", "s& c #2D5E86", "t& c #29567A", "u& c #3B6084", "v& c #36577C", "w& c #2B5B84", "x& c #295D86", "y& c #385D78", "z& c #B9C2C7", "A& c #5A6567", "B& c #5E716D", "C& c #B9C3C2", "D& c #BFC3C6", "E& c #93A5B1", "F& c #385C76", "G& c #3D6180", "H& c #38506B", "I& c #334E65", "J& c #305368", "K& c #31607D", "L& c #33587D", "M& c #31577B", "N& c #29577C", "O& c #295D84", "P& c #2A5C85", "Q& c #2F5B82", "R& c #376183", "S& c #376080", "T& c #335D7C", "U& c #305D7D", "V& c #356385", "W& c #295A82", "X& c #285A82", "Y& c #265A82", "Z& c #2E607E", "`& c #33576F", " * c #516880", ".* c #425A77", "+* c #2E597F", "@* c #285C84", "#* c #395F78", "$* c #8EA2A9", "%* c #606B6E", "&* c #C2CECC", "** c #63726F", "=* c #B7C2C4", "-* c #BEC1C8", ";* c #9AA8B5", ">* c #3C5F7D", ",* c #27547B", "'* c #3C5771", ")* c #8F9BAB", "!* c #AAB6C1", "~* c #526977", "{* c #345B7A", "]* c #355880", "^* c #34577F", "/* c #305A80", "(* c #2C5E82", "_* c #2F5978", ":* c #42627A", "<* c #94AABA", "[* c #B5C6D3", "}* c #9EB0BD", "|* c #4A667B", "1* c #335A7D", "2* c #305D84", "3* c #2D5D83", "4* c #2C5E81", "5* c #265583", "6* c #3F6583", "7* c #698287", "8* c #A2ADB3", "9* c #7E8B98", "0* c #385B77", "a* c #2D5F84", "b* c #3C647D", "c* c #8FA3AA", "d* c #B8C1C8", "e* c #646F71", "f* c #C7D3D1", "g* c #647370", "h* c #B8C3C5", "i* c #A3ABBE", "j* c #38658C", "k* c #3B5B70", "l* c #7E8B93", "m* c #96A1A5", "n* c #7B8E9C", "o* c #2F5174", "p* c #315B85", "q* c #31587F", "r* c #32597A", "s* c #335A77", "t* c #3B586A", "u* c #A0B1B9", "v* c #878D8D", "w* c #A5A7A4", "x* c #929697", "y* c #A9B8C5", "z* c #304D6D", "A* c #3B5D8A", "B* c #385A87", "C* c #365C81", "D* c #375B8D", "E* c #2A4A70", "F* c #74878D", "G* c #9DA5A7", "H* c #858F98", "I* c #274B65", "J* c #295B7E", "K* c #345973", "L* c #8C9FA6", "M* c #BAC1C9", "N* c #B8C1C6", "O* c #667173", "P* c #C9D5D3", "Q* c #697875", "R* c #BCBFC6", "S* c #A7AFBA", "T* c #466581", "U* c #336087", "V* c #2C4E69", "W* c #97A7B7", "X* c #BDCED9", "Y* c #5F7988", "Z* c #345A7E", "`* c #346188", " = c #305E82", ".= c #2F5B7E", "+= c #346083", "@= c #365A7A", "#= c #344E65", "$= c #617281", "%= c #6F7B87", "&= c #445B69", "*= c #325169", "== c #396184", "-= c #2F5981", ";= c #305582", ">= c #2F5A7D", ",= c #305C89", "'= c #325982", ")= c #5A7789", "!= c #B9CBD9", "~= c #91A1B1", "{= c #2B4C6B", "]= c #375B75", "^= c #94A5AD", "/= c #BBBFC8", "(= c #B7C0C5", "_= c #6A7577", ":= c #CCD8D6", "<= c #BABDC2", "[= c #BBC4CB", "}= c #648095", "|= c #2C577A", "1= c #45678A", "2= c #4D6782", "3= c #526C83", "4= c #3F617A", "5= c #285677", "6= c #2E5E82", "7= c #2A5B83", "8= c #285B86", "9= c #265986", "0= c #38638D", "a= c #43658A", "b= c #416283", "c= c #3B6387", "d= c #32628A", "e= c #2D6189", "f= c #2D5C86", "g= c #2A5F81", "h= c #265B83", "i= c #2D6188", "j= c #3F6C8D", "k= c #446382", "l= c #566D8C", "m= c #4C6D90", "n= c #386385", "o= c #507087", "p= c #AFBDC6", "q= c #B7BAC3", "r= c #B9C0C6", "s= c #6C757A", "t= c #D6E2E2", "u= c #687676", "v= c #B7C3C3", "w= c #BABEC1", "x= c #B6BDC3", "y= c #B8C4D0", "z= c #607789", "A= c #406079", "B= c #30536F", "C= c #3C617E", "D= c #3A6180", "E= c #325D7D", "F= c #375F82", "G= c #365E81", "H= c #325E83", "I= c #315E85", "J= c #366289", "K= c #366088", "L= c #376189", "M= c #356289", "N= c #346286", "O= c #306182", "P= c #2F5F85", "Q= c #366488", "R= c #376386", "S= c #375E85", "T= c #365A7E", "U= c #41607D", "V= c #445C76", "W= c #617E89", "X= c #BCD1DA", "Y= c #B3BCC5", "Z= c #B8BDC3", "`= c #B8BFC7", " - c #6E757B", ".- c #D8E4E4", "+- c #BEC2C5", "@- c #BCBCBE", "#- c #BABBBD", "$- c #CDD4DB", "%- c #BDC7D0", "&- c #A2B3C3", "*- c #7E90A4", "=- c #64798E", "-- c #566C83", ";- c #465F77", ">- c #445F76", ",- c #415C77", "'- c #3F5D79", ")- c #3B5F7F", "!- c #365D7E", "~- c #375E7F", "{- c #396081", "]- c #3B5F79", "^- c #406075", "/- c #436179", "(- c #426179", "_- c #4E6A80", ":- c #5B778C", "<- c #6F8294", "[- c #8B99A9", "}- c #ACB6C0", "|- c #D3D7E1", "1- c #BBBCC1", "2- c #B9C0C8", "3- c #72797F", "4- c #B5C1C1", "5- c #BCC0C3", "6- c #BBBCC0", "7- c #BDC1C4", "8- c #C9CDD0", "9- c #B9BDC0", "0- c #BDC2C7", "a- c #C8CFD8", "b- c #C7D1DA", "c- c #CFD8E2", "d- c #CBD5E0", "e- c #C3CFDC", "f- c #B6C4D2", "g- c #ABBDCD", "h- c #A5B7C7", "i- c #9FB1C2", "j- c #9CAEBF", "k- c #9EB0C0", "l- c #A3B5C5", "m- c #A5B5C3", "n- c #ACBDC6", "o- c #C4D2DB", "p- c #CDDAE3", "q- c #C2CBD3", "r- c #C3CBD1", "s- c #C2C8CC", "t- c #C1C5C8", "u- c #BBBCBE", "v- c #C7C7C7", "w- c #BEC0C1", "x- c #BEBEC0", "y- c #BCBBC1", "z- c #7A8187", "A- c #D5E1E1", "B- c #B9C2C9", "C- c #B7C1CA", "D- c #BCC1C7", "E- c #BCBEBD", "F- c #BDBFBE", "G- c #B9BDBC", "H- c #BAC0C0", "I- c #BEBFC3", "J- c #BABDC4", "K- c #BEC3C9", "L- c #BCC0C4", "M- c #BFC1C3", "N- c #BCBEC0", "O- c #BAC2C5", "P- c #BBBFC3", "Q- c #C1C2C6", "R- c #C1C1C3", "S- c #C4C4C4", "T- c #C5C9CC", "U- c #BABEBF", "V- c #BDC0C9", "W- c #BBBEC7", "X- c #B6BDC5", "Y- c #7E858B", "Z- c #D4E0DE", "`- c #717B7A", " ; c #B7BFC1", ".; c #B7BCC0", "+; c #B7BEC6", "@; c #BBC0C3", "#; c #B9BFBF", "$; c #BBC1C1", "%; c #BCC2C2", "&; c #BBC0C4", "*; c #BABFC3", "=; c #BDC1C2", "-; c #BFC0C1", ";; c #BFC0C2", ">; c #BEBFC0", ",; c #BCC0C0", "'; c #BBBFC1", "); c #BCBFC4", "!; c #BBBEC3", "~; c #BEC1C6", "{; c #BAC2C4", "]; c #BDBEC3", "^; c #BDBDC5", "/; c #B7BEC8", "(; c #B5BCC4", "_; c #737D7E", ":; c #B6BBC1", "<; c #BBBBC3", "[; c #BCBCC4", "}; c #BEBEC6", "|; c #BCC4C6", "1; c #BDC5C7", "2; c #B9C1C4", "3; c #B6BFC4", "4; c #BCC5CA", "5; c #BCC7CA", "6; c #B8C3C7", "7; c #B2BCC3", "8; c #BAC3CC", "9; c #B6BFC6", "0; c #B8BFC5", "a; c #BAC1C7", "b; c #BCC6C8", "c; c #B6C0C1", "d; c #B8C0C2", "e; c #BABFC2", "f; c #BCBDC2", "g; c #7F868C", "h; c #DAE5E7", "i; c #6B7577", "j; c #B6BAC5", "k; c #B9BEC4", "l; c #B6BBBF", "m; c #A2ACAE", "n; c #929C9E", "o; c #9EA8AA", "p; c #97A1A3", "q; c #B4BEC0", "r; c #B7C1C3", "s; c #BAC3C8", "t; c #A6AFB4", "u; c #9EA7AC", "v; c #A1AAAF", "w; c #99A3A7", "x; c #A3AEB2", "y; c #B7C2C8", "z; c #B5BFC8", "A; c #BBC5CE", "B; c #B3BEC4", "C; c #A3AEB4", "D; c #97A2A8", "E; c #98A6A7", "F; c #98A4A4", "G; c #B7C1C2", "H; c #BBC3C5", "I; c #B8BCC5", "J; c #B6BDC7", "K; c #DDE8EA", "L; c #AFB6BE", "M; c #B5B9C3", "N; c #B3BDBE", "O; c #AFB9BA", "P; c #97A2A4", "Q; c #A5B0B4", "R; c #737E82", "S; c #798488", "T; c #9FAAAC", "U; c #929D9F", "V; c #AEB9BB", "W; c #ABB6B8", "X; c #969EA0", "Y; c #A8ADB0", "Z; c #898E91", "`; c #7E8386", " > c #7C8486", ".> c #A3ABAD", "+> c #9FA7AA", "@> c #ABB4B9", "#> c #AAB7BF", "$> c #A2B0B7", "%> c #9EABB3", "&> c #65727A", "*> c #5C6A6B", "=> c #A1AFAF", "-> c #9AA6A6", ";> c #BABEC3", ">> c #BCBEC5", ",> c #BABDC6", "'> c #81888E", ")> c #D6E2E0", "!> c #6D767B", "~> c #B8BDC1", "{> c #B3BDBF", "]> c #B5C0C2", "^> c #A9B7B8", "/> c #526061", "(> c #A3B1B2", "_> c #A8B6B7", ":> c #3C4A4B", "<> c #ABB9BA", "[> c #AAB8B9", "}> c #A7B5B6", "|> c #AFB9BB", "1> c #848C8F", "2> c #A4ACAF", "3> c #A0A8AB", "4> c #A5ADB0", "5> c #7B8489", "6> c #9FAAB0", "7> c #A1AEB6", "8> c #A1ACB2", "9> c #B2BDC3", "0> c #475258", "a> c #A8B3B9", "b> c #B1BCC0", "c> c #424C4E", "d> c #9EA6A9", "e> c #B4B9BD", "f> c #B6BEC1", "g> c #BABFC5", "h> c #BDBDC7", "i> c #B8BFC9", "j> c #868D93", "k> c #DAE6E4", "l> c #B3BAC2", "m> c #B5BABE", "n> c #B5BFC1", "o> c #AAB5B7", "p> c #7C8789", "q> c #ACB7B9", "r> c #A1ACAE", "s> c #778284", "t> c #B2BDBF", "u> c #B3BEC0", "v> c #828A8D", "w> c #ACB4B7", "x> c #AEB6B9", "y> c #A1A9AC", "z> c #A2ABB0", "A> c #79848A", "B> c #B1BEC6", "C> c #B6C1C7", "D> c #818C92", "E> c #AAB5B9", "F> c #869092", "G> c #A6AEB1", "H> c #AAAFB3", "I> c #BCBCC6", "J> c #888F95", "K> c #D9E5E3", "L> c #B0B7BF", "M> c #B2B7BB", "N> c #B4BCBF", "O> c #ADB7B9", "P> c #B6C1C3", "Q> c #A4AEB0", "R> c #96A0A2", "S> c #A9B3B5", "T> c #818B8D", "U> c #B2BCBE", "V> c #8E9699", "W> c #AAB2B5", "X> c #99A2A7", "Y> c #838E94", "Z> c #B5C2CA", "`> c #B1BCC2", " , c #8B969C", "., c #A5B0B6", "+, c #A8B3B7", "@, c #8D9799", "#, c #DCE6E5", "$, c #717B7E", "%, c #AEB5BC", "&, c #B1B6BA", "*, c #B2BBBD", "=, c #949C9F", "-, c #AFB7BA", ";, c #C6CED1", ">, c #B2BABD", ",, c #99A1A4", "', c #949BA0", "), c #98A0A4", "!, c #A1A9AD", "~, c #8C9497", "{, c #8A9297", "], c #909A9F", "^, c #AFBBC2", "/, c #B7C1C8", "(, c #C5CFD5", "_, c #A3ADB3", ":, c #A6B0B3", "<, c #A2AAAD", "[, c #C2C7CB", "}, c #BCBEC7", "|, c #DEE7E6", "1, c #6C7574", "2, c #B0B8BB", "3, c #B1B8BE", "4, c #B9BEC2", "5, c #A8ADB1", "6, c #ACB1B5", "7, c #BEC3C7", "8, c #A4A9AD", "9, c #A6AFB5", "0, c #9FA6AB", "a, c #A6ABAF", "b, c #9A9FA3", "c, c #AEB3B7", "d, c #AFB4B8", "e, c #B0B5B9", "f, c #BDC0C5", "g, c #B6BFC8", "h, c #B4BDC4", "i, c #8A9197", "j, c #B1B9BC", "k, c #AFB6BC", "l, c #B3B8BC", "m, c #A3AAB0", "n, c #AEB7BC", "o, c #93989C", "p, c #ADB2B6", "q, c #C1C6CA", "r, c #C0C5C9", "s, c #B5BEC5", "t, c #DDE6E5", "u, c #6B7473", "v, c #9DA5A8", "w, c #C1C9CC", "x, c #CACFD3", "y, c #A2A7AB", "z, c #BFC4C8", "A, c #BBBEC5", "B, c #B2BBC2", "C, c #71787E", "D, c #DCE5E4", "E, c #6E7776", "F, c #B0B7BD", "G, c #BEC3C6", "H, c #BABEC2", "I, c #BFC3C7", "J, c #AFB4B7", "K, c #C3C8CC", "L, c #BBBEC4", "M, c #B1BAC1", "N, c #757C82", "O, c #DFE5E5", "P, c #6F7575", "Q, c #AFB4BA", "R, c #B3B6BB", "S, c #B5B9BC", "T, c #B7BBBE", "U, c #B8BCBF", "V, c #C1C1CB", "W, c #C5C5CF", "X, c #C0C0CA", "Y, c #C4C4CE", "Z, c #C0C3CA", "`, c #B3BCC3", " ' c #DDE3E3", ".' c #B3B8BE", "+' c #B0B3B8", "@' c #B4B8BB", "#' c #B6B9BE", "$' c #9898A2", "%' c #ACACB6", "&' c #9A9AA4", "*' c #9E9EA8", "=' c #A3A6AF", "-' c #9DA0A7", ";' c #A4A7AC", ">' c #AEB2B5", ",' c #C0C4C7", "'' c #787F85", ")' c #DCE2E2", "!' c #727878", "~' c #AEB3B9", "{' c #A9ACB1", "]' c #B1B5B8", "^' c #B2B6B9", "/' c #B3B7BA", "(' c #B9BCC1", "_' c #C2C5CA", ":' c #9A9DA2", "<' c #898993", "[' c #74747E", "}' c #868690", "|' c #7F7F89", "1' c #71747D", "2' c #767980", "3' c #7A7D82", "4' c #999DA0", "5' c #C2C6C9", "6' c #767D83", "7' c #DEE4E4", "8' c #717777", "9' c #B1B4B8", "0' c #9FA3A6", "a' c #AFB3B6", "b' c #A9ADB0", "c' c #AEB1B6", "d' c #B1B4B9", "e' c #B8BBC0", "f' c #B2B5BA", "g' c #BFBFC9", "h' c #BEBEC8", "i' c #BCBFC7", "j' c #A9ACB3", "k' c #C1C4C9", "l' c #B6BABD", "m' c #C4C8CB", "n' c #ACAFB4", "o' c #AFB2B7", "p' c #BFC6CC", "q' c #B5BEC4", "r' c #DBE5E6", "s' c #6E7678", "t' c #B5BABD", "u' c #B5B9BA", "v' c #919596", "w' c #7B7E83", "x' c #91949B", "y' c #8A8D92", "z' c #9FA2A7", "A' c #96999E", "B' c #AAADB2", "C' c #A7AAAF", "D' c #989BA0", "E' c #9DA0A5", "F' c #B6B6BF", "G' c #BABAC4", "H' c #9D9DA7", "I' c #97989D", "J' c #9A9B9F", "K' c #97989C", "L' c #A3A4A8", "M' c #A2A6A9", "N' c #9A9EA1", "O' c #9B9EA3", "P' c #A6A9AE", "Q' c #95989D", "R' c #A0A1A6", "S' c #9E9FA4", "T' c #747C7F", "U' c #DDE7E8", "V' c #6F7779", "W' c #B3B8BB", "X' c #B1B5B6", "Y' c #AEB2B3", "Z' c #ADB0B5", "`' c #B1B4BB", " ) c #B5B8BD", ".) c #C3C3CB", "+) c #C4C4CC", "@) c #C7C7CF", "#) c #C5C6CB", "$) c #C2C3C7", "%) c #C5C6CA", "&) c #C7CBCE", "*) c #C3C7CA", "=) c #C1C2C7", "-) c #C2C3C8", ";) c #BDC4CA", ">) c #777F82", " . + @ # $ % & * = - ; ; > , > ' > ) , ! ~ , ) > , ! ! ~ > ! > > { ] ^ / ( _ ", " : < [ } | 1 ] 2 3 4 5 6 7 8 8 9 0 a b c d e f g h i j k l m n o p q r s t u ", " v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ` ...+.@.#.$. ", " %.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.,.9.0.a.b.c.d. ", "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~;~;~;~;5-5-0;h,`,z- ", " 'P,e,.'+'@'T,U,!;!;!;);f,{$<=#'$'%'&'*'='-';'>'7-,'+-+-~;~;~;~;5-5-0;h,s,'' ", " )'!'M>~'{']'^'/'('!;_'m$););_':'<'['}'|'1'2'3'4'5-5'7-5'_'{$~;~;7-5-0;B-d*6' ", " 7'8'e,~'9'0'a'b'+'c'd'd'e'f'{${$g'h'W,X,i'j'k'+-5-l'm'9-+'n'o'e'5-U,p'q'd*6' ", " r's't'^'u'v'w'x'y'z'A'B'+'C'D'E'F'G'H'H'I'J'K'L'M'N'S,+-B'O'P'Q'R'S'O$R$r=T' ", " U'V'W'^'X'Y'Z'`' )<=);{$+@{${$m$.)+)@).)#)$)%)b.&)*)*)D&k'f,m$f,=)-)7,O-;)>) "}; mplinuxman/README.osx0000644000175000006300000000101010003155476013737 0ustar boskoboskoMplinuxman on Mac OS X ~~~~~~~~~~~~~~~~~ Requirements: *Apple X server *You need to install gtk2 libraries for OS X, binary versions of these can be downloaded from http://fink.sourceforge.net/ . You need the development gtk+2-dev package. *Install libusb, from http://libusb.sourceforge.net/ . Look at it's documentation on how to build for Darwin. To compile for OS X: type "make -f makefile.osx" which makes the executable mplinuxman in this directory just copy it to where ever you want to execute it from mplinuxman/mplist.c0000644000175000006300000001350210003155421013722 0ustar boskobosko#include #include #include #include "mplinux.h" #include "f60lib/f60lib.h" #ifndef USE_OSX #include #endif static usb_dev_handle* mpl_USBHandle = NULL; int CancelOperation = 0; int default_device = 1; unsigned short vendor_id; unsigned short product_id; unsigned short mpl_hex_to_short(gchar* string) { gchar hex[4]; gchar c; unsigned short ret; int i; strncpy(hex,string,4); ret = 0; for(i = 0; i < 4; i++) { ret = ret << 4; c = g_ascii_tolower(hex[i]); if ( (c >= 'a') && (c <= 'f') ) { ret = ret | (c - 87); } else if ( (c >= '0') && (c <= '9') ) { ret = ret | (c - 48); } else { ret = ret | 0; } } return ret; } void mpl_set_device_id(int use_id, gchar* vendor, gchar* product) { vendor_id = mpl_hex_to_short(vendor); product_id = mpl_hex_to_short(product); if (use_id) { default_device = 0; } else { default_device = 1; } } void mpl_cancel_operation(gboolean a) { if (a == TRUE) { CancelOperation = 1; f60_error = USER_CANCELED; } else CancelOperation = 0; } void file_ext_to_mpm(gchar* c) { if (strlen(c) < 5) return; c[strlen(c) - 1] = 'm'; c[strlen(c) - 2] = 'p'; c[strlen(c) - 3] = 'm'; c[strlen(c) - 4] = '.'; } void file_ext_to_mp3(gchar* c) { if (strlen(c) < 5) return; c[strlen(c) - 1] = '3'; c[strlen(c) - 2] = 'p'; c[strlen(c) - 3] = 'm'; c[strlen(c) - 4] = '.'; } gchar* mpl_ErrorString() { return f60_strerror; } gint mpl_LastError() { return f60_error; } gboolean mpl_CheckForDevice() { if (mpl_USBHandle == NULL) { usb_init(); usb_find_busses(); usb_find_devices(); if (default_device) { mpl_USBHandle = f60_init(); } else { mpl_USBHandle = f60_init_with_id(vendor_id,product_id); } if (!mpl_USBHandle) return FALSE; } if (f60_get_dir(mpl_USBHandle) != NULL) { return TRUE; } if (f60_error == F60_ERROR_USB) { f60_close(mpl_USBHandle); usb_init(); usb_find_busses(); usb_find_devices(); if (default_device) { mpl_USBHandle = f60_init(); } else { mpl_USBHandle = f60_init_with_id(vendor_id,product_id); } if (mpl_USBHandle) if (f60_get_dir(mpl_USBHandle) != NULL) return TRUE; } f60_close(mpl_USBHandle); mpl_USBHandle = NULL; return FALSE; } GList* mpl_RefreshList() { struct f60_dir* dirptr; gint i; guint32 filesize; GList* dir = NULL; if (mpl_CheckForDevice() == FALSE) return (GList*)MPL_ERROR; dirptr = f60_get_dir(mpl_USBHandle); if (dirptr == NULL) return (GList*)MPL_ERROR; dir = g_list_append(dir,(gpointer)dirptr->total_memory); dir = g_list_append(dir,(gpointer)dirptr->free_memory); for(i=0;i < dirptr->size;i++) { f60_big2little_endian((guint32*)&dirptr->contents[i*256],&filesize); dir = g_list_append(dir,f60_strip_path(&dirptr->contents[i*256 + 21])); dir = g_list_append(dir,(gpointer)filesize); } return dir; } gint mpl_DeleteFile(gint index) { gint ret; if (mpl_CheckForDevice() == FALSE) return MPL_ERROR; ret = f60_delete_file(mpl_USBHandle,index); if (!ret) return MPL_ERROR; return 1; } gint mpl_SendFile(gchar* filename,gchar* text) { gchar tempname[F60_MAX_FILENAME + 10]; if (mpl_CheckForDevice() == FALSE) return MPL_ERROR; strcpy(tempname,MPL_TEMP_DIR); strncat(tempname,f60_strip_path(filename),F60_MAX_FILENAME); file_ext_to_mpm(tempname); if (!f60_encode_file(filename,tempname)) return MPL_ERROR; if (!f60_send_file(mpl_USBHandle,tempname,text)) { unlink(tempname); return MPL_ERROR; } unlink(tempname); if (CancelOperation) return MPL_ERROR; return 1; } gint mpl_SendFileNonMp3(gchar* filename) { if (mpl_CheckForDevice() == FALSE) return MPL_ERROR; if (!f60_send_file(mpl_USBHandle,filename,"notmpm")) { return MPL_ERROR; } return 1; } #define MAX_PATH PATH_MAX + F60_MAX_FILENAME +1 gchar* mpl_path_cat(gchar* ret,gchar* p1,char* p2) { if (strlen(p1) + strlen(p2) > MAX_PATH - 1) return NULL; strncpy(ret,p1,MAX_PATH); if (p1[strlen(p1) -1] != '/') strcat(ret,"/"); strncat(ret,p2,MAX_PATH - (strlen(p1) +1)); return ret; } gint mpl_GetFile(gint index,gchar* dirname) { gchar* c; gchar fullpath[PATH_MAX + F60_MAX_FILENAME + 1]; gint len; if (mpl_CheckForDevice() == FALSE) return MPL_ERROR; c = f60_get_file(mpl_USBHandle,index,MPL_TEMP_DIR); if (c == NULL) return MPL_ERROR; mpl_path_cat(fullpath,dirname,f60_strip_path(c)); len = strlen(c); if ( ((len - strlen(MPL_TEMP_DIR)) < 5) || (strncmp(c + (len -4),".mpm",4) != 0) ) { rename(c,fullpath); return 1; } file_ext_to_mp3(fullpath); if (!f60_decode_file(c,fullpath)) { unlink(c); return MPL_ERROR; } unlink(c); if (CancelOperation) return MPL_ERROR; return 1; } void mpl_CloseDevice() { if (mpl_USBHandle) f60_close(mpl_USBHandle); } gint mpl_ReorderFiles(gchar* order,guchar size) { if (mpl_CheckForDevice() == FALSE) return MPL_ERROR; if (!f60_move_file(mpl_USBHandle,order,size)) return MPL_ERROR; return 1; } gint mpl_FormatMedia(char TKFtype) { if (mpl_CheckForDevice() == FALSE) return MPL_ERROR; if (!f60_format_media(mpl_USBHandle,TKFtype)) return MPL_ERROR; return 1; } void mpl_SelectMemory(gint a) { f60_select_memory(a); } void mpl_PrintDebugInfo(gint a) { f60_set_debug(a); } float mpl_GetReadWriteProgress() { return f60_get_rw_progress(); } mplinuxman/main.c0000644000175000006300000001317507760647315013374 0ustar boskobosko#include #include #include #include #include #include #include "mplinux.h" #include "useful.h" GtkWindow* MainWindow; void sighup_handler(gint i) { g_signal_emit_by_name(MainWindow,"destroy",0,NULL); } void create_remover_script() { FILE* fp; gchar* cmd ="#!/bin/sh\nkill -HUP "; gchar pid[10]; if (getenv("REMOVER") == NULL) return; fp = fopen(getenv("REMOVER"),"w"); if (!fp) return; fwrite(cmd,1,strlen(cmd),fp); sprintf(pid,"%d",getpid()); fwrite(pid,1,strlen(pid),fp); fclose(fp); chmod(getenv("REMOVER"),S_IXUSR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IXGRP); } void Disclaimer() { GtkWidget* dialog; gint ret; dialog = gtk_message_dialog_new (NULL,0, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nDo you agree?"); w_center_window(GTK_WINDOW(dialog)); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (ret == -9) { unlink("/tmp/mplinuxman.pid"); exit(0); } } void ReadConfig() { gchar* c; gint width; gint height; gint i; if ( (cfg_Init() == CFG_NEW)) { Disclaimer(); } c = cfg_Read("geometry","window width","722"); width = atoi(c); c = cfg_Read("geometry","window height","460"); height = atoi(c); gtk_window_set_default_size(MainWindow,width,height); MW_SET("win_width",width); MW_SET("win_height",height); c = cfg_Read("geometry","splitter position","345"); i = atoi(c); gtk_paned_set_position(GTK_PANED(MW_GET("splitter")),i); c = cfg_Read("geometry","splitter2 position","190"); i = atoi(c); gtk_paned_set_position(GTK_PANED(MW_GET("splitter2")),i); c = cfg_Read("geometry","playlist column width","250"); i = atoi(c); gtk_tree_view_column_set_fixed_width(MW_GET("left_treeview_column"),i); c = cfg_Read("geometry","flash column width","250"); i = atoi(c); gtk_tree_view_column_set_fixed_width(MW_GET("right_flash_treeview_column"),i); c = cfg_Read("geometry","smartmedia column width","250"); i = atoi(c); gtk_tree_view_column_set_fixed_width(MW_GET("right_smartmedia_treeview_column"),i); c = cfg_Read("options","tool bar text","1"); if (atoi(c) ) { gtk_toolbar_set_style(GTK_TOOLBAR(MW_GET("left_toolbar")), GTK_TOOLBAR_BOTH); gtk_toolbar_set_style(GTK_TOOLBAR(MW_GET("right_toolbar")), GTK_TOOLBAR_BOTH); } c = cfg_Read("options","startup load list","1"); if (atoi(c)) menuitem_LoadPlaylist(NULL,3,NULL); c = cfg_Read("options","startup connect","1"); if (atoi(c)) gtk_timeout_add (1000,(GtkFunction)StartupConnect,NULL); c = cfg_Read("options","exit on unplugged","0"); if (atoi(c)) create_remover_script(); c = cfg_Read("options","print debug info","0"); if (atoi(c)) mpl_PrintDebugInfo(atoi(c)); c = cfg_Read("options","user supplied id","0"); if (atoi(c)) mpl_set_device_id(1,cfg_Read("options","supplied vendor id","0000"), cfg_Read("options","supplied product id","0000")); } gboolean check_for_pid() { FILE* fp; gchar pid[10]; fp = fopen("/tmp/mplinuxman.pid","r"); if (fp) { fclose(fp); return TRUE; } fp = fopen("/tmp/mplinuxman.pid","w"); if (!fp) return TRUE; sprintf(pid,"%d",getpid()); fwrite(pid,1,strlen(pid),fp); fclose(fp); return FALSE; } int main(int argc,char** argv) { #ifdef NLS bindtextdomain (PACKAGE, LOCALE_DIR); bind_textdomain_codeset(PACKAGE,"UTF-8"); textdomain (PACKAGE); #endif gtk_init (&argc,&argv); if (check_for_pid() == TRUE) { GtkWidget* dialog; gint ret; //gtk_init (&argc,&argv); g_print(_("Mplinuxman is already running\n")); dialog = gtk_message_dialog_new (NULL,0, GTK_MESSAGE_ERROR, GTK_BUTTONS_YES_NO, _("Found /tmp/mplinuxman.pid. Mplinuxman might be already running.\n\nIf the program crashed before. Please report it to\nhttp://mplinuxman.sourceforge.net\n\nDo you want to continue loading anyway?")); w_center_window(GTK_WINDOW(dialog)); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (ret == -9) exit(0); } g_thread_init(NULL); if (!g_thread_supported()) { g_print(_("gthreads not supported\n")); g_thread_init (NULL); } gdk_threads_init(); if (1) { const gchar* sstr = "style \"mystyle\"\n {\n GtkToolbar::shadow_type = GTK_SHADOW_NONE \n}\nclass \"GtkToolbar\" style \"mystyle\"\n"; gtk_rc_parse_string(sstr); } create_main_window(&MainWindow); ReadConfig(); gtk_widget_show_all(GTK_WIDGET(MainWindow)); // w_center_window(MainWindow); signal(SIGHUP,sighup_handler); gtk_main(); unlink("/tmp/mplinuxman.pid"); return 0; } mplinuxman/waitdialog.c0000644000175000006300000000777707760650333014601 0ustar boskobosko#include #include #include "mplinux.h" static gint ThreadRunning = 0; static GThreadFunc UserFunc; static GtkWidget* WaitDialog; static ProgressFunc progress_func = NULL; void wait_dialog_Minimize(GtkButton *button, gpointer user_data) { if (GTK_WIDGET_REALIZED(GTK_WIDGET(MainWindow))) { gtk_window_iconify(GTK_WINDOW(MainWindow)); } gtk_window_iconify(GTK_WINDOW(WaitDialog)); } gpointer thread_func(gpointer data) { gpointer ret; gdk_threads_leave(); ret = UserFunc(data); ThreadRunning = 0; return ret; } void wait_dialog_Response (GtkDialog *dialog, gint arg1, gpointer user_data) { GtkWidget* label; if (arg1 != GTK_RESPONSE_CANCEL) return; label = (GtkWidget*) user_data; gtk_label_set_text(GTK_LABEL(label),"Cancelling... Please Wait"); while (gtk_events_pending ()) gtk_main_iteration (); } gboolean wait_dialog_Check(GtkProgressBar* progressbar) { if (ThreadRunning) { if (progress_func) // for some reason the gtk type checking dont work here gtk_progress_bar_set_fraction(progressbar,progress_func()); else gtk_progress_bar_pulse(GTK_PROGRESS_BAR(progressbar)); return TRUE; } if (WaitDialog) gtk_dialog_response(GTK_DIALOG(WaitDialog),1); return FALSE; } gpointer CreateWaitDialog(GThreadFunc func,gpointer data, CancelFunc cancel_func,ProgressFunc pfunc, gchar* text) { GThread* thread; gpointer ret; GtkWidget* label; GtkWidget* vbox; GtkWidget* progressbar; GtkWidget* min_button; if (cancel_func) WaitDialog = gtk_dialog_new_with_buttons(text,MainWindow, GTK_DIALOG_MODAL & GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL,GTK_RESPONSE_CANCEL,NULL); else WaitDialog = gtk_dialog_new_with_buttons(text,MainWindow, GTK_DIALOG_MODAL & GTK_DIALOG_DESTROY_WITH_PARENT, NULL,NULL); gtk_window_set_default_size(GTK_WINDOW(WaitDialog),250,100); min_button = gtk_button_new_with_label(_("Minimize")); gtk_widget_set_size_request(min_button,0,0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(WaitDialog)->action_area),min_button,FALSE,FALSE,0); gtk_box_reorder_child(GTK_BOX(GTK_DIALOG(WaitDialog)->action_area),min_button,0); g_signal_connect(min_button,"clicked",G_CALLBACK(wait_dialog_Minimize),NULL); label = gtk_label_new(text); g_signal_connect(GTK_OBJECT(WaitDialog),"response",G_CALLBACK(wait_dialog_Response),(gpointer)label); progressbar = gtk_progress_bar_new(); gtk_progress_bar_set_pulse_step (GTK_PROGRESS_BAR(progressbar),0.05); //vbox = gtk_vbox_new(FALSE,0); vbox = GTK_DIALOG(WaitDialog)->vbox; gtk_box_pack_start(GTK_BOX(vbox),label,TRUE,FALSE,0); gtk_box_pack_start(GTK_BOX(vbox),progressbar,TRUE,FALSE,5); gtk_label_set_line_wrap(GTK_LABEL(label),TRUE); //gtk_container_add(GTK_CONTAINER(GTK_DIALOG(WaitDialog)->vbox),vbox); gtk_container_set_border_width(GTK_CONTAINER(WaitDialog),5); // gtk_window_set_decorated(GTK_WINDOW(WaitDialog),FALSE); // g_object_set(WaitDialog,"type",GTK_WINDOW_POPUP,NULL); // gtk_window_activate_focus (GTK_WINDOW(WaitDialog)); if (GTK_WIDGET_REALIZED(GTK_WIDGET(MainWindow))) if (gdk_window_get_state(GTK_WIDGET(MainWindow)->window) & GDK_WINDOW_STATE_ICONIFIED) gtk_window_iconify(GTK_WINDOW(WaitDialog)); gtk_widget_show_all(WaitDialog); UserFunc = func; ThreadRunning = 1; thread = g_thread_create(thread_func,data,TRUE,NULL); if (pfunc != NULL) progress_func = pfunc; else progress_func = NULL; gtk_timeout_add (100,(GtkFunction)wait_dialog_Check,(gpointer)progressbar); if (gtk_dialog_run(GTK_DIALOG(WaitDialog)) == GTK_RESPONSE_CANCEL) { gtk_widget_destroy(WaitDialog); WaitDialog = NULL; ThreadRunning = 0; if (cancel_func) cancel_func(TRUE); } else gtk_widget_destroy(WaitDialog); ret = g_thread_join(thread); if (cancel_func) cancel_func(FALSE); return ret; } mplinuxman/makefile0000644000175000006300000000565710542522232013770 0ustar boskoboskoINCLUDE = `pkg-config --cflags gthread-2.0` `pkg-config --cflags gtk+-2.0` -Ilibusb LIBS = `pkg-config --libs gthread-2.0` `pkg-config --libs gtk+-2.0` export LOCALE_PACKAGE=mplinuxman export LOCALE_DIR=/usr/local/share/locale # remove -D NLS=1 if you want to disable international language support (gettext) COMPILERFLAGS = -O -D MP_VERSION='"1.5"' -D PACKAGE='"$(LOCALE_PACKAGE)"' -D LOCALE_DIR='"$(LOCALE_DIR)"' -D NLS="1" CC = gcc CFLAGS = $(COMPILERFLAGS) $(INCLUDE) HEADERFILES = dirdialog.h mplinux.h useful.h mputil3.h OBJECTFILES = dirdialog.o main.o mainwindow.o useful.o mp3util.o playlist.o waitdialog.o mplist.o miscwindow.o mplinuxman : $(OBJECTFILES) f60lib.o ini.o usb.o error.o descriptors.o linux.o $(CC) -o mplinuxman $(CFLAGS) $(LIBS) $(OBJECTFILES) f60lib.o ini.o usb.o error.o descriptors.o linux.o ; echo -e "\nDone\nTo install mplinuxman use (this requires root privileges): make install\n" f60lib.o : f60lib/f60lib.c $(CC) -c $(CFLAGS) f60lib/f60lib.c ini.o : ini/ini.c $(CC) -c $(CFLAGS) ini/ini.c linux.o : libusb/linux.c $(CC) -c $(CFLAGS) libusb/linux.c descriptors.o : libusb/descriptors.c $(CC) -c $(CFLAGS) libusb/descriptors.c error.o : libusb/error.c $(CC) -c $(CFLAGS) libusb/error.c usb.o : libusb/usb.c $(CC) -c $(CFLAGS) libusb/usb.c $(OBJECTFILES) : %.o: %.c $(CC) -c $(CFLAGS) $< clean: rm mplinuxman *.o *~ ; exit 0 #create message template file mplinuxman.pot in the po dir, then merge in any changes to the translated message files in po dir pot: xgettext -k_ -kN_ -ppo -o mplinuxman.pot main.c dirdialog.c miscwindow.c mainwindow.c waitdialog.c cd po;\ for name in `find *.po 2> /dev/null`; do\ msgmerge -o tmp $$name mplinuxman.pot ;\ mv tmp $$name;\ done;\ #compile/install all translated message files in po dir install-po: sh po/install.sh install-launcher: cp logo.xpm /usr/local/share/pixmaps/mplinuxman.xpm cp mplinuxman.desktop /usr/local/share/applications install: mkdir -p /usr/local/bin/ cp mplinuxman /usr/local/bin cd extra/mp_util && make && cp mputil /usr/local/bin && cd ../.. mkdir -p /usr/local/share/pixmaps/ cp logo.xpm /usr/local/share/pixmaps/mplinuxman.xpm mkdir -p /usr/local/share/applications/ cp mplinuxman.desktop /usr/local/share/applications mkdir -p /usr/local/share/locale/de/LC_MESSAGES/ mkdir -p /usr/local/share/locale/es/LC_MESSAGES/ mkdir -p /usr/local/share/locale/fr/LC_MESSAGES/ mkdir -p /usr/local/share/locale/ja/LC_MESSAGES/ mkdir -p /usr/local/share/locale/nl/LC_MESSAGES/ sh po/install.sh uninstall: rm /usr/local/bin/mplinuxman rm /usr/local/bin/mputil rm /usr/local/share/pixmaps/mplinuxman.xpm rm /usr/local/share/applications/mplinuxman.desktop rm /usr/local/share/locale/de/LC_MESSAGES/mplinuxman.mo rm /usr/local/share/locale/es/LC_MESSAGES/mplinuxman.mo rm /usr/local/share/locale/fr/LC_MESSAGES/mplinuxman.mo rm /usr/local/share/locale/ja/LC_MESSAGES/mplinuxman.mo rm /usr/local/share/locale/nl/LC_MESSAGES/mplinuxman.mo mplinuxman/mplinux.h0000644000175000006300000000610210000662374014120 0ustar boskobosko #define MW_SET(name,value) g_object_set_data(G_OBJECT(MainWindow),name,(gpointer)value) #define MW_REF (name,value) g_object_set_data_full(G_OBJECT(MainWindow),name,(gpointer)value); #define MW_GET(name) g_object_get_data(G_OBJECT(MainWindow),name) #define MPL_ERROR -1 #define USER_CANCELED 64 #define MPL_TEMP_DIR "/tmp/" #define CFG_FILE "options" #define CFG_DIR "/.mplinux/" #define CFG_PLAY_LIST "mpman.m3u" #define CFG_NEW 1 #define CFG_OK 2 #define FLASH 1 #define SMARTCAM 3 #define SMART 2 // Gettext i18n support #ifdef NLS #include #include #define _(String) gettext (String) #endif #ifndef NLS #define _(String) String #endif #define gettext_noop(String) String #define N_(String) gettext_noop (String) struct s_PlayListEntry { GString* name; GString* ID3name; GString* ID3name_utf8; gint filesize; } ; typedef struct s_PlayListEntry PlayListEntry; extern GtkWindow* MainWindow; void create_main_window( GtkWindow** return_window); void create_file_properties_window(); void create_file_info_window(); void create_options_window(); void create_about_window(); gboolean right_treeview_Refresh(GtkWidget *widgy,gpointer user_data); gboolean StartupConnect(gpointer data); void menuitem_LoadPlaylist(gpointer callback_data, guint callback_action, GtkWidget *widget); void menuitem_SavePlaylist(gpointer callback_data, guint callback_action, GtkWidget *widget); typedef void (*CancelFunc)(gboolean a); typedef float (*ProgressFunc)(); gpointer CreateWaitDialog(GThreadFunc func,gpointer data, CancelFunc cancel_func, ProgressFunc pfunc, gchar* text); PlayListEntry* pl_New(gchar* name,gchar* ID3name,gint filesize); void pl_Remove(PlayListEntry* remove); PlayListEntry* pl_AddFile(gchar* filename); // must free list after use GList* pl_AddDirectory(gchar* dirname); void pl_AddDirectoryCancel(gboolean a); struct mp3_info* pl_GetMp3Info(gchar* filename); // must free list after use GList* pl_LoadList(gchar* filename); int pl_SaveList(GList* list,gchar* filename); GList* pl_RandomizeList(guint freemem); float pl_LoadListProgress(); gchar* strip_path(gchar* filename); // see playlist.c void pl_MegaHack(int i); GList* pl_GetPlayList(); // must free list after use GList* mpl_RefreshList(); gchar* mpl_ErrorString(); gint mpl_LastError(); gint mpl_DeleteFile(gint index); gint mpl_SendFile(gchar* filename,gchar* text); gboolean mpl_CheckForDevice(); gint mpl_GetFile(gint index,gchar* dirname); gint mpl_ReorderFiles(gchar* order,guchar size); void mpl_CloseDevice(); void mpl_SelectMemory(gint a); void mpl_PrintDebugInfo(gint a); gint mpl_SendFileNonMp3(gchar* filename); gint mpl_FormatMedia(char x); float mpl_GetReadWriteProgress(); void mpl_cancel_operation(gboolean a); void mpl_set_device_id(int use_id, gchar* vendor, gchar* product); int cfg_Init(); void cfg_Write(gchar* sec,gchar* name,gchar* value); char* cfg_Read(gchar* sec,gchar*name,gchar* fallback); char* cfg_ReadSection(gchar* sec); void cfg_Save(); void ButtonRelief (GtkWidget *widget,gpointer data); #ifdef NLS gchar* convert_if_needed(gchar* text); #endif mplinuxman/mplinuxman.desktop0000644000175000006300000000053010542513677016051 0ustar boskobosko[Desktop Entry] Version=1.0 Encoding=UTF-8 Name=Mplinuxman Name[nl]=Mplinuxman Comment=Manage your MPMan portable mp3 player Comment[nl]=Beheer uw MPMan draagbare mp3 speler Exec=mplinuxman Icon=/usr/local/share/pixmaps/mplinuxman.xpm Terminal=false Type=Application StartupNotify=true Categories=GNOME;Application;Utility; GenericName[nl_NL]= mplinuxman/miscwindow.c0000644000175000006300000005272110535347513014622 0ustar boskobosko#include #include #include #include #include "mp3util.h" #include "mplinux.h" void ButtonRelief (GtkWidget *widget,gpointer data) { gtk_button_set_relief(GTK_BUTTON(widget),(GtkReliefStyle)data); } void left_treeview_GetSelectedInfo (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, PlayListEntry** p) { PlayListEntry* get; gtk_tree_model_get(model,iter,0,&get,-1); *p = get; } void create_file_info_window() { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; PlayListEntry* p = NULL; struct mp3_info* m; GtkWidget* dialog; GtkWidget* temp; GtkWidget* temp2; GtkWidget* temp3; GtkWidget* temp4; gchar text[128]; gint i; gsize bytes_read; gsize bytes_written; tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)left_treeview_GetSelectedInfo , &p); if (p == NULL) return; m = pl_GetMp3Info(p->name->str); if (m == NULL) return; //strncpy(text,_("File Info "),12); dialog = gtk_dialog_new_with_buttons(_("File Info "),MainWindow, GTK_DIALOG_MODAL & GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE,GTK_RESPONSE_OK,NULL); #ifdef NLS temp2 = gtk_label_new(convert_if_needed(p->name->str)); #else temp2 = gtk_label_new(p->name->str); #endif gtk_label_set_line_wrap(GTK_LABEL(temp2),TRUE); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),temp2,FALSE,FALSE,5); temp = gtk_hbox_new(FALSE,0); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),temp,TRUE,TRUE,5); // gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox),temp); temp2 = gtk_table_new(5,3,FALSE); gtk_table_set_col_spacings(GTK_TABLE(temp2),3); temp4 = gtk_frame_new(_("ID3 Tag")); gtk_frame_set_shadow_type(GTK_FRAME(temp4),GTK_SHADOW_NONE); gtk_container_set_border_width(GTK_CONTAINER(temp4),5); gtk_box_pack_start(GTK_BOX(temp),temp4,TRUE,TRUE,0); gtk_container_add(GTK_CONTAINER(temp4),temp2); temp3 = gtk_table_new(8,2,TRUE); gtk_table_set_row_spacings(GTK_TABLE(temp2),3); temp4 = gtk_frame_new(_("MPEG Info")); gtk_container_set_border_width(GTK_CONTAINER(temp4),5); gtk_box_pack_start(GTK_BOX(temp),temp4,FALSE,FALSE,0); gtk_container_add(GTK_CONTAINER(temp4),temp3); gtk_frame_set_shadow_type(GTK_FRAME(temp4),GTK_SHADOW_NONE); for(i=0;i<4;i++) { GtkWidget* l; GtkWidget* e; gchar* labels[] = {_("Title"),_("Artist"),_("Album"),_("Comment")}; gchar* values[] = {m->title,m->artist,m->album,m->comment}; l = gtk_label_new(labels[i]); e = gtk_entry_new(); if (m->hastag) #ifdef NLS gtk_entry_set_text(GTK_ENTRY(e),convert_if_needed(values[i])); #else gtk_entry_set_text(GTK_ENTRY(e),values[i]); #endif gtk_table_attach_defaults(GTK_TABLE(temp2),l,0,1,i,i+1); gtk_table_attach_defaults(GTK_TABLE(temp2),e,1,2,i,i+1); } for(i=0;i<7;i++) { GtkWidget* l; GtkWidget* l2; gchar* labels[] = {_("Version"),_("layer"),_("Bitrate"),_("Samplerate"),_("stereo"),_("copyright"),_("size")}; gint values[] = {m->version,m->layer,m->bitrate,m->samplerate,m->channels, m->copyright,m->filesize}; gchar c[15]; l = gtk_label_new(labels[i]); gtk_misc_set_alignment(GTK_MISC(l),0,0.5); if (i == 2) sprintf(c,"%d kbps",values[i]/1000); else if (i == 3) sprintf(c,"%.1f kHz",(float) values[i]/ (float)1000); else if (i == 4) sprintf(c,"%s",values[i] == 3 ? _("no"):_("yes")); else if (i == 5) sprintf(c,"%s",values[i] ? _("yes"):_("no")); else if (i == 6) sprintf(c,"%d KB",values[i] / 1024); else sprintf(c,"%d",values[i]); l2 = gtk_label_new(c); gtk_table_attach_defaults(GTK_TABLE(temp3),l,0,1,i,i+1); gtk_table_attach_defaults(GTK_TABLE(temp3),l2,1,2,i,i+1); } g_signal_connect_swapped (GTK_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (dialog)); gtk_dialog_set_has_separator (GTK_DIALOG(dialog),FALSE); gtk_container_foreach(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), ButtonRelief,(gpointer)GTK_RELIEF_NONE); gtk_widget_show_all(dialog); } void sensitive_callback(GtkWidget* widget,gpointer data) { if (GTK_WIDGET_TYPE(widget) == GTK_TYPE_CONTAINER) gtk_container_foreach(GTK_CONTAINER(widget),sensitive_callback,data); gtk_widget_set_sensitive(widget,(gboolean)data); } void active_button_Toggled (GtkToggleButton *togglebutton, gpointer user_data) { GtkWidget* container; gboolean checked; checked = gtk_toggle_button_get_active(togglebutton); container = (GtkWidget*) user_data; gtk_widget_set_sensitive(container,checked); if (GTK_WIDGET_TYPE(container) == GTK_TYPE_CONTAINER) gtk_container_foreach(GTK_CONTAINER(container),sensitive_callback,(gpointer) checked); } extern GtkTooltips* tooltips; void create_options_window() { GtkWidget* dialog; GtkWidget* vbox; GtkWidget* table; GtkWidget* hbox; GtkWidget* tabs; GtkWidget* tooltext_button; GtkWidget* startconnect_button; GtkWidget* listload_button; GtkWidget* unplugexit_button; GtkWidget* play_entry; GtkWidget* stop_entry; GtkWidget* title_entry; GtkWidget* label; GtkWidget* customtitle_button; GtkWidget* enablelogging_button; GtkWidget* changeid_button; GtkWidget* logsize_spin; GtkWidget* frame; GtkWidget* frame2; GtkWidget* vendor_entry; GtkWidget* productid_entry; gchar convert[8]; gchar* c; gchar* b; dialog = gtk_dialog_new_with_buttons(_("Options"),MainWindow, GTK_DIALOG_MODAL & GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE,NULL); tabs = gtk_notebook_new(); gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),tabs,TRUE,TRUE,0); gtk_container_set_border_width(GTK_CONTAINER(tabs),5); vbox = gtk_vbox_new(FALSE,5); gtk_notebook_append_page(GTK_NOTEBOOK(tabs),vbox,gtk_label_new(_("Interface"))); tooltext_button = gtk_check_button_new_with_label(_("Show toolbar text labels")); gtk_box_pack_start(GTK_BOX(vbox),tooltext_button,FALSE,FALSE,5); startconnect_button = gtk_check_button_new_with_label(_("Try to connect to device on startup")); gtk_box_pack_start(GTK_BOX(vbox),startconnect_button,FALSE,FALSE,5); listload_button = gtk_check_button_new_with_label(_("Load default playlist on startup")); gtk_box_pack_start(GTK_BOX(vbox),listload_button,FALSE,FALSE,5); unplugexit_button = gtk_check_button_new_with_label(_("Exit program when device is unplugged\nrequires hotplug support (/sbin/hotplug)")); gtk_box_pack_start(GTK_BOX(vbox),unplugexit_button,FALSE,FALSE,5); vbox = gtk_table_new(3,7,FALSE); gtk_container_set_border_width(GTK_CONTAINER(vbox),5); gtk_notebook_append_page(GTK_NOTEBOOK(tabs),vbox,gtk_label_new(_("MP3 player"))); label = gtk_label_new(_("Command to play mp3 (%f = selected filenames)")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,0,1,0,1); play_entry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(vbox),play_entry,0,2,1,2); gtk_table_attach_defaults(GTK_TABLE(vbox),gtk_hseparator_new(),0,2,2,3); label = gtk_label_new(_("Command to stop playing mp3")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,0,1,4,5); stop_entry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(vbox),stop_entry,0,2,5,6); vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox),5); gtk_notebook_append_page(GTK_NOTEBOOK(tabs),vbox,gtk_label_new(_("Title"))); customtitle_button = gtk_check_button_new_with_label(_("Use customized track title format")); gtk_box_pack_start(GTK_BOX(vbox),customtitle_button,FALSE,FALSE,0); frame = gtk_frame_new(_("Title format")); gtk_box_pack_start(GTK_BOX(vbox),frame,TRUE,TRUE,5); vbox = gtk_table_new(3,6,FALSE); gtk_container_set_border_width(GTK_CONTAINER(vbox),5); gtk_container_add(GTK_CONTAINER(frame),vbox); title_entry = gtk_entry_new(); gtk_table_attach_defaults(GTK_TABLE(vbox),title_entry,0,2,0,1); label = gtk_label_new(_("%f File name")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,0,1,1,2); label = gtk_label_new(_("%p Performer/artist")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,0,1,2,3); label = gtk_label_new(_("%a Album")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,0,1,3,4); label = gtk_label_new(_("%t Track name")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,1,2,1,2); label = gtk_label_new(_("%c Comment")); gtk_misc_set_alignment(GTK_MISC(label),0,1); gtk_table_attach_defaults(GTK_TABLE(vbox),label,1,2,2,3); g_signal_connect(customtitle_button,"toggled",G_CALLBACK(active_button_Toggled),frame); vbox = gtk_vbox_new(FALSE,0); gtk_container_set_border_width(GTK_CONTAINER(vbox),5); gtk_notebook_append_page(GTK_NOTEBOOK(tabs),vbox,gtk_label_new(_("Advanced"))); changeid_button = gtk_check_button_new_with_label(_("Specify vendor / product ID")); gtk_tooltips_set_tip(tooltips,changeid_button,"USE THIS AT YOUR OWN RISK!",""); gtk_box_pack_start(GTK_BOX(vbox),changeid_button,FALSE,FALSE,0); frame2 = gtk_frame_new(_("Device ID")); gtk_box_pack_start(GTK_BOX(vbox),frame2,TRUE,TRUE,5); table = gtk_table_new(3,3,FALSE); gtk_container_set_border_width(GTK_CONTAINER(table),5); gtk_container_add(GTK_CONTAINER(frame2),table); label = gtk_label_new("Vendor ID"); gtk_misc_set_alignment(GTK_MISC(label),.8,.5); gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,0,1); vendor_entry = gtk_entry_new_with_max_length(4); gtk_table_attach_defaults(GTK_TABLE(table),vendor_entry,1,2,0,1); label = gtk_label_new("Product ID"); gtk_misc_set_alignment(GTK_MISC(label),.8,.5); gtk_table_attach_defaults(GTK_TABLE(table),label,0,1,1,2); productid_entry = gtk_entry_new_with_max_length(4); gtk_table_attach_defaults(GTK_TABLE(table),productid_entry,1,2,1,2); hbox = gtk_hbox_new(FALSE,0); gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); enablelogging_button = gtk_check_button_new_with_label(_("Enable logging")); gtk_box_pack_start(GTK_BOX(hbox),enablelogging_button,FALSE,FALSE,0); logsize_spin = gtk_spin_button_new_with_range(1,1000,10); gtk_tooltips_set_tip(tooltips,logsize_spin,"maximum number of bytes to log in each message",""); gtk_spin_button_set_value(GTK_SPIN_BUTTON(logsize_spin),50); gtk_box_pack_start(GTK_BOX(hbox),logsize_spin,FALSE,FALSE,5); g_signal_connect(changeid_button,"toggled",G_CALLBACK(active_button_Toggled),frame2); g_signal_connect(enablelogging_button,"toggled",G_CALLBACK(active_button_Toggled),logsize_spin); c = cfg_Read("options","tool bar text","1"); if (atoi(c)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(tooltext_button),TRUE); c = cfg_Read("options","startup connect","1"); if (atoi(c)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(startconnect_button),TRUE); c = cfg_Read("options","startup load list","1"); if (atoi(c)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(listload_button),TRUE); c = cfg_Read("options","exit on unplugged","0"); if (atoi(c)) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(unplugexit_button),TRUE); c = cfg_Read("options","mp3 play command","mpg123 %f"); gtk_entry_set_text(GTK_ENTRY(play_entry),c); c = cfg_Read("options","mp3 stop command","killall mpg123"); gtk_entry_set_text(GTK_ENTRY(stop_entry),c); c = cfg_Read("options","use custom titles","0"); if (atoi(c)) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(customtitle_button),TRUE); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(customtitle_button),FALSE); active_button_Toggled((GtkToggleButton*)customtitle_button,(gpointer)frame); } c = cfg_Read("options","title format","%p - %t"); gtk_entry_set_text(GTK_ENTRY(title_entry),c); c = cfg_Read("options","print debug info","0"); if (atoi(c)) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enablelogging_button),TRUE); gtk_spin_button_set_value(GTK_SPIN_BUTTON(logsize_spin),atoi(c)); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enablelogging_button),FALSE); active_button_Toggled((GtkToggleButton*)enablelogging_button,(gpointer)logsize_spin); } c = cfg_Read("options","user supplied id","0"); if (atoi(c)) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(changeid_button),TRUE); } else { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(changeid_button),FALSE); active_button_Toggled((GtkToggleButton*)changeid_button,(gpointer)frame2); } gtk_entry_set_text(GTK_ENTRY(productid_entry),cfg_Read("options","supplied product id","0006")); gtk_entry_set_text(GTK_ENTRY(vendor_entry),cfg_Read("options","supplied vendor id","0a62")); gtk_window_resize(GTK_WINDOW(dialog),400,200); gtk_dialog_set_has_separator (GTK_DIALOG(dialog),FALSE); gtk_container_foreach(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), ButtonRelief,(gpointer)GTK_RELIEF_NONE); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(tooltext_button))) { cfg_Write("options","tool bar text","1"); gtk_toolbar_set_style(GTK_TOOLBAR(MW_GET("left_toolbar")), GTK_TOOLBAR_BOTH); gtk_toolbar_set_style(GTK_TOOLBAR(MW_GET("right_toolbar")), GTK_TOOLBAR_BOTH); } else { cfg_Write("options","tool bar text","0"); gtk_toolbar_set_style(GTK_TOOLBAR(MW_GET("left_toolbar")), GTK_TOOLBAR_ICONS); gtk_toolbar_set_style(GTK_TOOLBAR(MW_GET("right_toolbar")), GTK_TOOLBAR_ICONS); } if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(startconnect_button))) cfg_Write("options","startup connect","1"); else cfg_Write("options","startup connect","0"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(listload_button))) cfg_Write("options","startup load list","1"); else cfg_Write("options","startup load list","0"); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(unplugexit_button))) cfg_Write("options","exit on unplugged","1"); else cfg_Write("options","exit on unplugged","0"); cfg_Write("options","mp3 play command",(gchar*)gtk_entry_get_text(GTK_ENTRY(play_entry))); cfg_Write("options","mp3 stop command",(gchar*)gtk_entry_get_text(GTK_ENTRY(stop_entry))); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(customtitle_button))) cfg_Write("options","use custom titles","1"); else cfg_Write("options","use custom titles","0"); cfg_Write("options","title format",(gchar*)gtk_entry_get_text(GTK_ENTRY(title_entry))); if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(enablelogging_button))) { snprintf(convert,5,"%d",gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(logsize_spin))); cfg_Write("options","print debug info",convert); mpl_PrintDebugInfo(gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(logsize_spin))); } else { cfg_Write("options","print debug info","0"); mpl_PrintDebugInfo(0); } if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(changeid_button))) { cfg_Write("options","user supplied id","1"); cfg_Write("options","supplied vendor id", c = (gchar*)gtk_entry_get_text(GTK_ENTRY(vendor_entry))); cfg_Write("options","supplied product id",b = (gchar*)gtk_entry_get_text(GTK_ENTRY(productid_entry))); mpl_set_device_id(1,c,b); } else { cfg_Write("options","user supplied id","0"); mpl_set_device_id(0,"0000","0000"); } gtk_widget_destroy(dialog); } GtkWidget* da; GdkPixbuf* buffer; gint expose_cb (GtkWidget *widget, GdkEventExpose *event, gpointer data) { GdkPixbuf* frame; guchar *pixels; int rowstride; frame = (GdkPixbuf*)data; rowstride = gdk_pixbuf_get_rowstride (frame); pixels = gdk_pixbuf_get_pixels (frame) + rowstride * event->area.y + event->area.x * 4; gdk_draw_rgb_32_image_dithalign (widget->window, widget->style->black_gc, event->area.x, event->area.y, event->area.width, event->area.height, GDK_RGB_DITHER_NORMAL, pixels, rowstride, event->area.x, event->area.y); return TRUE; } gint timeout (gpointer data) { GdkPixbuf* frame; guchar *pixels; guchar *source; gint i,j; int rowstride; float para; static float multiplier = 0.0; static unsigned char lcolor = 1; frame = (GdkPixbuf*)data; rowstride = gdk_pixbuf_get_rowstride (frame); pixels = gdk_pixbuf_get_pixels(frame); source = gdk_pixbuf_get_pixels(buffer); para = 2.0f * ((multiplier - 0.4) * (multiplier - 0.4)) + 0.1; for(i=0;i<400;i++) for(j=0;j 4) lcolor = 2; } if (multiplier > 1.0) { multiplier = 0.0; } gtk_widget_queue_draw (da); return TRUE; } guint timeout_id; static void cleanup_callback (GtkObject *object, gpointer data) { GdkPixbuf* frame; g_source_remove (timeout_id); timeout_id = 0; frame = (GdkPixbuf*) data; g_object_unref(frame); g_object_unref(buffer); gtk_widget_destroy(GTK_WIDGET(object)); } void create_easteregg_window() { GtkWidget* window; GdkPixbuf* frame; GdkPixbuf* i; GtkWidget* vbox; i = MW_GET("mp_icon"); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_resizable (GTK_WINDOW (window), FALSE); gtk_widget_set_size_request (window, 400,400); frame = gdk_pixbuf_new (GDK_COLORSPACE_RGB, gdk_pixbuf_get_has_alpha(i) , gdk_pixbuf_get_bits_per_sample(i) , 400,400); g_signal_connect (window, "destroy", G_CALLBACK (cleanup_callback), frame); buffer = gdk_pixbuf_scale_simple(i,400,400,GDK_INTERP_HYPER); da = gtk_drawing_area_new(); g_signal_connect(da,"expose_event",G_CALLBACK(expose_cb),frame); vbox = gtk_vbox_new(FALSE,5); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_box_pack_start(GTK_BOX(vbox),da,TRUE,TRUE,0); gtk_box_pack_start(GTK_BOX(vbox),gtk_label_new("mild7@users.sourceforge.net"),FALSE,FALSE,5); gtk_window_set_transient_for (GTK_WINDOW(window),GTK_WINDOW(MainWindow)); gtk_window_set_title(GTK_WINDOW(window),_("Contgratulations you found an easter egg!")); timeout_id = gtk_timeout_add (50, timeout, frame); gtk_widget_show_all(window); } gboolean image_button_event (GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->type == GDK_2BUTTON_PRESS) { gtk_dialog_response(GTK_DIALOG(user_data),1); create_easteregg_window(); return TRUE; } return FALSE; } void unset_can_focus(GtkWidget* widget,gpointer data) { g_object_set(widget,"can-focus",FALSE,NULL); } void create_about_window() { const char **tem; const char *authors[] = { "", "Tim O'Brien ", "Boško Andjelković ", "", NULL, "Tholom Kiely", "Kazutaka Manabe", "Kris Meeusen", "Christian von Eichel-Streiber", "", NULL }; authors[0] = _("Lead developers:"); for (tem = authors; *tem != NULL; tem++) ; *tem = _("Testing and patches:"); static const gchar copyright[] = \ "Copyright \xc2\xa9 2002-2006 Tim O'Brien\n" "Copyright \xc2\xa9 2006 Boško Andjelković\n"; gtk_show_about_dialog (GTK_WINDOW (MainWindow), "authors", (const char **) authors, "comments", _("Mplinuxman is a file manager program for the MPMan F60,F55,F50, and d-link dmp-220 USB portable MP3 players."), "copyright", copyright, "logo", MW_GET("mp_icon"), "translator-credits", "Boško Andjelković\nShimada Hirofumi\nThomas Jost\nMarcos Mainar\nThomas Ritter\n", "version", MP_VERSION, "website", "http://mplinuxman.sourceforge.net", "name", "Mplinuxman", NULL); } mplinuxman/mp3util.h0000644000175000006300000000062510003155362014022 0ustar boskobosko struct mp3_info { int bitrate; int samplerate; int version; int layer; int channels; int copyright; int filesize; char hastag; char title[31]; char artist[31]; char album[31]; char year[5]; char comment[31]; unsigned char genre; }; int mp3_valid(char* filename); struct mp3_info* mp3_get_info(); int mp3_get_tag(char* filename); mplinuxman/mp3util.c0000644000175000006300000001513310003155362014015 0ustar boskobosko#include #include #include "mp3util.h" /* (15,12)Bitrate index bits V1,L1 V1,L2 V1,L3 V2,L1 V2, L2 & L3 0000 free free free free free 0001 32 32 32 32 8 0010 64 48 40 48 16 0011 96 56 48 56 24 0100 128 64 56 64 32 0101 160 80 64 80 40 0110 192 96 80 96 48 0111 224 112 96 112 56 1000 256 128 112 128 64 1001 288 160 128 144 80 1010 320 192 160 160 96 1011 352 224 192 176 112 1100 384 256 224 192 128 1101 416 320 256 224 144 1110 448 384 320 256 160 1111 bad bad bad bad bad NOTES: All values are in kbps (11,10) Sampling rate frequency index (values are in Hz) bits MPEG1 MPEG2 MPEG2.5 00 44100 22050 11025 01 48000 24000 12000 10 32000 16000 8000 11 reserv. reserv. reserv. */ const int mp1_3_bitrates[] = {-1,32000,40000,48000,56000,64000,80000,96000,112000,128000 ,160000,192000,224000,256000,320000,-1}; const int mp2_3_bitrates[] = {-1,8000,16000,24000,32000,40000,48000,56000,64000,80000,96000 ,112000,128000,144000,160000,-1}; const int mp1_samplerates[] = {44100,48000,32000,-1}; const int mp2_samplerates[] = {22050,24000,16000,-1}; struct mp3_info Mp3Info; void killwhitespace(char* c) { while(*c == 32) c--; c++; *c = '\0'; } int mp3_valid(char* filename) { FILE*fp = NULL; unsigned char buffer[129]; unsigned char c; int nbytes; int i = 0; int bitrate = 0; int samplerate = 0; int pad = 0; int crc = 0; int version = 0; int layer = 0; int channels = 0; int cp = 0; int framelen; float temp; fp = fopen(filename,"r"); if (!fp) goto error; nbytes = fread(buffer,1,4,fp); if (!nbytes) goto error; // skip over stupid windows riff if (strncmp(buffer,"RIFF",4 ) == 0) { while (1) { buffer[i] = fgetc(fp); if (feof(fp)) goto error; if (strncmp(buffer,"data",i + 1) == 0) i++; else i = 0; if (i ==4){ fseek(fp,4,SEEK_CUR); break; } } } else fseek(fp,0,SEEK_SET); // find first frame do { c = 0; while (1) { if (c == 0xff) { c = fgetc(fp); if (feof(fp)) goto error; version = (c >> 3) & 0x03; layer = (c >> 1) & 0x03; if ( (version > 1) && (layer == 1) && ((c & 0xe0) == 0xe0) ) break; } else { c = fgetc(fp); if (feof(fp)) goto error; } } crc = (c & 0x01); c = fgetc(fp); if (feof(fp)) goto error; if (version == 3) { bitrate = mp1_3_bitrates[(c >> 4) & 0x0f]; samplerate = mp1_samplerates[(c >> 2) & 0x03]; pad = (c >> 1) & 0x01; } if (version == 2) { bitrate = mp2_3_bitrates[(c >> 4) & 0x0f]; samplerate = mp2_samplerates[(c >> 2) & 0x03]; pad = (c >> 1) & 0x01; } c = fgetc(fp); channels = (c >> 6) & 0x03; cp = (c >> 3) & 0x01; } while ((samplerate == -1) || (bitrate == -1)); // calculate frame length and jump to next frame temp = (float) bitrate / (float) samplerate; framelen = (144 * temp) + pad; if (version == 2) framelen = framelen - 1; fseek(fp,framelen - 4,SEEK_CUR); if (version == 3) { c = fgetc(fp); if (feof(fp)) goto error; } // HACK: how do i calculate mpeg 2 frame lengths correctly? if (version == 2) for(i=0;i<3;i++) { if ((c =fgetc(fp)) == 0xff) break; if (feof(fp)) goto error; } if (c != 0xff) goto error; c = fgetc(fp); if (feof(fp)) goto error; if ( !( (((c >> 3) & 0x03) > 1) && ( ((c >> 1) & 0x03) == 1) && ((c & 0xe0) == 0xe0) ) ) goto error; Mp3Info.samplerate = samplerate; Mp3Info.bitrate = bitrate; Mp3Info.version = 4 - version; Mp3Info.layer = 4 - layer; Mp3Info.channels = channels; Mp3Info.copyright = cp; // get id3 info fseek(fp,0,SEEK_END); Mp3Info.filesize = ftell(fp); fseek(fp,ftell(fp) - 2 * 1024,SEEK_SET); i = 0; while (1) { buffer[i] = fgetc(fp); if (feof(fp)) break; if (strncmp(buffer,"TAG",i + 1) == 0) i++; else i = 0; if (i ==3) break; } nbytes = fread(&buffer[3],1,125,fp); if ( (nbytes == 125) && (strncmp(buffer,"TAG",3) == 0) ) { char* c; Mp3Info.hastag = 1; strncpy(Mp3Info.title,&buffer[3],30); strncpy(Mp3Info.artist,&buffer[33],30); strncpy(Mp3Info.album,&buffer[63],30); strncpy(Mp3Info.year,&buffer[93],4); strncpy(Mp3Info.comment,&buffer[97],30); killwhitespace(&Mp3Info.title[strlen(Mp3Info.title) -1]); killwhitespace(&Mp3Info.artist[strlen(Mp3Info.artist) -1]); killwhitespace(&Mp3Info.album[strlen(Mp3Info.album) -1]); killwhitespace(&Mp3Info.comment[strlen(Mp3Info.comment) -1]); Mp3Info.genre = buffer[127]; } else Mp3Info.hastag = 0; fclose(fp); return 1; error: Mp3Info.bitrate = -1; if (fp) fclose(fp); return 0; } // mp3_get_tag , takes half the time of mp3_valid #define CHECK_BLOCK 2048 #define BUFFER_POS (c - tag_buffer) #define BUFFER_UNREAD ( (tag_buffer + nbytes) - c) #define TAG_SIZE 128 int mp3_get_tag(char* filename) { FILE* fp; int nbytes; static char tag_buffer[CHECK_BLOCK]; struct stat stat_s; unsigned int filesize; int i; char* c = tag_buffer; Mp3Info.bitrate = 1; stat(filename, &stat_s); filesize = stat_s.st_size; fp = fopen(filename,"r"); if (!fp) goto error; Mp3Info.filesize = filesize; if (filesize < CHECK_BLOCK) fseek(fp, filesize, SEEK_SET); else fseek(fp, filesize - CHECK_BLOCK, SEEK_SET); nbytes = fread(tag_buffer, CHECK_BLOCK, 1, fp); i = 0; while (1) { if (BUFFER_POS == nbytes) break; if (BUFFER_UNREAD < TAG_SIZE) break; if (strncmp(c ,"TAG",i + 1) == 0) i++; else { i = 0; c++; } if (i ==3) break; } if ( (BUFFER_UNREAD >= TAG_SIZE) && (i == 3) ) { Mp3Info.hastag = 1; strncpy(Mp3Info.title,&c[3],30); strncpy(Mp3Info.artist,&c[33],30); strncpy(Mp3Info.album,&c[63],30); strncpy(Mp3Info.year,&c[93],4); strncpy(Mp3Info.comment,&c[97],30); killwhitespace(&Mp3Info.title[strlen(Mp3Info.title) -1]); killwhitespace(&Mp3Info.artist[strlen(Mp3Info.artist) -1]); killwhitespace(&Mp3Info.album[strlen(Mp3Info.album) -1]); killwhitespace(&Mp3Info.comment[strlen(Mp3Info.comment) -1]); Mp3Info.genre = c[127]; } else Mp3Info.hastag = 0; fclose(fp); return 1; error: Mp3Info.bitrate = -1; if (fp) fclose(fp); return 0; } struct mp3_info* mp3_get_info() { if (Mp3Info.bitrate != -1) return &Mp3Info; else return NULL; } mplinuxman/README0000644000175000006300000000541610003155517013141 0ustar boskoboskoMplinuxman ~~~~~~~~~~ Version 1.4 MPMan F60/F55/F50 Manager for Linux http://mplinuxman.sourceforge.net For building/running on OS X , look at README.osx To install type "make" which makes the executable mplinuxman in this directory just copy it to where ever you want to execute it from (eg /usr/local/bin) USB setup ~~~~~~~~~ You must have a driver for usb controller, and have the usbdevfs filesystem mounted. to load the driver as a module type: modprobe uhci or modprobe ohci to mount usbdevfs type (if not already mounted): mount -t usbdevfs usbdevfs /proc/bus/usb *note: make sure the user you run mplinuxman as has permissions to read/write to files in /proc/bus/usb (see "USB device permissions" below on how to do this) Hotplugging ~~~~~~~~~~~ In the extra directory is a file with an entry for usb.usermap for usb hotpluggin, and a script to run mplinuxman from hotplug To set this up get and install the hotplugging scripts from http://linux-hotplug.sourceforge.net and do the following from the source directory: cat extra/mpf60.usermap >> /etc/hotplug/usb.usermap or if you have a mpman f50 cat extra/mpf50.usermap >> /etc/hotplug/usb.usermap cp extra/mplinuxman /etc/hotplug/usb/ edit the /etc/hotplug/usb/mplinuxman and change USBUSER to your user, and the path to where the mplinuxman exe is located *note: you may have to change the "0" zeros in the .usermap files to 0x0 USB device permissions ~~~~~~~~~~~~~~~~~~~~~~ To Make sure other users (not root) can use USB devices: To do this look at your /etc/fstab file. Find/Add a line that has the word usbdevfs in it. make sure the 4th word on this line has the option devmode=0666. for example usbdevfs /proc/bus/usb usbdevfs devmode=0666 0 0 or none /proc/bus/usb usbdevfs devmode=0666 0 0 type mount -o remount /proc/bus/usb to remount the filesystem I18n support ~~~~~~~~~~~~ As of version 1.3 , there is support for language translations. If you want to contribute a translated message file please email them to me and I will upload them to the website. To make a translation file, copy the template (po/mplinuxman.pot) to po/fr.po (eg. for a french translation), Do the translation of this file and then do a "make install-po" to compile/install the translation. To compile all translated message files (*.po) in the po directory , and install the compiled translations in /usr/local/share/locale: type "make install-po" more info on GNU gettext http://www.gnu.org/manual/gettext/html_chapter/gettext_toc.html Mputil ~~~~~~ In the extra directory there is mputil, its a command line utility to send/get/delete files from the mpman. Type "make" from its directory to make. This program uses libusb which is included. http://libusb.sourceforge.net/ If find any bugs please eamil me Tim O'Brien mild7@users.sourceforge.net mplinuxman/makefile.osx0000644000175000006300000000266010542514535014576 0ustar boskoboskoINCLUDE = `pkg-config --cflags gthread-2.0` `pkg-config --cflags gtk+-2.0` LIBS = `pkg-config --libs gthread-2.0` `pkg-config --libs gtk+-2.0` -lusb export LOCALE_PACKAGE=mplinuxman export LOCALE_DIR=/usr/local/share/locale # remove -D NLS=1 if you want to disable international language support (gettext) COMPILERFLAGS = -O -D MP_VERSION='"1.5"' -D PACKAGE='"$(LOCALE_PACKAGE)"' -D LOCALE_DIR='"$(LOCALE_DIR)"' -D NLS=1 OSX_FLAGS = -D USE_SYSTEM_LIBUSB=1 -D USE_OSX=1 CC = gcc CFLAGS = $(COMPILERFLAGS) $(OSX_FLAGS) $(INCLUDE) HEADERFILES = dirdialog.h mplinux.h useful.h mputil3.h OBJECTFILES = dirdialog.o main.o mainwindow.o useful.o mp3util.o playlist.o waitdialog.o mplist.o miscwindow.o mplinuxman : $(OBJECTFILES) f60lib.o ini.o $(CC) -o mplinuxman $(CFLAGS) $(LIBS) $(OBJECTFILES) f60lib.o ini.o f60lib.o : f60lib/f60lib.c $(CC) -c $(CFLAGS) f60lib/f60lib.c ini.o : ini/ini.c $(CC) -c $(CFLAGS) ini/ini.c $(OBJECTFILES) : %.o: %.c $(CC) -c $(CFLAGS) $< clean: rm mplinuxman *.o *~ ; exit 0 #create message template file mplinuxman.pot in the po dir, then merge in any changes to the translated message files in po dir pot: xgettext -k_ -kN_ -ppo -o mplinuxman.pot main.c dirdialog.c miscwindow.c mainwindow.c waitdialog.c cd po;\ for name in `find *.po 2> /dev/null`; do\ msgmerge -o tmp $$name mplinuxman.pot ;\ mv tmp $$name;\ done;\ #compile/install all translated message files in po dir install-po: sh po/install.sh mplinuxman/playlist.c0000644000175000006300000002542410003155447014271 0ustar boskobosko#include #include #include #include #include #include #ifndef USE_OSX #include #endif #define MAX_PATH NAME_MAX + PATH_MAX #include "mplinux.h" #include "mp3util.h" #include "ini/ini.h" GList* PlayList = NULL; // need this to support another generic mp3 list, not tied to playlist // should have done this at design time void pl_MegaHack(int i) { static GList* templist; GList* tmp; if (i) { templist = PlayList; PlayList = NULL; } else { while (PlayList) pl_Remove(PlayList->data); PlayList = templist; } } GList* pl_GetPlayList() { return PlayList; } gint EntriesAllocated = 0; gchar* path_cat(gchar* ret,gchar* p1,char* p2) { if (strlen(p1) + strlen(p2) > MAX_PATH - 1) return NULL; strncpy(ret,p1,MAX_PATH); if (p1[strlen(p1) -1] != '/') strcat(ret,"/"); strncat(ret,p2,MAX_PATH - (strlen(p1) +1)); return ret; } gchar* strip_path(gchar* filename) { gchar* c; c = filename + strlen(filename); while (c != filename) { c--; if (*c == '/' || *c == '\\') { c++; break; } } return c; } gchar* strip_dotmp3(gchar* filename) { static gchar ret[NAME_MAX +1]; gchar* c; strncpy(ret,filename,NAME_MAX); c = ret + strlen(ret); while (c != ret) { c--; if (strncasecmp(c,".mp3",3) == 0) { *c = '\0'; break; } } return ret; } gint pl_listcomp(PlayListEntry* entry1,PlayListEntry* entry2) { GString* s1; GString* s2; s1 = entry1->name; s2 = entry2->name; return strcmp(s1->str,s2->str); } PlayListEntry* pl_New(gchar* name,gchar* ID3name,gint filesize) { PlayListEntry* new; gsize bytes_read; gsize bytes_written; new = g_malloc(sizeof(PlayListEntry)); new->name = g_string_new(name); new->ID3name = g_string_new(ID3name); new->filesize = filesize; #ifdef NLS new->ID3name_utf8 = g_string_new(convert_if_needed(ID3name)); #else new->ID3name_utf8 = g_string_new(ID3name); #endif PlayList = g_list_insert_sorted(PlayList,new,(GCompareFunc)pl_listcomp); return new; } void pl_Remove(PlayListEntry* remove) { g_string_free(remove->name,TRUE); g_string_free(remove->ID3name,TRUE); g_string_free(remove->ID3name_utf8,TRUE); PlayList = g_list_remove(PlayList,remove); g_free(remove); } struct mp3_info* pl_GetMp3Info(gchar* filename) { if (!mp3_valid(filename)) return NULL; return mp3_get_info(); } void replace_substring(GString* g_str, gchar* find, gchar* rep) { char* str; char* c; int pos; int len; len = strlen(find); str = g_str->str; while (c = strstr(str,find)) { pos = c - str; g_string_erase(g_str,pos,len); g_string_insert(g_str,pos,rep); str = g_str->str; } } PlayListEntry* pl_AddFile(gchar* filename) { struct mp3_info* info = NULL; gchar temp[81]; gchar* c; GString* custom; PlayListEntry* entry; /* if (!mp3_valid(filename)) return NULL; */ if (!mp3_get_tag(filename)) return NULL; info = mp3_get_info(); if (info->hastag) { c = cfg_Read("options","use custom titles","0"); if (atoi(c)) { custom = g_string_sized_new(40); g_string_append(custom,cfg_Read("options","title format","%p - %t")); replace_substring(custom,"%p",info->artist); replace_substring(custom,"%t",info->title); replace_substring(custom,"%f",strip_dotmp3(strip_path(filename))); replace_substring(custom,"%c",info->comment); replace_substring(custom,"%a",info->album); entry = pl_New(filename,custom->str,info->filesize); g_string_free(custom,TRUE); return entry; } else { if ( (c = strchr(strip_path(filename),'-')) ) { if (strlen(c) - 6 > strlen(info->title)) snprintf(temp,81,"%s %s",info->artist,strip_dotmp3(c)); else snprintf(temp,81,"%s - %s",info->artist,info->title); } else { snprintf(temp,81,"%s - %s",info->artist,info->title); } return pl_New(filename,strip_dotmp3(temp),info->filesize); } } else return pl_New(filename,strip_dotmp3(strip_path(filename)),info->filesize); } static gint AddDirectoryCancel = 0; void pl_AddDirectoryCancel(gboolean a) { if (a == TRUE) AddDirectoryCancel = 1; else AddDirectoryCancel = 0; } //returned list must be freed GList* pl_AddDirectory(gchar* dirname) { GDir* gdir; gchar* c; GList* ret = NULL; PlayListEntry* p; gchar file_path[NAME_MAX + PATH_MAX]; gdir = g_dir_open(dirname,0,NULL); if (!gdir) return NULL; while ( ( (c = (gchar*)g_dir_read_name(gdir)) != NULL) && (!AddDirectoryCancel) ) { path_cat(file_path,dirname,c); if (g_file_test(file_path,G_FILE_TEST_IS_DIR)) { GList* more = NULL; more = pl_AddDirectory(file_path); ret = g_list_concat(ret,more); continue; } if (strlen(c) < 5) continue; if (c[strlen(c) -1] != '3') continue; if (! ( (c[strlen(c) - 2] == 'p') || (c[strlen(c) - 2] == 'P') ) ) continue; if (! ( (c[strlen(c) - 3] == 'm') || (c[strlen(c) - 3] == 'M') ) ) continue; p = pl_AddFile(file_path); if (p) ret = g_list_append(ret,p); } if (AddDirectoryCancel) if (ret) { GList* tmp; for(tmp = ret;tmp;tmp = g_list_next(tmp)) pl_Remove(tmp->data); g_list_free(ret); ret = NULL; } g_dir_close(gdir); return ret; } gboolean pl_StringOk(guchar* string) { int i; for(i=0;i 127) return FALSE; return TRUE; } gint loadlist_file_size = 1; gint loadlist_file_position = 0; float pl_LoadListProgress() { return (float) loadlist_file_position / (float) loadlist_file_size; } GList* pl_LoadList(gchar* filename) { FILE* fp; GList* list = NULL; guchar buffer[256]; PlayListEntry* p; int len; fp = fopen(filename,"r"); if (!fp) return NULL; fseek(fp,0,SEEK_END); loadlist_file_size = ftell(fp); fseek(fp,0,SEEK_SET); loadlist_file_position = 0; while (fgets(buffer,256,fp)) { if (( len = strlen(buffer) ) < 1) break; //if (pl_StringOk(buffer) == FALSE) {fclose(fp);return NULL;} if (buffer[len -1] == '\n') { buffer[len -1] = '\0'; len = strlen(buffer); } if (buffer[0] == '#') continue; if (buffer[0] == ';') continue; if (buffer[len -1] != '3') continue; if (! ( (buffer[len - 2] == 'p') || (buffer[len - 2] == 'P') ) ) continue; if (! ( (buffer[len - 3] == 'm') || (buffer[len - 3] == 'M') ) ) continue; p = pl_AddFile(buffer); if (p) list = g_list_append(list,p); loadlist_file_position = ftell(fp); } fclose(fp); return list; } int pl_SaveList(GList* list,gchar* filename) { FILE* fp; GList* i; PlayListEntry* p; fp = fopen(filename,"w"); if (!fp) return 0; for(i=list;i;i = g_list_next(i)) { p = i->data; fwrite(p->name->str,1,strlen(p->name->str),fp); fwrite("\n",1,1,fp); } fclose(fp); return 1; } void pl_RemoveBigger(gint big) { GList* i; for(i=PlayList;i; ) if ( ( ((PlayListEntry*)i->data)->filesize > big) || (((PlayListEntry*)i->data)->filesize == 0) ) { pl_Remove(i->data); i = PlayList; } else i = g_list_next(i); } guint pl_ListSize() { GList* i; guint size = 0; for(i=PlayList;i;i = g_list_next(i) ) size = size + ((PlayListEntry*)i->data)->filesize; return size; } GList* pl_RandomizeList(guint freemem) { gint len; PlayListEntry* p; gint random_index; GRand* g; len = g_list_length(PlayList); if (len < 2) return PlayList; pl_RemoveBigger(freemem); len = g_list_length(PlayList); if (len < 2) return PlayList; g = g_rand_new(); while (pl_ListSize() > freemem) { random_index = g_rand_int_range(g,0,len); p = g_list_nth_data(PlayList,random_index); pl_Remove(p); len--; if (len == 1) break; } return PlayList; } static gint ini_fd = -1; static GString* cfg_filename; int cfg_Init() { gint fd; gint ret = CFG_OK; gchar fullpath[PATH_MAX + NAME_MAX]; strncpy(fullpath,getenv("HOME"),PATH_MAX); strncat(fullpath,CFG_DIR,sizeof(CFG_DIR)); fd = mkdir(fullpath, S_IRWXU); if (fd < 0) if (errno != EEXIST) return 0; strncat(fullpath,CFG_FILE,sizeof(CFG_FILE)); ini_fd = ini_ReadFile(fullpath); if (ini_fd < 0) { ini_fd = ini_NewFile(); if (ini_fd < 0) return 0; ret = CFG_NEW; } cfg_filename = g_string_new(fullpath); strncpy(fullpath,getenv("HOME"),PATH_MAX); strncat(fullpath,CFG_DIR,sizeof(CFG_DIR)); strncat(fullpath,CFG_PLAY_LIST,sizeof(CFG_PLAY_LIST)); cfg_Write("paths","default playlist",fullpath); return ret; } void cfg_Write(gchar* sec,gchar* name,gchar* value) { if (ini_fd < 0) return; ini_WriteString(ini_fd,sec,name,value); } char* cfg_Read(gchar* sec,gchar*name,gchar* fallback) { gchar* ret; if (ini_fd < 0) return NULL; ret = ini_ReadValue(ini_fd,sec,name); if (ret == NULL) { cfg_Write(sec,name,fallback); return fallback; } return ret; } char* cfg_ReadSection(gchar* sec) { gchar* name; gchar* value; if (ini_fd < 0) return NULL; value = ini_ReadKeysValues(ini_fd,sec,&name); if (value < (gchar*)1) return 0; return value; } void cfg_Save() { if (ini_fd < 0) return; ini_Save(ini_fd,cfg_filename->str); } #ifdef NLS // if not a valid utf-8 string try to convert from current locale charset to utf-8 // fallback to iso8859-1 charset gchar* convert_if_needed(gchar* text) { gint bytes_read; gint bytes_written; gchar* conv_text; GError* gerror = NULL; static gchar* free_text = NULL; if (g_utf8_validate(text,-1,NULL)) return text; conv_text = g_locale_to_utf8(text,-1,&bytes_read,&bytes_written,NULL); if (conv_text != NULL) return conv_text; if (free_text) g_free(free_text); free_text = g_convert(text,strlen(text),"UTF-8","ISO-8859-1",&bytes_read,&bytes_written,&gerror); if (!free_text) { g_print("%s\bn",gerror->message); // if we still cant convert return original string, will likely produce an error message return text; } return free_text; } #endif mplinuxman/random.xpm0000644000175000006300000000335707662770360014311 0ustar boskobosko/* XPM */ static char * random_xpm[] = { "24 24 70 1", " c None", ". c #424242", "+ c #202020", "@ c #363636", "# c #525252", "$ c #2E2E2E", "% c #474747", "& c #333333", "* c #454545", "= c #595959", "- c #404040", "; c #727272", "> c #2A2A2A", ", c #232323", "' c #222222", ") c #626262", "! c #323232", "~ c #888888", "{ c #3A3A3A", "] c #1E1E1E", "^ c #393939", "/ c #5C5C5C", "( c #959595", "_ c #1B1B1B", ": c #5D5D5D", "< c #808080", "[ c #242424", "} c #313131", "| c #4D4D4D", "1 c #929292", "2 c #949494", "3 c #939393", "4 c #252525", "5 c #505050", "6 c #212121", "7 c #686868", "8 c #797979", "9 c #666666", "0 c #636363", "a c #2D2D2D", "b c #7E7E7E", "c c #696969", "d c #262626", "e c #2C2C2C", "f c #4F4F4F", "g c #444444", "h c #4E4E4E", "i c #9C9C9C", "j c #141414", "k c #1F1F1F", "l c #4A4A4A", "m c #1D1D1D", "n c #2F2F2F", "o c #3C3C3C", "p c #6F6F6F", "q c #9E9E9E", "r c #383838", "s c #353535", "t c #5A5A5A", "u c #818181", "v c #3E3E3E", "w c #545454", "x c #828282", "y c #ABABAB", "z c #3F3F3F", "A c #A3A3A3", "B c #8E8E8E", "C c #4B4B4B", "D c #535353", "E c #A0A0A0", " .+@ ", " #$%&* ", " . =- ", " ;>,') !; ", " ~' {] ^$ ", " /+ (_: <[} ", " ! |[1 2 ", " 34/ >5 ", " {6 >7 ", " 8]! ", " 97 0a+>9 ", " {b cdefg,h ", " ijk lm n!: ", " op h+ qrs7 ", " p't ", " uv>8 ", " w'g ", " x$} ", " yz6 ", " AB ", " C0 ", " i]+ ", " D| ", " E "}; mplinuxman/mainwindow.c0000644000175000006300000017221610542507151014607 0ustar boskobosko/* * mainwindow.c * This file is part of mplinuxman * * Copyright (C) 2002-2006 - Tim O'Brien * Copyright (C) 2006 - Boško Andjelković * * mplinuxman is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * mplinuxman is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with mplinuxman; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301 USA */ /* Main Window code A good example of how not to do things.... firstly use glade to build the interface, (cuts out ALOT of lines of code) */ #include #include #include #include #include #include "dirdialog.h" #include "mplinux.h" #include "useful.h" #include "f60lib/f60error.h" #include "mp3util.h" #include "logo.xpm" #include "random.xpm" GtkTooltips* tooltips; enum foo{ MP_LIST_NAME, MP_LIST_SIZE, MP_LIST_ORDER, MP_LIST_N_COLUMNS }; void mw_Destroy(GtkWidget* w, gpointer p) { gchar c[8]; gint i; gchar* k; // menuitem_SavePlaylist(NULL,3,NULL); k = cfg_Read("options","mp3 stop command","killall mpg123"); g_spawn_command_line_async(k,NULL); if (! MW_GET("win_maximized")) { snprintf(c,7,"%d",(gint)MW_GET("win_width")); cfg_Write("geometry","window width",c); snprintf(c,7,"%d",(gint)MW_GET("win_height")); cfg_Write("geometry","window height",c); i = gtk_paned_get_position(GTK_PANED(MW_GET("splitter"))); snprintf(c,7,"%d",i); cfg_Write("geometry","splitter position",c); i = gtk_paned_get_position(GTK_PANED(MW_GET("splitter2"))); snprintf(c,7,"%d",i); cfg_Write("geometry","splitter2 position",c); i = gtk_tree_view_column_get_width(MW_GET("left_treeview_column")); snprintf(c,7,"%d",i); cfg_Write("geometry","playlist column width",c); i = gtk_tree_view_column_get_width(MW_GET("right_flash_treeview_column")); snprintf(c,7,"%d",i); cfg_Write("geometry","flash column width",c); i = gtk_tree_view_column_get_width(MW_GET("right_smartmedia_treeview_column")); snprintf(c,7,"%d",i); cfg_Write("geometry","smartmedia column width",c); } cfg_Save(); mpl_CloseDevice(); gtk_main_quit(); } gboolean main_window_FrameEvent (GtkWindow *window, GdkEventConfigure *event, gpointer user_data) { if (event->type == GDK_CONFIGURE) { MW_SET("win_width",event->width); MW_SET("win_height",event->height); } return FALSE; } gboolean main_window_WindowStateEvent (GtkWidget *widget, GdkEventWindowState *event, gpointer user_data) { if (event->type == GDK_WINDOW_STATE ) { if (event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED) MW_SET("win_maximized",1); else MW_SET("win_maximized",0); } return FALSE; } void MplinuxError() { GtkWidget* dialog; gchar msg[512]; gchar title[51]; GtkStatusbar* sb; snprintf(msg,10," "); snprintf(title,50," "); switch (mpl_LastError()) { case F60_ERROR_NO_DEVICE: snprintf(title,50,_("Error Connecting Device ")); snprintf(msg,511,_("%s\n\nMake sure the device is plugged into the USB port, or try reloading the USB module"),mpl_ErrorString()); sb = MW_GET("right_statusbar"); gtk_statusbar_pop(sb,0); gtk_statusbar_push(sb,0,_("No device detected")); break; case F60_ERROR_CMD: snprintf(title,50,_("Error From Device")); snprintf(msg,511,_("%s\n\nThe device reported an error"),mpl_ErrorString()); break; case F60_ERROR_OTHER: snprintf(title,50,_("Error")); snprintf(msg,511,_("%s\n\nMake sure the requested directory or temporary directory is accessible"),mpl_ErrorString()); break; case F60_ERROR_USB: snprintf(title,50,_("USB Error")); snprintf(msg,511,_("%s\n\nMake sure the USB device is working properly"),mpl_ErrorString()); break; case F60_ERROR_DEVICE_FULL: snprintf(title,50,_("Error Copying File")); snprintf(msg,511,_("%s\n\nMake the device is not full"),mpl_ErrorString()); break; case USER_CANCELED: return; break; default: snprintf(title,50,_("Error")); snprintf(msg,511,_("An unkown error occurred")); break; } dialog = gtk_message_dialog_new (MainWindow, GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s",msg); gtk_window_set_title(GTK_WINDOW(dialog),title); g_signal_connect_swapped (GTK_OBJECT (dialog), "response", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (dialog)); gtk_dialog_set_has_separator (GTK_DIALOG(dialog),FALSE); gtk_widget_show_all(dialog); } void left_treeview_cell_RenderName (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { PlayListEntry* p; gchar* c; gtk_tree_model_get(model,iter,0,&p,-1); c = p->ID3name_utf8->str; g_object_set (GTK_CELL_RENDERER (cell),"text", c ,NULL); } void left_treeview_cell_RenderSize (GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { PlayListEntry* p; gchar size_str[20]; float size; gtk_tree_model_get(model,iter,0,&p,-1); size = (float)p->filesize /(float)1024; snprintf(size_str,20,"%.1f",size/(float)1024); g_object_set (GTK_CELL_RENDERER (cell),"text", size_str,NULL); } void treeview_GetLastSelected(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gint ret[]) { PlayListEntry* p; gtk_tree_model_get(model,iter,0,&p,-1); ret[1] = ret[1] + p->filesize; ret[0] = ret[0] + 1; } void left_treeview_UpdateStatusbar(GtkTreeView* treeview) { GtkTreeSelection* selection; GtkStatusbar* stat; gint nsel_size[2] = {0,0}; gchar output[51]; selection = gtk_tree_view_get_selection(treeview); gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)treeview_GetLastSelected , nsel_size); snprintf(output,50,_("%d File(s) selected %d,%03d k"), nsel_size[0],(nsel_size[1]/1024) / 1000, (nsel_size[1]/1024) % 1000); if (nsel_size[0] == 0) output[0] = '\0'; stat = MW_GET("left_statusbar"); gtk_statusbar_pop(stat,0); gtk_statusbar_push(stat,0,output); } void left_treeview_SelectAll (GtkTreeView *treeview, gpointer user_data) { left_treeview_UpdateStatusbar(treeview); } gboolean left_treeview_ButtonEvent (GtkTreeView *treeview, GdkEventButton *event, gpointer user_data) { if (event->type != GDK_BUTTON_PRESS) return FALSE; if (event->button != 3) return FALSE; gtk_menu_popup(GTK_MENU(user_data),NULL,NULL,NULL,NULL,event->button,event->time); return TRUE; } void right_list_Select(int a); //try to refresh flash and smartmedia memory lists on startup gboolean StartupConnect(gpointer data) { right_list_Select((int)SMART); right_treeview_Refresh(NULL,(gpointer)1); right_list_Select((int)FLASH); right_treeview_Refresh(NULL,NULL); return FALSE; } //timeout call runs only once, if user_data == 1 no error msg gboolean right_treeview_Refresh(GtkWidget *widgy,gpointer user_data) { GtkWidget* tv; GtkTreeModel* model; GtkTreeIter iter; GList* entries= NULL; GList* p; gint n, n2; gchar size_str[51]; GtkStatusbar* stat; int i; gsize bytes_read; gsize bytes_written; tv = MW_GET("right_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); gtk_list_store_clear (GTK_LIST_STORE(model)); p = entries = mpl_RefreshList(); if (entries == (GList*)-1) { if (user_data != (gpointer)1) MplinuxError(); return FALSE; } stat = MW_GET("right_statusbar"); n2= (gint) p->data; p = g_list_next(p); n = (gint) p->data; p = g_list_next(p); snprintf(size_str,60,"%d,%03d k %s %d,%03d k %s %%%.0f %s",(n/1024)/1000,(n/1024)%1000 ,_("free"),(n2/1024)/1000,(n2/1024)%1000,_("total"),((float)(n2 - n)/(float)n2) * (float)100,_("used")); gtk_statusbar_pop(stat,0); gtk_statusbar_push(stat,0,size_str); for(i=0;p != NULL;p = g_list_next(p),i++) { gtk_list_store_append(GTK_LIST_STORE(model),&iter); #ifdef NLS gtk_list_store_set(GTK_LIST_STORE(model),&iter,MP_LIST_NAME, convert_if_needed(p->data),-1); #else gtk_list_store_set(GTK_LIST_STORE(model),&iter,MP_LIST_NAME,p->data,-1); #endif p = g_list_next(p); n = (gint) p->data; snprintf(size_str,20,"%.1f",(float) n /(float) 1024 /(float)1024); gtk_list_store_set(GTK_LIST_STORE(model),&iter,MP_LIST_SIZE,size_str,-1); gtk_list_store_set(GTK_LIST_STORE(model),&iter,MP_LIST_ORDER,(gchar)i,-1); } g_list_free(entries); return FALSE; } void right_treeview_selection_Changed (GtkTreeSelection *treeselection, gpointer user_data) { right_list_Select((int)user_data); } void right_list_Select(int a) { GdkColor blue; GdkColor white; GtkWidget* flash_button; GtkWidget* flash_scroller; GtkWidget* flash_label; GtkWidget* smart_button; GtkWidget* smart_scroller; GtkWidget* smart_label; GtkRcStyle* rc_style; GtkWidget* flash_tv; GtkWidget* smart_tv; GtkStatusbar* stat; blue.pixel = 0x0; blue.red = 0x3d00; blue.green = 0x6500; blue.blue = 0x9900; white.pixel = 0x0; white.red = 0xffff; white.green = 0xffff; white.blue = 0xffff; flash_button = MW_GET("flash_memory_button"); flash_scroller = MW_GET("flash_memory_scroller"); flash_label = MW_GET("flash_memory_label"); smart_button = MW_GET("smart_memory_button"); smart_scroller = MW_GET("smart_memory_scroller"); smart_label = MW_GET("smart_memory_label"); stat = MW_GET("right_statusbar"); flash_tv = MW_GET("right_flash_treeview"); smart_tv = MW_GET("right_smartmedia_treeview"); g_signal_handlers_disconnect_by_func( gtk_tree_view_get_selection(GTK_TREE_VIEW(flash_tv)), G_CALLBACK(right_treeview_selection_Changed), (gpointer)FLASH); g_signal_handlers_disconnect_by_func( gtk_tree_view_get_selection(GTK_TREE_VIEW(smart_tv)), G_CALLBACK(right_treeview_selection_Changed), (gpointer)SMART); rc_style = gtk_rc_style_new(); gtk_widget_modify_style(flash_button,rc_style); gtk_widget_modify_style(flash_label,rc_style); gtk_widget_modify_style(flash_scroller,rc_style); gtk_widget_modify_style(smart_button,rc_style); gtk_widget_modify_style(smart_label,rc_style); gtk_widget_modify_style(smart_scroller,rc_style); g_object_unref(G_OBJECT(rc_style)); if (a == FLASH) { mpl_SelectMemory(FLASH); gtk_button_set_relief(GTK_BUTTON(flash_button),GTK_RELIEF_NORMAL); gtk_button_set_relief(GTK_BUTTON(smart_button),GTK_RELIEF_NONE); gtk_widget_modify_bg (flash_button, GTK_STATE_NORMAL, &blue); //gtk_widget_modify_fg (flash_label, GTK_STATE_NORMAL, &white); gtk_widget_modify_bg (flash_scroller, GTK_STATE_NORMAL, &blue); gtk_widget_modify_bg (flash_button, GTK_STATE_PRELIGHT, &blue); gtk_widget_modify_fg (flash_label, GTK_STATE_PRELIGHT, &white); gtk_widget_modify_bg (flash_scroller, GTK_STATE_PRELIGHT, &blue); MW_SET("right_treeview",flash_tv); gtk_tree_selection_unselect_all( gtk_tree_view_get_selection(GTK_TREE_VIEW(smart_tv)) ); g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(smart_tv)),"changed", G_CALLBACK(right_treeview_selection_Changed), (gpointer)SMART); gtk_statusbar_pop(stat,0); gtk_statusbar_push(stat,0,_("Internal memory selected")); } if (a == SMART) { mpl_SelectMemory(SMART); gtk_button_set_relief(GTK_BUTTON(flash_button),GTK_RELIEF_NONE); gtk_button_set_relief(GTK_BUTTON(smart_button),GTK_RELIEF_NORMAL); gtk_widget_modify_bg (smart_button, GTK_STATE_NORMAL, &blue); //gtk_widget_modify_fg (smart_label, GTK_STATE_NORMAL, &white); gtk_widget_modify_bg (smart_scroller, GTK_STATE_NORMAL, &blue); gtk_widget_modify_bg (smart_button, GTK_STATE_PRELIGHT, &blue); gtk_widget_modify_fg (smart_label, GTK_STATE_PRELIGHT, &white); gtk_widget_modify_bg (smart_scroller, GTK_STATE_PRELIGHT, &blue); MW_SET("right_treeview",smart_tv); gtk_tree_selection_unselect_all( gtk_tree_view_get_selection(GTK_TREE_VIEW(flash_tv)) ); g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW(flash_tv)),"changed", G_CALLBACK(right_treeview_selection_Changed), (gpointer)FLASH); gtk_statusbar_pop(stat,0); gtk_statusbar_push(stat,0,_("SmartMedia card selected")); } } void right_list_button_Clicked(GtkButton *button,gpointer user_data) { right_list_Select((gint)user_data); } gboolean popup_AddDirectory(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { gchar* c; c = cfg_Read("paths","add directory","/"); if (GTK_WIDGET_TYPE(user_data) == gtk_menu_get_type()) gtk_menu_popdown(GTK_MENU(user_data)); gchar *dirname; GtkWidget *dialog; dialog = gtk_file_chooser_dialog_new (_("Add directory..."),MainWindow,GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),c); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); if(result == GTK_RESPONSE_ACCEPT) { gchar *selected_filename; selected_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); dirname = dirsel_convert_if_needed (selected_filename); gtk_widget_destroy (dialog); GtkWidget* tv; GtkTreeModel* model; GtkTreeIter iter; GList* entries= NULL; GList* p; gint n; cfg_Write("paths","add directory",dirname); entries = CreateWaitDialog((GThreadFunc)pl_AddDirectory,dirname,pl_AddDirectoryCancel,NULL,_("Reading Directory")); // entries = pl_AddDirectory(dirname); if (g_list_length(entries) == 0) { cfg_Write("paths","add directory","/"); return; } tv = MW_GET("left_treeview"); gtk_widget_grab_focus (tv); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); n = gtk_tree_model_iter_n_children(model,NULL); if (n) gtk_tree_model_iter_nth_child(model,&iter,NULL,n -1); for(p = entries;p;p = g_list_next(p)) { gtk_list_store_append(GTK_LIST_STORE(model),&iter); gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,p->data,-1); } g_list_free(entries); g_free (selected_filename); } else { gtk_widget_destroy (dialog); } return FALSE; } gboolean popup_AddFile(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { gchar* c; gtk_menu_popdown(GTK_MENU(user_data)); c = cfg_Read("paths","add file","/"); GtkWidget *dialog; dialog = gtk_file_chooser_dialog_new (_("Add file..."),MainWindow,GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); GtkFileFilter *filter; filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Music Files")); gtk_file_filter_add_pattern (filter, "*.mp3"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),c); gtk_window_set_modal(GTK_WINDOW(dialog),TRUE); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); if(result == GTK_RESPONSE_ACCEPT) { char *selected_filename; selected_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); PlayListEntry* p; GtkWidget* tv; GtkTreeModel* model; GtkTreeIter iter; gint n; if (!pl_GetMp3Info(selected_filename) ) { gtk_widget_destroy (dialog); return; } p = pl_AddFile(selected_filename); if (!p) { gtk_widget_destroy (dialog); return; } cfg_Write("paths","add file",selected_filename); tv = MW_GET("left_treeview"); gtk_widget_grab_focus (tv); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); n = gtk_tree_model_iter_n_children(model,NULL); if (n) gtk_tree_model_iter_nth_child(model,&iter,NULL,n -1); gtk_list_store_append(GTK_LIST_STORE(model),&iter); gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,p,-1); g_free (selected_filename); } gtk_widget_destroy (dialog); return FALSE; } void menuitem_SendNonMp3 (gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget *dialog; dialog = gtk_file_chooser_dialog_new (_("Send non-Mp3 file..."),MainWindow,GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); gtk_window_set_modal(GTK_WINDOW(dialog),TRUE); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); if(result == GTK_RESPONSE_ACCEPT) { gchar *selected_filename; selected_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); gtk_widget_destroy (dialog); gint ret; ret = (gint) CreateWaitDialog((GThreadFunc)mpl_SendFileNonMp3,selected_filename,NULL,mpl_GetReadWriteProgress,_("sending file")); if (ret == MPL_ERROR) { MplinuxError(); return; } right_treeview_Refresh(NULL,NULL); g_free (selected_filename); } else gtk_widget_destroy (dialog); } void left_treeview_NameSelectedFiles(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GList** list) { PlayListEntry* p; GList* l; l = *list; gtk_tree_model_get(model,iter,0,&p,-1); l = g_list_append(l,p->name->str); *list = l; } gboolean popup_Context(GtkWidget *widget, gpointer user_data) { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; gint which; gchar* c; GList* files = NULL; GList* ptr; GString* cmd = g_string_new(""); which = (gint) user_data; switch (which) { case 1: tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)left_treeview_NameSelectedFiles , &files); if (files == NULL) break; c = cfg_Read("options","mp3 stop command","killall mpg123"); g_spawn_command_line_async(c,NULL); c = cfg_Read("options","mp3 play command","mpg123 %f"); if (strstr(c,"%f") != NULL) { cmd = g_string_append_len(cmd,c,strstr(c,"%f") - c); for(ptr=files;ptr;ptr = g_list_next(ptr)) { cmd = g_string_append(cmd,"\""); cmd = g_string_append(cmd,(gchar*)ptr->data); cmd = g_string_append(cmd,"\" "); GString *fn = g_string_new(""); GtkRecentManager *manager; GtkRecentData *recent_data; manager = gtk_recent_manager_new (); recent_data = g_new0 (GtkRecentData, 1); recent_data->mime_type = "audio/mpeg"; recent_data->app_name = "mplinuxman"; recent_data->app_exec = g_strjoin (" ", g_strsplit_set (c, " ", -1)[0], "%u", NULL); //recent_data->display_name = g_path_get_basename((gchar*)ptr->data); fn = g_string_append (fn,"file://"); fn = g_string_append (fn,g_strescape ((gchar*)ptr->data,NULL)); if (!gtk_recent_manager_add_full (manager,fn->str, recent_data)) { /* warn about the error */ } g_free (recent_data->app_exec); g_free (recent_data); g_object_unref (manager); } cmd = g_string_append(cmd,strstr(c,"%f") + 2); } else cmd = g_string_append(cmd,c); g_spawn_command_line_async(cmd->str,NULL); break; case 2: c = cfg_Read("options","mp3 stop command","killall mpg123"); g_spawn_command_line_async(c,NULL); break; } g_string_free(cmd,TRUE); return TRUE; } gint one_arg_func(gchar* name) { return mpl_SendFile(name,MW_GET("i_need_an_arg")); } void left_treeview_SendSelectedFiles(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gint* i) { PlayListEntry* p; gint ret; gchar msg[101]; if (*i == -1) return; gtk_tree_model_get(model,iter,0,&p,-1); snprintf(msg,100,_("sending %s"),p->ID3name_utf8->str); MW_SET("i_need_an_arg",p->ID3name->str); ret = (gint) CreateWaitDialog((GThreadFunc)one_arg_func,p->name->str,mpl_cancel_operation, mpl_GetReadWriteProgress,msg); if (ret == MPL_ERROR) { MplinuxError(); *i = -1; } right_treeview_Refresh(NULL,NULL); } void toolbar_SendFiles(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; gint i; if (mpl_CheckForDevice() == FALSE) { MplinuxError(); return; } tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); i = 0; gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)left_treeview_SendSelectedFiles , &i); } gboolean toolbar_AddFiles(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { if (event->type != GDK_BUTTON_PRESS) return FALSE; //gtk_window_get_position(MainWindow,&x2,&y2); //gtk_widget_get_pointer(GTK_WIDGET(MainWindow),&x,&y); //x = x -35; //y = y +35; //gtk_item_factory_popup(GTK_ITEM_FACTORY(user_data),x +x2, // y +y2,event->button,event->time -1); gtk_menu_popup(GTK_MENU(user_data),NULL,NULL,NULL,NULL,event->button,event->time); // gtk_button_released(GTK_BUTTON(widget)); return TRUE; } void left_treeview_RemoveSelection(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GList** data) { GtkTreeIter* iter_copy; iter_copy = gtk_tree_iter_copy(iter); *data = g_list_append(*data,iter_copy); } void toolbar_RemoveFiles(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; GList* remove_iters =NULL; GtkTreeIter iter2; PlayListEntry* p; tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)left_treeview_RemoveSelection , &remove_iters); remove_iters = g_list_first(remove_iters); while (remove_iters) { GtkTreeIter *iter = remove_iters->data; gtk_tree_model_get(model,iter,0,&p,-1); if (!g_list_next(remove_iters)) { iter2 = *iter; if (gtk_tree_model_iter_next (model,&iter2)) { gtk_tree_selection_select_iter(selection,&iter2); gtk_tree_view_set_cursor (GTK_TREE_VIEW(tv), gtk_tree_model_get_path(model,&iter2), NULL,FALSE); } } gtk_list_store_remove (GTK_LIST_STORE(model),iter); gtk_tree_iter_free(iter); pl_Remove(p); remove_iters = g_list_next(remove_iters); } } void toolbar_FileProperties(gpointer callback_data, guint callback_action, GtkWidget *widget) { create_file_info_window(); } void toolbar_RandomList(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget* tv; GtkTreeModel* model; GList* dir,*newlist,*p; GtkTreeIter iter; guint freemem; tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); dir = mpl_RefreshList(); if (dir == (GList*)-1) { MplinuxError(); return; } if (g_list_length(dir) == 0) return; dir = g_list_next(dir); freemem = (guint) dir->data; g_list_free(dir); gtk_list_store_clear(GTK_LIST_STORE(model)); newlist = pl_RandomizeList(freemem); for(p = newlist;p;p = g_list_next(p)) { gtk_list_store_append(GTK_LIST_STORE(model),&iter); gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,p->data,-1); } gtk_widget_grab_focus (tv); g_signal_emit_by_name(tv,"select-all",0,NULL); } gint one_arg_func2(gint i) { return mpl_GetFile(i,MW_GET("i_need_an_arg2")); } void right_treeview_MpGetSelection (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gchar* dirname) { int ret; if (dirname[0] == '\0') return; MW_SET("i_need_an_arg2",dirname); ret = (gint) CreateWaitDialog((GThreadFunc)one_arg_func2, (gpointer)atoi(gtk_tree_path_to_string (path)),mpl_cancel_operation, mpl_GetReadWriteProgress,"Getting file"); if ( ret == MPL_ERROR) { dirname[0] = '\0'; MplinuxError(); return; } } void toolbar_GetFiles(gpointer callback_data, guint callback_action, GtkWidget *widget) { gchar*c; c = cfg_Read("paths","save directory","/"); GtkWidget *dialog; dialog = gtk_file_chooser_dialog_new (_("Select save directory..."),MainWindow,GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); gtk_window_set_transient_for(GTK_WINDOW(dialog),MainWindow); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),c); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); if(result == GTK_RESPONSE_ACCEPT) { gchar *selected_filename; gchar *dirname; selected_filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); dirname = dirsel_convert_if_needed (selected_filename); GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; cfg_Write("paths","save directory",dirname); tv = MW_GET("right_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_selected_foreach (selection,(GtkTreeSelectionForeachFunc)right_treeview_MpGetSelection ,dirname); gtk_widget_destroy (dialog); g_free (selected_filename); } else { gtk_widget_destroy (dialog); } } void toolbar_Refresh(gpointer callback_data, guint callback_action, GtkWidget *widget) { gtk_timeout_add (1000,(GtkFunction)right_treeview_Refresh,NULL); } void toolbar_Reorder(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkTreeView *tv; GtkTreeModel* model; GtkTreeIter iter; guchar order[257]; guchar i; tv = MW_GET("right_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); if (gtk_tree_model_get_iter_first(model,&iter) == FALSE) return; i = 0; do { gtk_tree_model_get(model,&iter,MP_LIST_ORDER,&order[i+1],-1); i++; } while(gtk_tree_model_iter_next (model,&iter)); order[0] = i; if (mpl_ReorderFiles(order,i) == MPL_ERROR) MplinuxError(); gtk_timeout_add (1000,(GtkFunction)right_treeview_Refresh,NULL); } void right_treeview_MpDeleteSelection (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gint* i) { if (*i == -1) return g_print("%d\n",atoi(gtk_tree_path_to_string (path)) - *i); if (mpl_DeleteFile(atoi(gtk_tree_path_to_string (path)) - *i) == MPL_ERROR) { *i = -1; MplinuxError(); return; } *i = *i + 1; } void toolbar_MpDelete(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; gint i; tv = MW_GET("right_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); i = 0; gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)right_treeview_MpDeleteSelection , &i); right_treeview_Refresh(NULL,NULL); } gint left_treeview_Sort (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { PlayListEntry* p1, *p2; gtk_tree_model_get(model,a,0,&p1,-1); gtk_tree_model_get(model,b,0,&p2,-1); if (user_data == (gpointer) 10) { gchar* c1; gchar* c2; c1 = p1->ID3name->str; c2 = p2->ID3name->str; return strcasecmp(c1,c2); } if (user_data == (gpointer) 20) { gint i1; gint i2; i1 = p1->filesize; i2 = p2->filesize; return i1 - i2; } return 0; } // gtk_signal_emit_by_name seems to give a gtk error for some reason void menuitem_SelectAll(gpointer callback_data, guint callback_action, GtkWidget *widget) { GtkWidget* tv; tv = MW_GET("right_treeview"); if (GTK_WIDGET_HAS_FOCUS(tv)) { g_signal_emit_by_name(tv,"select-all",0,NULL); } else { tv = MW_GET("left_treeview"); gtk_widget_grab_focus (tv); g_signal_emit_by_name(tv,"select-all",0,NULL); } } void menuitem_LoadPlaylist(gpointer callback_data,guint callback_action,GtkWidget *widget) { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; GtkTreeIter iter; GList* entries = NULL, *p =NULL; gchar* c; GtkWidget *dialog; GtkFileFilter *filter; tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); if ((gint) callback_action != 3) { dialog = gtk_file_chooser_dialog_new (_("Select playlist..."),MainWindow,GTK_FILE_CHOOSER_ACTION_OPEN,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Playlists")); gtk_file_filter_add_pattern (filter, "*.m3u"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); c = cfg_Read("paths","playlist","/"); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),c); gtk_window_set_modal(GTK_WINDOW(dialog),TRUE); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); if (result == GTK_RESPONSE_CANCEL) { gtk_widget_destroy (dialog); return; } c = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); } else c = cfg_Read("paths","default playlist",""); entries = CreateWaitDialog((GThreadFunc)pl_LoadList,c,NULL,pl_LoadListProgress, _("Loading Playlist")); if (g_list_length(entries) != 0) { if ((gint) callback_action != 3) cfg_Write("paths","playlist",c); if ((gint) callback_action == 1 ) { gtk_tree_selection_select_all(selection); toolbar_RemoveFiles(NULL,0,NULL); } } if ((gint) callback_action != 3) gtk_widget_destroy (dialog); gtk_widget_grab_focus (tv); for(p = entries;p;p = g_list_next(p)) { gtk_list_store_append(GTK_LIST_STORE(model),&iter); gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,p->data,-1); } tv = MW_GET("left_statusbar"); gtk_statusbar_pop(GTK_STATUSBAR(tv),0); if (g_list_length(entries) !=0) gtk_statusbar_push(GTK_STATUSBAR(tv),0,_("Loaded Playlist")); else { if ((gint) callback_action != 3) gtk_statusbar_push(GTK_STATUSBAR(tv),0,_("Error Loading Playlist")); } g_list_free(entries); } void menuitem_SavePlaylist(gpointer callback_data,guint callback_action,GtkWidget *widget) { GtkWidget* tv; GtkTreeModel* model; GtkTreeIter iter; GList* entries = NULL, *p =NULL; gchar* c; GtkWidget *dialog; GtkFileFilter *filter; tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); if ((gint) callback_action != 3) { dialog = gtk_file_chooser_dialog_new (_("Save playlist..."),MainWindow,GTK_FILE_CHOOSER_ACTION_SAVE,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,NULL); filter = gtk_file_filter_new (); gtk_file_filter_set_name (filter, _("Playlists")); gtk_file_filter_add_pattern (filter, "*.m3u"); gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (dialog), filter); c = cfg_Read("paths","playlist","/"); gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog),c); gtk_window_set_modal(GTK_WINDOW(dialog),TRUE); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); if (result == GTK_RESPONSE_CANCEL) { gtk_widget_destroy (dialog); return; } c = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); } else c = cfg_Read("paths","default playlist",""); if (gtk_tree_model_get_iter_first(model,&iter) == FALSE) { if ((gint) callback_action != 3) gtk_widget_destroy (dialog); else unlink(c); return; } do { gtk_tree_model_get(model,&iter,0,&p,-1); entries = g_list_append(entries,p); } while(gtk_tree_model_iter_next (model,&iter)); tv = MW_GET("left_statusbar"); gtk_statusbar_pop(GTK_STATUSBAR(tv),0); if (pl_SaveList(entries,c)) { if ((gint) callback_action != 3) cfg_Write("paths","playlist",c); gtk_statusbar_push(GTK_STATUSBAR(tv),0,_("Saved Playlist")); } else { gtk_statusbar_push(GTK_STATUSBAR(tv),0,_("Error Saving Playlist")); // g_print("saved\n"); } if ((gint) callback_action != 3) gtk_widget_destroy (dialog); g_list_free(entries); } void menuitem_Options(gpointer callback_data, guint callback_action, GtkWidget *widget) { create_options_window(); } void menuitem_About(gpointer callback_data, guint callback_action, GtkWidget *widget) { create_about_window(); } gint format_thread(gpointer a) { return mpl_FormatMedia(0x4e); } gint format_thread1(gpointer a) { return mpl_FormatMedia(0x44); } void menuitem_FormatMem(gpointer callback_data,guint callback_action,GtkWidget *widget) { gint ret; GtkWidget* dialog; if (callback_action == FLASH) { mpl_SelectMemory(FLASH); dialog = gtk_message_dialog_new (NULL,0,GTK_MESSAGE_WARNING,GTK_BUTTONS_YES_NO, _("This will delete all data in Flash Memory\nWould you like to continue?")); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (ret == -9) return; ret = (gint)CreateWaitDialog( (GThreadFunc)format_thread,NULL,NULL,NULL,_("Formatting Internal Memory")); } else if (callback_action == SMART) { dialog = gtk_message_dialog_new (NULL,0,GTK_MESSAGE_WARNING,GTK_BUTTONS_YES_NO, _("This will delete all data in SmartMedia\nWould you like to continue?")); mpl_SelectMemory(SMART); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (ret == -9) return; ret = (gint)CreateWaitDialog( (GThreadFunc)format_thread,NULL,NULL,NULL,_("Formatting SmartMedia")); } else if (callback_action == SMARTCAM) { dialog = gtk_message_dialog_new (NULL,0,GTK_MESSAGE_WARNING,GTK_BUTTONS_YES_NO, _("This will format SmartMedia for camera\nWould you like to continue?")); mpl_SelectMemory(SMART); ret = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); if (ret == -9) return; ret = (gint)CreateWaitDialog( (GThreadFunc)format_thread1,NULL,NULL,NULL,_("Formatting SmartMedia for camera")); } //ret = gtk_dialog_run (GTK_DIALOG (dialog)); //gtk_widget_destroy (dialog); //if (ret == -9) return; //mpl_SelectMemory(callback_action); //ret = (gint)CreateWaitDialog( (GThreadFunc)format_thread,NULL,NULL,NULL,_("Formatting Internal Memory")); if (ret == MPL_ERROR) { MplinuxError(); return; } right_treeview_Refresh(NULL,NULL); } static GtkItemFactoryEntry menu_items[] = { { N_("/_File"), NULL, 0, 0, "" }, { N_("/File/_Add"), NULL ,NULL, 0, ""}, { N_("/File/Add/Directory..."), NULL ,G_CALLBACK(popup_AddDirectory), 0, ""}, { N_("/File/Add/File..."), NULL ,G_CALLBACK(popup_AddFile), 0, ""}, { N_("/File/sep1"), NULL,NULL, 0, ""}, { N_("/File/_Send..."), "Return",toolbar_SendFiles, 0, "", GTK_STOCK_GO_FORWARD }, { N_("/File/_Remove"), "Delete",toolbar_RemoveFiles, 0, "", GTK_STOCK_REMOVE }, { N_("/File/_Properties"),NULL,toolbar_FileProperties, 0, "", GTK_STOCK_PROPERTIES }, { N_("/File/sep1"), NULL,NULL, 0, ""}, { N_("/File/Send non mp3 file..."), NULL,menuitem_SendNonMp3, 0, "", GTK_STOCK_FILE }, { N_("/File/sep1"), NULL,NULL, 0, ""}, { N_("/File/_Quit"), NULL ,mw_Destroy, 0, "", GTK_STOCK_QUIT }, {N_("/_Mpman"),NULL,0,0,""}, {N_("/Mpman/_Refresh"), "r",toolbar_Refresh,0,"",GTK_STOCK_REFRESH}, { N_("/Mpman/_Get..."), "Return",toolbar_GetFiles, 0, "", GTK_STOCK_GO_BACK }, { N_("/Mpman/_Delete"), "Delete",toolbar_MpDelete, 0, "", GTK_STOCK_DELETE }, { N_("/Mpman/sep1"), NULL,NULL, 0, ""}, { N_("/Mpman/Format Internal Memory"), NULL,menuitem_FormatMem, FLASH, "" }, { N_("/Mpman/Format SmartMedia card"), NULL,menuitem_FormatMem, SMART, "" }, { N_("/Mpman/Format SmartMedia for camera"), NULL,menuitem_FormatMem, SMARTCAM, "" }, { N_("/_Edit"), NULL, 0, 0, "" }, {N_("/Edit/Select _All Ctrl+A"), NULL,menuitem_SelectAll,0,""}, { N_("/Edit/sep1"), NULL,NULL, 0, ""}, {N_("/Edit/_Options"), NULL,menuitem_Options,0,"",GTK_STOCK_PREFERENCES}, { N_("/_Playlist"), NULL, 0, 0, "" }, { N_("/Playlist/_Load..."), "L",menuitem_LoadPlaylist, 1, "", GTK_STOCK_OPEN }, { N_("/Playlist/_Add..."), NULL,menuitem_LoadPlaylist, 0, "", GTK_STOCK_ADD }, { N_("/Playlist/sep1"), NULL,NULL, 0, ""}, { N_("/Playlist/Sa_ve as..."), "S",menuitem_SavePlaylist, 0, "", GTK_STOCK_SAVE_AS }, { N_("/Playlist/Save as Default"), NULL,menuitem_SavePlaylist, 3, "", GTK_STOCK_SAVE_AS }, { N_("/Help"), NULL, 0, 0, "" }, { N_("/Help/About"), NULL,menuitem_About, 0, "",GTK_STOCK_ABOUT }, }; /* static GtkItemFactoryEntry popup_items[] = { {"/Add Directory", 0,popup_AddDirectory,0,""}, {"/Add File", 0,popup_AddFile,0,""}, }; */ GtkWidget* StockIcon(const gchar* id) { GdkPixbuf* icon; GtkWidget* image; icon = gtk_widget_render_icon(GTK_WIDGET(MainWindow),id, GTK_ICON_SIZE_LARGE_TOOLBAR, "yeah"); image = gtk_image_new_from_pixbuf(icon); g_object_unref(icon); return image; } void create_toolbar() { GtkWidget* toolbar; GtkWidget* w; GtkWidget* w2; GtkWidget* w3; GdkPixbuf* icon; GtkWidget* image; toolbar = MW_GET("left_toolbar"); gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Send"), _("Send selected files to Mpman F60"), NULL, StockIcon(GTK_STOCK_GO_FORWARD), G_CALLBACK (toolbar_SendFiles), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ w2 = gtk_menu_new(); w3 = gtk_menu_item_new_with_label(_("Add Directory")); g_signal_connect(w3,"button-release-event",G_CALLBACK(popup_AddDirectory),w2); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); w3 = gtk_menu_item_new_with_label(_("Add File")); g_signal_connect(w3,"button-release-event",G_CALLBACK(popup_AddFile),w2); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); w = gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Add"), _("Add files to list"), NULL, StockIcon(GTK_STOCK_ADD), NULL, NULL, /* user data for callback */ -1); /* -1 means "append" */ g_signal_connect(w,"button-press-event",G_CALLBACK(toolbar_AddFiles),w2); gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Remove"), _("Remove selected files from list"), NULL, StockIcon(GTK_STOCK_REMOVE), G_CALLBACK (toolbar_RemoveFiles), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Properties"), _("Show file properties"), NULL, StockIcon(GTK_STOCK_PROPERTIES), G_CALLBACK (toolbar_FileProperties), MainWindow, -1); icon = gdk_pixbuf_new_from_xpm_data((const char**)&random_xpm); image = gtk_image_new_from_pixbuf(icon); g_object_unref(icon); gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Random"), _("Create random list to fill available memory"), NULL, image, G_CALLBACK (toolbar_RandomList), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ toolbar = MW_GET("right_toolbar"); gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Send"), _("Send selected files to PC"), NULL, StockIcon(GTK_STOCK_GO_BACK), G_CALLBACK (toolbar_GetFiles), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Refresh List"), _("Connect/Refresh index"), NULL, StockIcon(GTK_STOCK_REFRESH ), G_CALLBACK (toolbar_Refresh), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Reorder") , _("Update MP3 player with reordered list"), NULL, StockIcon(GTK_STOCK_CONVERT), G_CALLBACK (toolbar_Reorder), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ gtk_toolbar_insert_item (GTK_TOOLBAR (toolbar), _("Delete"), _("Delete selected files"), NULL, StockIcon(GTK_STOCK_DELETE), G_CALLBACK (toolbar_MpDelete), MainWindow, /* user data for callback */ -1); /* -1 means "append" */ } void left_treeview_DragSelectedFiles(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, GString* i) { PlayListEntry* p; gchar* fname; gtk_tree_model_get(model,iter,0,&p,-1); fname = g_filename_to_uri(p->name->str,NULL,NULL); g_string_append_printf(i,"%s\r\n",fname); } void left_treeview_DragDataGet(GtkWidget *widget, GdkDragContext *drag_context, GtkSelectionData *data, guint info, guint time, gpointer user_data) { GtkWidget* tv; GtkTreeModel* model; GtkTreeSelection* selection; GString* buffer; buffer = g_string_sized_new(80); tv = MW_GET("left_treeview"); model = gtk_tree_view_get_model(GTK_TREE_VIEW(tv)); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc)left_treeview_DragSelectedFiles , buffer); g_string_append_c(buffer,'\0'); gtk_selection_data_set(data,data->type,8,buffer->str,buffer->len); g_string_free(buffer,TRUE); } const GtkTargetEntry targets[] = {{"STRING",0,5},{"text/plain",0,5}}; GtkWidget* create_pc_frame(gchar* name) { GtkWidget* frame; GtkWidget* scroller; GtkWidget* treeview; GtkWidget* vbox; GtkWidget *toolbar; GtkWidget* statusbar; gchar c[64]; frame = gtk_frame_new("Directory"); sprintf(c,"%s%s",name,"frame"); MW_SET(c,frame); vbox = gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(frame),vbox); toolbar = gtk_toolbar_new (); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_ICONS); //gtk_container_set_border_width(GTK_CONTAINER(vbox),5); sprintf(c,"%s%s",name,"toolbar"); MW_SET(c,toolbar); gtk_box_pack_start(GTK_BOX(vbox),toolbar,FALSE,FALSE,0); scroller = gtk_scrolled_window_new(NULL,NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scroller),GTK_SHADOW_IN); gtk_container_set_border_width(GTK_CONTAINER(scroller),0); gtk_box_pack_start(GTK_BOX(vbox),scroller,TRUE,TRUE,0); treeview = gtk_tree_view_new(); sprintf(c,"%s%s",name,"treeview"); MW_SET(c,treeview); gtk_container_add(GTK_CONTAINER(scroller),treeview); gtk_drag_source_set(treeview,GDK_BUTTON1_MASK,targets,2,GDK_ACTION_COPY); g_signal_connect(treeview,"drag-data-get",G_CALLBACK(left_treeview_DragDataGet),NULL); statusbar = gtk_statusbar_new(); sprintf(c,"%s%s",name,"statusbar"); MW_SET(c,statusbar); if (strcmp("left_",name) == 0) gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar),FALSE); gtk_box_pack_start(GTK_BOX(vbox),statusbar,FALSE,FALSE,0); return frame; } //this is really crap , but i cannot be fscked void right_list_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *data, guint info, guint time, gpointer user_data) { guchar* fname; guchar* c; GList* entries; PlayListEntry* p; int ret; static gchar msg[101]; if ((data->length < 4) || (data->format != 8)) { gtk_drag_finish(drag_context,FALSE,FALSE,time); return; } right_list_Select((gint) user_data); if (mpl_CheckForDevice() == FALSE) { MplinuxError(); gtk_drag_finish(drag_context,FALSE,FALSE,time); return; } pl_MegaHack(1); c = data->data; // CRLF rears its ugly head again, much like this code while (c = strchr(c,'\n')) { *c = '\0'; *(c - 1) = '\0'; c++; } c = data->data; do { fname = g_filename_from_uri(c,NULL,NULL); if (g_file_test(fname,G_FILE_TEST_IS_DIR)) { entries = CreateWaitDialog((GThreadFunc)pl_AddDirectory,fname, pl_AddDirectoryCancel,NULL,_("Reading Directory")); if (entries) g_list_free(entries); } else { if ( pl_GetMp3Info(fname) ) pl_AddFile(fname); } c = c + strlen(c) + 2; } while (c < (data->data + data->length)); gtk_drag_finish(drag_context,TRUE,FALSE,time); for(entries = pl_GetPlayList();entries;entries = g_list_next(entries)) { p = (PlayListEntry*) entries->data; snprintf(msg,100,_("sending %s"),p->ID3name_utf8->str); MW_SET("i_need_an_arg",p->ID3name->str); ret = (gint) CreateWaitDialog((GThreadFunc)one_arg_func,p->name->str,mpl_cancel_operation, mpl_GetReadWriteProgress,msg); if (ret == MPL_ERROR) { MplinuxError(); break; } right_treeview_Refresh(NULL,NULL); } right_treeview_Refresh(NULL,NULL); pl_MegaHack(0); } GtkWidget* create_mp_frame(gchar* name) { GtkWidget* frame; GtkWidget* button; GtkWidget* scroller; GtkWidget* treeview; GtkWidget* vbox; GtkWidget* vbox2; GtkWidget *toolbar; GtkWidget* statusbar; GtkWidget* vpaned; GtkWidget* label; GtkTargetList* target_list; gchar c[64]; tooltips = gtk_tooltips_new(); frame = gtk_frame_new("Directory"); sprintf(c,"%s%s",name,"frame"); MW_SET(c,frame); vbox = gtk_vbox_new(FALSE,0); gtk_container_add(GTK_CONTAINER(frame),vbox); toolbar = gtk_toolbar_new (); gtk_toolbar_set_style(GTK_TOOLBAR(toolbar),GTK_TOOLBAR_ICONS); sprintf(c,"%s%s",name,"toolbar"); MW_SET(c,toolbar); gtk_box_pack_start(GTK_BOX(vbox),toolbar,FALSE,FALSE,0); vpaned = gtk_vpaned_new(); MW_SET("splitter2",vpaned); gtk_box_pack_start(GTK_BOX(vbox),vpaned,TRUE,TRUE,0); vbox2 = gtk_vbox_new(FALSE,0); gtk_paned_pack1(GTK_PANED(vpaned),vbox2,TRUE,TRUE); scroller = gtk_scrolled_window_new(NULL,NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scroller),GTK_SHADOW_IN); gtk_container_set_border_width(GTK_CONTAINER(vbox2),0); button = gtk_button_new(); label = gtk_label_new(_("Flash Memory")); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_set_size_request(button,1,20); gtk_tooltips_set_tip(tooltips,button,_("Select internal flash memory"),""); gtk_button_set_relief(GTK_BUTTON(button),GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX(vbox2),button,FALSE,TRUE,0); gtk_box_pack_start(GTK_BOX(vbox2),scroller,TRUE,TRUE,0); MW_SET("flash_memory_button",button); MW_SET("flash_memory_scroller",scroller); MW_SET("flash_memory_label",label); g_signal_connect(button,"clicked",G_CALLBACK(right_list_button_Clicked),(gpointer)FLASH); treeview = gtk_tree_view_new(); sprintf(c,"%s%s",name,"flash_treeview"); MW_SET(c,treeview); gtk_container_add(GTK_CONTAINER(scroller),treeview); //gtk_drag_dest_set(scroller,GTK_DEST_DEFAULT_ALL,&drag_types[0],1,GDK_ACTION_COPY ); gtk_drag_dest_set(scroller,GTK_DEST_DEFAULT_ALL,targets,2,GDK_ACTION_COPY); target_list = gtk_target_list_new(targets,2); gtk_drag_dest_set_target_list(scroller,target_list); g_signal_connect(scroller,"drag-data-received",G_CALLBACK(right_list_drag_data_received),(gpointer)FLASH); vbox2 = gtk_vbox_new(FALSE,0); gtk_paned_pack2(GTK_PANED(vpaned),vbox2,TRUE,TRUE); scroller = gtk_scrolled_window_new(NULL,NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroller), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scroller),GTK_SHADOW_IN); gtk_container_set_border_width(GTK_CONTAINER(vbox2),0); button = gtk_button_new(); label = gtk_label_new(_("SmartMedia")); gtk_container_add(GTK_CONTAINER(button),label); gtk_widget_set_size_request(button,1,20); gtk_tooltips_set_tip(tooltips,button,_("Select SmartMedia card memory"),""); gtk_button_set_relief(GTK_BUTTON(button),GTK_RELIEF_NONE); gtk_box_pack_start(GTK_BOX(vbox2),button,FALSE,TRUE,0); gtk_box_pack_start(GTK_BOX(vbox2),scroller,TRUE,TRUE,0); MW_SET("smart_memory_button",button); MW_SET("smart_memory_scroller",scroller); MW_SET("smart_memory_label",label); g_signal_connect(button,"clicked",G_CALLBACK(right_list_button_Clicked),(gpointer)SMART); treeview = gtk_tree_view_new(); sprintf(c,"%s%s",name,"smartmedia_treeview"); MW_SET(c,treeview); gtk_container_add(GTK_CONTAINER(scroller),treeview); gtk_drag_dest_set(scroller,GTK_DEST_DEFAULT_ALL,targets,2,GDK_ACTION_COPY); gtk_drag_dest_set_target_list(scroller,target_list); g_signal_connect(scroller,"drag-data-received",G_CALLBACK(right_list_drag_data_received),(gpointer)SMART); //gtk_drag_dest_set(scroller,GTK_DEST_DEFAULT_ALL,&drag_types[1],1,GDK_ACTION_COPY ); statusbar = gtk_statusbar_new(); sprintf(c,"%s%s",name,"statusbar"); MW_SET(c,statusbar); if (strcmp("left_",name) == 0) gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar),FALSE); gtk_box_pack_start(GTK_BOX(vbox),statusbar,FALSE,FALSE,0); right_list_Select(FLASH); return frame; } void create_play_list_view() { GtkWidget* tv; GtkCellRenderer* renderer; GtkTreeViewColumn *column; GtkListStore* list_store; GtkTreeSelection* selection; GtkWidget* w2; GtkWidget* w3; tv = MW_GET("left_treeview"); list_store = gtk_list_store_new(1,G_TYPE_POINTER); gtk_tree_view_set_model(GTK_TREE_VIEW(tv),GTK_TREE_MODEL(list_store)); gtk_tree_view_set_reorderable (GTK_TREE_VIEW(tv),TRUE); column = gtk_tree_view_column_new(); MW_SET("left_treeview_column",column); gtk_tree_view_column_set_title(column,_("Name")); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start (column,renderer,TRUE); gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable(column,TRUE); gtk_tree_view_column_set_fixed_width(column,250); gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), 0,left_treeview_Sort,(gpointer)10,NULL); gtk_tree_view_column_set_sort_column_id(column,0); gtk_tree_view_column_set_cell_data_func (column, renderer, left_treeview_cell_RenderName, NULL, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tv),column); column = gtk_tree_view_column_new(); gtk_tree_view_column_set_title(column,_("size")); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer,"xalign",1.0,NULL); gtk_tree_view_column_pack_start (column,renderer,TRUE); gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable(column,FALSE); gtk_tree_view_column_set_fixed_width(column,20); gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(list_store), 1,left_treeview_Sort,(gpointer)20,NULL); gtk_tree_view_column_set_sort_column_id(column,1); gtk_tree_view_column_set_cell_data_func (column, renderer, left_treeview_cell_RenderSize, NULL, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (tv),column); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_set_mode(selection,GTK_SELECTION_MULTIPLE); g_signal_connect_swapped(selection,"changed",G_CALLBACK(left_treeview_UpdateStatusbar),tv); w2 = gtk_menu_new(); w3 = gtk_menu_item_new_with_label(_("Play Files")); g_signal_connect(w3,"activate",G_CALLBACK(popup_Context),(gpointer)1); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); w3 = gtk_menu_item_new_with_label(_("Stop playing")); g_signal_connect(w3,"activate",G_CALLBACK(popup_Context),(gpointer)2); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); w3 = gtk_menu_item_new_with_label(_("Send Files to Mpman")); g_signal_connect(w3,"activate",G_CALLBACK(toolbar_SendFiles),0); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); w3 = gtk_menu_item_new_with_label(_("Remove Files")); g_signal_connect(w3,"activate",G_CALLBACK(toolbar_RemoveFiles),0); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); w3 = gtk_menu_item_new_with_label(_("File Properties")); g_signal_connect(w3,"activate",G_CALLBACK(toolbar_FileProperties),0); gtk_menu_append(GTK_MENU(w2),w3); gtk_widget_show(w3); g_signal_connect(tv,"button-press-event",G_CALLBACK(left_treeview_ButtonEvent),w2); } void create_mp_list_view() { GtkWidget* tv; GtkCellRenderer* renderer; GtkTreeViewColumn *column; GtkListStore* list_store; GtkTreeSelection* selection; tv = MW_GET("right_flash_treeview"); list_store = gtk_list_store_new(MP_LIST_N_COLUMNS,G_TYPE_STRING, G_TYPE_STRING,G_TYPE_UCHAR); gtk_tree_view_set_model(GTK_TREE_VIEW(tv),GTK_TREE_MODEL(list_store)); gtk_tree_view_set_reorderable (GTK_TREE_VIEW(tv),TRUE); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", MP_LIST_NAME, NULL); MW_SET("right_flash_treeview_column",column); gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable(column,TRUE); gtk_tree_view_column_set_fixed_width(column,250); gtk_tree_view_append_column (GTK_TREE_VIEW (tv),column); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer,"xalign",1.0,NULL); column = gtk_tree_view_column_new_with_attributes (_("size"), renderer, "text", MP_LIST_SIZE, NULL); gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable(column,TRUE); gtk_tree_view_append_column (GTK_TREE_VIEW (tv),column); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_set_mode(selection,GTK_SELECTION_MULTIPLE); } void create_smartmedia_list_view() { GtkWidget* tv; GtkCellRenderer* renderer; GtkTreeViewColumn *column; GtkListStore* list_store; GtkTreeSelection* selection; tv = MW_GET("right_smartmedia_treeview"); list_store = gtk_list_store_new(MP_LIST_N_COLUMNS,G_TYPE_STRING, G_TYPE_STRING,G_TYPE_UCHAR); gtk_tree_view_set_model(GTK_TREE_VIEW(tv),GTK_TREE_MODEL(list_store)); gtk_tree_view_set_reorderable (GTK_TREE_VIEW(tv),TRUE); renderer = gtk_cell_renderer_text_new(); column = gtk_tree_view_column_new_with_attributes (_("Name"), renderer, "text", MP_LIST_NAME, NULL); MW_SET("right_smartmedia_treeview_column",column); gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable(column,TRUE); gtk_tree_view_column_set_fixed_width(column,250); gtk_tree_view_append_column (GTK_TREE_VIEW (tv),column); renderer = gtk_cell_renderer_text_new(); g_object_set(renderer,"xalign",1.0,NULL); column = gtk_tree_view_column_new_with_attributes (_("size"), renderer, "text", MP_LIST_SIZE, NULL); gtk_tree_view_column_set_sizing(column,GTK_TREE_VIEW_COLUMN_FIXED); gtk_tree_view_column_set_resizable(column,TRUE); gtk_tree_view_append_column (GTK_TREE_VIEW (tv),column); selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv)); gtk_tree_selection_set_mode(selection,GTK_SELECTION_MULTIPLE); } void create_main_window(GtkWindow** return_window) { GtkWidget* window; GtkWidget* vbox; GtkWidget* hpaned; GtkWidget* gen; GtkItemFactory *item_factory; GtkAccelGroup *accel_group; GList* icons =NULL; GdkPixbuf* p; // GtkItemFactoryEntry* t_menu_items; int i; window = gtk_widget_new(GTK_TYPE_WINDOW, "type",GTK_WINDOW_TOPLEVEL, "title","Mplinuxman", "allow_grow",TRUE, "allow_shrink",FALSE, "default-width",650, "default-height",450, NULL); if (strstr(MP_VERSION,"beta") != NULL) { char buffer[30]; snprintf(buffer,29,"Mplinuxman %s",MP_VERSION); gtk_window_set_title(GTK_WINDOW(window),buffer); } *return_window = GTK_WINDOW(window); g_signal_connect(window,"destroy",G_CALLBACK(mw_Destroy),NULL); vbox = gtk_vbox_new(FALSE,5); gtk_container_add(GTK_CONTAINER(window),vbox); accel_group = gtk_accel_group_new (); gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); g_object_unref (accel_group); item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", accel_group); // t_menu_items = g_malloc(sizeof(GtkItemFactoryEntry)*G_N_ELEMENTS(menu_items)); for(i=0;i"), FALSE,FALSE,0); hpaned = gtk_hpaned_new(); MW_SET("splitter",hpaned); gtk_box_pack_start(GTK_BOX(vbox),hpaned,TRUE,TRUE,0); gtk_container_set_border_width(GTK_CONTAINER(hpaned),0); gtk_paned_pack1(GTK_PANED(hpaned),create_pc_frame("left_"),TRUE,TRUE); gtk_paned_pack2(GTK_PANED(hpaned),create_mp_frame("right_"),TRUE,TRUE); gen = MW_GET("left_frame"); gtk_frame_set_label(GTK_FRAME(gen),"PC"); //gtk_frame_set_shadow_type(GTK_FRAME(gen),GTK_SHADOW_NONE); gen = MW_GET("right_frame"); gtk_frame_set_label(GTK_FRAME(gen),"MpMan"); //gtk_frame_set_shadow_type(GTK_FRAME(gen),GTK_SHADOW_NONE); g_signal_connect(MainWindow,"configure_event",G_CALLBACK(main_window_FrameEvent), NULL); g_signal_connect(MainWindow,"window-state-event",G_CALLBACK(main_window_WindowStateEvent), NULL); create_toolbar(); create_play_list_view(); create_mp_list_view(); create_smartmedia_list_view(); p = gdk_pixbuf_new_from_xpm_data((const char**)&logo); MW_SET("mp_icon",p); icons = g_list_append(icons,p); gtk_window_set_default_icon_list (icons); //store the current locale #ifdef NLS MW_SET("current_locle",setlocale(LC_ALL,NULL)); #endif }