Index: /winamp-musepack/trunk/mpc_player.cpp
===================================================================
--- /winamp-musepack/trunk/mpc_player.cpp	(revision 253)
+++ /winamp-musepack/trunk/mpc_player.cpp	(revision 254)
@@ -29,7 +29,35 @@
 #include <mpc/minimax.h>
 
-#include <taglib/tag.h>
-#include <taglib/tfile.h>
-
+#include <tag.h>
+#include <tfile.h>
+
+const char* mpc_player::GenreList [NO_GENRES] = {
+    "", "Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk",
+    "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies",
+    "Other", "Pop", "R&B", "Rap", "Reggae", "Rock",
+    "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks",
+    "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk",
+    "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House",
+    "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass",
+    "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock",
+    "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk",
+    "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta",
+    "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret",
+    "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi",
+    "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical",
+    "Rock & Roll", "Hard Rock", "Folk", "Folk/Rock", "National Folk", "Swing",
+    "Fast-Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde",
+    "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band",
+    "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson",
+    "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus",
+    "Po""rn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba",
+    "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet",
+    "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall",
+    "Goa", "Drum & Bass", "Club House", "Ha""rd""co""re", "Terror",
+    "Indie", "BritPop", "NegerPunk", "Polsk Punk", "Beat",
+    "Christian Gangsta", "Heavy Metal", "Black Metal", "Crossover", "Contemporary C",
+    "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "JPop",
+    "SynthPop",
+};
 
 mpc_player::mpc_player(In_Module * in_mod)
@@ -58,4 +86,7 @@
 	wait_event = 0;
 	tag_file = 0;
+	
+	TagLib::FileRef fileRef;
+	fileRef.file()->useWinAnsiCP(true);
 }
 
@@ -189,8 +220,6 @@
 	if (length_in_ms) *length_in_ms = getLength();
 	if (title) {
-		if(tag_file == 0) {
+		if (tag_file == 0)
 			tag_file = new TagLib::FileRef(lastfn, false);
-			(tag_file->file())->useWinAnsiCP(true);
-		}
 
 		if (tag_file->isNull() || !tag_file->tag()) {
@@ -201,10 +230,4 @@
 			TagLib::Tag *tag = tag_file->tag();
 			sprintf(title, "%s - %s", tag->artist().toCString(), tag->title().toCString());
-			//tag->artist()
-			//tag->album()
-			//tag->year()
-			//tag->comment()
-			//tag->track()
-			//tag->genre()
 		}
 	}
@@ -281,18 +304,24 @@
 		TagLib::Tag *tag = tag_file->tag();
 
-		//tag->setTitle(wch);
-		//tag->setArtist(wch);
-		//tag->setAlbum(wch);
-
-		//TagLib::String year(wch);
-		//tag->setYear(year.toInt());
-
-		//TagLib::String track(wch);
-		//tag->setTrack(track.toInt());
-
-		//tag->setGenre(wch);
-		//tag->setComment(wch);
-
-		tag_file->save(); // FIXME : make all crash
+		WCHAR buf[2048];
+
+		GetDlgItemTextW(hDlg, IDC_TITLE, buf, 2048);
+		tag->setTitle(buf);
+		GetDlgItemTextW(hDlg, IDC_ARTIST, buf, 2048);
+		tag->setArtist(buf);
+		GetDlgItemTextW(hDlg, IDC_ALBUM, buf, 2048);
+		tag->setAlbum(buf);
+		GetDlgItemTextW(hDlg, IDC_YEAR, buf, 2048);
+		TagLib::String year(buf);
+		tag->setYear(year.toInt());
+		GetDlgItemTextW(hDlg, IDC_TRACK, buf, 2048);
+		TagLib::String track(buf);
+		tag->setTrack(track.toInt());
+		GetDlgItemTextW(hDlg, IDC_GENRE, buf, 2048);
+		tag->setGenre(buf);
+		GetDlgItemTextW(hDlg, IDC_COMMENT, buf, 2048);
+		tag->setComment(buf);
+
+		tag_file->save();
 	}
 }
@@ -324,8 +353,8 @@
 	SetDlgItemText(hDlg, IDC_STREAM_INFO, tmp.str().c_str());
 
-	if(tag_file == 0) {
+	SetDlgItemText(hDlg, IDC_FILE, lastfn);
+
+	if (tag_file == 0)
 		tag_file = new TagLib::FileRef(lastfn, false);
-		(tag_file->file())->useWinAnsiCP(true);
-	}
 
 	if (!tag_file->isNull() && tag_file->tag()) {
@@ -350,4 +379,8 @@
 		SetDlgItemTextW(hDlg, IDC_COMMENT, buf);
 	}
