summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/menu.c b/menu.c
index 3a31fbb4..70795ddf 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c,v 1.73 2010-01-18 22:50:23 phintuka Exp $
+ * $Id: menu.c,v 1.74 2010-01-18 22:53:32 phintuka Exp $
*
*/
@@ -117,6 +117,11 @@ cMenuBrowseFiles::cMenuBrowseFiles(eMainMenuMode mode, bool OnlyQueue) :
cMenuBrowseFiles::~cMenuBrowseFiles()
{
+ cPlugin *p = cPluginManager::GetPlugin(PLUGIN_NAME_I18N);
+ if (p) {
+ p->SetupStore("Media.RootDir", xc.media_root_dir);
+ }
+
Setup.Save();
free(m_CurrentDir);
}
@@ -190,18 +195,18 @@ void cMenuBrowseFiles::Set(void)
void cMenuBrowseFiles::StoreConfig(void)
{
- cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("Media.BrowseMusicDir",
- xc.browse_music_dir);
- cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("Media.BrowseFilesDir",
- xc.browse_files_dir);
- cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("Media.BrowseImagesDir",
- xc.browse_images_dir);
+ cPlugin *p = cPluginManager::GetPlugin(PLUGIN_NAME_I18N);
+ if (p) {
+ p->SetupStore("Media.BrowseMusicDir", xc.browse_music_dir);
+ p->SetupStore("Media.BrowseFilesDir", xc.browse_files_dir);
+ p->SetupStore("Media.BrowseImagesDir", xc.browse_images_dir);
#if 1
- // delete old keys (<1.0.0)
- cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("BrowseMusicDir");
- cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("BrowseFilesDir");
- cPluginManager::GetPlugin(PLUGIN_NAME_I18N)->SetupStore("BrowseImagesDir");
+ // delete old keys (<1.0.0)
+ p->SetupStore("BrowseMusicDir");
+ p->SetupStore("BrowseFilesDir");
+ p->SetupStore("BrowseImagesDir");
#endif
+ }
}
void cMenuBrowseFiles::SetHelpButtons(void)