mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
*neutrino port mediaplayer menu: own modules for mediaplayer settings added
also added own modules for audioplayer settings and pictureviewer settings, called in the mediaplayer menu. Note: In original neutrino source also to find entries for esound and movieplayer. These are still missing here, but it's more easy expandable, if we add more entries and settings modules in future and it's more advantageous for comming changes. git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1181 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -40,6 +40,7 @@ libneutrino_gui_a_SOURCES = \
|
||||
audio_select.cpp \
|
||||
audio_setup.cpp \
|
||||
audioplayer.cpp \
|
||||
audioplayer_setup.cpp\
|
||||
bookmarkmanager.cpp \
|
||||
bouquetlist.cpp \
|
||||
channellist.cpp \
|
||||
@@ -55,6 +56,7 @@ libneutrino_gui_a_SOURCES = \
|
||||
infoviewer.cpp \
|
||||
keybind_setup.cpp \
|
||||
mediaplayer.cpp \
|
||||
mediaplayer_setup.cpp \
|
||||
moviebrowser.cpp \
|
||||
movieinfo.cpp \
|
||||
movieplayer.cpp \
|
||||
@@ -64,6 +66,7 @@ libneutrino_gui_a_SOURCES = \
|
||||
osdlang_setup.cpp \
|
||||
parentallock_setup.cpp \
|
||||
pictureviewer.cpp \
|
||||
pictureviewer_setup.cpp \
|
||||
pluginlist.cpp \
|
||||
plugins.cpp \
|
||||
proxyserver_setup.cpp \
|
||||
|
129
src/gui/audioplayer_setup.cpp
Normal file
129
src/gui/audioplayer_setup.cpp
Normal file
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
$port: audioplayer_setup.cpp,v 1.4 2010/12/06 21:00:15 tuxbox-cvs Exp $
|
||||
|
||||
audioplayer setup implementation - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "gui/audioplayer_setup.h"
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
#include <mymenu.h>
|
||||
|
||||
#include <gui/widget/icons.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
|
||||
#include "gui/audioplayer.h"
|
||||
#include "gui/filebrowser.h"
|
||||
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <system/debug.h>
|
||||
|
||||
|
||||
|
||||
CAudioPlayerSetup::CAudioPlayerSetup()
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
|
||||
width = w_max (40, 10);
|
||||
selected = -1;
|
||||
}
|
||||
|
||||
CAudioPlayerSetup::~CAudioPlayerSetup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int CAudioPlayerSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
{
|
||||
dprintf(DEBUG_DEBUG, "init audioplayer setup\n");
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
|
||||
if (parent)
|
||||
parent->hide();
|
||||
|
||||
|
||||
if(actionKey == "audioplayerdir")
|
||||
{
|
||||
parent->hide();
|
||||
CFileBrowser b;
|
||||
b.Dir_Mode=true;
|
||||
if (b.exec(g_settings.network_nfs_audioplayerdir))
|
||||
strncpy(g_settings.network_nfs_audioplayerdir, b.getSelectedFile()->Name.c_str(), sizeof(g_settings.network_nfs_audioplayerdir)-1);
|
||||
return res;
|
||||
}
|
||||
|
||||
showAudioPlayerSetup();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#define AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT 2
|
||||
const CMenuOptionChooser::keyval AUDIOPLAYER_DISPLAY_ORDER_OPTIONS[AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT] =
|
||||
{
|
||||
{ CAudioPlayerGui::ARTIST_TITLE, LOCALE_AUDIOPLAYER_ARTIST_TITLE },
|
||||
{ CAudioPlayerGui::TITLE_ARTIST, LOCALE_AUDIOPLAYER_TITLE_ARTIST }
|
||||
};
|
||||
|
||||
|
||||
/*shows the audio setup menue*/
|
||||
void CAudioPlayerSetup::showAudioPlayerSetup()
|
||||
{
|
||||
CMenuWidget* audioplayerSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
|
||||
audioplayerSetup->setSelected(selected);
|
||||
|
||||
audioplayerSetup->addIntroItems(LOCALE_AUDIOPLAYER_NAME);
|
||||
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_DISPLAY_ORDER, &g_settings.audioplayer_display , AUDIOPLAYER_DISPLAY_ORDER_OPTIONS, AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT, true ));
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_FOLLOW , &g_settings.audioplayer_follow , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SELECT_TITLE_BY_NAME , &g_settings.audioplayer_select_title_by_name , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_REPEAT_ON , &g_settings.audioplayer_repeat_on , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SHOW_PLAYLIST, &g_settings.audioplayer_show_playlist, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ));
|
||||
|
||||
CStringInput * audio_screensaver= new CStringInput(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, g_settings.audioplayer_screensaver, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ");
|
||||
audioplayerSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, true, g_settings.audioplayer_screensaver, audio_screensaver));
|
||||
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO , &g_settings.audioplayer_highprio , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
|
||||
if (CVFD::getInstance()->has_lcd) //FIXME
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SPECTRUM , &g_settings.spectrum , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplayerSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_DEFDIR, true, g_settings.network_nfs_audioplayerdir, this, "audioplayerdir"));
|
||||
audioplayerSetup->addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_ENABLE_SC_METADATA, &g_settings.audioplayer_enable_sc_metadata, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ));
|
||||
|
||||
audioplayerSetup->exec (NULL, "");
|
||||
audioplayerSetup->hide ();
|
||||
selected = audioplayerSetup->getSelected();
|
||||
delete audioplayerSetup;
|
||||
}
|
58
src/gui/audioplayer_setup.h
Normal file
58
src/gui/audioplayer_setup.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
$port: audioplayer_setup.h,v 1.3 2010/12/06 21:00:15 tuxbox-cvs Exp $
|
||||
|
||||
audioplayer setup implementation - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __audioplayer_setup__
|
||||
#define __audioplayer_setup__
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
|
||||
#include <driver/framebuffer.h>
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
class CAudioPlayerSetup : public CMenuTarget
|
||||
{
|
||||
private:
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
int width, selected;
|
||||
|
||||
void showAudioPlayerSetup();
|
||||
|
||||
|
||||
public:
|
||||
CAudioPlayerSetup();
|
||||
~CAudioPlayerSetup();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
102
src/gui/mediaplayer_setup.cpp
Normal file
102
src/gui/mediaplayer_setup.cpp
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
$port: mediaplayer_setup.cpp,v 1.5 2010/12/06 21:00:15 tuxbox-cvs Exp $
|
||||
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
media player setup implementation - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "gui/mediaplayer_setup.h"
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
|
||||
#include <gui/widget/icons.h>
|
||||
#include "gui/widget/stringinput.h"
|
||||
|
||||
|
||||
#include "gui/audioplayer_setup.h"
|
||||
#include "gui/pictureviewer_setup.h"
|
||||
|
||||
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <system/debug.h>
|
||||
|
||||
|
||||
|
||||
CMediaPlayerSetup::CMediaPlayerSetup()
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
|
||||
width = w_max (40, 10);
|
||||
selected = -1;
|
||||
}
|
||||
|
||||
CMediaPlayerSetup::~CMediaPlayerSetup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int CMediaPlayerSetup::exec(CMenuTarget* parent, const std::string & /*actionKey*/)
|
||||
{
|
||||
dprintf(DEBUG_DEBUG, "init mediaplayer setup menu\n");
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
|
||||
if (parent)
|
||||
parent->hide();
|
||||
|
||||
|
||||
showMediaPlayerSetup();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*shows media setup menue entries*/
|
||||
void CMediaPlayerSetup::showMediaPlayerSetup()
|
||||
{
|
||||
|
||||
CMenuWidget* mediaSetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
|
||||
mediaSetup->setSelected(selected);
|
||||
|
||||
// intros
|
||||
mediaSetup->addIntroItems(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL);
|
||||
|
||||
mediaSetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_HEAD, true, NULL, new CPictureViewerSetup(), "", CRCInput::RC_red, NEUTRINO_ICON_BUTTON_RED));
|
||||
mediaSetup->addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_NAME, true, NULL, new CAudioPlayerSetup(), "", CRCInput::RC_green, NEUTRINO_ICON_BUTTON_GREEN));
|
||||
|
||||
mediaSetup->exec (NULL, "");
|
||||
mediaSetup->hide ();
|
||||
selected = mediaSetup->getSelected();
|
||||
delete mediaSetup;
|
||||
|
||||
}
|
60
src/gui/mediaplayer_setup.h
Normal file
60
src/gui/mediaplayer_setup.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
$port: mediaplayer_setup.h,v 1.3 2010/12/05 22:32:12 tuxbox-cvs Exp $
|
||||
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
media player setup implementation - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __mediaplayer_setup__
|
||||
#define __mediaplayer_setup__
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
|
||||
#include <driver/framebuffer.h>
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
class CMediaPlayerSetup : public CMenuTarget
|
||||
{
|
||||
private:
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
int width, selected;
|
||||
|
||||
void showMediaPlayerSetup();
|
||||
|
||||
|
||||
public:
|
||||
CMediaPlayerSetup();
|
||||
~CMediaPlayerSetup();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
120
src/gui/pictureviewer_setup.cpp
Normal file
120
src/gui/pictureviewer_setup.cpp
Normal file
@@ -0,0 +1,120 @@
|
||||
/*
|
||||
$port: pictureviewer_setup.cpp,v 1.4 2010/12/08 18:03:23 tuxbox-cvs Exp $
|
||||
|
||||
pictureviewer setup implementation - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "gui/pictureviewer_setup.h"
|
||||
|
||||
#include <global.h>
|
||||
#include <neutrino.h>
|
||||
|
||||
#include <gui/widget/icons.h>
|
||||
#include <gui/widget/stringinput.h>
|
||||
#include <gui/widget/stringinput_ext.h>
|
||||
|
||||
#include "gui/pictureviewer.h"
|
||||
#include "gui/filebrowser.h"
|
||||
|
||||
#include <driver/screen_max.h>
|
||||
|
||||
#include <system/debug.h>
|
||||
|
||||
|
||||
CPictureViewerSetup::CPictureViewerSetup()
|
||||
{
|
||||
frameBuffer = CFrameBuffer::getInstance();
|
||||
|
||||
width = w_max (40, 10);
|
||||
selected = -1;
|
||||
}
|
||||
|
||||
CPictureViewerSetup::~CPictureViewerSetup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int CPictureViewerSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
||||
{
|
||||
dprintf(DEBUG_DEBUG, "init pctureviwer setup\n");
|
||||
int res = menu_return::RETURN_REPAINT;
|
||||
|
||||
if (parent)
|
||||
parent->hide();
|
||||
|
||||
|
||||
if(actionKey == "picturedir")
|
||||
{
|
||||
parent->hide();
|
||||
CFileBrowser b;
|
||||
b.Dir_Mode=true;
|
||||
if (b.exec(g_settings.network_nfs_picturedir))
|
||||
strncpy(g_settings.network_nfs_picturedir, b.getSelectedFile()->Name.c_str(), sizeof(g_settings.network_nfs_picturedir)-1);
|
||||
return res;
|
||||
}
|
||||
|
||||
showPictureViewerSetup();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#define PICTUREVIEWER_SCALING_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval PICTUREVIEWER_SCALING_OPTIONS[PICTUREVIEWER_SCALING_OPTION_COUNT] =
|
||||
{
|
||||
{ CPictureViewer::SIMPLE, LOCALE_PICTUREVIEWER_RESIZE_SIMPLE },
|
||||
{ CPictureViewer::COLOR , LOCALE_PICTUREVIEWER_RESIZE_COLOR_AVERAGE },
|
||||
{ CPictureViewer::NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE }
|
||||
};
|
||||
|
||||
|
||||
/*shows the picviewer setup menue*/
|
||||
void CPictureViewerSetup::showPictureViewerSetup()
|
||||
{
|
||||
|
||||
CMenuWidget* picviewsetup = new CMenuWidget(LOCALE_MAINMENU_SETTINGS, NEUTRINO_ICON_SETTINGS, width);
|
||||
picviewsetup->setSelected(selected);
|
||||
|
||||
// intros: back ande save
|
||||
picviewsetup->addIntroItems(LOCALE_PICTUREVIEWER_HEAD);
|
||||
|
||||
picviewsetup->addItem(new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING , &g_settings.picviewer_scaling , PICTUREVIEWER_SCALING_OPTIONS , PICTUREVIEWER_SCALING_OPTION_COUNT , true ));
|
||||
CStringInput * pic_timeout= new CStringInput(LOCALE_PICTUREVIEWER_SLIDE_TIME, g_settings.picviewer_slide_time, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ");
|
||||
picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, pic_timeout));
|
||||
picviewsetup->addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir"));
|
||||
|
||||
picviewsetup->exec(NULL, "");
|
||||
picviewsetup->hide();
|
||||
selected = picviewsetup->getSelected();
|
||||
delete picviewsetup;
|
||||
}
|
58
src/gui/pictureviewer_setup.h
Normal file
58
src/gui/pictureviewer_setup.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
$port: pictureviewer_setup.h,v 1.3 2010/12/08 18:03:23 tuxbox-cvs Exp $
|
||||
|
||||
pictureviewer setup implementation - Neutrino-GUI
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
and some other guys
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Copyright (C) 2011 T. Graf 'dbt'
|
||||
Homepage: http://www.dbox2-tuning.net/
|
||||
|
||||
License: GPL
|
||||
|
||||
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __pictureviewer_setup__
|
||||
#define __pictureviewer_setup__
|
||||
|
||||
#include <gui/widget/menue.h>
|
||||
|
||||
#include <driver/framebuffer.h>
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
class CPictureViewerSetup : public CMenuTarget
|
||||
{
|
||||
private:
|
||||
CFrameBuffer *frameBuffer;
|
||||
|
||||
int width, selected;
|
||||
|
||||
void showPictureViewerSetup();
|
||||
|
||||
|
||||
public:
|
||||
CPictureViewerSetup();
|
||||
~CPictureViewerSetup();
|
||||
int exec(CMenuTarget* parent, const std::string & actionKey);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@@ -2181,14 +2181,12 @@ int CNeutrinoApp::run(int argc, char **argv)
|
||||
CMenuWidget mainSettings (LOCALE_MAINSETTINGS_HEAD , NEUTRINO_ICON_SETTINGS);
|
||||
CMenuWidget streamingSettings (LOCALE_STREAMINGMENU_HEAD , NEUTRINO_ICON_STREAMING);
|
||||
CMenuWidget miscSettings (LOCALE_MISCSETTINGS_HEAD , NEUTRINO_ICON_SETTINGS);
|
||||
CMenuWidget audioplPicSettings (LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL, NEUTRINO_ICON_SETTINGS);
|
||||
CMenuWidget _scanSettings (LOCALE_SERVICEMENU_SCANTS , NEUTRINO_ICON_SETTINGS);
|
||||
CMenuWidget service (LOCALE_SERVICEMENU_HEAD , NEUTRINO_ICON_SETTINGS);
|
||||
|
||||
InitMainMenu(mainMenu, mainSettings, miscSettings, service, audioplPicSettings, streamingSettings);
|
||||
InitMainMenu(mainMenu, mainSettings, miscSettings, service, streamingSettings);
|
||||
|
||||
InitServiceSettings(service, _scanSettings);
|
||||
InitAudioplPicSettings(audioplPicSettings);
|
||||
InitMiscSettings(miscSettings);
|
||||
InitScanSettings(_scanSettings);
|
||||
|
||||
@@ -4188,25 +4186,6 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
|
||||
}
|
||||
fontsizenotifier.changeNotify(NONEXISTANT_LOCALE, NULL);
|
||||
}
|
||||
// else if(actionKey=="osd.def") {
|
||||
// for (int i = 0; i < TIMING_SETTING_COUNT; i++)
|
||||
// g_settings.timing[i] = default_timing[i];
|
||||
//
|
||||
// SetupTiming();
|
||||
// }
|
||||
else if(actionKey == "audioplayerdir") {
|
||||
parent->hide();
|
||||
|
||||
chooserDir(g_settings.network_nfs_audioplayerdir, false, NULL, sizeof(g_settings.network_nfs_audioplayerdir)-1);
|
||||
|
||||
}
|
||||
else if(actionKey == "picturedir") {
|
||||
parent->hide();
|
||||
|
||||
chooserDir(g_settings.network_nfs_picturedir, false, NULL, sizeof(g_settings.network_nfs_picturedir)-1);
|
||||
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
else if(actionKey == "moviedir") {
|
||||
parent->hide();
|
||||
|
||||
|
@@ -172,10 +172,9 @@ private:
|
||||
void InitZapper();
|
||||
void InitServiceSettings(CMenuWidget &, CMenuWidget &);
|
||||
void InitScreenSettings(CMenuWidget &);
|
||||
void InitAudioplPicSettings(CMenuWidget &);
|
||||
void InitMiscSettings(CMenuWidget &);
|
||||
void InitScanSettings(CMenuWidget &);
|
||||
void InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings, CMenuWidget &miscSettings, CMenuWidget &service, CMenuWidget &audioplPicSettings, CMenuWidget &streamingSettings);
|
||||
void InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings, CMenuWidget &miscSettings, CMenuWidget &service, CMenuWidget &streamingSettings);
|
||||
|
||||
void SetupFrameBuffer();
|
||||
void SelectAPID();
|
||||
|
@@ -90,6 +90,7 @@
|
||||
#include "gui/infoviewer.h"
|
||||
#include "gui/keybind_setup.h"
|
||||
#include "gui/mediaplayer.h"
|
||||
#include "gui/mediaplayer_setup.h"
|
||||
#include "gui/motorcontrol.h"
|
||||
#include "gui/movieplayer.h"
|
||||
#include "gui/network_setup.h"
|
||||
@@ -178,7 +179,7 @@ extern bool autoshift;
|
||||
* CNeutrinoApp - init main menu *
|
||||
**************************************************************************************/
|
||||
void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings, CMenuWidget &miscSettings,
|
||||
CMenuWidget &service, CMenuWidget &audiopl_picSettings, CMenuWidget &/*streamingSettings*/)
|
||||
CMenuWidget &service, CMenuWidget &/*streamingSettings*/)
|
||||
{
|
||||
unsigned int system_rev = cs_get_revision();
|
||||
|
||||
@@ -274,7 +275,7 @@ void CNeutrinoApp::InitMainMenu(CMenuWidget &mainMenu, CMenuWidget &mainSettings
|
||||
|
||||
mainSettings.addItem(new CMenuForwarder(LOCALE_HDD_SETTINGS, true, NULL, new CHDDMenuHandler(), NULL, CRCInput::convertDigitToKey(sett_count++)));
|
||||
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_KEYBINDING, true, NULL, new CKeybindSetup(), NULL, CRCInput::RC_green , NEUTRINO_ICON_BUTTON_GREEN ));
|
||||
mainSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL , true, NULL, &audiopl_picSettings , NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
mainSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYERPICSETTINGS_GENERAL , true, NULL, new CMediaPlayerSetup()/*&audiopl_picSettings*/ , NULL, CRCInput::RC_yellow, NEUTRINO_ICON_BUTTON_YELLOW));
|
||||
mainSettings.addItem(new CMenuForwarder(LOCALE_MAINSETTINGS_MISC , true, NULL, &miscSettings , NULL, CRCInput::RC_blue , NEUTRINO_ICON_BUTTON_BLUE ));
|
||||
|
||||
//mainSettings.addItem(new CMenuForwarder(LOCALE_CAM_SETTINGS, true, NULL, g_CamHandler));
|
||||
@@ -945,58 +946,6 @@ void CNeutrinoApp::InitServiceSettings(CMenuWidget &service, CMenuWidget &_scanS
|
||||
}
|
||||
}
|
||||
|
||||
#define MESSAGEBOX_NO_YES_OPTION_COUNT 2
|
||||
const CMenuOptionChooser::keyval MESSAGEBOX_NO_YES_OPTIONS[MESSAGEBOX_NO_YES_OPTION_COUNT] =
|
||||
{
|
||||
{ 0, LOCALE_MESSAGEBOX_NO },
|
||||
{ 1, LOCALE_MESSAGEBOX_YES }
|
||||
};
|
||||
|
||||
#define PICTUREVIEWER_SCALING_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval PICTUREVIEWER_SCALING_OPTIONS[PICTUREVIEWER_SCALING_OPTION_COUNT] =
|
||||
{
|
||||
{ CPictureViewer::SIMPLE, LOCALE_PICTUREVIEWER_RESIZE_SIMPLE },
|
||||
{ CPictureViewer::COLOR , LOCALE_PICTUREVIEWER_RESIZE_COLOR_AVERAGE },
|
||||
{ CPictureViewer::NONE , LOCALE_PICTUREVIEWER_RESIZE_NONE }
|
||||
};
|
||||
|
||||
#define AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT 2
|
||||
const CMenuOptionChooser::keyval AUDIOPLAYER_DISPLAY_ORDER_OPTIONS[AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT] =
|
||||
{
|
||||
{ CAudioPlayerGui::ARTIST_TITLE, LOCALE_AUDIOPLAYER_ARTIST_TITLE },
|
||||
{ CAudioPlayerGui::TITLE_ARTIST, LOCALE_AUDIOPLAYER_TITLE_ARTIST }
|
||||
};
|
||||
|
||||
void CNeutrinoApp::InitAudioplPicSettings(CMenuWidget &audioplPicSettings)
|
||||
{
|
||||
audioplPicSettings.addItem(GenericMenuSeparator);
|
||||
audioplPicSettings.addItem(GenericMenuBack);
|
||||
|
||||
audioplPicSettings.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_PICTUREVIEWER_HEAD));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_PICTUREVIEWER_SCALING , &g_settings.picviewer_scaling , PICTUREVIEWER_SCALING_OPTIONS , PICTUREVIEWER_SCALING_OPTION_COUNT , true ));
|
||||
CStringInput * pic_timeout= new CStringInput(LOCALE_PICTUREVIEWER_SLIDE_TIME, g_settings.picviewer_slide_time, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ");
|
||||
audioplPicSettings.addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_SLIDE_TIME, true, g_settings.picviewer_slide_time, pic_timeout));
|
||||
audioplPicSettings.addItem(new CMenuForwarder(LOCALE_PICTUREVIEWER_DEFDIR, true, g_settings.network_nfs_picturedir, this, "picturedir"));
|
||||
|
||||
audioplPicSettings.addItem(new CMenuSeparator(CMenuSeparator::LINE | CMenuSeparator::STRING, LOCALE_AUDIOPLAYER_NAME));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_DISPLAY_ORDER, &g_settings.audioplayer_display , AUDIOPLAYER_DISPLAY_ORDER_OPTIONS, AUDIOPLAYER_DISPLAY_ORDER_OPTION_COUNT, true ));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_FOLLOW , &g_settings.audioplayer_follow , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SELECT_TITLE_BY_NAME , &g_settings.audioplayer_select_title_by_name , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_REPEAT_ON , &g_settings.audioplayer_repeat_on , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SHOW_PLAYLIST, &g_settings.audioplayer_show_playlist, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ));
|
||||
|
||||
CStringInput * audio_screensaver= new CStringInput(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, g_settings.audioplayer_screensaver, 2, NONEXISTANT_LOCALE, NONEXISTANT_LOCALE, "0123456789 ");
|
||||
audioplPicSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_SCREENSAVER_TIMEOUT, true, g_settings.audioplayer_screensaver, audio_screensaver));
|
||||
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_HIGHPRIO , &g_settings.audioplayer_highprio , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
|
||||
if (CVFD::getInstance()->has_lcd) //FIXME
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_SPECTRUM , &g_settings.spectrum , MESSAGEBOX_NO_YES_OPTIONS , MESSAGEBOX_NO_YES_OPTION_COUNT , true ));
|
||||
audioplPicSettings.addItem(new CMenuForwarder(LOCALE_AUDIOPLAYER_DEFDIR, true, g_settings.network_nfs_audioplayerdir, this, "audioplayerdir"));
|
||||
audioplPicSettings.addItem(new CMenuOptionChooser(LOCALE_AUDIOPLAYER_ENABLE_SC_METADATA, &g_settings.audioplayer_enable_sc_metadata, MESSAGEBOX_NO_YES_OPTIONS, MESSAGEBOX_NO_YES_OPTION_COUNT, true ));
|
||||
|
||||
}
|
||||
|
||||
#define MISCSETTINGS_FB_DESTINATION_OPTION_COUNT 3
|
||||
const CMenuOptionChooser::keyval MISCSETTINGS_FB_DESTINATION_OPTIONS[MISCSETTINGS_FB_DESTINATION_OPTION_COUNT] =
|
||||
{
|
||||
|
Reference in New Issue
Block a user