Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 270363
Collapse All | Expand All

(-)src/Config.cpp.orig (-2 / +2 lines)
Lines 9-15 Link Here
9
	wxString strDir;
9
	wxString strDir;
10
	for (int nDir = 0; nDir < c_nMaxDirs; nDir++)
10
	for (int nDir = 0; nDir < c_nMaxDirs; nDir++)
11
	{
11
	{
12
		strDir.Printf("dir%d", nDir);
12
		strDir.Printf(wxT("dir%d"), nDir);
13
		cfg->Read(strDir, &m_strDir[nDir]);
13
		cfg->Read(strDir, &m_strDir[nDir]);
14
	}
14
	}
15
}
15
}
Lines 20-26 Link Here
20
	wxString strDir;
20
	wxString strDir;
21
	for (int nDir = 0; nDir < c_nMaxDirs; nDir++)
21
	for (int nDir = 0; nDir < c_nMaxDirs; nDir++)
22
	{
22
	{
23
		strDir.Printf("dir%d", nDir);
23
		strDir.Printf(wxT("dir%d"), nDir);
24
		cfg->Write(strDir, m_strDir[nDir]);
24
		cfg->Write(strDir, m_strDir[nDir]);
25
	}
25
	}
26
}
26
}
(-)src/EzGrid.cpp.orig (-3 / +3 lines)
Lines 14-20 Link Here
14
	// Adjust the default row height to be more compact
14
	// Adjust the default row height to be more compact
15
	wxFont font = GetLabelFont();
15
	wxFont font = GetLabelFont();
16
	int w=40, h=18; 
16
	int w=40, h=18; 
17
	GetTextExtent("a", &w, &h, NULL, NULL, &font);
17
	GetTextExtent(wxT("a"), &w, &h, NULL, NULL, &font);
18
	SetColLabelSize(h+6);
18
	SetColLabelSize(h+6);
19
#ifdef __WXGTK__
19
#ifdef __WXGTK__
20
	SetDefaultRowSize(h+8, TRUE);	
20
	SetDefaultRowSize(h+8, TRUE);	
Lines 30-36 Link Here
30
	wxString strCol;
30
	wxString strCol;
31
	for (int nCol = 0; nCol < GetNumberCols(); nCol++)
31
	for (int nCol = 0; nCol < GetNumberCols(); nCol++)
32
	{
32
	{
33
		strCol.Printf("column%d", nCol);
33
		strCol.Printf(wxT("column%d"), nCol);
34
		cfg->Write(strCol, (long)GetColSize(nCol));
34
		cfg->Write(strCol, (long)GetColSize(nCol));
35
	}
35
	}
36
}
36
}
Lines 61-67 Link Here
61
	long nColWidth;
61
	long nColWidth;
62
	for (int nCol = 0; nCol < GetNumberCols(); nCol++)
62
	for (int nCol = 0; nCol < GetNumberCols(); nCol++)
63
	{
63
	{
64
		strCol.Printf("column%d", nCol);
64
		strCol.Printf(wxT("column%d"), nCol);
65
		if (cfg->Read(strCol, &nColWidth))
65
		if (cfg->Read(strCol, &nColWidth))
66
			SetColSize(nCol, nColWidth);
66
			SetColSize(nCol, nColWidth);
67
	}
67
	}
