Skip to content

Commit 94fe080

Browse files
author
Paul Harrison
committed
MythMusic: remove 'Directory to hold music' setting from the settings pages
1 parent 4211abf commit 94fe080

File tree

5 files changed

+2
-47
lines changed

5 files changed

+2
-47
lines changed

mythplugins/mythmusic/mythmusic/generalsettings.cpp

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
GeneralSettings::GeneralSettings(MythScreenStack *parent, const char *name)
1111
: MythScreenType(parent, name),
12-
m_musicLocation(NULL), m_musicAudioDevice(NULL),
12+
m_musicAudioDevice(NULL),
1313
m_musicDefaultUpmix(NULL), m_musicCDDevice(NULL),
1414
m_nonID3FileNameFormat(NULL), m_ignoreID3Tags(NULL),
1515
m_allowTagWriting(NULL), m_saveButton(NULL),
@@ -30,7 +30,6 @@ bool GeneralSettings::Create()
3030
if (!LoadWindowFromXML("musicsettings-ui.xml", "generalsettings", this))
3131
return false;
3232

33-
UIUtilE::Assign(this, m_musicLocation, "musiclocation", &err);
3433
UIUtilE::Assign(this, m_musicAudioDevice, "musicaudiodevice", &err);
3534
UIUtilE::Assign(this, m_musicDefaultUpmix, "musicdefaultupmix", &err);
3635
UIUtilE::Assign(this, m_musicCDDevice, "musiccddevice", &err);
@@ -46,7 +45,6 @@ bool GeneralSettings::Create()
4645
return false;
4746
}
4847

49-
m_musicLocation->SetText(gCoreContext->GetSetting("MusicLocation"));
5048
m_musicAudioDevice->SetText(gCoreContext->GetSetting("MusicAudioDevice"));
5149

5250
int loadMusicDefaultUpmix = gCoreContext->GetNumSetting("MusicDefaultUpmix", 0);
@@ -68,9 +66,6 @@ bool GeneralSettings::Create()
6866
connect(m_saveButton, SIGNAL(Clicked()), this, SLOT(slotSave()));
6967
connect(m_cancelButton, SIGNAL(Clicked()), this, SLOT(Close()));
7068

71-
m_musicLocation->SetHelpText(tr("This directory must exist, and the user "
72-
"running MythMusic needs to have write permission "
73-
"to the directory."));
7469
m_musicAudioDevice->SetHelpText(tr("Audio Device used for playback. 'default' "
7570
"will use the device specified in MythTV"));
7671
m_musicDefaultUpmix->SetHelpText(tr("MythTV can upconvert stereo tracks to 5.1 audio. "
@@ -97,25 +92,13 @@ bool GeneralSettings::Create()
9792

9893
BuildFocusList();
9994

100-
SetFocusWidget(m_musicLocation);
95+
SetFocusWidget(m_musicCDDevice);
10196

10297
return true;
10398
}
10499

105100
void GeneralSettings::slotSave(void)
106101
{
107-
// get the starting directory from the settings and remove all multiple
108-
// directory separators "/" and resolves any "." or ".." in the path.
109-
QString dir = m_musicLocation->GetText();
110-
111-
if (!dir.isEmpty())
112-
{
113-
dir = QDir::cleanPath(dir);
114-
if (!dir.endsWith("/"))
115-
dir += "/";
116-
}
117-
118-
gCoreContext->SaveSetting("MusicLocation", dir);
119102
gCoreContext->SaveSetting("CDDevice", m_musicCDDevice->GetText());
120103
gCoreContext->SaveSetting("MusicAudioDevice", m_musicAudioDevice->GetText());
121104
gCoreContext->SaveSetting("NonID3FileNameFormat", m_nonID3FileNameFormat->GetText());

mythplugins/mythmusic/mythmusic/generalsettings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ class GeneralSettings : public MythScreenType
2020
bool Create(void);
2121

2222
private:
23-
MythUITextEdit *m_musicLocation;
2423
MythUITextEdit *m_musicAudioDevice;
2524
MythUICheckBox *m_musicDefaultUpmix;
2625
MythUITextEdit *m_musicCDDevice;

mythplugins/mythmusic/theme/default-wide/musicsettings-ui.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111
<value>General Settings</value>
1212
</textarea>
1313

14-
<textarea name="musiclocation_label" from="basetextarea">
15-
<area>140,100,500,50</area>
16-
<align>right,vcenter</align>
17-
<value>Directory to hold music:</value>
18-
</textarea>
19-
<textedit name="musiclocation" from="basetextedit">
20-
<area>650,100,550,50</area>
21-
</textedit>
22-
2314
<textarea name="musiccddevice_label" from="basetextarea">
2415
<area>140,160,500,50</area>
2516
<align>right,vcenter</align>

mythplugins/mythmusic/theme/default/musicsettings-ui.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,6 @@
1111
<value>General Settings</value>
1212
</textarea>
1313

14-
<textarea name="musiclocation_label" from="basetextarea">
15-
<area>20,40,380,50</area>
16-
<align>right,vcenter</align>
17-
<value>Directory to hold music:</value>
18-
</textarea>
19-
<textedit name="musiclocation" from="basetextedit">
20-
<position>410,40</position>
21-
</textedit>
22-
2314
<textarea name="musiccddevice_label" from="basetextarea">
2415
<area>20,100,380,50</area>
2516
<align>right,vcenter</align>

mythtv/themes/Terra/musicsettings-ui.xml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
<value>General Settings</value>
1111
</textarea>
1212

13-
<textarea name="musiclocation_label" from="basetextarea">
14-
<area>140,100,500,50</area>
15-
<align>right,vcenter</align>
16-
<value>Directory to hold music:</value>
17-
</textarea>
18-
<textedit name="musiclocation" from="basetextedit">
19-
<area>650,100,550,50</area>
20-
</textedit>
21-
2213
<textarea name="musiccddevice_label" from="basetextarea">
2314
<area>140,160,500,50</area>
2415
<align>right,vcenter</align>

0 commit comments

Comments
 (0)