+
+	HWND hGenre = GetDlgItem ( hDlg, IDC_GENRE );
+	for ( int n = 0; n < NO_GENRES; n++ )
+        SendMessage ( hGenre, CB_ADDSTRING, 0, (LONG)(LPSTR)GenreList[n] );
 }
 
@@ -358,5 +391,5 @@
 	{
 	case WM_INITDIALOG:
-		SetWindowLong(hDlg, DWL_USER, lParam);
+		SetWindowLongPtr(hDlg, DWLP_USER, lParam);
 		((mpc_player *) lParam)->initDlg(hDlg);
 		return TRUE;
@@ -367,8 +400,7 @@
 			return TRUE;
 		} else if (LOWORD(wParam) == IDC_RELOAD) {
-			// FIXME : this will not work on X64
-			((mpc_player*)GetWindowLong(hDlg, DWL_USER))->initDlg(hDlg);
+			((mpc_player*)GetWindowLongPtr(hDlg, DWLP_USER))->initDlg(hDlg);
 		} else if (LOWORD(wParam) == IDC_SAVE) {
-			((mpc_player*)GetWindowLong(hDlg, DWL_USER))->writeTags(hDlg);
+			((mpc_player*)GetWindowLongPtr(hDlg, DWLP_USER))->writeTags(hDlg);
 			EndDialog(hDlg, LOWORD(wParam));
 			return TRUE;
@@ -382,8 +414,4 @@
 {
 	DialogBoxParam(mod->hDllInstance, (LPCTSTR)IDD_INFO_BOX, hwnd, (DLGPROC)About, (LPARAM) this);
-
-	//loadTags(% infoBox);
-
-	//infoBox.ShowDialog();
 	return 0;
 }
Index: /winamp-musepack/trunk/mpc_player.h
===================================================================
--- /winamp-musepack/trunk/mpc_player.h	(revision 253)
+++ /winamp-musepack/trunk/mpc_player.h	(revision 254)
@@ -21,9 +21,10 @@
 
 #include <mpc/mpcdec.h>
-#include <taglib/fileref.h>
+#include <fileref.h>
 
 // post this to the main window at end of file (after playback as stopped)
 #define WM_WA_EOF WM_USER+2
 
+#define NO_GENRES 149
 
 class mpc_player
@@ -51,4 +52,5 @@
 private:
 	char lastfn[MAX_PATH];	// currently playing file (used for getting info on the current file)
+	static const char* GenreList[NO_GENRES];
 	mpc_streaminfo si;
 	mpc_reader reader;
Index: /winamp-musepack/trunk/resource.h
===================================================================
--- /winamp-musepack/trunk/resource.h	(revision 253)
+++ /winamp-musepack/trunk/resource.h	(revision 254)
@@ -10,5 +10,4 @@
 #define IDC_GENRE                       1004
 #define IDC_ALBUM                       1005
-#define IDC_BUTTON1                     1006
 #define IDC_CANCEL                      1006
 #define IDC_YEAR                        1007
@@ -17,4 +16,6 @@
 #define IDC_TRACK                       1010
 #define IDC_COMMENT                     1011
+#define IDC_EDIT1                       1012
+#define IDC_FILE                        1012
 #define IDC_STATIC                      -1
 
@@ -25,5 +26,5 @@
 #define _APS_NEXT_RESOURCE_VALUE        102
 #define _APS_NEXT_COMMAND_VALUE         40001
-#define _APS_NEXT_CONTROL_VALUE         1007
+#define _APS_NEXT_CONTROL_VALUE         1013
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
Index: /winamp-musepack/trunk/winamp-musepack.rc
===================================================================
--- /winamp-musepack/trunk/winamp-musepack.rc	(revision 253)
+++ /winamp-musepack/trunk/winamp-musepack.rc	(revision 254)
@@ -57,31 +57,32 @@
 //
 
-IDD_INFO_BOX DIALOGEX 0, 0, 406, 186
+IDD_INFO_BOX DIALOGEX 0, 0, 406, 202
 STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
 CAPTION "Musepack file information"
 FONT 8, "MS Shell Dlg", 0, 0, 0x0
 BEGIN
-    GROUPBOX        "Stream",IDC_STATIC,264,0,138,180,BS_FLAT
-    LTEXT           "C'est juste un test.\nPour voir si tout va bien.",
-                    IDC_STREAM_INFO,270,11,126,163
-    GROUPBOX        "Tag",IDC_STATIC,6,0,252,180,BS_FLAT
-    EDITTEXT        IDC_TITLE,54,12,198,12,ES_AUTOHSCROLL
-    RTEXT           "Title",IDC_STATIC,12,14,36,8
-    EDITTEXT        IDC_ARTIST,54,30,198,12,ES_AUTOHSCROLL
-    RTEXT           "Artist",IDC_STATIC,12,32,36,8
-    EDITTEXT        IDC_ALBUM,54,48,198,12,ES_AUTOHSCROLL
-    RTEXT           "Album",IDC_STATIC,12,50,36,8
-    EDITTEXT        IDC_YEAR,54,66,42,12,ES_AUTOHSCROLL | ES_NUMBER
-    RTEXT           "Year",IDC_STATIC,12,68,36,8
-    EDITTEXT        IDC_TRACK,228,66,24,12,ES_AUTOHSCROLL | ES_NUMBER
-    RTEXT           "Track",IDC_STATIC,162,68,60,8
-    COMBOBOX        IDC_GENRE,54,84,198,18,CBS_DROPDOWN | CBS_SORT | 
+    GROUPBOX        "Stream",IDC_STATIC,264,18,138,180,BS_FLAT
+    LTEXT           "",IDC_STREAM_INFO,270,29,126,163
+    GROUPBOX        "Tag",IDC_STATIC,6,18,252,180,BS_FLAT
+    EDITTEXT        IDC_TITLE,54,30,198,12,ES_AUTOHSCROLL
+    RTEXT           "Title",IDC_STATIC,12,32,36,8
+    EDITTEXT        IDC_ARTIST,54,48,198,12,ES_AUTOHSCROLL
+    RTEXT           "Artist",IDC_STATIC,12,50,36,8
+    EDITTEXT        IDC_ALBUM,54,66,198,12,ES_AUTOHSCROLL
+    RTEXT           "Album",IDC_STATIC,12,68,36,8
+    EDITTEXT        IDC_YEAR,54,84,42,12,ES_AUTOHSCROLL | ES_NUMBER
+    RTEXT           "Year",IDC_STATIC,12,86,36,8
+    EDITTEXT        IDC_TRACK,228,84,24,12,ES_AUTOHSCROLL | ES_NUMBER
+    RTEXT           "Track",IDC_STATIC,162,86,60,8
+    COMBOBOX        IDC_GENRE,54,102,198,18,CBS_DROPDOWN | CBS_SORT | 
                     WS_VSCROLL | WS_TABSTOP
-    RTEXT           "Genre",IDC_STATIC,12,86,36,8
-    EDITTEXT        IDC_COMMENT,54,102,198,54,ES_MULTILINE | ES_AUTOHSCROLL
-    RTEXT           "Comment",IDC_STATIC,12,104,36,8
-    PUSHBUTTON      "Cancel",IDC_CANCEL,186,162,66,12
-    PUSHBUTTON      "Reload",IDC_RELOAD,99,162,66,12
-    PUSHBUTTON      "Save",IDC_SAVE,12,162,66,12
+    RTEXT           "Genre",IDC_STATIC,12,104,36,8
+    EDITTEXT        IDC_COMMENT,54,120,198,54,ES_MULTILINE | ES_AUTOHSCROLL
+    RTEXT           "Comment",IDC_STATIC,12,122,36,8
+    PUSHBUTTON      "Cancel",IDC_CANCEL,186,180,66,12
+    PUSHBUTTON      "Reload",IDC_RELOAD,99,180,66,12
+    PUSHBUTTON      "Save",IDC_SAVE,12,180,66,12
+    EDITTEXT        IDC_FILE,24,6,378,12,ES_AUTOHSCROLL | ES_READONLY
+    RTEXT           "File",IDC_STATIC,6,8,12,8
 END
 
@@ -100,5 +101,5 @@
         RIGHTMARGIN, 399
         TOPMARGIN, 7
-        BOTTOMMARGIN, 179
+        BOTTOMMARGIN, 195
     END
 END
Index: /winamp-musepack/trunk/winamp-musepack.vcproj
===================================================================
--- /winamp-musepack/trunk/winamp-musepack.vcproj	(revision 253)
+++ /winamp-musepack/trunk/winamp-musepack.vcproj	(revision 254)
@@ -21,5 +21,5 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
-				AdditionalIncludeDirectories="&quot;C:\Program Files\taglib\include&quot;;&quot;$(SolutionDir)\..\libmpc\include&quot;"
+				AdditionalIncludeDirectories="&quot;C:\Program Files\taglib\include\taglib&quot;;&quot;$(SolutionDir)\..\libmpc\include&quot;"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WINAMPMUSEPACK_EXPORTS"
 				MinimalRebuild="TRUE"
@@ -72,5 +72,5 @@
 			<Tool
 				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="&quot;C:\Program Files\taglib\include&quot;;&quot;$(SolutionDir)\..\libmpc\include&quot;"
+				AdditionalIncludeDirectories="&quot;C:\Program Files\taglib\include\taglib&quot;;&quot;$(SolutionDir)\..\libmpc\include&quot;"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WINAMPMUSEPACK_EXPORTS"
 				RuntimeLibrary="2"