(-)src/EzGrid.h.orig (-1 / +1 lines)
Lines 7-13 Link Here
7
class EzGrid : public wxGrid
7
class EzGrid : public wxGrid
8
{
8
{
9
public:
9
public:
10
	EzGrid::EzGrid(wxWindow *parent,
10
	EzGrid(wxWindow *parent,
11
		wxWindowID id,	const wxPoint& pos = wxDefaultPosition,
11
		wxWindowID id,	const wxPoint& pos = wxDefaultPosition,
12
		const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS,
12
		const wxSize& size = wxDefaultSize, long style = wxWANTS_CHARS,
13
		const wxString& name = wxPanelNameStr);
13
		const wxString& name = wxPanelNameStr);
(-)src/EzTag.h.orig (-1 / +5 lines)
Lines 1-6 Link Here
1
#ifndef _EZTAG_H_INCLUDED_
1
#ifndef _EZTAG_H_INCLUDED_
2
#define _EZTAG_H_INCLUDED_
2
#define _EZTAG_H_INCLUDED_
3
3
4
#include <wx/string.h>
5
#include <wx/strconv.h>
4
#include <id3/tag.h>
6
#include <id3/tag.h>
5
7
6
const int nMaxFrameTypes = 4;
8
const int nMaxFrameTypes = 4;
Lines 8-25 Link Here
8
10
9
// provides easier to use functions for ID3_Tag
11
// provides easier to use functions for ID3_Tag
10
class EzTag : public ID3_Tag
12
class EzTag : public ID3_Tag
13
11
{
14
{
12
public:
15
public:
13
	EzTag();
16
	EzTag();
14
	~EzTag();
17
	~EzTag();
15
	wxString GetField(ID3_FrameID fid);
18
	wxString GetField(ID3_FrameID fid);
16
	void UpdateTag(int nFrameIDIndex, const wxChar *text);
19
	void UpdateTag(int nFrameIDIndex, const wxString& text);
17
	void SetFileToLink(const wxString& strFileToLink)
20
	void SetFileToLink(const wxString& strFileToLink)
18
	{
21
	{
19
		m_strFileToLink = strFileToLink;
22
		m_strFileToLink = strFileToLink;
20
	}
23
	}
21
private:
24
private:
22
	wxString m_strFileToLink;
25
	wxString m_strFileToLink;
26
	const char *strFileToLink;
23
};
27
};
24
28
25
29
(-)src/EzTag.cpp.orig (-6 / +8 lines)
Lines 12-27 Link Here
12
{
12
{
13
}
13
}
14
14
15
void EzTag::UpdateTag(int nFrameIDIndex, const wxChar *text)
15
void EzTag::UpdateTag(int nFrameIDIndex, const wxString& text)
16
{
16
{
17
	wxASSERT(nFrameIDIndex > 0 && nFrameIDIndex < nMaxFrameTypes);
17
	wxASSERT(nFrameIDIndex > 0 && nFrameIDIndex < nMaxFrameTypes);
18
	if (!m_strFileToLink.IsEmpty())
18
	if (!m_strFileToLink.IsEmpty())
19
	{
19
	{
20
		Link(m_strFileToLink);
20
		Link(strFileToLink, ID3TT_ALL);
21
		m_strFileToLink.IsEmpty();
21
		m_strFileToLink.IsEmpty();
22
	}
22
	}
23
	ID3_Frame* frame = NULL;
23
	ID3_Frame* frame = NULL;
24
	if (NULL != text)
24
	if (! wxIsEmpty(text))
25
	{
25
	{
26
		// first remove old tag
26
		// first remove old tag
27
		frame = Find(c_frameID[nFrameIDIndex]);
27
		frame = Find(c_frameID[nFrameIDIndex]);
Lines 30-39 Link Here
30
			frame = RemoveFrame(frame);
30
			frame = RemoveFrame(frame);
31
			delete frame;
31
			delete frame;
32
		}
32
		}
33
		if (strlen(text) > 0)
33
		if (!wxIsEmpty(text))
34
		{
34
		{
35
			ID3_Field* field = NULL;
35
			frame = new ID3_Frame(c_frameID[nFrameIDIndex]);
36
			frame = new ID3_Frame(c_frameID[nFrameIDIndex]);
36
			frame->GetField(ID3FN_TEXT)->Set(text);
37
			field = frame->GetField(ID3FN_TEXT);
38
			field->Set((const char*) wxConvCurrent->cWX2MB(text));
37
			AttachFrame(frame);
39
			AttachFrame(frame);
38
		}
40
		}
39
	}
41
	}
Lines 61-67 Link Here
61
		return str;
63
		return str;
62
	} // no field found
64
	} // no field found
63
	field->SetEncoding(ID3TE_ISO8859_1); // use Latin-1 charset
65
	field->SetEncoding(ID3TE_ISO8859_1); // use Latin-1 charset
64
	str = field->GetRawText(); // TODO: GetRawUnicodeText
66
	str = field->GetRawUnicodeText(); // TODO: GetRawUnicodeText
65
	str.Trim(true);
67
	str.Trim(true);
66
	str.Trim(false);
68
	str.Trim(false);
67
	return str;
69
	return str;

Return to bug 270363