summaryrefslogtreecommitdiffstats
path: root/abs/core
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core')
-rwxr-xr-xabs/core/mythdb-initial/PKGBUILD6
-rw-r--r--abs/core/mythdb-initial/custom.sql3
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml164
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp216
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h80
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp195
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp131
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro47
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp182
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/autocard.h30
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp55
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h14
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp157
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h43
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp319
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h45
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp733
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/infrared.h67
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml148
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh353
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp272
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h11
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp1179
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h111
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp4910
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h589
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/main.cpp597
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp623
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h97
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h5
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro55
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp436
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h60
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp409
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h13
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp92
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h44
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp112
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/vnc.h28
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp696
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h130
-rw-r--r--abs/core/mythinstall/PKGBUILD28
-rwxr-xr-xabs/core/mythinstall/checkout_MythVantage.sh3
-rw-r--r--abs/core/mythinstall/fileshare.cpp.patch156
-rw-r--r--abs/core/mythinstall/infrared.cpp.patch35
-rw-r--r--abs/core/mythinstall/installationtype.cpp.patch98
-rw-r--r--abs/core/mythinstall/installdialog.cpp.patch75
-rw-r--r--abs/core/mythinstall/installsettings.cpp.patch532
-rw-r--r--abs/core/mythinstall/misc_settings.cpp.patch53
-rw-r--r--abs/core/mythinstall/xorgsettings.cpp.patch34
-rw-r--r--abs/core/mythinstall/xorgsettings.h.patch11
-rw-r--r--abs/core/plymouth-theme-linhes/PKGBUILD3
-rw-r--r--abs/core/plymouth/PKGBUILD4
53 files changed, 13476 insertions, 1013 deletions
diff --git a/abs/core/mythdb-initial/PKGBUILD b/abs/core/mythdb-initial/PKGBUILD
index 54b5912..d1566a5 100755
--- a/abs/core/mythdb-initial/PKGBUILD
+++ b/abs/core/mythdb-initial/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=mythdb-initial
-pkgver=8
-pkgrel=3
+pkgver=8.1
+pkgrel=1
pkgdesc="setup the initial mythtv database for linhes"
url=""
license=""
@@ -22,4 +22,4 @@ package() {
md5sums=('366c1fe7668739d2d5c1123f9f4ee110'
'ad0e57ac5e7c3677808a670e16634bba'
- '6c7fd1877f45b604be14d58d068f6d08')
+ '8c5aa22be114fc20298891d37928cd2e')
diff --git a/abs/core/mythdb-initial/custom.sql b/abs/core/mythdb-initial/custom.sql
index cb18965..99a0452 100644
--- a/abs/core/mythdb-initial/custom.sql
+++ b/abs/core/mythdb-initial/custom.sql
@@ -45,6 +45,7 @@ INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES
('HaltCommand' ,'sudo /sbin/halt' , 'apheleia'),
('RebootCommand' ,'sudo /sbin/reboot' , 'apheleia'),
('Theme' ,'LinHES' , 'apheleia'),
+ ('ThemePainter' ,'auto' , 'apheleia'),
('LircSocket' ,'/var/run/lirc/lircd' , 'apheleia');
--
@@ -149,7 +150,7 @@ INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES
('HOSTOSsize', '5' , 'apheleia'),
('HOSTrootfstype', 'ext3' , 'apheleia'),
('HOSTHOMEsize', '3' , 'apheleia'),
-('HOSTDatabasesize','5' , 'apheleia'),
+('HOSTDatabasesize','2' , 'apheleia'),
('HostUseSWAP', '1' , 'apheleia'),
('HostUseALLdata', '1' , 'apheleia'),
('HOSTdatafstype', 'xfs' , 'apheleia');
diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml b/abs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml
new file mode 100755
index 0000000..df0598b
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml
@@ -0,0 +1,164 @@
+<!--
+
+ This is a myth style theme file for mythwelcome
+
+ (c) 2005 by a whole bunch of people associated with MythTV
+
+-->
+<mythuitheme>
+
+ <window name="welcome_screen">
+
+ <!--
+
+ First, define all the fonts we need on this screen
+
+ -->
+ <font name="title" face="Arial">
+ <color>#ffff00</color>
+ <dropcolor>#000000</dropcolor>
+ <size>24</size>
+ <shadow>3,3</shadow>
+ <bold>yes</bold>
+ </font>
+
+ <font name="time" face="Arial">
+ <color>#9999cc</color>
+ <size>18</size>
+ <bold>yes</bold>
+ </font>
+
+ <font name="label" face="Arial">
+ <color>#ffff00</color>
+ <dropcolor>#000000</dropcolor>
+ <size>18</size>
+ <shadow>3,3</shadow>
+ <bold>yes</bold>
+ </font>
+
+ <font name="info" face="Arial">
+ <color>#ffffff</color>
+ <size>18</size>
+ <bold>yes</bold>
+ </font>
+
+ <font name="biginfo" face="Arial">
+ <color>#ffffff</color>
+ <size>50</size>
+ <bold>yes</bold>
+ </font>
+ <font name="warning" face="Arial">
+ <color>#ff0000</color>
+ <dropcolor>#000000</dropcolor>
+ <size>16</size>
+ <shadow>2,2</shadow>
+ <bold>yes</bold>
+ </font>
+
+ <font name="buttons" face="Arial">
+ <color>#ffff00</color>
+ <size>14</size>
+ <bold>yes</bold>
+ </font>
+
+ <container name="main_display">
+ <area>0,0,800,600</area>
+
+ <textarea name="title" draworder="0" align="center">
+ <multiline>no</multiline>
+ <font>title</font>
+ <area>50,40,700,40</area>
+ <value></value>
+ </textarea>
+
+ <!--
+ time
+ -->
+ <textarea name="time_text" draworder="0" align="right">
+ <multiline>no</multiline>
+ <font>time</font>
+ <area>660,520,110,30</area>
+ <value></value>
+ </textarea>
+
+ <textarea name="date_text" draworder="0" align="center">
+ <multiline>no</multiline>
+ <font>time</font>
+ <area>0,60,800,70</area>
+ <value></value>
+ </textarea>
+
+ <!--
+ current myth status
+ -->
+
+ <textarea name="status_text" draworder="1" align="center">
+ <multiline>yes</multiline>
+ <font>info</font>
+ <area>20,70,760,60</area>
+ <value>MythTV is idle and will shutdown shortly.</value>
+ </textarea>
+
+ <!--
+ current recordings status
+ -->
+
+ <textarea name="recording_label" draworder="1" align="center">
+ <font>label</font>
+ <area>20,110,760,30</area>
+ <!--<value>Percent Complete </value>-->
+ <value></value>
+ </textarea>
+
+ <textarea name="recording_text" draworder="1" align="hcenter">
+ <multiline>yes</multiline>
+ <font>biginfo</font>
+ <area>20,110,760,150</area>
+ <value></value>
+ </textarea>
+
+ <!--
+ next scheduled recording status
+ -->
+
+ <textarea name="scheduled_label" draworder="1" align="center">
+ <font>label</font>
+ <area>20,320,760,30</area>
+ <value></value>
+ </textarea>
+
+ <textarea name="scheduled_text" draworder="1" align="hcenter">
+ <multiline>yes</multiline>
+ <font>biginfo</font>
+ <area>20,400,760,120</area>
+ <value></value>
+ </textarea>
+
+ <!--
+ scheduled recordings conflict warning
+ -->
+
+ <textarea name="conflicts_text" draworder="1" align="center">
+ <font>warning</font>
+ <area>20,490,760,30</area>
+ <value>WARNING: There are conflicting scheduled recordings!</value>
+ </textarea>
+
+ <!--
+ start frontend button
+
+ <textbutton name="startfrontend_button" draworder="1">
+ <position>81,535</position>
+ <font>buttons</font>
+ <image function="on" filename="mw_text_button_on.png"></image>
+ <image function="off" filename="mw_text_button_off.png"></image>
+ <image function="pushed" filename="mw_text_button_pushed.png"></image>
+ </textbutton>
+
+ -->
+
+ </container>
+
+ </window>
+
+</mythuitheme>
diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp
new file mode 100755
index 0000000..6d1920f
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp
@@ -0,0 +1,216 @@
+#include <qapplication.h>
+#include <unistd.h>
+#include <fstream>
+#include <sys/wait.h> // For WIFEXITED on Mac OS X
+
+#include "mythcontext.h"
+#include "mythdbcon.h"
+#include "lcddevice.h"
+#include "tv.h"
+#include "programinfo.h"
+#include "uitypes.h"
+#include "remoteutil.h"
+#include "installdialog.h"
+#include "libmyth/dialogbox.h"
+#include <qvaluevector.h>
+#include <stdlib.h>
+#define UPDATE_STATUS_INTERVAL 5000
+#define UPDATE_SCREEN_INTERVAL 5000
+QStringList belist;
+BEvector beveclist (100);
+QString BECommand;
+int retval;
+int runstuff(QStringList hostlist,BEvector Bea,QString bcmd ){
+belist=hostlist;
+beveclist = Bea;
+BECommand=bcmd;
+
+WelcomeDialog *mythWelcome = new WelcomeDialog(gContext->GetMainWindow(),
+ "welcome_screen", "bpopup-",
+ "welcome_screen");
+ mythWelcome->exec();
+ delete mythWelcome;
+ return (0);
+}
+
+
+WelcomeDialog::WelcomeDialog(MythMainWindow *parent,
+ QString window_name,
+ QString theme_filename,
+ const char* name)
+:MythThemedDialog(parent, window_name, theme_filename, name)
+{
+ gContext->addListener(this);
+ m_timeFormat = gContext->GetSetting("TimeFormat", "h:mm AP");
+ wireUpTheme();
+ assignFirstFocus();
+ popup = NULL;
+ showPopup();
+}
+
+
+int WelcomeDialog::exec()
+{
+ return MythDialog::exec();
+}
+
+
+
+void WelcomeDialog::keyPressEvent(QKeyEvent *e)
+{
+ bool handled = false;
+
+ QStringList actions;
+ gContext->GetMainWindow()->TranslateKeyPress("Welcome", e, actions);
+
+ for (unsigned int i = 0; i < actions.size() && !handled; i++)
+ {
+ QString action = actions[i];
+ handled = true;
+ if (action == "ESCAPE")
+ {
+ return; // eat escape key
+ }
+ else if (action == "MENU")
+ {
+ showPopup();
+ }
+ else if (action == "NEXTVIEW")
+ {
+ accept();
+ }
+ else if (action == "SELECT")
+ {
+ activateCurrent();
+ }
+ else
+ handled = false;
+ }
+
+ if (!handled)
+ MythThemedDialog::keyPressEvent(e);
+}
+
+UITextType* WelcomeDialog::getTextType(QString name)
+{
+ UITextType* type = getUITextType(name);
+
+ if (!type)
+ {
+ cout << "ERROR: Failed to find '" << name << "' UI element in theme file\n"
+ << "Bailing out!" << endl;
+ exit(0);
+ }
+ return type;
+}
+
+void WelcomeDialog::wireUpTheme()
+{
+ m_status_text = getTextType("status_text");
+ m_recording_text = getTextType("recording_text");
+ m_scheduled_text = getTextType("scheduled_text");
+ m_time_text = getTextType("time_text");
+ m_date_text = getTextType("date_text");
+ m_warning_text = getTextType("conflicts_text");
+ m_warning_text->hide();
+ buildFocusList();
+}
+
+void WelcomeDialog::closeDialog()
+{
+cout <<"close dialog" <<endl;
+ done(1);
+}
+
+WelcomeDialog::~WelcomeDialog()
+{
+ gContext->removeListener(this);
+
+ if (m_updateStatusTimer)
+ delete m_updateStatusTimer;
+
+ if (m_updateScreenTimer)
+ delete m_updateScreenTimer;
+
+ if (m_timeTimer)
+ delete m_timeTimer;
+}
+
+void WelcomeDialog::updateTime(void)
+{
+ QString s="";
+ m_date_text->SetText(s);
+}
+
+void WelcomeDialog::updateStatus(void)
+{
+ updateStatusMessage();
+}
+
+void WelcomeDialog::updateScreen(void)
+{
+ m_recording_text->SetText(recording_text);
+ m_scheduled_text->SetText(scheduled_text);
+ m_status_text->SetText("");
+ m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true);
+
+}
+
+void WelcomeDialog::updateAll(void)
+{
+ updateRecordingList();
+ updateScheduledList();
+}
+
+bool WelcomeDialog::updateRecordingList()
+{
+ return true;
+}
+
+bool WelcomeDialog::updateScheduledList()
+{
+
+
+ updateStatus();
+ updateScreen();
+ return true;
+}
+
+void WelcomeDialog::updateStatusMessage(void)
+{
+
+}
+
+void WelcomeDialog::showPopup(void)
+{
+ if (popup)
+ return;
+ DialogCode retitem = MythPopupBox::ShowButtonPopup(gContext->GetMainWindow(),
+ QString("JobQueuePopup"),
+ QObject::tr("Select Backend to " + BECommand ),
+ belist,kDialogCodeButton0);
+ retval = retitem - kDialogCodeListStart;
+ cout << beveclist[retval] << endl;
+ cancelPopup();
+ dorestart( BECommand , beveclist[retval] );
+ }
+
+
+
+void WelcomeDialog::cancelPopup(void)
+{
+ if (!popup)
+ return;
+ popup->hide();
+ popup->deleteLater();
+ popup = NULL;
+ setActiveWindow();
+}
+
+void dorestart (QString command , QString behost)
+{
+cout << command << behost << endl;
+system("/usr/bin/backend_control.sh " + command + " " + behost );
+exit(0);
+}
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h
new file mode 100755
index 0000000..69af384
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h
@@ -0,0 +1,80 @@
+//#ifndef WELCOMEDIALOG_H_
+//#define WELCOMEDIALOG_H_
+
+#include <iostream>
+using namespace std;
+
+#include <qdatetime.h>
+#include "mythdialogs.h"
+#include "libmyth/dialogbox.h"
+#include <qvaluevector.h>
+ typedef QValueVector<QString> BEvector;
+
+int runstuff(QStringList , BEvector,QString);
+
+//QStringList BeButtonList;
+
+class WelcomeDialog : public MythThemedDialog
+{
+
+ Q_OBJECT
+
+ public:
+
+ WelcomeDialog(MythMainWindow *parent,
+ QString window_name,
+ QString theme_filename,
+ const char* name = 0);
+ ~WelcomeDialog();
+
+ void keyPressEvent(QKeyEvent *e);
+ void wireUpTheme();
+ int exec();
+
+ protected slots:
+ void updateAll(void);
+ void updateStatus(void);
+ void updateScreen(void);
+ void closeDialog();
+ void updateTime();
+ void showPopup();
+
+ void cancelPopup();
+ // void MAINPopup();
+ bool updateRecordingList(void);
+ bool updateScheduledList(void);
+
+
+ private:
+ void updateStatusMessage(void);
+ UITextType* getTextType(QString name);
+ MythPopupBox *popup;
+// DialogBox *reboot_box;
+// DialogBox *upgrade_box;
+ //
+ // GUI stuff
+ //
+ UITextType *m_status_text;
+ UITextType *m_recording_text;
+ UITextType *m_scheduled_text;
+ UITextType *m_warning_text;
+ UITextType *m_time_text;
+ UITextType *m_date_text;
+ QTimer *m_updateStatusTimer;
+ QTimer *m_updateScreenTimer;
+ QTimer *m_timeTimer;
+
+// QString m_installDir;
+ QString m_timeFormat;
+// QStringList m_statusList;
+// QString install_drive ;
+// QString install_text;
+ string recording_text;
+ string scheduled_text;
+// string bin_prefix;
+// bool I_AM_BUSY;
+
+
+};
+
+void dorestart (QString,QString);
diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp b/abs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp
new file mode 100755
index 0000000..7c5f9f2
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp
@@ -0,0 +1,195 @@
+#include <qapplication.h>
+#include <cstdlib>
+//#include "libmyth/mythdialogs.h"
+#include "libmyth/mythcontext.h"
+#include "libmyth/settings.h"
+#include "libmyth/langsettings.h"
+#include "libmyth/mythdbcon.h"
+#include <libmyth/exitcodes.h>
+#include "libmythtv/tv.h"
+
+#include "mythdialogbox.h"
+
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+
+#include "libmyth/dialogbox.h"
+#include <qlist.h>
+#include <qvaluevector.h>
+#include "installdialog.h"
+void initKeys(void)
+{
+ REG_KEY("Welcome", "STARTXTERM", "Open an Xterm window", "F12");
+ REG_KEY("Welcome", "SHOWSETTINGS", "Show Mythshutdown settings", "F11");
+}
+
+int main(int argc, char **argv)
+{
+ QString becommand;
+ QApplication a(argc, argv);
+ bool bShow=false;
+ gContext = NULL;
+ gContext = new MythContext(MYTH_BINARY_VERSION);
+ if (!gContext->Init())
+ {
+ VERBOSE(VB_IMPORTANT, "mythwelcome: Could not initialize myth context. "
+ "Exiting.");
+ return FRONTEND_EXIT_NO_MYTHCONTEXT;
+ }
+
+ if (!MSqlQuery::testDBConnection())
+ {
+ VERBOSE(VB_IMPORTANT, "mythwelcome: Could not open the database. "
+ "Exiting.");
+ return -1;
+ }
+
+ if ( a.argc() == 1 )
+ {
+ VERBOSE(VB_IMPORTANT, "Not enough argurments");
+ exit(1);
+ }
+ // Check command line arguments
+ for (int argpos = 1; argpos < a.argc(); ++argpos)
+ {
+ // ++argpos;
+
+ if (!strcmp(a.argv()[argpos],"-restart"))
+ {
+ becommand="restart";
+ }
+ else if (!strcmp(a.argv()[argpos],"-start"))
+ {
+ becommand="start";
+ }
+ else if (!strcmp(a.argv()[argpos],"-stop"))
+ {
+ becommand="stop";
+ }
+ else if (!strcmp(a.argv()[argpos],"-forceshow"))
+ {
+ bShow=true;
+ }
+ else
+ {
+ cerr << "Invalid argument: " << a.argv()[argpos] << endl <<
+ "Valid options are: " << endl <<
+ "-restart " << endl <<
+ "-start " << endl <<
+ "-stop " << endl <<
+ "-forceshow" << endl;
+
+ return FRONTEND_EXIT_INVALID_CMDLINE;
+ }
+
+
+ }
+
+ gContext->LoadQtConfig();
+
+
+
+ QStringList msg;
+ QString tempip;
+ QString justifyip;
+ QString temphname;
+ QString justifyname;
+ QString tempbetype;
+ QString justifybetype;
+
+ int listmaxpos = 0 ;
+ typedef QValueVector<QString> BEvector;
+ BEvector BElist (20);
+
+ if (!MSqlQuery::testDBConnection())
+ {
+ VERBOSE(VB_IMPORTANT, "mythwelcome: Could not open the database. "
+ "Exiting.");
+ }
+
+ //select the master backend
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare( "SELECT DISTINCT data,hostname from settings where value='MasterServerIP';");
+ if (query.exec() && query.isActive() && query.size() > 0)
+ {
+ while (query.next())
+ {
+
+ tempip = query.value(0).toString();
+ justifyip=tempip.rightJustify(15,' ',false);
+ temphname = query.value(1).toString();
+ justifyname= temphname.rightJustify( 20, ' ',false );
+
+ if ( temphname == "" )
+ tempbetype="MBE: ";
+ else
+ tempbetype="SBE: ";
+
+ tempbetype.append(justifyname);
+ tempbetype.append(" ");
+ tempbetype.append(justifyip);
+
+ justifybetype= tempbetype.leftJustify(50,' ' ,true);
+ BElist[listmaxpos] = tempbetype;
+ msg << (justifybetype);
+ listmaxpos++;
+ }
+ }
+
+
+ //slave backends
+ query.prepare( "SELECT DISTINCT data,hostname from settings where value='BackendServerIP' and not data=:ip ;");
+ query.bindValue( ":ip", tempip );
+ if (query.exec() && query.isActive() && query.size() > 0)
+ {
+ while (query.next())
+ {
+
+ tempip = query.value(0).toString();
+ justifyip=tempip.rightJustify(15,' ',false);
+ temphname = query.value(1).toString();
+ justifyname= temphname.rightJustify( 20, ' ',false );
+
+ if ( temphname == "" )
+ tempbetype="MBE: ";
+ else
+ tempbetype="SBE: ";
+
+ tempbetype.append(justifyname);
+ tempbetype.append(" ");
+ tempbetype.append(justifyip);
+
+ justifybetype= tempbetype.leftJustify(50,' ' ,true);
+ BElist[listmaxpos] = tempbetype;
+ msg << (justifybetype);
+ listmaxpos++;
+ }
+ }
+
+
+
+if ( query.size () >1)
+ bShow=true;
+
+
+cout << listmaxpos << endl;
+if ( bShow )
+{
+ LanguageSettings::load("mythfrontend");
+
+ MythMainWindow *mainWindow = GetMythMainWindow();
+ mainWindow->Init();
+ gContext->SetMainWindow(mainWindow);
+ initKeys();
+ runstuff(msg,BElist,becommand);
+
+delete gContext;
+}
+else
+{
+ dorestart( becommand, BElist[0] );
+}
+return 0;
+}
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp
new file mode 100755
index 0000000..53f3089
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp
@@ -0,0 +1,131 @@
+/****************************************************************************
+** WelcomeDialog meta object code from reading C++ file 'installdialog.h'
+**
+** Created: Fri Aug 8 02:57:02 2008
+** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $)
+**
+** WARNING! All changes made in this file will be lost!
+*****************************************************************************/
+
+#undef QT_NO_COMPAT
+#include "installdialog.h"
+#include <qmetaobject.h>
+#include <qapplication.h>
+
+#include <private/qucomextra_p.h>
+#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
+#error "This file was generated using the moc from 3.3.8. It"
+#error "cannot be used with the include files from this version of Qt."
+#error "(The moc has changed too much.)"
+#endif
+
+const char *WelcomeDialog::className() const
+{
+ return "WelcomeDialog";
+}
+
+QMetaObject *WelcomeDialog::metaObj = 0;
+static QMetaObjectCleanUp cleanUp_WelcomeDialog( "WelcomeDialog", &WelcomeDialog::staticMetaObject );
+
+#ifndef QT_NO_TRANSLATION
+QString WelcomeDialog::tr( const char *s, const char *c )
+{
+ if ( qApp )
+ return qApp->translate( "WelcomeDialog", s, c, QApplication::DefaultCodec );
+ else
+ return QString::fromLatin1( s );
+}
+#ifndef QT_NO_TRANSLATION_UTF8
+QString WelcomeDialog::trUtf8( const char *s, const char *c )
+{
+ if ( qApp )
+ return qApp->translate( "WelcomeDialog", s, c, QApplication::UnicodeUTF8 );
+ else
+ return QString::fromUtf8( s );
+}
+#endif // QT_NO_TRANSLATION_UTF8
+
+#endif // QT_NO_TRANSLATION
+
+QMetaObject* WelcomeDialog::staticMetaObject()
+{
+ if ( metaObj )
+ return metaObj;
+ QMetaObject* parentObject = MythThemedDialog::staticMetaObject();
+ static const QUMethod slot_0 = {"updateAll", 0, 0 };
+ static const QUMethod slot_1 = {"updateStatus", 0, 0 };
+ static const QUMethod slot_2 = {"updateScreen", 0, 0 };
+ static const QUMethod slot_3 = {"closeDialog", 0, 0 };
+ static const QUMethod slot_4 = {"updateTime", 0, 0 };
+ static const QUMethod slot_5 = {"showPopup", 0, 0 };
+ static const QUMethod slot_6 = {"cancelPopup", 0, 0 };
+ static const QUParameter param_slot_7[] = {
+ { 0, &static_QUType_bool, 0, QUParameter::Out }
+ };
+ static const QUMethod slot_7 = {"updateRecordingList", 1, param_slot_7 };
+ static const QUParameter param_slot_8[] = {
+ { 0, &static_QUType_bool, 0, QUParameter::Out }
+ };
+ static const QUMethod slot_8 = {"updateScheduledList", 1, param_slot_8 };
+ static const QMetaData slot_tbl[] = {
+ { "updateAll()", &slot_0, QMetaData::Protected },
+ { "updateStatus()", &slot_1, QMetaData::Protected },
+ { "updateScreen()", &slot_2, QMetaData::Protected },
+ { "closeDialog()", &slot_3, QMetaData::Protected },
+ { "updateTime()", &slot_4, QMetaData::Protected },
+ { "showPopup()", &slot_5, QMetaData::Protected },
+ { "cancelPopup()", &slot_6, QMetaData::Protected },
+ { "updateRecordingList()", &slot_7, QMetaData::Protected },
+ { "updateScheduledList()", &slot_8, QMetaData::Protected }
+ };
+ metaObj = QMetaObject::new_metaobject(
+ "WelcomeDialog", parentObject,
+ slot_tbl, 9,
+ 0, 0,
+#ifndef QT_NO_PROPERTIES
+ 0, 0,
+ 0, 0,
+#endif // QT_NO_PROPERTIES
+ 0, 0 );
+ cleanUp_WelcomeDialog.setMetaObject( metaObj );
+ return metaObj;
+}
+
+void* WelcomeDialog::qt_cast( const char* clname )
+{
+ if ( !qstrcmp( clname, "WelcomeDialog" ) )
+ return this;
+ return MythThemedDialog::qt_cast( clname );
+}
+
+bool WelcomeDialog::qt_invoke( int _id, QUObject* _o )
+{
+ switch ( _id - staticMetaObject()->slotOffset() ) {
+ case 0: updateAll(); break;
+ case 1: updateStatus(); break;
+ case 2: updateScreen(); break;
+ case 3: closeDialog(); break;
+ case 4: updateTime(); break;
+ case 5: showPopup(); break;
+ case 6: cancelPopup(); break;
+ case 7: static_QUType_bool.set(_o,updateRecordingList()); break;
+ case 8: static_QUType_bool.set(_o,updateScheduledList()); break;
+ default:
+ return MythThemedDialog::qt_invoke( _id, _o );
+ }
+ return TRUE;
+}
+
+bool WelcomeDialog::qt_emit( int _id, QUObject* _o )
+{
+ return MythThemedDialog::qt_emit(_id,_o);
+}
+#ifndef QT_NO_PROPERTIES
+
+bool WelcomeDialog::qt_property( int id, int f, QVariant* v)
+{
+ return MythThemedDialog::qt_property( id, f, v);
+}
+
+bool WelcomeDialog::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; }
+#endif // QT_NO_PROPERTIES
diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro b/abs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro
new file mode 100755
index 0000000..d2ebce9
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro
@@ -0,0 +1,47 @@
+MYTHPATH="/data/LinHES-PKGBUILD/abs/core-testing/mythtv/stable/mythtv/src/mythtv-0.21"
+
+
+
+
+include ( $$MYTHPATH/libs/libmyth/mythconfig.mak)
+include ( $$MYTHPATH/settings.pro)
+#include ( $$MYTHPATH/programs-libs.pro)
+
+INCLUDEPATH += $$MYTHPATH $$MYTHPATH/libs/ $$MYTHPATH/libs/libmyth $$MYTHPATH/libs/libmythtv
+INCLUDEPATH += $$MYTHPATH/libs/libavutil $$MYTHPATH/libs/libavformat $$MYTHPATH/libs/libavcodec
+INCLUDEPATH += $$MYTHPATH/libs/libmythupnp $$MYTHPATH/libs/libmythui
+INCLUDEPATH += $$MYTHPATH/libs/libmythlivemedia
+
+LIBS += -L$$MYTHPATH/libs/libmyth -L$$MYTHPATH/libs/libmythtv
+LIBS += -L$$MYTHPATH/libs/libavutil -L$$MYTHPATH/libs/libavcodec -L$$MYTHPATH/libs/libavformat
+LIBS += -L$$MYTHPATH/libs/libmythfreemheg
+LIBS += -L$$MYTHPATH/libs/libmythui
+LIBS += -L$$MYTHPATH/libs/libmythupnp
+LIBS += -L$$MYTHPATH/libs/libmythlivemedia
+
+LIBS += -lmythtv-$$LIBVERSION -lmythavformat-$$LIBVERSION
+LIBS += -lmythavutil-$$LIBVERSION -lmythavcodec-$$LIBVERSION
+LIBS += -lmythfreemheg-$$LIBVERSION
+LIBS += -lmythupnp-$$LIBVERSION
+LIBS += -lmythlivemedia-$$LIBVERSION
+LIBS += -lmyth-$$LIBVERSION -lmythui-$$LIBVERSION $$EXTRA_LIBS
+
+
+
+TEMPLATE = app
+CONFIG += thread
+TARGET = mythbeselect
+target.path = $${PREFIX}/bin
+
+INSTALLS = target
+
+uifiles.path = $${PREFIX}/share/mythtv/themes/default
+uifiles.files = install-ui.xml images/*.png
+
+INSTALLS += uifiles
+
+QMAKE_CLEAN += $(TARGET)
+
+# Input
+HEADERS += installdialog.h
+SOURCES += main.cpp installdialog.cpp
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp
new file mode 100755
index 0000000..cfd7fb3
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp
@@ -0,0 +1,182 @@
+//#include "libmyth/mythdbcon.h"
+#include "mythdbcon.h"
+#include <mythtv/mythdbcon.h>
+#include "autocard.h"
+#include <stdlib.h>
+
+AutoCard::AutoCard(void) :
+ listbox(new ListBoxSetting(this))
+{
+ listbox->setLabel(tr("Cards"));
+ addChild(listbox);
+}
+void AutoCard::popup_menu(void)
+{
+ QString name = listbox->getValue();
+// //cout << "in popup" << name << endl;
+ QString uniqid = name.section(' ', -1);
+ QString description = name.section('*',-3,-3);
+ description = description.section('.',1);
+ description = description.stripWhiteSpace();
+// //cout << uniqid << endl;
+// //cout << "descriptn" << endl;
+// //cout << description << endl;
+ if (name.isEmpty() || name == "Default")
+ return;
+
+ QString message = tr("Cardme:") +
+ QString("\n'%1'?").arg(name);
+
+ DialogCode value = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(),
+ "", message,
+ tr("Add Card"),
+ tr("Do not Add"), kDialogCodeButton0);
+
+ if ( value == kDialogCodeButton1)
+ {
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare("update autocard set devicestatus ='unused' where uniqid=:UNIQID and description=:DESCRIPTION;");
+ query.bindValue(":UNIQID",uniqid );
+ query.bindValue(":DESCRIPTION",description );
+ //FINDME
+ // if (!query.exec())
+ // MythContext::DBError("Autocard::popup", query);
+
+ int lastIndex = listbox->getValueIndex(name);
+ lastValue = "";
+ load();
+ listbox->setValue(lastIndex);
+ }
+ else if (value == kDialogCodeButton0)
+ {
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare("update autocard set devicestatus ='will-add' where uniqid=:UNIQID and description=:DESCRIPTION;");
+ query.bindValue(":UNIQID",uniqid );
+ query.bindValue(":DESCRIPTION",description );
+
+//FNDME
+// if (!query.exec())
+// MythContext::DBError("Autocard::popup", query);
+
+ int lastIndex = listbox->getValueIndex(name);
+ lastValue = "";
+ load();
+ listbox->setValue(lastIndex);
+
+
+
+
+ }
+
+
+ listbox->setFocus();
+}
+
+
+
+QStringList AutoCard::GetNames(void)
+{
+ QStringList names;
+ QString device;
+ QString description;
+ QString displayname ;
+ QString status ;
+ QString uniqid;
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare("SELECT dev,description,uniqid,devicestatus FROM autocard order by uniqid");
+ if (query.exec() && query.isActive() && query.size() > 0)
+ {
+ while (query.next())
+ {
+ device=query.value(0).toString();
+ description=query.value(1).toString();
+ uniqid=query.value(2).toString();
+ status=query.value(3).toString();
+ //displayname=device;
+ displayname=". ";
+ displayname.append(description);
+ displayname.append(" * ");
+ displayname.append(status);
+ displayname.append(" * ");
+
+ displayname.append(uniqid);
+ names << displayname ;
+ }
+
+ return names;
+ }
+}
+
+void AutoCard::open(QString name)
+{
+ lastValue = name;
+ bool created = false;
+ //cout << name << endl;
+ if (name == "Mark all cards for addition")
+ {
+ //cout <<"updating all cards" << endl;
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare("update autocard set devicestatus='will-add' where devicestatus='unused' order by uniqid");
+ query.exec();
+ }
+ else if ( name == "Perform actions" )
+ {
+ // write udev rules and reload udev
+
+ system ("sudo autocard.py -w -i");
+ system ("sudo autocard.py -r");
+
+ }
+ else if ( name == "Exit" )
+ {
+ // write udev rules and reload udev
+ exit(0);
+ }
+ else
+ {
+ popup_menu();
+// bool ok = MythPopupBox::showGetTextPopup(gContext->GetMainWindow(),
+// tr("Create New Playback Group"),
+// tr("Enter group name or press SELECT to enter text via the "
+// "On Screen Keyboard"), name);
+
+
+ }
+
+};
+
+void AutoCard::load(void)
+{
+ listbox->clearSelections();
+
+
+ QStringList names = AutoCard::GetNames();
+ while (!names.isEmpty())
+ {
+ listbox->addSelection(names.front());
+ names.pop_front();
+ }
+ listbox->addSelection("Mark all cards for addition");
+ listbox->addSelection("Perform actions");
+ listbox->addSelection("Exit");
+ listbox->setValue(lastValue);
+
+}
+
+
+int AutoCard::exec(void)
+{
+ while (ConfigurationDialog::exec() == QDialog::Accepted)
+ open(listbox->getValue());
+
+ return QDialog::Rejected;
+}
+
+
+MythDialog* AutoCard::dialogWidget(MythMainWindow* parent,
+ const char* widgetName)
+{
+ dialog = ConfigurationDialog::dialogWidget(parent, widgetName);
+ connect(dialog, SIGNAL(menuButtonPressed()), this, SLOT(popup_menu()));
+ return dialog;
+}
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h
new file mode 100755
index 0000000..4948842
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h
@@ -0,0 +1,30 @@
+#ifndef AUTOCARD_H
+#define AUTOCARD_H
+#include <mythtv/mythdbcon.h>
+#include "qstringlist.h"
+#include "libmyth/settings.h"
+#include "libmyth/mythwidgets.h"
+
+class MPUBLIC AutoCard : public QObject, public ConfigurationDialog
+{
+ Q_OBJECT
+
+public:
+ AutoCard();
+ virtual int exec(void);
+ virtual void load(void);
+ virtual void save(void) { };
+ virtual void save(QString) { };
+ virtual MythDialog* dialogWidget(MythMainWindow* parent,
+ const char* widgetName=0);
+ static QStringList GetNames(void);
+protected slots:
+ void open(QString name);
+ void popup_menu(void);
+
+protected:
+ ListBoxSetting *listbox;
+ QString lastValue;
+};
+
+#endif
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp
new file mode 100755
index 0000000..7c8f4a2
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp
@@ -0,0 +1,55 @@
+
+using namespace std;
+
+#include <QString>
+
+#include "mythcorecontext.h"
+#include "commandlineparser.h"
+#define MYTH_APPNAME_MYTHINSTALL "mythinstall"
+
+MythInstallCommandLineParser::MythInstallCommandLineParser() :
+ MythCommandLineParser(MYTH_APPNAME_MYTHINSTALL)
+{ LoadArguments(); }
+
+void MythInstallCommandLineParser::LoadArguments(void)
+{
+ addHelp();
+ addVersion();
+ addSettingsOverride();
+ addGeometry();
+ addLogging();
+
+// add(QStringList( QStringList() << "-s" << "--screen" ), "screen", "",
+// "List settings screens to show", "");
+
+ add("-s", "screen", "",
+ "Start the frontend at specified jump point.", "");
+
+ add("-r", "readme", "",
+ "Show readme", "");
+
+ add("-H", "help", "",
+ "Show help screen", "");
+
+ add("-Q", "question", "",
+ "Display question with yes/no", "");
+
+ add("-b", "run_mythsetup", "",
+ "Ask to start mythtv setup", "");
+
+ add("-L", "show_lang", "",
+ "On install show lang/country screen", "");
+
+
+
+ //add(QStringList( QStringList() << "-p" << "--prompt" ), "prompt", false,
+ // "Always prompt for backend selection.", "");
+
+
+}
+
+QString MythInstallCommandLineParser::GetHelpHeader(void) const
+{
+ return "generic help msg line 34";
+}
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h
new file mode 100755
index 0000000..dc45adc
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h
@@ -0,0 +1,14 @@
+
+#include <QString>
+
+#include "mythcommandlineparser.h"
+
+class MythInstallCommandLineParser : public MythCommandLineParser
+{
+ public:
+ MythInstallCommandLineParser();
+ void LoadArguments(void);
+ protected:
+ QString GetHelpHeader(void) const;
+};
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp
new file mode 100755
index 0000000..22d784f
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp
@@ -0,0 +1,157 @@
+#include "mythuihelper.h"
+#include "settings.h"
+#include "compat-mv.h"
+
+
+void ImageSelectSetting::addImageSelection(const QString& label,
+ QImage* image,
+ QString value,
+ bool select) {
+ images.push_back(image);
+ addSelection(label, value, select);
+}
+
+ImageSelectSetting::~ImageSelectSetting()
+{
+ Teardown();
+}
+
+void ImageSelectSetting::deleteLater(void)
+{
+ Teardown();
+ SelectSetting::deleteLater();
+}
+
+void ImageSelectSetting::Teardown(void)
+{
+ while (images.size())
+ {
+ QImage *tmp = images.back();
+ images.pop_back();
+ delete tmp;
+ }
+ bxwidget = NULL;
+ imagelabel = NULL;
+ combo = NULL;
+}
+
+void ImageSelectSetting::imageSet(int num)
+{
+ if (num >= (int)images.size())
+ return;
+
+ if (!images[current])
+ return;
+
+ QImage temp = *(images[current]);
+ temp = temp.scaled((int)(184 * m_hmult), (int)(138 * m_hmult),
+ Qt::KeepAspectRatio);
+
+ QPixmap tmppix = QPixmap::fromImage(temp);
+ imagelabel->setPixmap(tmppix);
+}
+
+QWidget* ImageSelectSetting::configWidget(ConfigurationGroup *cg,
+ QWidget* parent,
+ const char* widgetName)
+{
+ int width = 0, height = 0;
+
+ GetMythUI()->GetScreenSettings(width, m_wmult, height, m_hmult);
+
+ bxwidget = new QWidget(parent);
+ bxwidget->setObjectName(widgetName);
+
+ QBoxLayout *layout = NULL;
+ if (labelAboveWidget)
+ {
+ layout = new QVBoxLayout();
+ bxwidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
+ QSizePolicy::Maximum));
+ }
+ else
+ layout = new QHBoxLayout();
+
+ layout->setContentsMargins(0,0,0,0);
+ layout->setSpacing(0);
+
+ if (getLabel() != "")
+ {
+ QLabel *label = new QLabel();
+ label->setText(getLabel() + ":");
+ layout->addWidget(label);
+ }
+
+ combo = new MythComboBox(false);
+ layout->addWidget(combo);
+
+ QLabel *testlabel = new QLabel();
+ testlabel->setText(" ");
+ layout->addWidget(testlabel);
+
+ connect(bxwidget, SIGNAL(destroyed(QObject*)),
+ this, SLOT(widgetDeleted(QObject*)));
+
+ imagelabel = new QLabel();
+ layout->addWidget(imagelabel);
+
+ for (unsigned int i = 0 ; i < images.size() ; ++i)
+ combo->insertItem(labels[i]);
+
+ if (isSet)
+ combo->setCurrentIndex(current);
+ else
+ current = 0;
+
+ if (images.size() != 0 && current < images.size() && images[current])
+ {
+ QImage temp = *(images[current]);
+ temp = temp.scaled((int)(184 * m_hmult), (int)(138 * m_hmult),
+ Qt::KeepAspectRatio);
+
+ QPixmap tmppix = QPixmap::fromImage(temp);
+ imagelabel->setPixmap(tmppix);
+ imagelabel->setMinimumHeight(tmppix.height());
+ }
+ else
+ {
+ QPixmap tmppix((int)(184 * m_hmult), (int)(138 * m_hmult));
+ tmppix.fill(Qt::black);
+
+ imagelabel->setPixmap(tmppix);
+ imagelabel->setMinimumHeight(tmppix.height());
+ }
+
+ connect(combo, SIGNAL(highlighted(int)), this, SLOT(setValue(int)));
+ connect(combo, SIGNAL(highlighted(int)), this, SLOT(imageSet(int)));
+ connect(combo, SIGNAL(activated(int)), this, SLOT(setValue(int)));
+ connect(combo, SIGNAL(activated(int)), this, SLOT(imageSet(int)));
+
+ connect(this, SIGNAL(selectionsCleared()),
+ combo, SLOT(clear()));
+
+ if (cg)
+ connect(combo, SIGNAL(changeHelpText(QString)), cg,
+ SIGNAL(changeHelpText(QString)));
+
+ bxwidget->setLayout(layout);
+
+ return bxwidget;
+}
+
+void ImageSelectSetting::widgetInvalid(QObject *obj)
+{
+ if (bxwidget == obj)
+ {
+ bxwidget = NULL;
+ imagelabel = NULL;
+ combo = NULL;
+ }
+}
+
+void ImageSelectSetting::setHelpText(const QString &str)
+{
+ if (combo)
+ combo->setHelpText(str);
+ SelectSetting::setHelpText(str);
+}
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h
new file mode 100755
index 0000000..bc2c4cb
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h
@@ -0,0 +1,43 @@
+#include "settings.h"
+#include "mythstorage.h"
+
+class MPUBLIC ImageSelectSetting: public SelectSetting {
+ Q_OBJECT
+public:
+ ImageSelectSetting(Storage *_storage) :
+ SelectSetting(_storage),
+ bxwidget(NULL), imagelabel(NULL), combo(NULL),
+ m_hmult(1.0f), m_wmult(1.0f) { }
+ virtual QWidget* configWidget(ConfigurationGroup *cg, QWidget* parent,
+ const char* widgetName = 0);
+ virtual void widgetInvalid(QObject *obj);
+ virtual void deleteLater(void);
+ virtual void setHelpText(const QString &str);
+
+ virtual void addImageSelection(const QString& label,
+ QImage* image,
+ QString value=QString::null,
+ bool select=false);
+
+protected slots:
+ void imageSet(int);
+
+protected:
+ void Teardown(void);
+ virtual ~ImageSelectSetting();
+
+protected:
+ vector<QImage*> images;
+ QWidget *bxwidget;
+ QLabel *imagelabel;
+ MythComboBox *combo;
+ float m_hmult, m_wmult;
+};
+
+
+class MPUBLIC HostImageSelect : public ImageSelectSetting, public HostDBStorage
+{
+public:
+ HostImageSelect(const QString &name) :
+ ImageSelectSetting(this), HostDBStorage(this, name) { }
+}; \ No newline at end of file
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp
new file mode 100755
index 0000000..58804a5
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp
@@ -0,0 +1,319 @@
+#include <unistd.h>
+#include "misc_settings.h"
+#include "mv_common.h"
+//Added by qt3to4:
+
+#include <Q3TextStream>
+#include <unistd.h>
+#include <stdio.h>
+#include <QtNetwork>
+
+#include <stdlib.h>
+#include "mythprogressdialog.h"
+#include "mythsystemlegacy.h"
+
+
+#include "mythuihelper.h"
+
+#include "fileshare.h"
+
+extern HostParms hostparm;
+using namespace std;
+
+//________________Client (NFS) Screen SETTINGS_________________________
+static HostComboBox *HostHaveCentralNFS()
+{
+ HostComboBox *gc = new HostComboBox("HostHaveCentralNFS");
+ gc->setLabel(QObject::tr("Central NFS Server"));
+ gc->addSelection("no");
+ gc->addSelection("yes") ;
+ gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the master backend. Select no if you are unsure."));
+
+ return gc;
+}
+
+static HostComboBox *HostCentralNFSIP()
+{
+ HostComboBox *gc = new HostComboBox("HostCentralNFSIP",true);
+ gc->setLabel(QObject::tr("NFS Server"));
+ gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, For example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file."));
+ gc->addSelection("example ip:share") ;
+ gc->addSelection("file:nfsmap_auto") ;
+ gc->addSelection("file:nfsmap") ;
+ gc->addSelection("silverraid:/raid0/data/media/");
+ gc->addSelection("") ;
+ return gc;
+};
+
+static HostComboBox *HostNFSmountpoint()
+{
+// #ifdef __MVAPP__
+// HostComboBox *gc = new HostComboBox("HostNFSmountpoint");
+// gc->addSelection("/data/storage/central_nfs");
+// #else
+// HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true);
+// gc->addSelection("/myth");
+// #endif
+
+ HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true);
+ gc->addSelection("/data/storage/central_nfs");
+ gc->setLabel(QObject::tr("Mount Point"));
+ gc->setHelpText(QObject::tr(""));
+ return gc;
+}
+
+static HostCheckBox *HostCentralNFSallhosts()
+{
+ HostCheckBox *gc = new HostCheckBox("HostCentralNFSallhosts");
+ gc->setLabel(QObject::tr("All Hosts Use This Share"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("If checked then all new hosts added to the cluster will try to access the same share."));
+ return gc;
+};
+
+
+
+
+
+ClientNFSSettings::ClientNFSSettings():
+TriggeredConfigurationGroup(false,false,false,true,true,false,false,true)
+{
+ setLabel(QObject::tr("Client NFS configuration"));
+
+ Setting* havenfs = HostHaveCentralNFS();
+ addChild(havenfs);
+ setTrigger(havenfs);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup();
+ QString systemtype = gCoreContext->GetSetting("HostSystemType");
+
+ if ( systemtype == "Master_backend" )
+ {
+ settings->addChild(HostCentralNFSallhosts());
+ }
+
+
+
+
+
+
+
+ settings->addChild(HostCentralNFSIP());
+ settings->addChild(HostNFSmountpoint());
+
+ addTarget("no", new VerticalConfigurationGroup());
+ addTarget("yes", settings);
+};
+
+
+
+//_______________Client NFS Frame
+FileShareMainFrameClient::FileShareMainFrameClient():
+VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("File Sharing Settings (1/2)"));
+ VerticalConfigurationGroup* fileshareframeclientsettings =
+ new VerticalConfigurationGroup(false, true,false,false);
+
+ ClientNFSSettings *clientnfssettings = new ClientNFSSettings();
+ fileshareframeclientsettings->addChild(clientnfssettings);
+ addChild(fileshareframeclientsettings);
+}
+
+
+//--------------------------------------
+
+static HostCheckBox *HostServiceNFS()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceNFS");
+ gc->setLabel(QObject::tr("File Sharing using NFS"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("If checked, any device on the network can access media via NFS."));
+ return gc;
+};
+static HostCheckBox *HostServiceSamba()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba");
+ gc->setLabel(QObject::tr("File Sharing using SMB (Windows Sharing)"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If checked, any device on the network can access media via Windows SMB file sharing."));
+ return gc;
+};
+
+static HostCheckBox *HostServiceSamba_write()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write");
+ gc->setLabel(QObject::tr("ReadOnly"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked, remote clients will have write and delete abilities."));
+ return gc;
+};
+
+
+static HostCheckBox *HostServiceSamba_writehome()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome");
+ gc->setLabel(QObject::tr("ReadOnly"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked, remote clients will have write and delete abilities."));
+ return gc;
+};
+
+static HostCheckBox *HostServiceSamba_media()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media");
+ gc->setLabel(QObject::tr("Share media"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr(" "));
+ return gc;
+};
+
+static HostCheckBox *HostServiceSamba_home()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home");
+ gc->setLabel(QObject::tr("Share home"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr(" "));
+ return gc;
+};
+
+
+
+static HostComboBox *HostServiceSamba_domain()
+{
+ HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true);
+ gc->setLabel(QObject::tr("Workgroup"));
+ gc->setHelpText(QObject::tr("Workgroup for Windows SMB shares."));
+ gc->addSelection("WORKGROUP");
+ QString currentitem;
+ QString line;
+ QFile file("/tmp/smbdomainlist");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith("domain"))
+ {
+ currentitem = line.section( " ", 1, 1 );
+ if ( currentitem != "-" )
+ gc->addSelection(currentitem);
+ }
+ }
+ file.close();
+ }
+ gc->addSelection("type_workgroup_here");
+ return gc;
+};
+
+class SAMBAsettings: public TriggeredConfigurationGroup {
+public:
+
+ SAMBAsettings():
+ TriggeredConfigurationGroup(false, true, true, true,false, false, true, true) {
+ SetVertical(true);
+ Setting* trigger = HostServiceSamba() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(2,false,false);
+ //settings->addChild(HostServiceSamba());
+ settings->addChild(HostServiceSamba_media());
+ settings->addChild(HostServiceSamba_write());
+ settings->addChild(HostServiceSamba_home());
+ settings->addChild(HostServiceSamba_writehome());
+ settings->addChild(HostServiceSamba_domain());
+
+ addTarget("0", new GridConfigurationGroup(2,false, false));
+ addTarget("1", settings);
+ };
+};
+
+void smb_busy_box() {
+ system ("nmbscan -d > /tmp/smbdomainlist & ");
+ QString msgtext="Searching for Windows Workgroups";
+ int return_code;
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,
+ "installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+ int progressbar=1;
+ MythProgressDialog *popupProgress = NULL;
+ popupProgress = new MythProgressDialog(msgtext, 50);
+ if (popupProgress)
+ {
+ popupProgress->setProgress(progressbar);
+ }
+
+
+
+ while ( return_code == 0 )
+ {
+
+ progressbar++;
+ popupProgress->setProgress(progressbar);
+ if (progressbar > 50 )
+ progressbar = 10;
+
+ return_code = myth_system("ps -ef|grep nmbscan|grep -v grep > /dev/null");
+ qApp->processEvents ();
+ usleep(900);
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+
+ if (popupProgress)
+ {
+ popupProgress->Close();
+ popupProgress->deleteLater();
+ }
+}
+
+
+//_______________Server NFS Frame
+FileShareMainFrameServer::FileShareMainFrameServer():
+VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("File Sharing Settings (2/2)"));
+
+ VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true);
+ TransLabelSetting *deniedlabel = new TransLabelSetting();
+ deniedlabel->setValue(" File sharing is not available for frontend_only systems." );
+ denied->addChild(deniedlabel);
+
+ VerticalConfigurationGroup* fileshare_frame_serversettings =
+ new VerticalConfigurationGroup(false,false,false,false);
+ fileshare_frame_serversettings->addChild(HostServiceNFS());
+ fileshare_frame_serversettings->addChild(new SAMBAsettings);
+
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+ if (hostparm.ThisSystemType == "Frontend_only" )
+ {
+ addChild(denied);
+ }
+ else
+ {
+ smb_busy_box();
+ addChild(fileshare_frame_serversettings);
+ }
+
+}
+
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h
new file mode 100755
index 0000000..68be528
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h
@@ -0,0 +1,45 @@
+#include <mythcontext.h>
+#include <unistd.h>
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+#include "settings.h"
+#include "installsettings.h"
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+
+#include <stdlib.h>
+#include <cstdlib>
+#include <mythtv/mythdbcon.h>
+#include <qdir.h>
+#include <qapplication.h>
+#include "mythmiscutil.h"
+
+
+
+
+class FileShareMainFrameClient: public VerticalConfigurationGroup {
+public:
+ FileShareMainFrameClient();
+};
+
+
+class FileShareMainFrameServer: public VerticalConfigurationGroup {
+public:
+ FileShareMainFrameServer();
+};
+
+
+
+
+
+
+
+class ClientNFSSettings: public
+TriggeredConfigurationGroup {
+public:
+ ClientNFSSettings();
+
+};
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp
new file mode 100755
index 0000000..34a2a33
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp
@@ -0,0 +1,733 @@
+#include <unistd.h>
+#include <stdlib.h>
+#include "infrared.h"
+#include <Q3TextStream>
+
+using namespace std;
+
+extern HostParms hostparm;
+
+// READS IN REMOTES DESIGNATED AS favorites
+HostRemoteTypeIR_favorites::HostRemoteTypeIR_favorites():
+ HostImageSelect("HostRemoteType_favorites") {
+ setLabel(QObject::tr("Remote"));
+ QString dirtxt;
+ QString previewpath;
+ //scan templates
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/remotes/favorites");
+ QDir remotes_global(dirtxt);
+ remotes_global.setFilter(QDir::Dirs);
+ remotes_global.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs);
+ QString previewpath_global;
+ previewpath_global = dirtxt;
+ for( QFileInfoList::iterator it = fil_global.begin();
+ it != fil_global.end();
+ ++it )
+ {
+ QFileInfo &remote = *it;
+ previewpath=dirtxt;
+ previewpath+="/";
+ previewpath+=remote.fileName() ;
+ previewpath+="/preview.jpg" ;
+ QFileInfo preview_global(previewpath);
+ if ( !preview_global.exists() )
+ {
+ continue;
+ }
+ QImage* previewImage = new QImage(preview_global.absFilePath());
+ addImageSelection(remote.fileName(), previewImage);
+ }
+};
+
+// READS IN REMOTES DESIGNATED AS OTHER
+HostRemoteTypeIR_other::HostRemoteTypeIR_other():
+ HostImageSelect("HostRemoteType_other") {
+ setLabel(QObject::tr("Remote"));
+ QString dirtxt;
+ QString previewpath;
+ //scan templates
+
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/remotes/other");
+ QDir remotes_global(dirtxt);
+ remotes_global.setFilter(QDir::Dirs);
+ remotes_global.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs);
+ QString previewpath_global;
+ previewpath_global = dirtxt;
+ for( QFileInfoList::iterator it = fil_global.begin();
+ it != fil_global.end();
+ ++it )
+ {
+ QFileInfo &remote = *it;
+ previewpath=dirtxt;
+ previewpath+="/";
+ previewpath+=remote.fileName() ;
+ previewpath+="/preview.jpg" ;
+ QFileInfo preview_global(previewpath);
+ if ( !preview_global.exists() )
+ {
+ continue;
+ }
+ QImage* previewImage = new QImage(preview_global.absFilePath());
+ addImageSelection(remote.fileName(), previewImage);
+ }
+};
+
+
+// READS IN REMOTES DESIGNATED AS hauppauge
+HostRemoteTypeIR_hauppauge::HostRemoteTypeIR_hauppauge():
+ HostImageSelect("HostRemoteType_hauppauge") {
+ setLabel(QObject::tr("Remote"));
+ QString dirtxt;
+ QString previewpath;
+ //scan templates
+
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/remotes/hauppauge");
+ QDir remotes_global(dirtxt);
+ remotes_global.setFilter(QDir::Dirs);
+ remotes_global.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs);
+ QString previewpath_global;
+ previewpath_global = dirtxt;
+ for( QFileInfoList::iterator it = fil_global.begin();
+ it != fil_global.end();
+ ++it )
+ {
+ QFileInfo &remote = *it;
+ previewpath=dirtxt;
+ previewpath+="/";
+ previewpath+=remote.fileName() ;
+ previewpath+="/preview.jpg" ;
+ QFileInfo preview_global(previewpath);
+ if ( !preview_global.exists() )
+ {
+ continue;
+ }
+ QImage* previewImage = new QImage(preview_global.absFilePath());
+ addImageSelection(remote.fileName(), previewImage);
+ }
+};
+
+
+
+// READS IN REMOTES DESIGNATED AS ATI
+HostRemoteTypeIR_ATI::HostRemoteTypeIR_ATI():
+ HostImageSelect("HostRemoteType_ATI") {
+ setLabel(QObject::tr("Remote"));
+ QString dirtxt;
+ QString previewpath;
+ //scan templates
+
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/remotes/ATI");
+ QDir remotes_global(dirtxt);
+ remotes_global.setFilter(QDir::Dirs);
+ remotes_global.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs);
+ QString previewpath_global;
+ previewpath_global = dirtxt;
+ for( QFileInfoList::iterator it = fil_global.begin();
+ it != fil_global.end();
+ ++it )
+ {
+ QFileInfo &remote = *it;
+ previewpath=dirtxt;
+ previewpath+="/";
+ previewpath+=remote.fileName() ;
+ previewpath+="/preview.jpg" ;
+ QFileInfo preview_global(previewpath);
+ if ( !preview_global.exists() )
+ {
+ continue;
+ }
+ QImage* previewImage = new QImage(preview_global.absFilePath());
+ addImageSelection(remote.fileName(), previewImage);
+ }
+};
+
+
+
+// READS IN REMOTES DESIGNATED AS USER
+HostRemoteTypeIR_user::HostRemoteTypeIR_user():
+ HostImageSelect("HostRemoteType_user") {
+ setLabel(QObject::tr("Remote"));
+ QString dirtxt;
+ QString previewpath;
+ //scan home dir $HOME/remotes
+ dirtxt=QDir::homePath() ;
+ dirtxt.append("/remotes");
+
+ QDir remotes_global(dirtxt);
+ remotes_global.setFilter(QDir::Dirs);
+ remotes_global.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs);
+ QString previewpath_global;
+ previewpath_global = dirtxt;
+ int count = 0;
+ for( QFileInfoList::iterator it = fil_global.begin();
+ it != fil_global.end();
+ ++it )
+ {
+ QFileInfo &remote = *it;
+ previewpath=dirtxt;
+ previewpath+="/";
+ previewpath+=remote.fileName() ;
+ previewpath+="/preview.jpg" ;
+ QFileInfo preview_global(previewpath);
+ if ( !preview_global.exists() )
+ {
+ continue;
+ }
+ QImage* previewImage = new QImage(preview_global.absFilePath());
+ addImageSelection(remote.fileName(), previewImage);
+ count++;
+ }
+ QFileInfo preview_global(previewpath);
+ QImage* previewImage = new QImage(preview_global.absFilePath());
+ if ( count == 0 )
+ addImageSelection("none found", previewImage);
+
+};
+
+
+
+
+
+static HostComboBox *HostReceiverType()
+{
+ HostComboBox *gc = new HostComboBox("HostReceiverType");
+ gc->setLabel(QObject::tr("Receiver"));
+ gc->addSelection("Default");
+ gc->addSelection("tinker");
+ gc->addSelection("serial");
+ gc->addSelection("streamzap");
+ gc->addSelection("mce");
+ //gc->addSelection("imon");
+ gc->addSelection("Hauppauge");
+ gc->addSelection("hd_pvr");
+ gc->addSelection("CommandIR");
+ gc->addSelection("iguanaIR-usb");
+ gc->addSelection("SiliconDust_HDHR");
+
+ gc->setHelpText(QObject::tr("The type of infrared receiver used. Default will use ALL remote devices found."));
+ gc->setValue("Default");
+ return gc;
+};
+
+
+
+static HostComboBox *HostSerialPortlirc()
+{
+ HostComboBox *gc = new HostComboBox("HostSerialPortlirc",false);
+ gc->setLabel(QObject::tr("Serial Port"));
+ gc->addSelection("ttyS0");
+ gc->addSelection("ttyS1");
+ gc->addSelection("ttyS2");
+ gc->addSelection("ttyS3");
+ gc->setHelpText(QObject::tr("Serial port with the lirc receiver or transmitter"));
+ return gc;
+}
+
+static HostComboBox *HostHDHRlirc_device()
+{
+ QString temphdhr;
+ temphdhr = gCoreContext->GetSetting("HostHDHRlirc_device");
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HostHDHRlirc_device'; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ HostComboBox *gc = new HostComboBox("HostHDHRlirc_device",false);
+ system ("hdhomerun_config discover > /tmp/.hdhrdiscover");
+ gc->setLabel(QObject::tr("HDHR device"));
+ gc->setHelpText(QObject::tr("HDHomeRun device to use as remote receiver. Identifier listed is the Device id found on the bottom of the HDHomeRun."));
+ QString currentitem;
+ QString line;
+ QFile file("/tmp/.hdhrdiscover");
+ bool foundhdhr;
+ foundhdhr = false;
+
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith("hdhomerun device"))
+ {
+ currentitem = line.section( " ", 2, 2 );
+ gc->addSelection(currentitem);
+ foundhdhr = true;
+ }
+ }
+ file.close();
+ }
+
+ //These are all hoops to jump through to clear out the device list and save when the combobox isn't touched by the user and they just accept the defaults
+ if ( foundhdhr == false )
+ {
+ gc->clearSelections();
+ gc->addSelection("No devices found");
+ gc->setValue("No devices found");
+ gCoreContext->SaveSetting("HostHDHRlirc_device","No devices found");
+ }
+ else
+ {
+ int findhdhr=gc->findSelection(temphdhr);
+ //JM VERBOSE(VB_IMPORTANT, findhdhr);
+ if ( findhdhr > -1 )
+ {
+ gc->addSelection(temphdhr);
+ gc->setValue(temphdhr);
+ gCoreContext->SaveSetting("HostHDHRlirc_device", temphdhr );
+ }
+ else
+ {
+ gCoreContext->SaveSetting("HostHDHRlirc_device", gc->getValue());
+ }
+ }
+
+ return gc;
+}
+
+
+
+class LIRC_ReceiverSettings: public TriggeredConfigurationGroup {
+public:
+ LIRC_ReceiverSettings():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ Setting* trigger = HostReceiverType() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true);
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(2,true);
+ settings->addChild(HostSerialPortlirc());
+
+ ConfigurationGroup* hdhrsettings = new GridConfigurationGroup(2,true);
+ hdhrsettings->addChild(HostHDHRlirc_device());
+
+
+
+ addTarget("Default", blanksettings);
+ addTarget("tinker", blanksettings );
+ addTarget("serial", settings);
+ addTarget("imon", blanksettings );
+ //addTarget("Hauppauge",blanksettings);
+ addTarget("hd_pvr",blanksettings);
+ addTarget("CommandIR", blanksettings);
+ addTarget("iguanaIR-usb", blanksettings);
+ addTarget("mce", blanksettings);
+ addTarget("streamzap", blanksettings);
+ addTarget("SiliconDust_HDHR", hdhrsettings);
+
+ };
+};
+
+static HostComboBox *HostRemotebucket()
+{
+ HostComboBox *gc = new HostComboBox("HostRemotebucket");
+ gc->setLabel(QObject::tr("Remote Class"));
+ gc->addSelection("favorites");
+ gc->addSelection("hauppauge");
+ gc->addSelection("ATI");
+ gc->addSelection("user");
+ gc->addSelection("other");
+
+ gc->setHelpText(QObject::tr("Remote classification. Favorites are remotes fully supported by LinHES."));
+
+ return gc;
+};
+
+
+class Remote_bucket: public TriggeredConfigurationGroup {
+public:
+ Remote_bucket():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ Setting* trigger = HostRemotebucket() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true);
+ ConfigurationGroup* favorites_def = new GridConfigurationGroup(2,true);
+ favorites_def-> addChild(new HostRemoteTypeIR_favorites());
+
+ ConfigurationGroup* other_def = new GridConfigurationGroup(2,true);
+ other_def-> addChild(new HostRemoteTypeIR_other());
+
+ ConfigurationGroup* hauppauge_def = new GridConfigurationGroup(2,true);
+ hauppauge_def-> addChild(new HostRemoteTypeIR_hauppauge());
+
+ ConfigurationGroup* ATI_def = new GridConfigurationGroup(2,true);
+ ATI_def-> addChild(new HostRemoteTypeIR_ATI());
+
+
+ ConfigurationGroup* user_def = new GridConfigurationGroup(2,true);
+ user_def-> addChild(new HostRemoteTypeIR_user());
+
+ addTarget("favorites", favorites_def);
+ addTarget("hauppauge", hauppauge_def);
+ addTarget("ATI", ATI_def);
+ addTarget("user", user_def);
+ addTarget("other", other_def);
+
+
+
+
+ };
+};
+
+
+
+
+
+
+
+IRFrame::IRFrame():
+ VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("Remotes Settings"));
+ LIRC_ReceiverSettings *receiversettings = new LIRC_ReceiverSettings();
+ //addChild(new HostRemoteTypeIR());
+ addChild(new Remote_bucket());
+ addChild(receiversettings);
+}
+
+
+//----------------transmit settings--------------
+static HostComboBox *HostTransmitproto_1()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitproto_1",false);
+ gc->setLabel(QObject::tr("Transmitter 1"));
+ gc->addSelection("none");
+ gc->setValue(0);
+ gc->setHelpText(QObject::tr("Remote codes to control a cable box"));
+ QString dirtxt;
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/transmit");
+ QDir transmit(dirtxt);
+ transmit.setFilter(QDir::Dirs);
+ transmit.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil = transmit.entryInfoList(QDir::Dirs);
+ for( QFileInfoList::iterator it = fil.begin();
+ it != fil.end();
+ ++it )
+ {
+ QFileInfo &currentitem = *it;
+ // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName());
+ if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "")
+ {
+ gc->addSelection(currentitem.fileName());
+ }
+ }
+ return gc;
+};
+
+
+
+
+
+static HostComboBox *HostTransmitproto_2()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitproto_2",false);
+ gc->setLabel(QObject::tr("Transmitter 2"));
+ gc->addSelection("none");
+ gc->setValue(0);
+ gc->setHelpText(QObject::tr("Remote codes to control a cable box"));
+ QString dirtxt;
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/transmit");
+ QDir transmit(dirtxt);
+ transmit.setFilter(QDir::Dirs);
+ transmit.setSorting(QDir::Name | QDir::IgnoreCase);
+ QFileInfoList fil = transmit.entryInfoList(QDir::Dirs);
+ for( QFileInfoList::iterator it = fil.begin();
+ it != fil.end();
+ ++it )
+ {
+ QFileInfo &currentitem = *it;
+ // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName());
+ if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "")
+ {
+ gc->addSelection(currentitem.fileName());
+ }
+ }
+ return gc;
+};
+
+static HostComboBox *HostTransmitproto_3()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitproto_3",false);
+ gc->setLabel(QObject::tr("Transmitter 3"));
+ gc->addSelection("none");
+ gc->setValue(0);
+ gc->setHelpText(QObject::tr("Remote codes to control a cable box"));
+ QString dirtxt;
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/transmit");
+ QDir transmit(dirtxt);
+ transmit.setFilter(QDir::Dirs);
+ QFileInfoList fil = transmit.entryInfoList(QDir::Dirs);
+ for( QFileInfoList::iterator it = fil.begin();
+ it != fil.end();
+ ++it )
+ {
+ QFileInfo &currentitem = *it;
+ // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName());
+ if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "")
+ {
+ gc->addSelection(currentitem.fileName());
+ }
+ }
+ return gc;
+};
+
+static HostComboBox *HostTransmitproto_4()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitproto_4",false);
+ gc->setLabel(QObject::tr("Transmitter 4"));
+ gc->addSelection("none");
+ gc->setValue(0);
+ gc->setHelpText(QObject::tr("Remote codes to control a cable box"));
+ QString dirtxt;
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/transmit");
+ QDir transmit(dirtxt);
+ QFileInfoList fil = transmit.entryInfoList(QDir::Dirs);
+ for( QFileInfoList::iterator it = fil.begin();
+ it != fil.end();
+ ++it )
+ {
+ QFileInfo &currentitem = *it;
+ // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName());
+ if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "")
+ {
+ gc->addSelection(currentitem.fileName());
+ }
+ }
+ return gc;
+};
+
+
+static HostComboBox *HostBlasterType()
+{
+ HostComboBox *gc = new HostComboBox("HostBlasterType");
+ gc->setLabel(QObject::tr("Blaster"));
+ gc->addSelection("None");
+ gc->addSelection("Receiver");
+ gc->addSelection("serial");
+ gc->addSelection("CommandIR");
+
+ //gc->addSelection("Hauppauge");
+ gc->addSelection("mce");
+ //gc->addSelection("pvr150");
+ gc->addSelection("iguanaIR-usb");
+ gc->addSelection("hd_pvr");
+ gc->setHelpText(QObject::tr("The type of infrared transmitter being used. Selecting CommandIR or iguanaIR-usb will use that device for both transmitting and receiving. All other receivers will be disabled."));
+ gc->setValue("None");
+ return gc;
+};
+
+static HostComboBox *HostSerialPort_blasterlirc()
+{
+ HostComboBox *gc = new HostComboBox("HostSerialPort_blasterlirc",false);
+ gc->setLabel(QObject::tr("Serial Port"));
+ gc->addSelection("ttyS0");
+ gc->addSelection("ttyS1");
+ gc->addSelection("ttyS2");
+ gc->addSelection("ttyS3");
+ gc->setHelpText(QObject::tr("Serial port with the lirc transmitter"));
+ return gc;
+}
+
+
+static HostSpinBox *HostTransmitDelay_1()
+{
+ HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_1", 1 , 200, 1, true);
+ gc->setLabel(QObject::tr("Delay"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits"));
+ return gc;
+}
+static HostComboBox *HostTransmitSend_after_1()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitSend_after_1",false);
+ gc->setLabel(QObject::tr("Key:"));
+ gc->addSelection("Enter");
+ gc->addSelection("Select");
+ gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select"));
+ return gc;
+}
+
+static HostSpinBox *HostTransmitDelay_2()
+{
+ HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_2", 1 , 200, 1, true);
+ gc->setLabel(QObject::tr("Delay"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits"));
+ return gc;
+}
+static HostComboBox *HostTransmitSend_after_2()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitSend_after_2",false);
+ gc->setLabel(QObject::tr("Key:"));
+ gc->addSelection("Enter");
+ gc->addSelection("Select");
+ gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select"));
+ return gc;
+}
+
+
+static HostSpinBox *HostTransmitDelay_3()
+{
+ HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_3", 1 , 200, 1, true);
+ gc->setLabel(QObject::tr("Delay"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits"));
+ return gc;
+}
+static HostComboBox *HostTransmitSend_after_3()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitSend_after_3",false);
+ gc->setLabel(QObject::tr("Key:"));
+ gc->addSelection("Enter");
+ gc->addSelection("Select");
+ gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select"));
+ return gc;
+}
+
+
+static HostSpinBox *HostTransmitDelay_4()
+{
+ HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_4", 1 , 200, 1, true);
+ gc->setLabel(QObject::tr("Delay"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits"));
+ return gc;
+}
+static HostComboBox *HostTransmitSend_after_4()
+{
+ HostComboBox *gc = new HostComboBox("HostTransmitSend_after_4",false);
+ gc->setLabel(QObject::tr("Key:"));
+ gc->addSelection("Enter");
+ gc->addSelection("Select");
+ gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select"));
+ return gc;
+}
+
+
+
+
+
+
+
+class LIRC_BlasterSettings: public TriggeredConfigurationGroup {
+public:
+ LIRC_BlasterSettings():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ Setting* trigger = HostBlasterType() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true);
+
+ ConfigurationGroup* transmit_1 = new GridConfigurationGroup(3,true);
+ transmit_1->addChild(HostTransmitproto_1());
+ transmit_1->addChild(HostTransmitDelay_1());
+ //transmit_1->addChild(HostTransmitSend_after_1());
+
+ ConfigurationGroup* transmit_2 = new GridConfigurationGroup(3,true);
+ transmit_2->addChild(HostTransmitproto_2());
+ transmit_2->addChild(HostTransmitDelay_2());
+ //transmit_2->addChild(HostTransmitSend_after_2());
+
+
+ ConfigurationGroup* transmit_3 = new GridConfigurationGroup(3,true);
+ transmit_3->addChild(HostTransmitproto_3());
+ transmit_3->addChild(HostTransmitDelay_3());
+ //transmit_3->addChild(HostTransmitSend_after_3());
+
+ ConfigurationGroup* transmit_4 = new GridConfigurationGroup(3,true);
+ transmit_4->addChild(HostTransmitproto_4());
+ transmit_4->addChild(HostTransmitDelay_4());
+ //transmit_4->addChild(HostTransmitSend_after_4());
+
+ ConfigurationGroup* CommandIRsettings = new GridConfigurationGroup(1,true);
+ CommandIRsettings->addChild(transmit_1);
+ CommandIRsettings->addChild(transmit_2);
+ CommandIRsettings->addChild(transmit_3);
+ CommandIRsettings->addChild(transmit_4);
+
+ ConfigurationGroup* mcesettings = new GridConfigurationGroup(1,true);
+ mcesettings->addChild(transmit_1);
+ mcesettings->addChild(transmit_2);
+
+ ConfigurationGroup* serial_settings = new GridConfigurationGroup(1,true);
+ serial_settings->addChild(HostSerialPort_blasterlirc());
+ serial_settings->addChild(transmit_1);
+
+ addTarget("None", blanksettings);
+ addTarget("Receiver", transmit_1);
+ addTarget("Serial", serial_settings);
+ addTarget("CommandIR", CommandIRsettings);
+ //addTarget("pvr150",blanksettings);
+ addTarget("hd_pvr",transmit_1);
+ addTarget("mce",mcesettings);
+ addTarget("iguanaIR-usb",mcesettings);
+// addTarget("tinker", blanksettings );
+ };
+};
+
+IR_TransmitFrame::IR_TransmitFrame():
+ VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("Blaster Settings"));
+ LIRC_BlasterSettings *blastersettings = new LIRC_BlasterSettings();
+ addChild(blastersettings);
+}
+
+//------------------LCD settings-------------
+
+
+
+static HostComboBox *HostLCDType()
+{
+ HostComboBox *gc = new HostComboBox("HostLCDType",false);
+ gc->setLabel(QObject::tr("LCD/VFD model"));
+ gc->addSelection("no_lcd");
+ gc->addSelection("tinker");
+ gc->setValue(0);
+ gc->setHelpText(QObject::tr("VFD or LCD"));
+ QString dirtxt;
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/LCD");
+ QDir transmit(dirtxt);
+ transmit.setFilter(QDir::Dirs);
+ QFileInfoList fil = transmit.entryInfoList(QDir::Dirs);
+ for( QFileInfoList::iterator it = fil.begin();
+ it != fil.end();
+ ++it )
+ {
+ QFileInfo &currentitem = *it;
+ //JM VERBOSE(VB_IMPORTANT, currentitem.fileName());
+ if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "")
+ {
+ gc->addSelection(currentitem.fileName());
+ }
+ }
+ return gc;
+};
+
+LCDFrame::LCDFrame():
+ VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("LCD Settings"));
+ addChild(HostLCDType());
+}
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h
new file mode 100755
index 0000000..e11c49d
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h
@@ -0,0 +1,67 @@
+#include <mythcontext.h>
+#include <unistd.h>
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+#include "settings.h"
+#include "installsettings.h"
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+
+#include <stdlib.h>
+#include <cstdlib>
+#include <mythtv/mythdbcon.h>
+#include <qdir.h>
+#include <qapplication.h>
+#include "mythmiscutil.h"
+
+class IRFrame: public VerticalConfigurationGroup {
+public:
+ IRFrame();
+};
+
+
+class HostRemoteTypeIR_favorites: public HostImageSelect {
+public:
+ HostRemoteTypeIR_favorites();
+};
+
+class HostRemoteTypeIR_other: public HostImageSelect {
+public:
+ HostRemoteTypeIR_other();
+};
+
+class HostRemoteTypeIR_hauppauge: public HostImageSelect {
+public:
+ HostRemoteTypeIR_hauppauge();
+};
+
+class HostRemoteTypeIR_ATI: public HostImageSelect {
+public:
+ HostRemoteTypeIR_ATI();
+};
+
+
+class HostRemoteTypeIR_user: public HostImageSelect {
+public:
+ HostRemoteTypeIR_user();
+};
+
+
+class IR_TransmitFrame: public VerticalConfigurationGroup {
+public:
+ IR_TransmitFrame();
+
+};
+
+class LCDFrame: public VerticalConfigurationGroup {
+public:
+ LCDFrame();
+
+};
+
+
+
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml b/abs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml
new file mode 100755
index 0000000..c03d962
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml
@@ -0,0 +1,148 @@
+<mythuitheme>
+
+ <window name="welcome_screen">
+ <!-- <font name="title" face="Arial">
+ <color>#ffff00</color>
+ <dropcolor>#000000</dropcolor>
+ <size>24</size>
+ <shadow>3,3</shadow>
+ <bold>yes</bold>
+ </font>
+
+ <font name="time" face="Arial">
+ <color>#9999cc</color>
+ <size>18</size>
+ <bold>yes</bold>
+ </font>
+
+ <font name="label" face="Arial">
+ <color>#ffff00</color>
+ <dropcolor>#000000</dropcolor>
+ <size>18</size>
+ <shadow>3,3</shadow>
+ <bold>yes</bold>
+ </font>
+
+ <font name="info" face="Arial">
+ <color>#ffffff</color>
+ <size>18</size>
+ <bold>yes</bold>
+ </font>
+
+ <font name="biginfo" face="Arial">
+ <color>#ffffff</color>
+ <size>50</size>
+ <bold>yes</bold>
+ </font>
+ <font name="warning" face="Arial">
+ <color>#ff0000</color>
+ <dropcolor>#000000</dropcolor>
+ <size>16</size>
+ <shadow>2,2</shadow>
+ <bold>yes</bold>
+ </font>
+
+ <font name="buttons" face="Arial">
+ <color>#ffff00</color>
+ <size>14</size>
+ <bold>yes</bold>
+ </font>
+ <font name="tinyinfo" face="Arial">
+ <color>#9999cc</color>
+ <size>12</size>
+ <bold>no</bold>
+ </font>-->
+
+ <textarea name="title" from="basetextarea">
+ <area>50,10,700,40</area>
+ <font>title</font>
+ <align>allcenter</align>
+ <value>Welcome to MythVantage!</value>
+ </textarea>
+
+
+ <textarea name="time_text" draworder="0" align="right">
+ <multiline>no</multiline>
+ <font>time</font>
+ <area>660,520,110,30</area>
+ <value></value>
+ </textarea>
+
+ <textarea name="date_text" >
+ <multiline>yes</multiline>
+ <font>warning</font>
+ <area>20,55,740,100</area>
+ <value></value>
+ <align>allcenter</align>
+ </textarea>
+
+ <!--
+ current myth status
+ -->
+
+ <textarea name="status_text">
+ <multiline>yes</multiline>
+ <font>info</font>
+ <area>20,300,760,60</area>
+ <value></value>
+ <align>center</align>
+ </textarea>
+
+ <!--
+ current recordings status
+ -->
+
+ <textarea name="recording_label" draworder="1" align="center">
+ <font>label</font>
+ <area>20,140,760,30</area>
+ <!--<value>Percent Complete </value>-->
+ <value></value>
+ </textarea>
+
+ <textarea name="recording_text">
+ <multiline>yes</multiline>
+ <font>biginfo</font>
+ <area>20,140,760,150</area>
+ <value></value>
+ <align>allcenter</align>
+ </textarea>
+
+ <textarea name="scheduled_label" draworder="1" align="center">
+ <font>label</font>
+ <area>20,320,760,30</area>
+ <value></value>
+ </textarea>
+
+ <textarea name="scheduled_text">
+ <multiline>yes</multiline>
+ <font>biginfo</font>
+ <area>20,400,760,120</area>
+ <value></value>
+ <align>allcenter</align>
+ </textarea>
+
+ <textarea name="mythvantage_text">
+ <multiline>no</multiline>
+ <font>tinyinfo</font>
+ <area>20,540,760,30</area>
+ <value></value>
+ <align>right</align>
+ </textarea>
+ <imagetype name="logo">
+ <position>10,10</position>
+ <preserveaspect>true</preserveaspect>
+ <crop>x,y,w,h</crop>
+ <filepattern low="0" high="3000">/usr/MythVantage/logos/logo-%1.png</filepattern>
+ <delay>5000</delay>
+ </imagetype>
+
+ <imagetype name="logo1">
+ <position>550,10</position>
+ <filename>/usr/MythVantage/logos/</filename>
+ <preserveaspect>true</preserveaspect>
+ <crop>x,y,w,h</crop>
+ </imagetype>
+
+ </window>
+
+</mythuitheme>
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh b/abs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh
new file mode 100755
index 0000000..a1a722e
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh
@@ -0,0 +1,353 @@
+#!/bin/bash
+disk=$2
+rootfs=$3
+rootsize=$4
+datafs=$5
+datasize=$6
+swapsize=$7
+mountpoint="/new_boot"
+run=/root/install_functions.sh
+. /etc/systemconfig 2>/dev/null
+
+
+progress () {
+mypercent=`echo "$1" | cut -d. -f1`
+if [ x$mypercent = x ]
+then
+echo "" > /tmp/.install_percent
+else
+echo "${mypercent}% complete" > /tmp/.install_percent
+fi
+
+
+}
+
+full_install () {
+ if [ -f /tmp/.this_is_upgrade ]
+ then
+ rm /tmp/.this_is_upgrade
+ fi
+ echo "Partitioning $disk" > /tmp/.install_state
+ progress 1
+ sleep 1
+ $run partition_it $disk $rootsize $datasize $swapsize
+
+ echo "Formating $disk" > /tmp/.install_state
+ progress 2
+ sleep 1
+ $run format_it $disk $rootfs $datafs
+
+ echo "Preparing $disk" > /tmp/.install_state
+ progress 3
+ sleep 1
+ $run mount_it $disk
+
+ startsize=`statgrab -M disk.|grep $disk.write_bytes|cut -d= -f 2|tr -d " "`
+
+ echo "STARTSIZE=$startsize">/tmp/.startsize.io
+ echo "Installing data" > /tmp/.install_state
+
+ sleep 1
+ $run copy_it $disk ALL
+ $run fstab_fix_it $disk $rootfs $datafs
+
+ progress 99
+ sleep 1
+ $run grub_it $disk
+
+ echo "Configuring system" > /tmp/.install_state
+ progress 100
+ sleep 1
+ cp -f /etc/systemconfig "$mountpoint"/etc
+ #run save syssettings to save settings, then copy to new mountpoint
+ /root/restore_default_settings.sh -c save -t syssettings -h myhost -d 127.0.0.1
+ SE=/usr/share/templates/settings/syssettings
+ mkdir -p ${mountpoint}$SE
+ cp -rp $SE/* ${mountpoint}$SE/
+ chown root:mythtv "$mountpoint"/etc/systemconfig
+ chown -R mythtv:mythtv ${mountpoint}$SE
+
+ chmod -R 775 ${mountpoint}$SE
+ chmod 775 "$mountpoint"/etc/systemconfig
+ #copy over any updates that might have occured
+ cp -f /root/*.sh "$mountpoint"/root/
+ chmod -R 755 ${mountpoint}/root
+ cp /etc/mtab "$mountpoint"/etc/mtab
+ chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network
+
+ if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ]
+ then
+ #installing DB to local machine
+
+ chroot "$mountpoint" /root/install_db_chroot.sh
+ else
+ #update remotedb with this host settings
+ chroot "$mountpoint" /root/restore_default_settings.sh -c restore -t Default
+ chroot "$mountpoint" /root/restore_default_settings.sh -c restore -t syssettings
+ #Run second time
+ chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network
+ fi
+ echo "Done" > /tmp/.install_state
+ $run unmount_it $disk
+}
+
+
+
+
+function upgrade () {
+ touch /tmp/.this_is_upgrade
+
+ if [ ! x$rootfs = "xDo_not_format" ]
+ then
+ echo "Formating $disk" > /tmp/.install_state
+ progress 2
+ sleep 1
+ $run format_it $disk $rootfs NO
+ fi
+
+
+ echo "Preparing $disk" > /tmp/.install_state
+ progress 3
+ sleep 1
+ $run mount_it $disk
+ startsize=`statgrab -M disk.|grep $disk.write_bytes|cut -d= -f 2|tr -d " "`
+ echo "STARTSIZE=$startsize">/tmp/.startsize.io
+ echo "Installing data" > /tmp/.install_state
+ sleep 1
+ cp -rf /tmp/etc /new_boot/etc.old
+ cp -rf /tmp/oss /new_boot/var/lib/oss.old
+ $run copy_it $disk bin.lzm,boot.lzm,etc.lzm,home.lzm,lib.lzm,opt.lzm,root.lzm,sbin.lzm,usr.lzm,var.lzm
+
+ if [ x$rootfs = "xDo_not_format" ]
+ then
+ rootfs=`grep ${disk}1 /tmp/etc/fstab |awk ' { print $3 } '`
+ fi
+ datafs=`grep ${disk}3 /tmp/etc/fstab |awk ' { print $3 } '`
+ $run fstab_fix_it $disk $rootfs $datafs
+
+ echo "Writing boot sector" > /tmp/.install_state
+ progress 99
+ sleep 1
+ $run grub_it $disk
+
+
+ echo "Configuring system" > /tmp/.install_state
+ progress
+ sleep 1
+ cp /etc/mtab "$mountpoint"/etc/mtab
+ cp -f /etc/systemconfig "$mountpoint"/etc
+ cp -f /root/*.sh "$mountpoint"/root/
+ chmod -R 755 ${mountpoint}/root
+ chown root:mythtv "$mountpoint"/etc/systemconfig
+ chmod 775 "$mountpoint"/etc/systemconfig
+ chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network
+ # chroot "$mountpoint" /root/restore_default_settings.sh restore Default
+ chroot "$mountpoint" /root/restore_default_settings.sh -c restore -t syssettings
+ #Run second time
+ chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network
+ # fi
+
+ echo "Done" > /tmp/.install_state
+
+ $run unmount_it $disk
+}
+
+
+
+function killdhcp () {
+if [ -f /etc/dhcpc/dhcpcd-eth0.pid ]
+ then
+ pid=`cat /etc/dhcpc/dhcpcd-eth0.pid`
+ kill -9 $pid
+ rm -f /etc/dhcpc/dhcpcd-eth0.pid
+ rm -f /var/run/dhcpcd*
+ fi
+if [ -f /var/run/dhcpcd-eth0.pid ]
+ then
+ pid=`cat /var/rundhcpcd-eth0.pid`
+ kill -9 $pid
+ rm -f /var/run/dhcpcd-eth0.pid*
+ fi
+ip address flush dev eth0
+}
+
+function network_setup () {
+DEVICE=eth0
+ if [ ! -f /etc/systemconfig ]
+ then
+ exit 1
+ fi
+killdhcp
+
+if [ $UseDHCP = 0 ]
+then
+ /sbin/dhcpcd $DEVICE
+ if [ ! $? = 0 ]
+ then
+ exit 2
+ fi
+fi
+
+if [ $UseDHCP = 1 ]
+then
+
+ /sbin/ifconfig $DEVICE $ip
+ /sbin/route add default gw $route
+ echo "nameserver $nameserver" > /etc/resolv.conf
+fi
+
+
+}
+
+function SANE_SYSETTINGS () {
+sed -e '/HOSTrootfstype/d' \
+ -e '/HOSTrootfstype/d' \
+ -e '/HOSTdatafstype/d' \
+ -e '/HOSTOSsize/d' \
+ -e '/HostUseALLdata/d' \
+ -e '/HOSTDATAsize/d' \
+ -e '/HOSTuprootfstype/d' \
+ -e '/HostUseSWAP/d' \
+ -e '/HOSTSWAPsize/d ' /tmp/usr/share/templates/settings/syssettings/settings.txt > /tmp/settings.new
+ mv /tmp/settings.new /tmp/usr/share/templates/settings/syssettings/settings.txt
+}
+
+case $1 in
+ full_install_it )
+
+ full_install
+ ;;
+ find_update)
+ #TRY TO mount first partition of drive
+ #copy /etc/systemconfig to live, import settings into db
+ #umount drive
+ $run mount_it $disk
+ if [ -f /new_boot/etc/systemconfig ]
+ then
+ ###########ADD templates
+ mkdir -p /tmp/usr/share/templates
+ cp -pr /new_boot/usr/share/templates /tmp/usr/share
+ SANE_SYSETTINGS
+ cp -rp /tmp/usr/share/templates/settings /usr/share/templates
+
+
+ cp /new_boot/etc/systemconfig /etc/systemconfig
+ cp -rf /new_boot/etc /tmp/etc
+ cp -rf /new_boot/var/lib/oss /tmp/oss
+
+ /root/restore_default_settings.sh -c restore -t syssettings -h myhost -d 127.0.0.1
+ fi
+ $run umount_it $disk
+ ;;
+
+ upgrade_it)
+ #"/root/install_proxy.sh upgrade_it " + install_drive + " " + rootfs + "&"
+ upgrade
+
+ ;;
+ disk_model_it)
+ model="unknown"
+ size="xxx"
+ case $2 in
+
+ h* )
+ model=`cat /proc/ide/$2/model`
+ ;;
+ s*) model=`sginfo /dev/$2|grep Product|awk ' { print $2 } '`
+ ;;
+ esac
+ size=`parted /dev/$2 print |grep Disk|awk ' { print $3 } ' `
+
+
+ echo ""$model" $size " >/tmp/model
+
+ ;;
+ network_check_it)
+ #Should never return from check_network
+ case $2 in
+ setup_network) network_setup
+ ;;
+
+ check_self)
+ myipeth0=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n1`
+ ping -c 1 $myipeth0
+ if [ ! $? = 0 ]
+ then
+ exit 3
+ #can't ping yourself
+ fi
+ ;;
+ check_gw)
+ #check gateway
+ mygweth0=`/sbin/route |grep eth0|grep UG|awk '{ print $2}'`
+ ping -c 1 $mygweth0
+ if [ ! $? = 0 ]
+ then
+ exit 4
+ #can't ping the gw
+ fi
+ ;;
+ check_ns)
+ #check nameserver
+ mydns=`cat /etc/resolv.conf|grep nameserver|head -1|awk '{ print $2}'`
+ ping -c 1 $mydns
+ if [ ! $? = 0 ]
+ then
+ exit 5
+ #can't ping the gw
+ fi
+ ;;
+ check_names)
+ host google.com
+ if [ ! $? = 0 ]
+ then
+ exit 6
+ #can't ping the gw
+ fi
+ ;;
+ esac
+ exit 0
+ ;;
+
+
+ * )
+ state=`cat /tmp/.install_state`
+ if [ x"${state}" = "xConfiguring system" ]
+ then
+ progress ""
+ else
+ #finding the drive
+ ddrive=`df | grep $mountpoint | head -n1 | awk -F/ ' { print $3 } ' | cut -d" " -f 1|cut -b1,2,3 `
+ used=`statgrab -M disk.|grep ${ddrive}.write_bytes|cut -d= -f 2|tr -d " "`
+ . /tmp/.startsize.io
+ used=`echo $used-$STARTSIZE|bc`
+ echo $used
+
+ if [ ! x$used = x ]
+ then
+ . /root/.install_size
+ #somehow find if it's an install or update
+ if [ -f /tmp/.this_is_upgrade ]
+ then
+ total=$UPGRADESIZE
+ else
+ total=$TOTALSIZE
+ fi
+ percent=`echo "scale=2 ; ($used/$total) * 100 " |bc `
+ cond2=$(echo "$percent > 100" |bc )
+ if [ $cond2 -eq 1 ]
+ then
+ percent=100
+ fi
+ cond3=$(echo "$percent < 3" |bc )
+ if [ $cond3 -eq 0 ]
+ then
+ progress $percent
+ fi
+ fi
+ fi
+ ;;
+esac
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
new file mode 100755
index 0000000..80bd5d5
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp
@@ -0,0 +1,272 @@
+#include <mythcontext.h>
+#include <unistd.h>
+#include "installationtype.h"
+//Added by qt3to4:
+#include <Q3TextStream>
+
+#include <qdir.h>
+#include "mv_common.h"
+
+
+int mythinstalltype (QString tmp_install_drive)
+{
+
+ Mythinstalltype setting;
+ //FINDME this is needed to populate the default values and have the triggered config work
+ setting.Load();
+ setting.Save();
+
+ int retc = 1 ;
+ if ( setting.exec() == QDialog::Accepted )
+ {
+ retc = 0;
+ }
+ return retc;
+
+};
+
+static HostComboBox *HOSTinstallationtype()
+{
+ HostComboBox *gc = new HostComboBox("HOSTinstallationtype");
+ gc->setLabel(QObject::tr("Installation Type"));
+ gc->addSelection("Full/Auto") ;
+
+ gc->addSelection("Upgrade");
+
+ //gc->setValue("Full/Auto");
+ gc->setHelpText(QObject::tr("Full install will erase the entire drive and repartition. Upgrade will format only the first parition of the drive. Only LinHES R8.0 or newer can use Upgrade."));
+
+ return gc;
+}
+
+static HostSpinBox *HOSTOSsize()
+{
+#ifdef __MVAPP__
+ HostSpinBox *gc = new HostSpinBox("HOSTOSsize", 2, 15, 1, true);
+#else
+ HostSpinBox *gc = new HostSpinBox("HOSTOSsize", 3, 25, 1, true);
+#endif
+ gc->setLabel(QObject::tr("OS size (GB)"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Amount of space allocated for the root OS." ));
+
+ return gc;
+}
+
+static HostSpinBox *HOSTDATAsize()
+{
+ HostSpinBox *gc = new HostSpinBox("HOSTDATAsize", 2, 1500, 1, true);
+ gc->setLabel(QObject::tr("Data size (GB)"));
+ gc->setValue(3);
+ gc->setHelpText(QObject::tr("" ));
+
+ return gc;
+}
+
+static HostSpinBox *HOSTHOMEsize()
+{
+ HostSpinBox *gc = new HostSpinBox("HOSTHOMEsize", 1, 1500, 1, true);
+ gc->setLabel(QObject::tr("Home dir size (GB)"));
+ gc->setValue(3);
+ gc->setHelpText(QObject::tr("Amount of space allocated for the home directories partition. Three to five GB will be sufficient for most people. The home partition will be the same filesystem as the root OS." ));
+
+ return gc;
+}
+
+
+static HostSpinBox *HOSTDatabasesize()
+{
+ HostSpinBox *gc = new HostSpinBox("HOSTDatabasesize", 1, 20, 1, true);
+ gc->setLabel(QObject::tr("Database partition size (GB)"));
+ gc->setValue(4);
+ gc->setHelpText(QObject::tr("Amount of space allocated for the database partition. Two GB is more then enough for most people. The database partition space will be formatted with the ext3 filesystem." ));
+
+ return gc;
+}
+
+
+
+
+static HostSpinBox *HOSTSWAPsize()
+{
+ QString currentitem;
+ QString line;
+ QFile file("/proc/meminfo");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ line = t.readLine();
+ if ( line.startsWith("MemTotal:"))
+ {
+ currentitem = line.simplifyWhiteSpace();
+ currentitem = currentitem.section( " ", 1, 1 );
+ }
+ }
+ file.close();
+ bool ok;
+ int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE
+ mem = mem/1024 ;
+ if ( ! ok )
+ mem = 120 ;
+ HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 128, 128000, 128, true);
+ gc->setLabel(QObject::tr("Swapspace size (MB)"));
+ gc->setValue(mem);
+ gc->setHelpText(QObject::tr("Amount of space allocated for the swap partition." ));
+
+ return gc;
+}
+
+static HostCheckBox *HostUseSWAP()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseSWAP");
+ gc->setLabel(QObject::tr("Use swap partition"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Enable or disable the swap partition."));
+ return gc;
+};
+
+static HostCheckBox *HostUseALLdata()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseALLdata");
+ gc->setLabel(QObject::tr("Use all remaining space for data"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("If checked the remaining space on the drive will be used for storage. Otherwise you can set the size of the partition."));
+ return gc;
+};
+
+
+static HostComboBox *HOSTdatafstype()
+{
+ HostComboBox *gc = new HostComboBox("HOSTdatafstype");
+ gc->setLabel(QObject::tr("Data filesystem"));
+ gc->addSelection("ext3") ;
+ gc->addSelection("ext4") ;
+ // gc->addSelection("reiserfs");
+ gc->addSelection("jfs");
+ gc->addSelection("xfs");
+ //gc->addSelection("btrfs");
+
+ gc->setHelpText(QObject::tr("Filesystem type for data storage."));
+
+ return gc;
+}
+
+static HostComboBox *HOSTuprootfstype()
+{
+ HostComboBox *gc = new HostComboBox("HOSTuprootfstype");
+ gc->setLabel(QObject::tr("OS file system"));
+ gc->addSelection("ext3") ;
+ gc->addSelection("ext4") ;
+ gc->addSelection("reiserfs");
+ gc->addSelection("jfs");
+ //gc->addSelection("xfs");
+ //gc->addSelection("btrfs");
+ gc->addSelection("Do_not_format");
+
+ gc->setHelpText(QObject::tr("Filesystem type for OS. "));
+
+ return gc;
+}
+
+static HostComboBox *HOSTrootfstype()
+{
+ HostComboBox *gc = new HostComboBox("HOSTrootfstype");
+ gc->setLabel(QObject::tr("Root filesystem format"));
+ gc->addSelection("ext3") ;
+ gc->addSelection("ext4") ;
+ gc->addSelection("reiserfs");
+ gc->addSelection("jfs");
+ //gc->addSelection("btrfs");
+ //gc->addSelection("xfs");
+
+ gc->setHelpText(QObject::tr("Filesystem type for root OS."));
+
+ return gc;
+}
+
+class USESwap:
+ public TriggeredConfigurationGroup {
+public:
+ USESwap():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+ SetVertical(false);
+ Setting* useswap = HostUseSWAP();
+ addChild(useswap);
+ setTrigger(useswap);
+
+
+ ConfigurationGroup* swapyes = new VerticalConfigurationGroup(false);
+ swapyes->addChild(HOSTSWAPsize());
+ addTarget("1", swapyes );
+ addTarget("0", new VerticalConfigurationGroup(true));
+ };
+};
+
+class DATAsize:
+ public TriggeredConfigurationGroup {
+public:
+ DATAsize():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+ SetVertical(false);
+ Setting* datasize = HostUseALLdata();
+ addChild(datasize);
+ setTrigger(datasize);
+
+ ConfigurationGroup* alldatano = new VerticalConfigurationGroup(false);
+ alldatano->addChild(HOSTDATAsize());
+ alldatano->addChild(HOSTdatafstype());
+
+
+ ConfigurationGroup* alldatayes = new VerticalConfigurationGroup(false);
+ alldatayes->addChild(HOSTdatafstype());
+
+ addTarget("1", alldatayes);
+ addTarget("0", alldatano);
+ };
+};
+
+
+
+
+class Installationtype:
+ public TriggeredConfigurationGroup {
+public:
+ Installationtype():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+ setLabel(QObject::tr("LinHES Install"));
+ Setting *Mtemplate = HOSTinstallationtype();
+ addChild(Mtemplate);
+ setTrigger(Mtemplate);
+
+ ConfigurationGroup *ospartition = new GridConfigurationGroup(2,false);
+ ospartition->addChild(HOSTOSsize());
+ ospartition->addChild(HOSTrootfstype());
+ ospartition->addChild(HOSTHOMEsize());
+ ospartition->addChild(HOSTDatabasesize());
+
+ ConfigurationGroup *tupgrade = new VerticalConfigurationGroup(false);
+ tupgrade->addChild(HOSTuprootfstype());
+
+ ConfigurationGroup *tfull = new VerticalConfigurationGroup(false);
+// tfull->addChild(HOSTOSsize());
+// tfull->addChild(HOSTrootfstype());
+ tfull->addChild(ospartition);
+ tfull->addChild(new USESwap);
+ tfull->addChild(new DATAsize);
+
+ addTarget("Upgrade",tupgrade );
+ addTarget("Full/Auto", tfull);
+ };
+};
+
+Mythinstalltype::Mythinstalltype()
+{
+ //Reseting the install type to remove "NET"
+ if ( gCoreContext->GetSetting("Hostinstallationtype") == "NET")
+ gCoreContext->SaveSetting("HOSTinstallationtype","Full/Auto");
+ Installationtype *installationtype = new Installationtype();
+ addChild(installationtype);
+};
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h
new file mode 100755
index 0000000..e043f0a
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h
@@ -0,0 +1,11 @@
+#include <settings.h>
+#include "mythdialogs.h"
+
+class Mythinstalltype: public ConfigurationWizard {
+public:
+ Mythinstalltype();
+
+};
+
+int mythinstalltype(QString);
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp
new file mode 100755
index 0000000..ac72a0b
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp
@@ -0,0 +1,1179 @@
+#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3TextStream>
+#include <unistd.h>
+#include <fstream>
+
+#include "mythcontext.h"
+//#include "tv.h"
+#include "uitypes.h"
+#include "installdialog.h"
+#include "installsettings.h"
+#include "installationtype.h"
+#include "mv_common.h"
+#include "mythprogressdialog.h"
+
+#include <stdlib.h>
+
+#include "mythversion.h"
+#include "mythsystemlegacy.h"
+
+#define UPDATE_STATUS_INTERVAL 5000
+#define UPDATE_SCREEN_INTERVAL 5000
+
+
+
+WelcomeDialog::WelcomeDialog(MythScreenStack *parent, const char *name)
+ :MythScreenType(parent, name),
+ m_status_text(NULL), m_recording_text(NULL), m_scheduled_text(NULL),
+ m_time_text(NULL), m_date_text(NULL),
+ m_menuPopup(NULL), m_mv_text(NULL)
+
+{
+// system("rm -f /tmp/.install_state");
+// system("rm -f /tmp/.install_percent");
+// system("rm -f /tmp/.install_error");
+ install_drive = "" ;
+ recording_text = "";
+ scheduled_text = "";
+ install_text = "";
+ version_text = "";
+ I_AM_BUSY = false;
+ WORKING_ON_INSTALL = false;
+ current_hostname = "";
+
+ gCoreContext->addListener(this);
+ m_timeFormat = gCoreContext->GetSetting("TimeFormat", "h:mm AP");
+
+ m_updateStatusTimer = new QTimer(this);
+ connect(m_updateStatusTimer, SIGNAL(timeout()), this,
+ SLOT(updateStatus()));
+ m_updateStatusTimer->start(UPDATE_STATUS_INTERVAL);
+
+ m_updateScreenTimer = new QTimer(this);
+ connect(m_updateScreenTimer, SIGNAL(timeout()), this,
+ SLOT(updateScreen()));
+
+ m_timeTimer = new QTimer(this);
+ connect(m_timeTimer, SIGNAL(timeout()), this,
+ SLOT(updateTime()));
+ m_timeTimer->start(1000);
+
+ reboot_box = NULL;
+ m_menuPopup = NULL;
+ //QTimer::singleShot(6000, this, showPopup());
+
+ // JM
+ QTimer::singleShot(1000, this, SLOT(showPopup()));
+
+}
+
+bool WelcomeDialog::Create(void)
+{
+ bool foundtheme = false;
+
+ // Load the theme for this screen
+ foundtheme = LoadWindowFromXML("install-ui.xml", "welcome_screen", this);
+
+ if (!foundtheme)
+ return false;
+
+ bool err = false;
+ UIUtilE::Assign(this, m_status_text, "status_text", &err);
+ UIUtilE::Assign(this, m_recording_text, "recording_text", &err);
+ UIUtilE::Assign(this, m_scheduled_text, "scheduled_text", &err);
+ UIUtilE::Assign(this, m_time_text, "time_text", &err);
+ UIUtilE::Assign(this, m_date_text, "date_text", &err);
+ UIUtilE::Assign(this, m_mv_text, "mythvantage_text", &err);
+ if (err)
+ {
+ //JM VERBOSE(VB_IMPORTANT, "Cannot load screen 'welcome_screen'");
+ return false;
+ }
+
+ BuildFocusList();
+ updateTime();
+
+ return true;
+}
+
+void WelcomeDialog::shutdownNow(int rc)
+{
+ QString NETBOOT = getenv("NETBOOT");
+ NETBOOT=NETBOOT.stripWhiteSpace();
+// system("rm -f /tmp/.install_state");
+// system("rm -f /tmp/.install_percent");
+// system("rm -f /tmp/.install_error");
+ if (rc == 1)
+ system("/sbin/halt");
+ else
+ system("/sbin/reboot");
+}
+
+void WelcomeDialog::runLIVECD(void)
+{
+ ask_validate_network();
+ if ( runsettings(true) == 1 )
+ {
+ QString PAINTER = gCoreContext->GetSetting("ThemePainter");
+ QString startFECmd = ("MYTHCONFDIR=/tmp mythfrontend -O ThemePainter=" + PAINTER );
+ myth_system(startFECmd.ascii());
+ }
+ else
+ {
+ showPopup();
+ }
+
+
+}
+
+bool WelcomeDialog::keyPressEvent(QKeyEvent *event)
+{
+ bool handled = false;
+ QStringList actions;
+ handled=GetMythMainWindow()->TranslateKeyPress("Welcome", event, actions);
+
+ for (int i = 0; i < actions.size() && !handled; i++)
+ {
+ QString action = actions[i];
+ handled = true;
+
+ if (action == "ESCAPE")
+ {
+ return true; // eat escape key
+ }
+ else if (action == "MENU")
+ {
+ showPopup();
+ }
+ else if (action == "NEXTVIEW")
+ {
+ Close();
+ }
+ else if (action == "STARTXTERM")
+ {
+ QString cmd = gCoreContext->GetSetting("MythShutdownXTermCmd", "");
+ if (!cmd.isEmpty())
+ {
+ QByteArray tmp = cmd.toAscii();
+ system(tmp);
+ }
+ }
+ else
+ handled = false;
+ }
+
+ if (!handled && MythScreenType::keyPressEvent(event))
+ handled = true;
+ return handled;
+}
+
+void WelcomeDialog::closeDialog()
+{
+ Close();
+ exit(0);
+}
+
+
+// void WelcomeDialog::slotPopup()
+// {
+// showPopup();
+// }
+
+WelcomeDialog::~WelcomeDialog()
+{
+ gCoreContext->removeListener(this);
+ if (m_updateStatusTimer)
+ delete m_updateStatusTimer;
+
+ if (m_updateScreenTimer)
+ delete m_updateScreenTimer;
+
+ if (m_timeTimer)
+ delete m_timeTimer;
+}
+
+void WelcomeDialog::updateTime(void)
+{
+ QString releasefile="/etc/";
+ releasefile.append(RELEASEFILE);
+
+ QString distro_line;
+ QFile file(releasefile);
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ distro_line = t.readLine();
+ file.close();
+ }
+ QString s="";
+ s.append(distro_line);
+ s.append( "\nMythtv source:" );
+ //s.append(MYTH_SOURCE_VERSION);
+ //s.append(" ");
+ s.append(MYTH_SOURCE_PATH);
+ m_date_text->SetText(s);
+}
+
+void WelcomeDialog::updateStatus(void)
+{
+ updateStatusMessage();
+ updateScreen();
+}
+
+void WelcomeDialog::updateScreen(void)
+{
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh " );
+ system(cmdtxt);
+ recording_text=" ";
+ mythvantage_text=" ";
+ error_text=" ";
+ scheduled_text=" ";
+ QFile mystatus("/tmp/.install_state");
+ QFile mypercent("/tmp/.install_percent");
+ QFile myerror("/tmp/.install_error");
+ QFile mylog("/tmp/mythvantage_install.log");
+ if ( mystatus.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &mystatus ); // use a text stream
+ scheduled_text = t.readLine();
+ mystatus.close();
+ }
+
+ if ( mypercent.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &mypercent ); // use a text stream
+ recording_text = t.readLine();
+ mypercent.close();
+ }
+
+ if ( myerror.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &myerror ); // use a text stream
+ error_text = t.readLine();
+ myerror.close();
+ scheduled_text = error_text;
+ recording_text = "FAILED";
+ WORKING_ON_INSTALL = false;
+ }
+
+ if ( WORKING_ON_INSTALL )
+ {
+ if ( mylog.open( QIODevice::ReadOnly| QIODevice::Text ) )
+ {
+ Q3TextStream t( &mylog );
+ while ( !t.atEnd() )
+ {
+ mythvantage_text=t.readLine();
+ }
+ mylog.close();
+ }
+ }
+ else
+ mythvantage_text="";
+ m_recording_text->SetText(recording_text);
+ m_scheduled_text->SetText(scheduled_text);
+ m_mv_text->SetText(mythvantage_text);
+
+ if ( install_drive != "" )
+ install_text = "";
+
+ m_status_text->SetText(install_text );
+ m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true);
+ if ( scheduled_text == "Done" )
+ {
+ Reboot_popup () ;
+ }
+ // shows the busy box when configuring the system
+ if ( scheduled_text == "Configuring system")
+ {
+ if ( ! I_AM_BUSY )
+ busy_box();
+ }
+};
+
+void WelcomeDialog::busy_box(void)
+{
+ QString msgtext = "Please wait, " ;
+ msgtext.append(current_hostname);
+ msgtext.append(" is preparing for life");
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+
+ while ( scheduled_text == "Configuring system" )
+ {
+ qApp->processEvents ();
+ usleep(900);
+ I_AM_BUSY = true;
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+ I_AM_BUSY = false;
+}
+
+void WelcomeDialog::busy_find_oldsettings(void)
+{
+
+ QString msgtext = "Importing old settings" ;
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,
+ "importsettingsbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+ int return_code = 0;
+ while ( return_code == 0 )
+ {
+ qApp->processEvents ();
+ usleep(900);
+ I_AM_BUSY = true;
+ return_code = myth_system("ps -ef|grep install_proxy.sh|grep -v grep > /dev/null");
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+ I_AM_BUSY = false;
+
+}
+
+
+bool WelcomeDialog::updateRecordingList()
+{
+ //JM VERBOSE(VB_IMPORTANT, "updateRecordingList");
+ return true;
+}
+
+bool WelcomeDialog::updateScheduledList()
+{
+ //JM VERBOSE(VB_IMPORTANT, "updateScheduled list");
+ updateStatus();
+ updateScreen();
+ return true;
+}
+
+void WelcomeDialog::updateStatusMessage(void)
+{
+ return ;
+}
+
+void WelcomeDialog::showPopup(void)
+{
+
+// if (m_menuPopup)
+ // return;
+//
+// QString label = tr("MythVantage Menu");
+// MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+// m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup");
+//
+// if (m_menuPopup->Create())
+// mainStack->AddScreen(m_menuPopup);
+//
+// m_menuPopup->SetReturnEvent(this, "action");
+
+ MythScreenStack *popupStack = GetMythMainWindow()->GetMainStack();
+
+ m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu");
+
+ if (m_menuPopup->Create())
+ popupStack->AddScreen(m_menuPopup);
+
+ m_menuPopup->SetReturnEvent(this, "action");
+
+
+
+
+
+ // This is a bad way to lock the buttons but it works for now.
+ if ( scheduled_text.length() <= 2 )
+ {
+ m_menuPopup->AddButton(tr("Install or Upgrade "),
+ SLOT(Display_2ndpopup()));
+ m_menuPopup->AddButton(tr("Run MythFrontend"),
+ SLOT(runLIVECD()));
+ m_menuPopup->AddButton(tr("Exit"),
+ SLOT(closeDialog()));
+ m_menuPopup->AddButton(tr("Close menu")) ;
+ }
+ else
+ {
+ m_menuPopup->AddButton(tr("Exit"),
+ SLOT(closeDialog()));
+ m_menuPopup->AddButton(tr("Close menu"));
+ }
+
+}
+// switch (override_menu)
+// {
+// case 2:
+// case 4:
+// // shutdown
+// m_menuPopup->SetReturnEvent(this,"popmenu_shutdown");
+// m_menuPopup->AddButton(tr("Shutdown"));
+// break;
+// case 5:
+// // reboot
+// m_menuPopup->SetReturnEvent(this,"popmenu_reboot");
+// m_menuPopup->AddButton(tr("Reboot"));
+// break;
+// case 3:
+// case 6:
+// // both
+// m_menuPopup->SetReturnEvent(this,"popmenu_exit");
+// m_menuPopup->AddButton(tr("Shutdown"));
+// m_menuPopup->AddButton(tr("Reboot"));
+// break;
+// case 0:
+// default:
+// m_menuPopup->SetReturnEvent(this,"popmenu_noexit");
+// break;
+// }
+//
+// m_menuPopup->AddButton(tr("About"));
+// m_menuPopup->AddButton(tr("Cancel"));
+//
+// }
+
+
+
+
+// MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+//
+// m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu");
+//
+// if (m_menuPopup->Create())
+// popupStack->AddScreen(m_menuPopup);
+//
+// m_menuPopup->SetReturnEvent(this, "action");
+// // This is a bad way to lock the buttons but it works for now.
+// if ( scheduled_text.length() <= 2 )
+// {
+// m_menuPopup->AddButton(tr("Install or Upgrade "),
+// SLOT(Display_2ndpopup()));
+// m_menuPopup->AddButton(tr("Run MythFrontend"),
+// SLOT(runLIVECD()));
+// m_menuPopup->AddButton(tr("Exit"),
+// SLOT(closeDialog()));
+// m_menuPopup->AddButton(tr("Close menu")) ;
+// }
+// else
+// {
+// m_menuPopup->AddButton(tr("Exit"),
+// SLOT(closeDialog()));
+// m_menuPopup->AddButton(tr("Close menu"));
+// }
+// }
+
+
+QString WelcomeDialog::diskmodel(QString drive , QString tsize)
+{
+ string line;
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh disk_model_it " + drive + " " + tsize );
+ myth_system(cmdtxt);
+
+ ifstream model("/tmp/model");
+ if (model.is_open())
+ getline (model,line);
+ model.close();
+
+ QString qline( QString::fromStdString( line ) );
+ return qline;
+}
+
+QString WelcomeDialog::findinstallsouce(void)
+{
+ string line;
+ QString currentitem;
+ ifstream mountfile("/proc/mounts");
+ while (! mountfile.eof() )
+ {
+ getline (mountfile,line);
+ if ( line.empty() )
+ line = "oops didn't find andthing";
+
+ currentitem= ( QString::fromStdString( line ) );
+
+ if ( ! currentitem.contains("/dev"))
+ currentitem="not the right line";
+ // LOG(VB_GENERAL, LOG_ERR, currentitem);
+
+ if ( currentitem.contains("bootmnt") )
+ {
+ int ndx = line.find(" ");
+ currentitem =QString::fromStdString(line.substr(0,ndx));
+ ndx = currentitem.findRev("/");
+ currentitem = currentitem.mid(ndx+1,3);
+ return currentitem;
+ };
+ }
+};
+
+void WelcomeDialog::showPopup_2(void)
+{
+ MythScreenStack *popupStack = GetMythMainWindow()->GetMainStack();
+
+ m_menuPopup = new MythDialogBox("Select the drive to install to", popupStack, "actionmenu");
+
+ if (m_menuPopup->Create())
+ popupStack->AddScreen(m_menuPopup);
+
+ m_menuPopup->SetReturnEvent(this, "action");
+ QString currentitem;
+
+ string sizeitem;
+ QString disksize;
+ string line;
+ bool installsource = false;
+
+ QString NETBOOT = getenv("NETBOOT");
+ NETBOOT=NETBOOT.stripWhiteSpace();
+ if ( NETBOOT == "YES" )
+ m_menuPopup->AddButton(("Diskless Frontend " ), SLOT(install_net() ) );
+
+ QString INSTALLSOURCE = findinstallsouce();
+ ifstream partitions("/proc/partitions");
+ if (partitions.is_open())
+ {
+ while (! partitions.eof() )
+ {
+ getline (partitions,line);
+ if ( line.empty() )
+ {
+ line = "oops didn't find anything";
+ }
+ int ndx = line.rfind(" ");
+ ndx = ndx +1;
+ int linelength = line.length();
+ currentitem = QString::fromStdString(line.substr(ndx,linelength));
+ sizeitem = line.substr(0,ndx-1);
+ linelength = sizeitem.length();
+ ndx = sizeitem.rfind(" ");
+ disksize = QString::fromStdString(sizeitem.substr(ndx+1,linelength));
+
+ if ( currentitem == INSTALLSOURCE )
+ installsource = true;
+
+ if (! installsource )
+ {
+ if ( currentitem == "sde" )
+ m_menuPopup->AddButton(("sde " + diskmodel(currentitem,disksize)), SLOT(install_sde() ) );
+ if ( currentitem == "sdf" )
+ m_menuPopup->AddButton(("sdf " + diskmodel(currentitem,disksize)), SLOT(install_sdf() ) );
+ if ( currentitem == "sdg" )
+ m_menuPopup->AddButton(("sdg " + diskmodel(currentitem,disksize)), SLOT(install_sdg() ) );
+ if ( currentitem == "sdh" )
+ m_menuPopup->AddButton(("sdh " + diskmodel(currentitem,disksize)), SLOT(install_sdh() ) );
+ if (currentitem == "sda" )
+ m_menuPopup->AddButton(("sda " + diskmodel(currentitem,disksize)), SLOT(install_sda() ) );
+ if (currentitem == "sdb" )
+ m_menuPopup->AddButton(("sdb " + diskmodel(currentitem,disksize)), SLOT(install_sdb() ) );
+ if (currentitem == "sdc" )
+ m_menuPopup->AddButton(("sdc "+ diskmodel(currentitem,disksize)), SLOT(install_sdc() ) );
+ if (currentitem == "sdd" )
+ m_menuPopup->AddButton(("sdd "+ diskmodel(currentitem,disksize)), SLOT(install_sdd() ) );
+ }
+ installsource = false;
+ }
+ }
+ partitions.close();
+ m_menuPopup->AddButton(tr("Cancel"), SLOT(MAINPopup()));
+}
+
+void WelcomeDialog::GO_popup(QString go_text)
+{
+ DialogCode retval = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(),
+ QString("Start the process"),
+ QObject::tr(go_text),
+ QObject::tr("Start the process"), QObject::tr("Cancel"), kDialogCodeButton0);
+
+ if ( retval == kDialogCodeButton0 )
+ {
+ install_it();
+ }
+ else
+ {
+ showPopup();
+ }
+}
+
+
+void WelcomeDialog::Reboot_popup(void)
+{ if (reboot_box)
+ return;
+ QString prompt1;
+ QFile updbstatus("/tmp/.upgrade_db_failed");
+ if ( updbstatus.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ prompt1 = QObject::tr(" ");
+ prompt1.append("\n");
+ prompt1.append("An error occured while attempting to restore the database!");
+ prompt1.append("\n");
+ prompt1.append("The old database could not be restored, so a new database was created");
+ prompt1.append("\n");
+ }
+ else
+ prompt1 = QObject::tr("Ready to go!");
+
+ reboot_box = new DialogBox(GetMythMainWindow(), prompt1);
+ reboot_box->AddButton(QObject::tr("Reboot"));
+ reboot_box->AddButton(QObject::tr("Power off"));
+
+ int returncode = 0;
+ DialogCode dcode = reboot_box->exec();
+ reboot_box->deleteLater();
+ if (kDialogCodeButton0 == dcode )
+ returncode = 0;
+ if (kDialogCodeButton1 == dcode )
+ returncode = 1;
+ if (kDialogCodeButton2 == dcode )
+ returncode = 2;
+
+ reboot_box = NULL;
+ shutdownNow(returncode);
+}
+
+
+
+void WelcomeDialog::MAINPopup(void)
+{
+// if (!popup)
+// return;
+// popup->hide();
+// popup->deleteLater();
+ popup = NULL;
+ showPopup();
+
+}
+
+void WelcomeDialog::Display_2ndpopup(void)
+{
+ //JM VERBOSE(VB_GENERAL, "Display_2ndpopup");
+ showPopup_2();
+}
+
+void WelcomeDialog::install_sde(void)
+{
+ install_drive = "sde" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_sdf(void)
+{
+ install_drive = "sdf" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_sdg(void)
+{
+ install_drive = "sdg" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_sdh(void)
+{
+ install_drive = "sdh" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_sda(void)
+{ install_drive = "sda" ;
+ install_generic();
+}
+void WelcomeDialog::install_sdb(void)
+{ install_drive = "sdb" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_sdc(void)
+{ install_drive = "sdc" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_sdd(void)
+{
+ install_drive = "sdd" ;
+ install_generic();
+}
+
+void WelcomeDialog::install_net(void)
+{
+ install_drive = "NET" ;
+ //gCoreContext->ActivateSettingsCache(false);
+ gCoreContext->SaveSetting("HOSTinstallationtype","NET");
+ install_generic();
+}
+
+void WelcomeDialog::write_install_conf(QString rootdisk)
+{
+ //1077
+ QString op;
+ //QString rootdisk;
+ QString rootfs;
+ QString uprootfs;
+ QString rootsize;
+ QString homesize;
+ QString sqlsize;
+ QString usealldata;
+ QString datasize;
+ QString datafs;
+ QString datadisk;
+ QString swapsize;
+ QString useswap;
+
+ op = gCoreContext->GetSetting("HOSTinstallationtype");
+ if ( op == "Full/Auto" )
+ op = "full_install";
+ if ( op == "Upgrade" )
+ op = "upgrade";
+ //rootdisk = install_drive;
+ rootfs = gCoreContext->GetSetting("HOSTrootfstype");
+ uprootfs = gCoreContext->GetSetting("HOSTuprootfstype");
+ rootsize = gCoreContext->GetSetting("HOSTOSsize");
+ homesize = gCoreContext->GetSetting("HOSTHOMEsize");
+ sqlsize = gCoreContext->GetSetting("HOSTDatabasesize");
+
+ //datasize
+ usealldata = gCoreContext->GetSetting("HostUseALLdata");
+ datasize = gCoreContext->GetSetting("HOSTDATAsize");
+ if ( usealldata == "1" )
+ datasize="ALL";
+ else
+ datasize=datasize + "000";
+
+ datafs = gCoreContext->GetSetting("HOSTdatafstype");
+ datadisk = install_drive;
+
+ //swapsize
+ useswap = gCoreContext->GetSetting("HostUseSWAP");
+ swapsize = gCoreContext->GetSetting("HOSTSWAPsize");
+ if ( useswap == "0" )
+ swapsize="NO";
+
+ rootsize=rootsize + "000";
+ homesize=homesize + "000";
+ sqlsize=sqlsize + "000";
+
+ QFile f( "/etc/install_layout" );
+ if( !f.open( IO_WriteOnly ) )
+ std::cout << "Failed to open file /etc/install_layout." << std::endl;
+ QTextStream myfile( &f );
+
+ myfile << "op=" + op + "\n";
+ myfile << "rootdisk=" + rootdisk + "\n";
+ myfile << "rootfs=" + rootfs + "\n";
+ myfile << "uprootfs=" + uprootfs + "\n";
+ myfile << "rootsize=" + rootsize + "\n";
+ myfile << "homesize=" + homesize + "\n";
+ myfile << "homefs=" + rootfs + "\n";
+ myfile << "sqlsize=" + sqlsize + "\n";
+ //myfile << "sqlfs=" + sqlfs + "\n";
+ myfile << "sqlfs=ext3\n";
+ myfile << "datasize=" + datasize + "\n";
+ myfile << "datafs=" + datafs + "\n";
+ myfile << "datadisk=" + datadisk + "\n";
+ myfile << "swapsize=" + swapsize + "\n";
+
+ f.close();
+}
+
+
+void WelcomeDialog::install_generic(void)
+{
+ //write_install_conf(install_drive);
+ QString installwarningtext;
+ int runNextSetting;
+ runNextSetting = 1;
+ int tflag;
+ tflag = 0;
+ int retcode;
+ retcode=0;
+ QString installtype;
+ if ( install_drive != "NET")
+ retcode = mythinstalltype(install_drive);
+ if ( retcode == 0 )
+ {
+ installtype = gCoreContext->GetSetting("HOSTinstallationtype");
+ if ( installtype == "Full/Auto" )
+ {
+ //JM VERBOSE(VB_GENERAL, "Full install");
+ runNextSetting = ask_validate_network();
+ installwarningtext="Warning!";
+ installwarningtext.append ("\n");
+ installwarningtext.append ("\n");
+ installwarningtext.append ("Installation drive (");
+ installwarningtext.append (install_drive);
+ installwarningtext.append (") is about to be erased.");
+ installwarningtext.append ("\n");
+ }
+ else if ( installtype == "NET")
+ {
+ runNextSetting=0;
+ gCoreContext->SaveSetting("HostSystemType", "Frontend_only");
+ gCoreContext->SaveSetting("HostaccesshostypeSystemtype","0");
+ installwarningtext.append ("About to install ");
+ installwarningtext.append ("\n");
+ installwarningtext.append (install_drive);
+ // ask for hostname
+ runsettings(false,true,false,false,false,false,false);
+ }
+ else if ( installtype == "Upgrade" )
+ {
+ installwarningtext="Warning!";
+ installwarningtext.append ("\n");
+ installwarningtext.append ("\n");
+ installwarningtext.append ("OS partition (");
+ installwarningtext.append (install_drive);
+ installwarningtext.append ("1");
+ installwarningtext.append (") will be erased.");
+ installwarningtext.append ("\n");
+
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh find_update " + install_drive +" &");
+ system(cmdtxt);
+ busy_find_oldsettings();
+ bool flag = false;
+ QString line;
+ QString currentitem;
+ QFile file("/etc/systemconfig");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith("hostname"))
+ {
+ flag=true;
+ currentitem = line.section( "=", 1, 1 );
+ current_hostname = currentitem ;
+ }
+ }
+ file.close();
+ }
+ if ( flag )
+ {
+ //check if LinHES-release is 8.0 or newer
+ cout << "searching for LinHES-release" << endl;
+ //look for /tmp/etc/LinHES-release
+ QFile file("/tmp/etc/LinHES-release");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.contains("8.") )
+ {
+ tflag = 1;
+ }
+ }
+ file.close();
+ }
+ }
+ if ( tflag == 0 )
+ {
+ //popup install doesn't look like R8
+ MythPopupBox::showOkPopup(
+ GetMythMainWindow(),
+ QObject::tr(""),
+ QObject::tr("The selected disk cannot be upgraded because it is older than LinHES R8.0."));
+ runNextSetting = 1;
+ }
+ }
+ }
+ //run through the system settings
+ if ( runNextSetting == 0 )
+ {
+ //DEfault settings screen for install
+ tflag = runsettings (false , false , true,
+ true , false, false,
+ false,true,false, false ,
+ false, true , false , false ,
+ false , false, false, true , true,
+ false);
+ }
+ //else
+ // {
+ // cancelPopup();
+ //this is the popup after the upgrade
+ // showPopup();
+ // };
+
+ if ( tflag == 1 )
+ {
+ //write out the conf file
+ write_install_conf(install_drive);
+ GO_popup(installwarningtext);
+ }
+ else
+ {
+ showPopup();
+ }
+
+}
+
+void busy_network(void)
+{
+ QString msgtext = "Starting network" ;
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+ int return_code = 0;
+ while ( return_code == 0 )
+ {
+ qApp->processEvents ();
+ usleep(900);
+ return_code = myth_system("ps -ef|grep install_proxy.sh| grep setup_network |grep -v grep > /dev/null");
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+
+
+}
+
+
+int WelcomeDialog::ask_validate_network(void)
+{
+ QString pop_text="abc";
+ int retval = 1;
+ while ( retval != 0 )
+ {
+ int settingsrec = runsettings(false,true,false,false,false,false,false);
+ if ( settingsrec != 1 )
+ return 1;
+ else
+ {
+ MythProgressDialog *network_check = NULL;
+ network_check = new MythProgressDialog(QObject::tr("Please wait while the network is checked."), 7);
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh network_check_it setup_network &");
+ retval = system(cmdtxt);
+ busy_network();
+ if (network_check)
+ {
+ network_check->setProgress(2);
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh network_check_it check_self");
+ retval = system(cmdtxt);
+ if ( retval != 0 )
+ {
+ network_check->Close();
+ pop_text="Could not find myself on the network";
+ }
+ }
+
+ if ( retval == 0)
+ {
+ network_check->setProgress(3);
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh network_check_it check_gw");
+ retval = system(cmdtxt);
+ if ( retval != 0 )
+ {
+ network_check->Close();
+ pop_text="Could not locate gateway";
+ }
+ }
+
+ if (retval == 0)
+ {
+ network_check->setProgress(4);
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh network_check_it check_ns");
+ retval = system(cmdtxt);
+ if ( retval != 0 )
+ {
+ network_check->Close();
+ pop_text="Could not locate nameserver";
+ }
+ }
+
+ if (retval == 0)
+ {
+ network_check->setProgress(5);
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh network_check_it check_names");
+ retval = system(cmdtxt);
+ if ( retval != 0 )
+ {
+ network_check->Close();
+ pop_text="Could not lookup names";
+ }
+ }
+
+ if (retval == 0)
+ {
+ network_check->setProgress(6);
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/install_proxy.sh network_check_it host_names");
+ retval = system(cmdtxt);
+ if ( retval != 0 )
+ {
+ network_check->Close();
+ pop_text="Hostname already on the network";
+ }
+ }
+
+ network_check->setProgress(7);
+ if (network_check)
+ {
+ network_check->Close();
+ network_check->deleteLater();
+ }
+
+ if (retval != 0 )
+ {
+ DialogCode val = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), QString(""), QObject::tr(pop_text), QObject::tr("Continue"), QObject::tr("Try again"), kDialogCodeButton0);
+ if (kDialogCodeButton0 == val )
+ retval = 0;
+ }
+ }
+ }
+ return 0;
+}
+
+
+void WelcomeDialog::install_it(void)
+{
+ QString installtype = gCoreContext->GetSetting("HOSTinstallationtype");
+// QString rootfs = gCoreContext->GetSetting("HOSTrootfstype");
+// QString datafs = gCoreContext->GetSetting("HOSTdatafstype");
+// QString rootsize = gCoreContext->GetSetting("HOSTOSsize");
+// rootsize=rootsize + "000";
+// QString usealldata = gCoreContext->GetSetting("HostUseALLdata");
+// QString datasize = gCoreContext->GetSetting("HOSTDATAsize");
+// QString uprootfs = gCoreContext->GetSetting("HOSTuprootfstype");
+// QString useswap = gCoreContext->GetSetting("HostUseSWAP");
+// QString swapsize = gCoreContext->GetSetting("HOSTSWAPsize");
+ if ( installtype != "Upgrade" )
+ current_hostname = gCoreContext->GetSetting("HostMyhostname");
+ QString clean_upgrade = getenv("CLEAN_UPGRADE");
+ if ( clean_upgrade == "YES" )
+ current_hostname = gCoreContext->GetSetting("HostMyhostname");
+
+//get the hostname here if upgrade then use previous declarion of hostname
+// if ( usealldata == "1" )
+// {
+// datasize="ALL";
+// }
+// else
+// {
+// datasize=datasize + "000";
+// }
+// if ( useswap == "0" )
+// {
+// swapsize="NO";
+// };
+
+
+ if ( installtype == "Full/Auto" )
+ {
+ QString currentitem;
+ QString line;
+ QFile file("/proc/meminfo");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ line = t.readLine();
+ if ( line.startsWith("MemTotal:"))
+ {
+ currentitem = line.simplifyWhiteSpace();
+ currentitem = currentitem.section( " ", 1, 1 );
+ }
+ }
+ file.close();
+ bool ok;
+ int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE
+
+
+// if ( mem >= 500000 )
+// {
+// if ((gCoreContext->GetSetting("HostXres")) == "1280x720" )
+// gCoreContext->SaveSetting("Theme", "syth-lacquer-wide");
+// }
+
+
+ QString cmdtxt=MV_ROOT ;
+ //cmdtxt.append("bin/install_proxy.sh full_install_it " + install_drive + " " + rootfs + " " + rootsize + " " + datafs + " " + datasize + " " + swapsize + "&");
+ cmdtxt.append("bin/install_proxy.sh full_install_it &");
+ system(cmdtxt);
+ }
+ else if ( installtype == "Upgrade" )
+ {
+ QString cmdtxt=MV_ROOT ;
+ //cmdtxt.append("bin/install_proxy.sh upgrade_it " + install_drive + " " + uprootfs + "&");
+ cmdtxt.append("bin/install_proxy.sh upgrade_it &");
+ system(cmdtxt);
+ }
+ else if (installtype=="NET")
+ {
+ QString olddb = gCoreContext->GetSetting("HostMysqlserver");
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ char localhostname[1024];
+ if (gethostname(localhostname, 1024))
+ {
+ //JM VERBOSE(VB_IMPORTANT,
+ //"MCP: Error, could not determine host name." + ENO);
+ localhostname[0] = '\0';
+ }
+ QString h;
+ h=localhostname;
+ cmdtxt.append("bin/restore_default_settings.sh -c save -t syssettings -d 127.0.0.1 -h " + h);
+ system(cmdtxt);
+ cmdtxt=MV_ROOT ;
+ //cmdtxt.append("bin/install_proxy.sh NETBOOT " + install_drive + " &");
+ cmdtxt.append("bin/install_proxy.sh NETBOOT &");
+ system(cmdtxt);
+ }
+
+ WORKING_ON_INSTALL = true;
+ usleep (500);
+ updateScreen();
+ usleep (500);
+ updateScreen();
+}
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h
new file mode 100755
index 0000000..9d54c39
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h
@@ -0,0 +1,111 @@
+#ifndef WELCOMEDIALOG_H_
+#define WELCOMEDIALOG_H_
+
+#include <iostream>
+//Added by qt3to4:
+#include <QKeyEvent>
+using namespace std;
+
+#include <qdatetime.h>
+#include "mythdialogs.h"
+#include "libmyth/dialogbox.h"
+
+
+
+#include "remoteutil.h"
+#include "programinfo.h"
+#include "mythscreentype.h"
+#include "mythuibutton.h"
+#include "mythuitext.h"
+#include "mythdialogbox.h"
+#include "langsettings.h"
+
+class WelcomeDialog : public MythScreenType
+{
+
+ Q_OBJECT
+
+public:
+ WelcomeDialog(MythScreenStack *parent, const char *name);
+ ~WelcomeDialog();
+ bool Create(void);
+ bool keyPressEvent(QKeyEvent *event);
+
+
+protected slots:
+ void updateStatus(void);
+ void updateScreen(void);
+ void closeDialog();
+ void updateTime();
+ void showPopup();
+ void showPopup_2();
+ void GO_popup(QString);
+ void Reboot_popup();
+ void MAINPopup();
+ QString diskmodel(QString,QString);
+ QString findinstallsouce(void);
+ void Display_2ndpopup();
+ bool updateRecordingList(void);
+ bool updateScheduledList(void);
+ void shutdownNow(int);
+
+ void install_sde(void);
+ void install_sdf(void);
+ void install_sdg(void);
+ void install_sdh(void);
+ void install_sda(void);
+ void install_sdb(void);
+ void install_sdc(void);
+ void install_sdd(void);
+ void install_net(void);
+ void write_install_conf(QString);
+ void install_generic(void);
+ void install_it(void);
+ void runLIVECD(void);
+ void busy_box(void);
+ void busy_find_oldsettings(void);
+ int ask_validate_network(void);
+private:
+ void updateStatusMessage(void);
+
+ MythPopupBox *popup; //can remove this
+ MythDialogBox *m_menuPopup;
+ DialogBox *reboot_box;
+ DialogBox *upgrade_box;
+ //
+ // GUI stuff
+ //
+
+ MythUIText *m_status_text;
+ MythUIText *m_recording_text;
+ MythUIText *m_scheduled_text;
+ MythUIText *m_mv_text;
+
+ MythUIText *m_warning_text;
+ MythUIText *m_time_text;
+ MythUIText *m_date_text;
+ MythUIButton *m_startfrontend_button;
+
+ QTimer *m_updateStatusTimer;
+ QTimer *m_updateScreenTimer;
+ QTimer *m_timeTimer;
+
+ QString m_installDir;
+ QString m_timeFormat;
+ QStringList m_statusList;
+ QString install_drive ;
+ QString install_text;
+ QString version_text;
+ QString recording_text;
+ QString scheduled_text;
+ QString error_text;
+ QString mythvantage_text;
+ string bin_prefix;
+ QString current_hostname;
+
+ bool I_AM_BUSY;
+ bool WORKING_ON_INSTALL;
+
+};
+
+#endif
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp
new file mode 100755
index 0000000..2e505f1
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp
@@ -0,0 +1,4910 @@
+//_include <mythcontext.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <QtNetwork>
+
+
+//Added by qt3to4:
+#include <Q3TextStream>
+//#include "tv.h"
+#include <stdlib.h>
+#include "mythprogressdialog.h"
+#include "mythsystemlegacy.h"
+
+#include "xorgsettings.h"
+#include "password_manage.h"
+#include "misc_settings.h"
+#include "infrared.h"
+#include "supplemental.h"
+#include "vnc.h"
+#include "fileshare.h"
+
+
+
+int timezone_unknown = FALSE;
+extern HostParms hostparm;
+//extern DDCinfo ddcinfo;
+
+
+
+bool displaymysqlonly = false ;
+bool displayshownetwork =false ;
+bool displayshowhostype = false ;
+bool displayshowmisc =false ;
+bool displayshowshutdown =false ;
+bool displayshowadvanced = false;
+bool displayshowsound = false ;
+bool displayshowadvancedX = false;
+bool displayaccesscontrol= false;
+bool displayplugins = false;
+bool displaysoftware = false;
+bool displayuser = false;
+bool displaywebuser = false;
+bool displayddns = false;
+bool displayinfrared = false;
+bool displayscreensaver = false;
+//bool install_hobbit = false;
+bool displaysupplemental = false;
+bool displayremotesonly = false;
+bool displayvnc = false;
+bool displayfileshare = false;
+
+
+static HostComboBox *ThemePainter()
+{
+ HostComboBox *gc = new HostComboBox("ThemePainter");
+ gc->setLabel(QObject::tr("Paint Engine"));
+ gc->addSelection(QObject::tr("Qt"), "qt");
+ gc->addSelection(QObject::tr("OpenGL"), "opengl");
+ gc->setHelpText(QObject::tr("This selects what Myth uses to draw. If you have decent hardware, select OpenGL. Changing this requires a restart."));
+ return gc;
+
+}
+
+
+static HostLineEdit *HostDDnslogin()
+{
+ HostLineEdit *gc = new HostLineEdit("HostDDnslogin");
+ gc->setLabel(QObject::tr("Login"));
+ gc->setValue("");
+ gc->setHelpText(QObject::tr("Login for DDNS account."));
+ return gc;
+};
+
+static HostLineEdit *HostDDnspassword()
+{
+ HostLineEdit *gc = new HostLineEdit("HostDDnspassword");
+ gc->setLabel(QObject::tr("Password"));
+ gc->setValue("");
+ gc->SetPasswordEcho(true);
+ gc->setHelpText(QObject::tr("Password for DDNS account."));
+ return gc;
+};
+
+static HostLineEdit *HostDDnshostname()
+{
+ HostLineEdit *gc = new HostLineEdit("HostDDnshostname");
+ gc->setLabel(QObject::tr("DDNS hostname"));
+ gc->setValue("");
+ gc->setHelpText(QObject::tr("Hostname used for DDNS."));
+ return gc;
+};
+
+static HostCheckBox *HostDDnsEnable()
+{
+ HostCheckBox *gc = new HostCheckBox("HostDDnsEnable");
+ gc->setLabel(QObject::tr("Enable DDNS"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Update DDNS records at dyndns.com. Visit http://dyndns.com to setup your account."));
+ return gc;
+};
+
+class DDnssettings: public TriggeredConfigurationGroup {
+public:
+ DDnssettings():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("DDNS Settings"));
+ SetVertical(true);
+ Setting* trigger = HostDDnsEnable() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false);
+ settings->addChild(HostDDnshostname());
+ settings->addChild(HostDDnslogin());
+ settings->addChild(HostDDnspassword());
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", settings);
+ };
+};
+
+
+
+QString findnet()
+{
+
+ QString netdev="";
+ //QString netdev="eth0 eth1 wlan0 wlan1 ath0 ";
+ //QString netdev="eth0 eth1";
+ QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces();
+ for (int i = 0; i < ifaces.count(); ++i)
+ {
+ netdev+=ifaces[i].name();
+ }
+ return netdev;
+}
+
+/*
+ system("/sbin/ifconfig -a > /tmp/.netinfo");
+ QString line;
+ QFile file("/tmp/.netinfo");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.contains("HWaddr"))
+ {
+ QString s = line.simplifyWhiteSpace();
+ s = s.section( " ", 0, 0 ); // s == "surname"
+ netdev+=s;
+ netdev+=" ";
+ }
+ }
+ file.close();
+ }
+ return netdev;*/
+//}
+
+QString findnet_wireless()
+{
+
+ QString netdev="";
+//QString netdev="eth0 eth1 wlan0 wlan1 ath0 ";
+ system("/usr/sbin/iwconfig > /tmp/.netinfo_wireless");
+ QString line;
+ QFile file("/tmp/.netinfo_wireless");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.contains("Nickname") || line.contains("ESSID"))
+ {
+ QString s = line.simplifyWhiteSpace();
+ s = s.section( " ", 0, 0 ); // s == "surname"
+ netdev+=s;
+ netdev+=" ";
+ }
+ }
+ file.close();
+ }
+ return netdev;
+}
+
+static HostComboBox *HostNetDevice()
+{
+ HostComboBox *gc = new HostComboBox("HostNetDevice");
+ gc->setLabel(QObject::tr("Device"));
+ QString foundnet=findnet();
+
+ if (foundnet.contains(hostparm.ThisHostnetOLD))
+ {
+ QString s = "HostActiveonboot";
+ s+=hostparm.ThisHostnetOLD;
+ gCoreContext->SaveSetting(s, hostparm.ThisHostnetActiveOLD );
+ }
+
+ if (foundnet.contains("eth0"))
+ gc->addSelection("eth0");
+
+ if (foundnet.contains("eth1"))
+ gc->addSelection("eth1");
+
+ if (foundnet.contains("wlan0"))
+ gc->addSelection("wlan0");
+
+ if (foundnet.contains("wlan1"))
+ gc->addSelection("wlan1");
+
+ if (foundnet.contains("ath0"))
+ gc->addSelection("ath0");
+
+ int findoldnetdevice=gc->findSelection(hostparm.ThisHostnetOLD);
+ gc->setValue(findoldnetdevice);
+
+
+
+ gc->setHelpText(QObject::tr("Network interface"));
+ return gc;
+};
+
+
+static HostCheckBox *HostActiveonboot()
+{
+ HostCheckBox *gc = new HostCheckBox("HostActiveonboot");
+ gc->setLabel(QObject::tr("Device is active on boot"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Network is started on boot"));
+ return gc;
+};
+
+/*
+static HostCheckBox *HostServiceSamba()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba");
+ gc->setLabel(QObject::tr("Windows sharing"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Allow window machines to access recorded files"));
+ return gc;
+};
+
+static HostCheckBox *HostServiceSamba_write()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write");
+ gc->setLabel(QObject::tr("Readonly"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. "));
+ return gc;
+};
+
+
+static HostCheckBox *HostServiceSamba_writehome()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome");
+ gc->setLabel(QObject::tr("Readonly"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. "));
+ return gc;
+};
+
+static HostCheckBox *HostServiceSamba_media()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media");
+ gc->setLabel(QObject::tr("share media"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr(" "));
+ return gc;
+};
+
+static HostCheckBox *HostServiceSamba_home()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home");
+ gc->setLabel(QObject::tr("share home"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr(" "));
+ return gc;
+};
+
+
+
+static HostComboBox *HostServiceSamba_domain()
+{
+ HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true);
+ gc->setLabel(QObject::tr("Workgroup"));
+ gc->setHelpText(QObject::tr("Workgroup for smb share"));
+ gc->addSelection("WORKGROUP");
+ QString currentitem;
+ QString line;
+ QFile file("/tmp/smbdomainlist");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith("domain"))
+ {
+ currentitem = line.section( " ", 1, 1 );
+ if ( currentitem != "-" )
+ gc->addSelection(currentitem);
+ }
+ }
+ file.close();
+ }
+ gc->addSelection("type_workgroup_here");
+ return gc;
+};*/
+
+static HostCheckBox *HostLircWait()
+{
+ HostCheckBox *gc = new HostCheckBox("HostLircWait");
+ gc->setLabel(QObject::tr("Wait for lirc"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("System will wait for lirc before starting the UI "));
+ return gc;
+};
+
+static HostCheckBox *HostBEWait()
+{
+ HostCheckBox *gc = new HostCheckBox("HostBEWait");
+ gc->setLabel(QObject::tr("Delay starting mythfrontend until mythbackend is running"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("The system will check if mythbackend is online before starting mythfrontend. This will avoid connection errors and configuration screens."));
+ return gc;
+};
+
+
+
+// static HostComboBox *HostEvrouterConfig()
+// {
+// HostComboBox *gc = new HostComboBox("HostEvrouterConfig",true);
+// gc->setLabel(QObject::tr("Key Configuration"));
+// gc->setHelpText(QObject::tr("Choose the key definations that will be used by the event router"));
+// QString dirtxt;
+// dirtxt=MV_ROOT;
+// dirtxt.append("templates/evrouter");
+// QDir evrouter(dirtxt);
+//
+// evrouter.setSorting(QDir::Name | QDir::IgnoreCase);
+// QFileInfoList fil = evrouter.entryInfoList(QDir::Dirs);
+// for( QFileInfoList::iterator it = fil.begin();
+// it != fil.end();
+// ++it )
+// {
+// QFileInfo &currentitem = *it;
+// //JM VERBOSE(VB_IMPORTANT, currentitem.fileName());
+// if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "")
+// {
+// gc->addSelection(currentitem.fileName());
+// }
+// }
+// gc->addSelection("tinker");
+// return gc;
+// };
+
+
+// static HostCheckBox *HostServiceNFS()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostServiceNFS");
+// gc->setLabel(QObject::tr("Standard file sharing"));
+// gc->setValue(true);
+// gc->setHelpText(QObject::tr("Allow all machines to access recorded files with nfs"));
+// return gc;
+// };
+
+
+static HostCheckBox *HostServiceMythWEB()
+{
+ HostCheckBox *gc = new HostCheckBox("HostServiceMythWEB");
+ gc->setLabel(QObject::tr("Enable MythWeb"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Allow MythTV scheduling using a web browser."));
+ return gc;
+};
+
+// static HostCheckBox *HostServiceHobbitclient()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostServiceHobbitclient");
+// gc->setLabel(QObject::tr("Hobbit-client"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Report stats and other stuff to the master backend"));
+// return gc;
+// };
+//
+// static GlobalCheckBox *GlobalServiceHobbitserver()
+// {
+// GlobalCheckBox *gc = new GlobalCheckBox("GlobalServiceHobbitserver");
+// gc->setLabel(QObject::tr("Hobbit-server"));
+// gc->setValue(true);
+// gc->setHelpText(QObject::tr("Run the hobbit server to collect stats and other stuff"));
+// return gc;
+// };
+
+
+// static HostCheckBox *HostServiceRRD()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostServiceRRD");
+// gc->setLabel(QObject::tr("rrd_stats"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Collect stats and create graphs of various system resources."));
+// return gc;
+// };
+
+static HostCheckBox *HostUseDHCP()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseDHCP");
+ gc->setLabel(QObject::tr("Static ip address"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
+ return gc;
+};
+
+static HostCheckBox *HostRunDHCP()
+{
+ HostCheckBox *gc = new HostCheckBox("HostRunDHCP");
+ gc->setLabel(QObject::tr("DHCP Server"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Only one DHCP server should run on a network. Leave this unchecked if you are not sure."));
+ return gc;
+};
+
+// static HostCheckBox *HostRunEvrouter()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostRunEvrouter");
+// gc->setLabel(QObject::tr("Use evrouter"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Evrouter will run custom actions, based on the user defined events."));
+// return gc;
+// };
+
+static HostCheckBox *HostUsemythfrontend()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseMythWelcome");
+ gc->setLabel(QObject::tr("Run MythWelcome"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("If checked mythwelcome will be started instead of mythfrontend."));
+ return gc;
+};
+
+static HostCheckBox *HostRunFrontend()
+{
+ HostCheckBox *gc = new HostCheckBox("HostRunFrontend");
+ gc->setLabel(QObject::tr("Run Frontend"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("If checked the frontend X windows GUI will start. Most people will want this checked. Disable the frontend if you want the system to run without a display connected."));
+ return gc;
+};
+
+
+static HostComboBox *HostMysqlserverip_listbox()
+{
+ HostComboBox *gc = new HostComboBox("HostMysqlServer",true);
+ gc->setLabel(QObject::tr("Mysql server"));
+
+ QString currentitem;
+ QString prevline;
+ QString line;
+ QFile file("/tmp/mysqllist");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith(" address"))
+ {
+ currentitem = line.section( " ", 5, 5 );
+ currentitem = currentitem.section( "[" , 1,1 );
+ currentitem = currentitem.section( "]" , 0, 0 );
+
+ currentitem = currentitem + "\t" + prevline.section( " ",5,5 );
+ gc->addSelection(currentitem);
+ }
+ prevline = line;
+ }
+ file.close();
+ //system ("rm -f /tmp/mysqllist");
+ }
+ gc->addSelection("Manual: type ip here");
+ gc->setHelpText(QObject::tr(""));
+
+ QString NETBOOT = getenv("NETBOOT");
+ NETBOOT=NETBOOT.stripWhiteSpace();
+ if ( NETBOOT != "YES" )
+ {
+ if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" ))
+ gc->setEnabled(false);
+ }
+
+ return gc;
+}
+
+
+
+static HostCheckBox *HostRemoteBackup()
+{
+ HostCheckBox *gc = new HostCheckBox("HostRemoteBackup");
+ gc->setLabel(QObject::tr("Remote Backup"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Copy the system backup file to another directory or host."));
+ return gc;
+};
+
+
+static HostComboBox *HostRemoteBackupDir()
+{
+ QString tempItem;
+ HostComboBox *gc = new HostComboBox("HostRemoteBackupDir",true);
+ gc->setLabel(QObject::tr(" Dir or Host" ));
+ gc->addSelection("dir:/data/storage/disk0");
+ MSqlQuery query(MSqlQuery::InitCon());
+
+
+ query.prepare( "SELECT DISTINCT hostname from settings where hostname is not null and not (hostname=:HOSTNAME);");
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ if (query.exec() && query.isActive() && query.size() > 0)
+ {
+ while (query.next())
+ {
+ tempItem = query.value(0).toString();
+ gc->addSelection(tempItem);
+ }
+ }
+
+ gc->setHelpText(QObject::tr("Remote host that will receive a copy of the backup file. To copy the file to a local dir instead of a remote host use dir:/backup_dir_name"));
+
+ return gc;
+};
+
+class Backupsettings: public TriggeredConfigurationGroup {
+public:
+ Backupsettings():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ SetVertical(false);
+ setLabel(QObject::tr("Backup Settings"));
+ Setting* trigger = HostRemoteBackup();
+ addChild(trigger);
+ setTrigger(trigger);
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
+ settings->addChild(HostRemoteBackupDir());
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", settings);
+
+ };
+};
+
+
+
+// static HostCheckBox *HostPKG_MIRROR()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostPKG_MIRROR");
+// gc->setLabel(QObject::tr("Use Local mirror"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Master Backend will be used as the repo source."));
+// return gc;
+// };
+
+// static GlobalCheckBox *GlobalPKG_MIRROR()
+// {
+// GlobalCheckBox *gc = new GlobalCheckBox("GlobalPKG_MIRROR");
+// gc->setLabel(QObject::tr("Local mirror"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Keep a local copy of the packages. Allow other frontends to install from the local copy."));
+// return gc;
+// };
+
+
+
+static HostCheckBox *HostncidClient()
+{
+ HostCheckBox *gc = new HostCheckBox("HostncidClient");
+ gc->setLabel(QObject::tr("Show CallerID"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Show CallerID popup. The backend must be running the CallerID program."));
+ return gc;
+};
+
+static HostCheckBox *HostncidDaemon()
+{
+ HostCheckBox *gc = new HostCheckBox("HostncidDaemon");
+ gc->setLabel(QObject::tr("Run CallerID"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Run daemon to collect CallerID information."));
+ return gc;
+};
+
+static HostComboBox *HostSerialPortncid()
+{
+ HostComboBox *gc = new HostComboBox("HostSerialPortncid",false);
+ gc->setLabel(QObject::tr("Serial Port"));
+ gc->addSelection("ttyS0");
+ gc->addSelection("ttyS1");
+ gc->addSelection("ttyS2");
+ gc->addSelection("ttyS3");
+ gc->addSelection("ttyACM0");
+ gc->setHelpText(QObject::tr("Serial port where callerid capable modem is connected"));
+ return gc;
+}
+
+static HostCheckBox *HostNcidDeviceNetCallerID()
+{
+ HostCheckBox *gc = new HostCheckBox("HostNcidDeviceNetCallerID");
+ gc->setLabel(QObject::tr("Using a NetCallerID"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Instead of a typical modem, the serial device is a NetCallerID"));
+ return gc;
+};
+
+
+static HostCheckBox *Hostbootsplash()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostbootsplash");
+ gc->setLabel(QObject::tr("Enable Boot Splash"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Covers up boot messages with LinHES logo."));
+ return gc;
+};
+
+//-------------------------------------screensaver settings-------------------
+
+static HostComboBox *HostScreensaverType()
+{
+ HostComboBox *gc = new HostComboBox("HostScreensaverType");
+ gc->setLabel(QObject::tr("Screensaver Program"));
+ gc->addSelection("xscreensaver");
+ //gc->addSelection("gscreensaver");
+ gc->addSelection("none");
+ gc->addSelection("tinker");
+ gc->setHelpText(QObject::tr("Set the screensaver program."));
+ gc->setValue("none");
+ return gc;
+};
+
+static HostSpinBox *HostScreensaverIdle()
+{
+ HostSpinBox *gc = new HostSpinBox("HostScreensaverIdle", 5, 60, 1, true);
+ gc->setLabel(QObject::tr("Idle Time"));
+ gc->setValue(5);
+ gc->setHelpText(QObject::tr("Number of minutes to wait before starting the screensaver." ));
+ return gc;
+}
+
+static HostCheckBox *HostScreensaverBlank()
+{
+ HostCheckBox *gc = new HostCheckBox("HostScreensaverBlank");
+ gc->setLabel(QObject::tr("Blank"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Blank the screen instead of using a screensaver"));
+ return gc;
+};
+
+static HostCheckBox *HostScreensaverRandom()
+{
+ HostCheckBox *gc = new HostCheckBox("HostScreensaverRandom");
+ gc->setLabel(QObject::tr("Random"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Use a random screensaver."));
+ return gc;
+};
+
+
+
+static HostComboBox *HostGScreensaverTheme()
+{
+ HostComboBox *gc = new HostComboBox("HostGScreensaverTheme");
+ gc->setLabel(QObject::tr("Screensaver"));
+ gc->setHelpText(QObject::tr("Screen saver program to use."));
+ QString line;
+ QString dirtxt=MV_ROOT;
+ dirtxt.append("templates/gscreensavers");
+ QFile file(dirtxt);
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ gc->addSelection(line);
+ }
+ file.close();
+ }
+ return gc;
+};
+
+static HostComboBox *HostXScreensaverTheme()
+{
+ HostComboBox *gc = new HostComboBox("HostXScreensaverTheme");
+ gc->setLabel(QObject::tr("Screensaver"));
+ gc->setHelpText(QObject::tr("Screensaver to display."));
+ QString dirtxt;
+ dirtxt=MV_ROOT;
+ dirtxt.append("templates/xscreensavers");
+ //read in from a file.
+ QString line;
+ QFile file(dirtxt);
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ gc->addSelection(line);
+ }
+ file.close();
+ }
+ return gc;
+};
+
+class Screensaverhostsettings: public TriggeredConfigurationGroup {
+public:
+ Screensaverhostsettings():
+
+ TriggeredConfigurationGroup() {
+ SetVertical(true);
+ setLabel(QObject::tr("Screensaver Settings"));
+ Setting* trigger = HostScreensaverType() ;
+ addChild(trigger);
+ setTrigger(trigger);
+ ConfigurationGroup* screensaversettings = new GridConfigurationGroup(2);
+ screensaversettings->addChild(HostScreensaverBlank());
+ screensaversettings->addChild(HostScreensaverRandom());
+
+ ConfigurationGroup* xscreensaversettings = new VerticalConfigurationGroup();
+ xscreensaversettings->addChild(screensaversettings);
+ xscreensaversettings->addChild(HostScreensaverIdle());
+ xscreensaversettings->addChild(HostXScreensaverTheme());
+
+
+ ConfigurationGroup* gscreensaversettings = new VerticalConfigurationGroup();
+ gscreensaversettings->addChild(screensaversettings);
+ gscreensaversettings->addChild(HostScreensaverIdle());
+ gscreensaversettings->addChild(HostGScreensaverTheme());
+
+
+
+ addTarget("tinker", new VerticalConfigurationGroup(false, false));
+ addTarget("none", new VerticalConfigurationGroup(false, false));
+ addTarget("gscreensaver", gscreensaversettings);
+ addTarget("xscreensaver", xscreensaversettings);
+ };
+};
+
+
+
+
+//-------------------------------------access setting----------------------
+
+static HostCheckBox *Hostaccessnetwork()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessnetwork");
+ gc->setLabel(QObject::tr("Network"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Control access to Network Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccesshostype()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccesshostype");
+ gc->setLabel(QObject::tr("Host"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Host Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *HostaccesshostypeSystemtype()
+{
+ HostCheckBox *gc = new HostCheckBox("HostaccesshostypeSystemtype");
+ gc->setLabel(QObject::tr("Change System Type"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Ability to change the System Type in Host Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessmisc()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessmisc");
+ gc->setLabel(QObject::tr("Miscellanous"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Miscellanous Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccesssleep()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccesssleep");
+ gc->setLabel(QObject::tr("Shutdown"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Shutdown Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessadvanced()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessadvanced");
+ gc->setLabel(QObject::tr("Advanced"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Advanced Settings. Checked means the screen is enabled. "));
+ return gc;
+};
+
+static HostCheckBox *HostaccessadvancedX()
+{
+ HostCheckBox *gc = new HostCheckBox("HostaccessadvancedX");
+ gc->setLabel(QObject::tr("Display"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Display Settings. Checked means the screen is enabled. "));
+ return gc;
+};
+static HostCheckBox *Hostaccessddns()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessddns");
+ gc->setLabel(QObject::tr("Dynamic DNS"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to DDNS Settings. Checked means the screen is enabled. "));
+ return gc;
+};
+
+static HostCheckBox *Hostaccesssound()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccesssound");
+ gc->setLabel(QObject::tr("Audio"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Audio Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessscreensaver()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessscreensaver");
+ gc->setLabel(QObject::tr("Screensaver"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Screensaver Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessir()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessir");
+ gc->setLabel(QObject::tr("Remotes"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Remotes Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessplugins()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessplugins");
+ gc->setLabel(QObject::tr("Programs"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Programs. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessuser()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessuser");
+ gc->setLabel(QObject::tr("User Accounts"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Control access to User Accounts. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccesswebuser()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccesswebuser");
+ gc->setLabel(QObject::tr("Web Security"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Web Security Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+static HostCheckBox *Hostaccessvnc()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessvnc");
+ gc->setLabel(QObject::tr("Screen Sharing"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to Screen Sharing Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+
+static HostCheckBox *Hostaccessfileshare()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostaccessfileshare");
+ gc->setLabel(QObject::tr("File Sharing"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Control access to File Sharing Settings. Checked means the screen is enabled."));
+ return gc;
+};
+
+
+class ACCESShostsettings: public TriggeredConfigurationGroup {
+public:
+ ACCESShostsettings():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ SetVertical(false);
+ Setting* trigger = Hostaccesshostype () ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false);
+ //settings->addChild(HostServiceSamba());
+ settings->addChild(HostaccesshostypeSystemtype());
+
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", settings);
+ };
+};
+
+
+//---------------------------------- PLUGINS ----------------------
+
+static HostCheckBox *Hostpluginmytharchive()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmytharchive");
+ gc->setLabel(QObject::tr("MythArchive"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Check to enable MythArchive."));
+ return gc;
+};
+
+
+static HostCheckBox *Hostpluginmythbrowser()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythbrowser");
+ gc->setLabel(QObject::tr("MythBrowser"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Check to enable MythBrowser."));
+ return gc;
+};
+
+
+// static HostCheckBox *Hostpluginmythcontrols()
+// {
+// HostCheckBox *gc = new HostCheckBox("Hostpluginmythcontrols");
+// gc->setLabel(QObject::tr("mythcontrols"));
+// gc->setValue(true);
+// gc->setHelpText(QObject::tr("check to enable mythcontrols"));
+// return gc;
+// };
+
+
+static HostCheckBox *Hostpluginmythnetvision()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythnetvision");
+ gc->setLabel(QObject::tr("MythNetvision"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Check to enable MythNetvision."));
+ return gc;
+};
+
+
+static HostCheckBox *Hostpluginmythgallery()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythgallery");
+ gc->setLabel(QObject::tr("MythGallery"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Check to enable MythGallery."));
+ return gc;
+};
+
+
+static HostCheckBox *Hostpluginmythgame()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythgame");
+ gc->setLabel(QObject::tr("MythGame"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Check to enable MythGame."));
+ return gc;
+};
+
+static HostCheckBox *Hostpluginmythgamesnes9x()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamesnes9x");
+ gc->setLabel(QObject::tr("snes9x"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Super Nintendo emulator"));
+ return gc;
+};
+
+static HostCheckBox *Hostpluginmythgamefceux()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamefceux");
+ gc->setLabel(QObject::tr("fceux"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("NES emulator"));
+ return gc;
+};
+
+static HostCheckBox *HostpluginmythgameMame()
+{
+ HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMame");
+ gc->setLabel(QObject::tr("mame"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Mame, Multiple Arcade Machine Emulator"));
+ return gc;
+};
+
+static HostCheckBox *HostpluginmythgameMednafen()
+{
+ HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMednafen");
+ gc->setLabel(QObject::tr("Mednafen"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Mednafen is a portable, utilizing OpenGL and SDL, command-line driven multi-system emulator with many advanced features."));
+ return gc;
+};
+
+static HostCheckBox *HostpluginmythgameROMDB()
+{
+ HostCheckBox *gc = new HostCheckBox("HostpluginmythgameROMDB");
+ gc->setLabel(QObject::tr("RomDB"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Table used my MythGame to store information about games. If you are into games, this is recommended."));
+ return gc;
+};
+
+static HostCheckBox *Hostpluginmythgamemupen64()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamemupen64");
+ gc->setLabel(QObject::tr("mupen64"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("n64 emulator"));
+ return gc;
+};
+
+static HostCheckBox *HostpluginmythgameDolphin()
+{
+ HostCheckBox *gc = new HostCheckBox("HostpluginmythgameDolphin");
+ gc->setLabel(QObject::tr("Dolphin"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Nintendo Wii emulator"));
+ return gc;
+};
+
+static HostCheckBox *HostpluginmythgameXe()
+{
+ HostCheckBox *gc = new HostCheckBox("HostpluginmythgameXe");
+ gc->setLabel(QObject::tr("Xe"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Xe is a multisystem emulator. http://www.xe-emulator.com/ for the complete list."));
+ return gc;
+};
+
+
+/*
+static HostCheckBox *Hostpluginmythmovietime()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythmovietime");
+ gc->setLabel(QObject::tr("mythmovietime"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Check to enable mythmovietime"));
+ return gc;
+};*/
+
+
+static HostCheckBox *Hostpluginmythmusic()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythmusic");
+ gc->setLabel(QObject::tr("MythMusic"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Check to enable MythMusic."));
+ return gc;
+};
+
+
+static HostCheckBox *Hostpluginmythnews()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythnews");
+ gc->setLabel(QObject::tr("MythNews"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Check to enable MythNews."));
+ return gc;
+};
+
+
+// static HostCheckBox *Hostpluginmythsmolt()
+// {
+// HostCheckBox *gc = new HostCheckBox("Hostpluginmythsmolt");
+// gc->setLabel(QObject::tr("mythsmolt"));
+// gc->setValue(true);
+// gc->setHelpText(QObject::tr("check to enable mythsmolt"));
+// return gc;
+// };
+
+
+// static HostCheckBox *Hostpluginmythvideo()
+// {
+// HostCheckBox *gc = new HostCheckBox("Hostpluginmythvideo");
+// gc->setLabel(QObject::tr("mythvideo"));
+// gc->setValue(true);
+// gc->setHelpText(QObject::tr("check to enable mythvideo"));
+// return gc;
+// };
+
+static HostCheckBox *Hostpluginmythvideo_dvdcss()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythvideo_dvdcss");
+ gc->setLabel(QObject::tr("dvdcss"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption."));
+ return gc;
+};
+
+
+
+// static HostCheckBox *Hostpluginmythstream()
+// {
+// HostCheckBox *gc = new HostCheckBox("Hostpluginmythstream");
+// gc->setLabel(QObject::tr("mythstream"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("MythStream is an unofficial MythTv plugin that plays Internet audio and video streams."));
+// return gc;
+// };
+
+static HostCheckBox *Hostpluginmythappletrailers()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythappletrailers");
+ gc->setLabel(QObject::tr("MythAppleTrailers"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Stream trailer's from Apple's website."));
+ return gc;
+};
+
+
+static HostCheckBox *Hostpluginmythweather()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythweather");
+ gc->setLabel(QObject::tr("MythWeather"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Check to enable MythWeather."));
+ return gc;
+};
+
+
+static HostCheckBox *HostMiro()
+{
+ HostCheckBox *gc = new HostCheckBox("HostMiro");
+ gc->setLabel(QObject::tr("Miro"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Miro is a popular, free, and open internet TV application. It brings video channels from thousands of sources and has more free HD than any other platform."));
+ return gc;
+};
+
+
+// static HostCheckBox *HostXine()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostXine");
+// gc->setLabel(QObject::tr("Xine"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Xine is a free multimedia player"));
+// return gc;
+// };
+
+
+// static HostCheckBox *Hostwebmin()
+// {
+// HostCheckBox *gc = new HostCheckBox("Hostwebmin");
+// gc->setLabel(QObject::tr("Webmin"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Webmin is a web-based interface for system administration for Unix. Once installed, you can access it at https://ip.of.back.end:10000 using your root password."));
+// return gc;
+// };
+
+// static HostCheckBox *Hostfuppes()
+// {
+// HostCheckBox *gc = new HostCheckBox("Hostfuppes");
+// gc->setLabel(QObject::tr("Fuppes"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Upnp server"));
+// return gc;
+// };
+
+static HostCheckBox *Hostfoldingathome()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostfoldingathome");
+ gc->setLabel(QObject::tr("Folding@home"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("A distributed computing project which studies protein folding, misfolding, aggregation, and related diseases."));
+ return gc;
+};
+
+
+
+static HostCheckBox *Hostwebonlinhes()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostwebonlinhes");
+ gc->setLabel(QObject::tr("Web On LinHES"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Includes Google Chrome and multiple websites with 10' UIs in Media Library --> Online Content."));
+ return gc;
+};
+
+static HostCheckBox *HostHuluDesktop()
+{
+ HostCheckBox *gc = new HostCheckBox("HostHuluDesktop");
+ gc->setLabel(QObject::tr("Hulu Desktop"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Hulu Desktop for Linux."));
+ return gc;
+};
+
+
+static HostComboBox *Hostfoldingusername()
+{
+ // If there is an old R5.5 style folding directory /myth/folding@home, attempt
+ // to retrieve the old username.
+
+ FILE *username_pipe;
+ username_pipe =
+ popen (
+ "grep username= /myth/folding@home/client.cfg 2> /dev/null | "
+ "sed 's/username=//g'", "r");
+
+ if (username_pipe)
+ {
+ char username[200];
+ if (fgets (username, sizeof (username), username_pipe))
+ {
+ char *new_line;
+ username[sizeof(username)-1]=0;
+ if ((new_line = strchr (username, '\n')))
+ new_line[0] = 0;
+
+ cout << "found old username " << username << endl;
+ //FIXME??
+ //gCoreContext->SetSetting("Hostfoldingusername", username);
+ gCoreContext->SaveSetting("Hostfoldingusername", username);
+ }
+ pclose (username_pipe);
+ }
+
+ HostComboBox *gc = new HostComboBox("Hostfoldingusername",true);
+ gc->setLabel(QObject::tr("Folding Username"));
+ gc->setValue("");
+
+ gc->setHelpText(QObject::tr("The username associated to the work-units you return."));
+ return gc;
+};
+
+static HostComboBox *Hostfoldingworksize()
+{
+ HostComboBox *gc = new HostComboBox("Hostfoldingworksize");
+ gc->setLabel(QObject::tr("Work Packet Size"));
+ gc->addSelection("Big", "big");
+ gc->addSelection("Normal", "normal");
+ gc->addSelection("Small", "small");
+ gc->setHelpText(QObject::tr("Acceptable size of work assignment and work result packets (bigger units may have large memory demands)."));
+ return gc;
+};
+
+// static HostCheckBox *HostXscreensaver()
+// {
+// HostCheckBox *gc = new HostCheckBox("HostXscreensaver");
+// gc->setLabel(QObject::tr("Screensaver"));
+// gc->setValue(false);
+// gc->setHelpText(QObject::tr("Run screensaver after 10 minutes of inactivity."));
+// return gc;
+// };
+
+
+static HostCheckBox *Hostpluginmythzoneminder()
+{
+ HostCheckBox *gc = new HostCheckBox("Hostpluginmythzoneminder");
+ gc->setLabel(QObject::tr("MythZoneMinder"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Check to enable MythZoneMinder."));
+ return gc;
+};
+
+
+// -------------End plugins--------------------------------
+
+
+
+class NCIDsettings: public TriggeredConfigurationGroup {
+public:
+ NCIDsettings():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ SetVertical(true);
+ Setting* trigger = HostncidDaemon() ;
+ addChild(trigger);
+ setTrigger(trigger);
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false,false);
+ settings->addChild(HostSerialPortncid());
+ settings->addChild(HostNcidDeviceNetCallerID());
+ addTarget("0", new HorizontalConfigurationGroup(false, false));
+ addTarget("1", settings);
+ };
+};
+
+// class SAMBAsettings: public TriggeredConfigurationGroup {
+// public:
+// SAMBAsettings():
+// TriggeredConfigurationGroup(false, true, true, true,false, false, true, true) {
+// SetVertical(false);
+// Setting* trigger = HostServiceSamba() ;
+// addChild(trigger);
+// setTrigger(trigger);
+//
+// ConfigurationGroup* settings = new GridConfigurationGroup(2,false,false);
+// //settings->addChild(HostServiceSamba());
+// settings->addChild(HostServiceSamba_media());
+// settings->addChild(HostServiceSamba_write());
+// settings->addChild(HostServiceSamba_home());
+// settings->addChild(HostServiceSamba_writehome());
+// settings->addChild(HostServiceSamba_domain());
+//
+// addTarget("0", new GridConfigurationGroup(2,false, false));
+// addTarget("1", settings);
+// };
+// };
+
+
+// class Evroutersettings: public TriggeredConfigurationGroup {
+// public:
+// Evroutersettings():
+// TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+// setLabel(QObject::tr("Evrouter config"));
+// Setting* trigger = HostRunEvrouter() ;
+// addChild(trigger);
+// setTrigger(trigger);
+//
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false);
+// settings->addChild(HostEvrouterConfig());
+//
+// addTarget("0", new VerticalConfigurationGroup(false, false));
+// addTarget("1", settings);
+// };
+// };
+
+class MythGamesettings: public TriggeredConfigurationGroup {
+public:
+ MythGamesettings():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ setLabel(QObject::tr("Programs - Games"));
+ Setting* trigger = Hostpluginmythgame() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(3,true,true);
+ settings->addChild(HostpluginmythgameROMDB());
+ settings->addChild(Hostpluginmythgamesnes9x());
+ settings->addChild(Hostpluginmythgamefceux());
+ settings->addChild(HostpluginmythgameMame());
+ settings->addChild(HostpluginmythgameMednafen());
+ settings->addChild(Hostpluginmythgamemupen64());
+ settings->addChild(HostpluginmythgameDolphin());
+ settings->addChild(HostpluginmythgameXe());
+
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", settings);
+ };
+};
+
+
+//____________________________________________________________________________
+class eth0_settings: public TriggeredConfigurationGroup {
+public:
+ eth0_settings():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+
+ HostComboBox *HOSTESSIDeth0 = new HostComboBox("HOSTESSIDeth0",true);
+ HOSTESSIDeth0->setLabel(QObject::tr("ESSID"));
+ HOSTESSIDeth0->addSelection("MythVantage");
+ HOSTESSIDeth0->addSelection("home_lan");
+ HOSTESSIDeth0->addSelection("type_it_here");
+ HOSTESSIDeth0->setHelpText(QObject::tr("ESSID"));
+ addChild(HOSTESSIDeth0);
+
+ HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0");
+ HostUseEncryptioneth0->setLabel(QObject::tr("Encryption"));
+ HostUseEncryptioneth0->setHelpText(QObject::tr("WPA uses a shared key phrase this is the most secure. For WEP use the generated key, this type of encryption is not recommended."));
+ HostUseEncryptioneth0->addSelection("none");
+ HostUseEncryptioneth0->addSelection("WPA");
+ HostUseEncryptioneth0->addSelection("WEP");
+
+ Setting* HostUseEncryption = HostUseEncryptioneth0;
+ addChild(HostUseEncryption);
+ setTrigger(HostUseEncryption);
+
+ HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0");
+ Hostkeyeth0->setLabel(QObject::tr("key"));
+ Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption."));
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
+ settings->addChild(Hostkeyeth0);
+ addTarget("none", new GridConfigurationGroup(1,false));
+ addTarget("WPA", settings);
+ addTarget("WEP", settings);
+ };
+};
+
+
+NetworkSettingseth0::NetworkSettingseth0():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("Network Settings"));
+ HostLineEdit *HostIPeth0 = new HostLineEdit("HostIPeth0");
+ HostIPeth0->setLabel(QObject::tr("IP Address"));
+ HostIPeth0->setValue("192.168.1.12");
+ HostIPeth0->setHelpText(QObject::tr("IP address of the new installation."));
+
+ HostComboBox *HostNETMASKeth0 = new HostComboBox("HostNETMASKeth0");
+ HostNETMASKeth0->setLabel(QObject::tr("Netmask"));
+ HostNETMASKeth0->addSelection("/0 0.0.0.0");
+ HostNETMASKeth0->addSelection("/1 128.0.0.0");
+ HostNETMASKeth0->addSelection("/2 192.0.0.0");
+ HostNETMASKeth0->addSelection("/3 224.0.0.0");
+ HostNETMASKeth0->addSelection("/4 240.0.0.0");
+ HostNETMASKeth0->addSelection("/5 248.0.0.0");
+ HostNETMASKeth0->addSelection("/6 252.0.0.0");
+ HostNETMASKeth0->addSelection("/7 254.0.0.0");
+ HostNETMASKeth0->addSelection("/8 255.0.0.0");
+ HostNETMASKeth0->addSelection("/9 255.128.0.0");
+ HostNETMASKeth0->addSelection("/10 255.192.0.0 ");
+ HostNETMASKeth0->addSelection("/11 255.224.0.0");
+ HostNETMASKeth0->addSelection("/12 255.240.0.0");
+ HostNETMASKeth0->addSelection("/13 255.248.0.0");
+ HostNETMASKeth0->addSelection("/14 255.252.0.0");
+ HostNETMASKeth0->addSelection("/15 255.254.0.0");
+ HostNETMASKeth0->addSelection("/16 255.255.0.0");
+ HostNETMASKeth0->addSelection("/17 255.255.128.0");
+ HostNETMASKeth0->addSelection("/18 255.255.192.0");
+ HostNETMASKeth0->addSelection("/19 255.255.224.0");
+ HostNETMASKeth0->addSelection("/20 255.255.240.0");
+ HostNETMASKeth0->addSelection("/21 255.255.248.0");
+ HostNETMASKeth0->addSelection("/22 255.255.252.0");
+ HostNETMASKeth0->addSelection("/23 255.255.254.0");
+ HostNETMASKeth0->addSelection("/24 255.255.255.0");
+ HostNETMASKeth0->addSelection("/25 255.255.255.128");
+ HostNETMASKeth0->addSelection("/26 255.255.255.192");
+ HostNETMASKeth0->addSelection("/27 255.255.255.224");
+ HostNETMASKeth0->addSelection("/28 255.255.255.240");
+ HostNETMASKeth0->addSelection("/29 255.255.255.248");
+ HostNETMASKeth0->addSelection("/30 255.255.255.252");
+ HostNETMASKeth0->addSelection("/31 255.255.255.254");
+ HostNETMASKeth0->addSelection("/32 255.255.255.255");
+ HostNETMASKeth0->setHelpText(QObject::tr("Netmask"));
+ HostNETMASKeth0->setValue(24);
+
+ HostLineEdit *HostGWeth0 = new HostLineEdit("HostGWeth0");
+ HostGWeth0->setLabel(QObject::tr("Gateway"));
+ HostGWeth0->setValue("192.168.1.1");
+ HostGWeth0->setHelpText(QObject::tr("This is the default route."));
+
+
+ HostLineEdit *HostDNSeth0 = new HostLineEdit("HostDNSeth0");
+ HostDNSeth0->setLabel(QObject::tr("Name Server"));
+ HostDNSeth0->setValue("192.168.1.1");
+ HostDNSeth0->setHelpText(QObject::tr("Name server"));
+
+
+ HostCheckBox *HostActiveonbooteth0 = new HostCheckBox("HostActiveonbooteth0");
+ HostActiveonbooteth0->setLabel(QObject::tr("Active"));
+ HostActiveonbooteth0->setValue(true);
+ HostActiveonbooteth0->setHelpText(QObject::tr("Network is started on boot."));
+
+ HostDefaulteth0 = new HostCheckBox("HostDefaulteth0");
+ HostDefaulteth0->setLabel(QObject::tr("Default"));
+ HostDefaulteth0->setValue(true);
+ HostDefaulteth0->setHelpText(QObject::tr("Will be used as the primary interface."));
+
+ connect(HostDefaulteth0, SIGNAL(valueChanged(bool)), this, SLOT(eth0_disable_others()));
+
+ HostCheckBox *HostUseDHCPeth0 = new HostCheckBox("HostUseDHCPeth0");
+ HostUseDHCPeth0 ->setLabel(QObject::tr("Static IP Address"));
+ HostUseDHCPeth0 ->setValue(false);
+ HostUseDHCPeth0 ->setHelpText(QObject::tr("Enable to use a static IP address, otherwise DHCP will be used."));
+
+ wirelessbuttoneth0 = new TransButtonSetting();
+ wirelessbuttoneth0->setLabel(tr("Wireless Settings"));
+ connect(wirelessbuttoneth0, SIGNAL(pressed()), this, SLOT(eth0_wireless_settings()));
+
+ ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, true, true);
+ settings1->addChild(HostActiveonbooteth0);
+ settings1->addChild(HostDefaulteth0);
+ settings1-> addChild(wirelessbuttoneth0);
+ addChild(settings1);
+
+
+ Setting* dhcpEnabled = HostUseDHCPeth0;
+ addChild(dhcpEnabled);
+ setTrigger(dhcpEnabled);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false, false, false);
+ settings->addChild(HostIPeth0);
+ settings->addChild(HostNETMASKeth0);
+ settings->addChild(HostGWeth0);
+ settings->addChild(HostDNSeth0);
+
+ addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+ addTarget("1", settings);
+};
+
+eth0options::eth0options()
+{
+
+ VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ rec->setLabel(QObject::tr("Wireless configuration for eth0"));
+ //rec->setUseLabel(true);
+ rec->addChild(new eth0_settings);
+ addChild(rec);
+}
+
+void NetworkSettingseth0::eth0_disable_others()
+{
+ QString my_current_value;
+ my_current_value = HostDefaulteth0->getValue();
+ if ( my_current_value == "1" )
+ {
+ hostparm.ThisHostDefaultInterface="eth0";
+ emit eth0_is_default();
+ }
+}
+void NetworkSettingseth0::eth0_disabled()
+{
+ HostDefaulteth0->setValue(0);
+}
+void NetworkSettingseth0::eth0_wireless_settings(void)
+{
+ eth0options eth0screen;
+ eth0screen.exec();
+}
+
+void NetworkSettingseth0::eth0_wireless_disable()
+{
+ wirelessbuttoneth0->setEnabled(false);
+}
+
+class eth1_settings: public TriggeredConfigurationGroup {
+public:
+ eth1_settings():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+
+ HostComboBox *HOSTESSIDeth1 = new HostComboBox("HOSTESSIDeth1",true);
+ HOSTESSIDeth1->setLabel(QObject::tr("ESSID"));
+ HOSTESSIDeth1->addSelection("MythVantage");
+ HOSTESSIDeth1->addSelection("home_lan");
+ HOSTESSIDeth1->addSelection("type_it_here");
+ HOSTESSIDeth1->setHelpText(QObject::tr("ESSID"));
+ addChild(HOSTESSIDeth1);
+ HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0");
+ HostUseEncryptioneth0->setLabel(QObject::tr("Encryption"));
+ HostUseEncryptioneth0->setHelpText(QObject::tr("WPA, WEP, none"));
+ HostUseEncryptioneth0->addSelection("none");
+ HostUseEncryptioneth0->addSelection("WPA");
+ HostUseEncryptioneth0->addSelection("WEP");
+
+ Setting* HostUseEncryption = HostUseEncryptioneth0;
+ addChild(HostUseEncryption);
+ setTrigger(HostUseEncryption);
+
+ HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0");
+ Hostkeyeth0->setLabel(QObject::tr("key"));
+ Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption"));
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
+ settings->addChild(Hostkeyeth0);
+ addTarget("none", new GridConfigurationGroup(1,false));
+ addTarget("WPA", settings);
+ addTarget("WEP", settings);
+ };
+};
+
+
+NetworkSettingseth1::NetworkSettingseth1():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("Network Settings"));
+ HostLineEdit *HostIPeth1 = new HostLineEdit("HostIPeth1");
+ HostIPeth1->setLabel(QObject::tr("Ip address"));
+ HostIPeth1->setValue("192.168.1.12");
+ HostIPeth1->setHelpText(QObject::tr("IP address of the new installation"));
+
+ HostComboBox *HostNETMASKeth1 = new HostComboBox("HostNETMASKeth1");
+ HostNETMASKeth1->setLabel(QObject::tr("Netmask"));
+ HostNETMASKeth1->addSelection("/0 0.0.0.0");
+ HostNETMASKeth1->addSelection("/1 128.0.0.0");
+ HostNETMASKeth1->addSelection("/2 192.0.0.0");
+ HostNETMASKeth1->addSelection("/3 224.0.0.0");
+ HostNETMASKeth1->addSelection("/4 240.0.0.0");
+ HostNETMASKeth1->addSelection("/5 248.0.0.0");
+ HostNETMASKeth1->addSelection("/6 252.0.0.0");
+ HostNETMASKeth1->addSelection("/7 254.0.0.0");
+ HostNETMASKeth1->addSelection("/8 255.0.0.0");
+ HostNETMASKeth1->addSelection("/9 255.128.0.0");
+ HostNETMASKeth1->addSelection("/10 255.192.0.0 ");
+ HostNETMASKeth1->addSelection("/11 255.224.0.0");
+ HostNETMASKeth1->addSelection("/12 255.240.0.0");
+ HostNETMASKeth1->addSelection("/13 255.248.0.0");
+ HostNETMASKeth1->addSelection("/14 255.252.0.0");
+ HostNETMASKeth1->addSelection("/15 255.254.0.0");
+ HostNETMASKeth1->addSelection("/16 255.255.0.0");
+ HostNETMASKeth1->addSelection("/17 255.255.128.0");
+ HostNETMASKeth1->addSelection("/18 255.255.192.0");
+ HostNETMASKeth1->addSelection("/19 255.255.224.0");
+ HostNETMASKeth1->addSelection("/20 255.255.240.0");
+ HostNETMASKeth1->addSelection("/21 255.255.248.0");
+ HostNETMASKeth1->addSelection("/22 255.255.252.0");
+ HostNETMASKeth1->addSelection("/23 255.255.254.0");
+ HostNETMASKeth1->addSelection("/24 255.255.255.0");
+ HostNETMASKeth1->addSelection("/25 255.255.255.128");
+ HostNETMASKeth1->addSelection("/26 255.255.255.192");
+ HostNETMASKeth1->addSelection("/27 255.255.255.224");
+ HostNETMASKeth1->addSelection("/28 255.255.255.240");
+ HostNETMASKeth1->addSelection("/29 255.255.255.248");
+ HostNETMASKeth1->addSelection("/30 255.255.255.252");
+ HostNETMASKeth1->addSelection("/31 255.255.255.254");
+ HostNETMASKeth1->addSelection("/32 255.255.255.255");
+ HostNETMASKeth1->setHelpText(QObject::tr("Netmask"));
+ HostNETMASKeth1->setValue(24);
+
+ HostLineEdit *HostGWeth1 = new HostLineEdit("HostGWeth1");
+ HostGWeth1->setLabel(QObject::tr("Gateway"));
+ HostGWeth1->setValue("192.168.1.1");
+ HostGWeth1->setHelpText(QObject::tr("This is the default route"));
+
+
+ HostLineEdit *HostDNSeth1 = new HostLineEdit("HostDNSeth1");
+ HostDNSeth1->setLabel(QObject::tr("Name server"));
+ HostDNSeth1->setValue("192.168.1.1");
+ HostDNSeth1->setHelpText(QObject::tr("Name server"));
+
+
+ HostCheckBox *HostActiveonbooteth1 = new HostCheckBox("HostActiveonbooteth1");
+ HostActiveonbooteth1->setLabel(QObject::tr("Active"));
+ HostActiveonbooteth1->setValue(false);
+ HostActiveonbooteth1->setHelpText(QObject::tr("Network is started on boot"));
+
+ HostDefaulteth1 = new HostCheckBox("HostDefaulteth1");
+ HostDefaulteth1->setLabel(QObject::tr("Default"));
+ HostDefaulteth1->setValue(false);
+ HostDefaulteth1->setHelpText(QObject::tr("Will be used as the primary interface"));
+ connect(HostDefaulteth1, SIGNAL(valueChanged(bool)), this, SLOT(eth1_disable_others()));
+
+ HostCheckBox *HostUseDHCPeth1 = new HostCheckBox("HostUseDHCPeth1");
+ HostUseDHCPeth1 ->setLabel(QObject::tr("Static ip address"));
+ HostUseDHCPeth1 ->setValue(false);
+ HostUseDHCPeth1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
+
+ wirelessbuttoneth1 = new TransButtonSetting();
+ wirelessbuttoneth1->setLabel(tr("Wireless Settings"));
+ connect(wirelessbuttoneth1, SIGNAL(pressed()), this, SLOT(eth1_wireless_settings()));
+
+ ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
+ settings1->addChild(HostActiveonbooteth1);
+ settings1->addChild(HostDefaulteth1);
+ settings1-> addChild(wirelessbuttoneth1);
+
+ addChild(settings1);
+
+ Setting* dhcpEnabled = HostUseDHCPeth1;
+ addChild(dhcpEnabled);
+ setTrigger(dhcpEnabled);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ settings->addChild(HostIPeth1);
+ settings->addChild(HostNETMASKeth1);
+ settings->addChild(HostGWeth1);
+ settings->addChild(HostDNSeth1);
+
+ addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+ addTarget("1", settings);
+};
+eth1options::eth1options()
+{
+ VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ rec->setLabel(QObject::tr("Wireless configuration for eth1"));
+ rec->addChild(new eth1_settings);
+ addChild(rec);
+}
+
+void NetworkSettingseth1::eth1_disable_others()
+{
+ QString my_current_value;
+ my_current_value = HostDefaulteth1->getValue();
+ if ( my_current_value == "1" )
+ {
+ hostparm.ThisHostDefaultInterface="eth1";
+ emit eth1_is_default();
+ }
+}
+void NetworkSettingseth1::eth1_disabled()
+{
+ HostDefaulteth1->setValue(0);
+}
+
+void NetworkSettingseth1::eth1_wireless_settings(void)
+{
+ eth1options eth1screen;
+ eth1screen.exec();
+}
+
+void NetworkSettingseth1::eth1_wireless_disable()
+{
+ wirelessbuttoneth1->setEnabled(false);
+}
+
+
+class wlan0_settings: public TriggeredConfigurationGroup {
+public:
+ wlan0_settings():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+
+ HostComboBox *HOSTESSIDwlan0 = new HostComboBox("HOSTESSIDwlan0",true);
+ HOSTESSIDwlan0->setLabel(QObject::tr("ESSID"));
+ HOSTESSIDwlan0->addSelection("MythVantage");
+ HOSTESSIDwlan0->addSelection("home_lan");
+ HOSTESSIDwlan0->addSelection("type_it_here");
+ HOSTESSIDwlan0->setHelpText(QObject::tr("ESSID"));
+ addChild(HOSTESSIDwlan0);
+ HostComboBox *HostUseEncryptionwlan0 = new HostComboBox("HostUseEncryptionwlan0");
+ HostUseEncryptionwlan0->setLabel(QObject::tr("Encryption"));
+ HostUseEncryptionwlan0->setHelpText(QObject::tr("WPA, WEP, none"));
+ HostUseEncryptionwlan0->addSelection("none");
+ HostUseEncryptionwlan0->addSelection("WPA");
+ HostUseEncryptionwlan0->addSelection("WEP");
+
+ Setting* HostUseEncryption = HostUseEncryptionwlan0;
+ addChild(HostUseEncryption);
+ setTrigger(HostUseEncryption);
+
+ HostLineEdit *Hostkeywlan0 = new HostLineEdit("Hostkeywlan0");
+ Hostkeywlan0->setLabel(QObject::tr("key"));
+ Hostkeywlan0->setHelpText(QObject::tr("Key to use for encryption"));
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
+ settings->addChild(Hostkeywlan0);
+ addTarget("none", new GridConfigurationGroup(1,false));
+ addTarget("WPA", settings);
+ addTarget("WEP", settings);
+ };
+};
+
+NetworkSettingswlan0::NetworkSettingswlan0():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("Network Settings"));
+
+ HostIPwlan0 = new HostLineEdit("HostIPwlan0");
+ HostIPwlan0->setLabel(QObject::tr("Ip address"));
+ HostIPwlan0->setValue("192.168.1.12");
+ HostIPwlan0->setHelpText(QObject::tr("IP address of the new installation"));
+
+ HostNETMASKwlan0 = new HostComboBox("HostNETMASKwlan0");
+ HostNETMASKwlan0->setLabel(QObject::tr("Netmask"));
+ HostNETMASKwlan0->addSelection("/0 0.0.0.0");
+ HostNETMASKwlan0->addSelection("/1 128.0.0.0");
+ HostNETMASKwlan0->addSelection("/2 192.0.0.0");
+ HostNETMASKwlan0->addSelection("/3 224.0.0.0");
+ HostNETMASKwlan0->addSelection("/4 240.0.0.0");
+ HostNETMASKwlan0->addSelection("/5 248.0.0.0");
+ HostNETMASKwlan0->addSelection("/6 252.0.0.0");
+ HostNETMASKwlan0->addSelection("/7 254.0.0.0");
+ HostNETMASKwlan0->addSelection("/8 255.0.0.0");
+ HostNETMASKwlan0->addSelection("/9 255.128.0.0");
+ HostNETMASKwlan0->addSelection("/10 255.192.0.0 ");
+ HostNETMASKwlan0->addSelection("/11 255.224.0.0");
+ HostNETMASKwlan0->addSelection("/12 255.240.0.0");
+ HostNETMASKwlan0->addSelection("/13 255.248.0.0");
+ HostNETMASKwlan0->addSelection("/14 255.252.0.0");
+ HostNETMASKwlan0->addSelection("/15 255.254.0.0");
+ HostNETMASKwlan0->addSelection("/16 255.255.0.0");
+ HostNETMASKwlan0->addSelection("/17 255.255.128.0");
+ HostNETMASKwlan0->addSelection("/18 255.255.192.0");
+ HostNETMASKwlan0->addSelection("/19 255.255.224.0");
+ HostNETMASKwlan0->addSelection("/20 255.255.240.0");
+ HostNETMASKwlan0->addSelection("/21 255.255.248.0");
+ HostNETMASKwlan0->addSelection("/22 255.255.252.0");
+ HostNETMASKwlan0->addSelection("/23 255.255.254.0");
+ HostNETMASKwlan0->addSelection("/24 255.255.255.0");
+ HostNETMASKwlan0->addSelection("/25 255.255.255.128");
+ HostNETMASKwlan0->addSelection("/26 255.255.255.192");
+ HostNETMASKwlan0->addSelection("/27 255.255.255.224");
+ HostNETMASKwlan0->addSelection("/28 255.255.255.240");
+ HostNETMASKwlan0->addSelection("/29 255.255.255.248");
+ HostNETMASKwlan0->addSelection("/30 255.255.255.252");
+ HostNETMASKwlan0->addSelection("/31 255.255.255.254");
+ HostNETMASKwlan0->addSelection("/32 255.255.255.255");
+ HostNETMASKwlan0->setHelpText(QObject::tr("Netmask"));
+ HostNETMASKwlan0->setValue(24);
+
+ HostGWwlan0 = new HostLineEdit("HostGWwlan0");
+ HostGWwlan0->setLabel(QObject::tr("Gateway"));
+ HostGWwlan0->setValue("192.168.1.1");
+ HostGWwlan0->setHelpText(QObject::tr("This is the default route"));
+
+
+ HostDNSwlan0 = new HostLineEdit("HostDNSwlan0");
+ HostDNSwlan0->setLabel(QObject::tr("Name server"));
+ HostDNSwlan0->setValue("192.168.1.1");
+ HostDNSwlan0->setHelpText(QObject::tr("Name server"));
+
+
+ HostActiveonbootwlan0 = new HostCheckBox("HostActiveonbootwlan0");
+ HostActiveonbootwlan0->setLabel(QObject::tr("Active"));
+ HostActiveonbootwlan0->setValue(false);
+ HostActiveonbootwlan0->setHelpText(QObject::tr("Network is started on boot"));
+
+ HostDefaultwlan0 = new HostCheckBox("HostDefaultwlan0");
+ HostDefaultwlan0->setLabel(QObject::tr("Default"));
+ HostDefaultwlan0->setValue(false);
+ HostDefaultwlan0->setHelpText(QObject::tr("Will be used as the primary interface"));
+ connect(HostDefaultwlan0, SIGNAL(valueChanged(bool)), this, SLOT(wlan0_disable_others()));
+
+ HostUseDHCPwlan0 = new HostCheckBox("HostUseDHCPwlan0");
+ HostUseDHCPwlan0 ->setLabel(QObject::tr("Static ip address"));
+ HostUseDHCPwlan0 ->setValue(false);
+ HostUseDHCPwlan0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
+
+ wirelessbuttonwlan0 = new TransButtonSetting();
+ wirelessbuttonwlan0->setLabel(tr("Wireless Settings"));
+ connect(wirelessbuttonwlan0, SIGNAL(pressed()), this, SLOT(wlan0_wireless_settings()));
+
+
+ ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
+ settings1->addChild(HostActiveonbootwlan0);
+ settings1->addChild(HostDefaultwlan0);
+ settings1-> addChild(wirelessbuttonwlan0);
+ addChild(settings1);
+
+ Setting* dhcpEnabled = HostUseDHCPwlan0;
+ addChild(dhcpEnabled);
+ setTrigger(dhcpEnabled);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ settings->addChild(HostIPwlan0);
+ settings->addChild(HostNETMASKwlan0);
+ settings->addChild(HostGWwlan0);
+ settings->addChild(HostDNSwlan0);
+
+ addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+ addTarget("1", settings);
+
+};
+
+Wlan0options::Wlan0options()
+{
+ VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ rec->setLabel(QObject::tr("Wireless configuration for wlan0"));
+ rec->addChild(new wlan0_settings);
+ addChild(rec);
+}
+
+void NetworkSettingswlan0::wlan0_disable_others()
+{
+ QString my_current_value;
+ my_current_value = HostDefaultwlan0->getValue();
+ if ( my_current_value == "1" )
+ {
+ hostparm.ThisHostDefaultInterface="wlan0";
+ emit wlan0_is_default();
+ }
+
+
+
+}
+void NetworkSettingswlan0::wlan0_disabled()
+{
+ HostDefaultwlan0->setValue(0);
+}
+
+
+void NetworkSettingswlan0::wlan0_wireless_settings(void)
+{
+ Wlan0options wlan0screen;
+ wlan0screen.exec();
+}
+void NetworkSettingswlan0::wlan0_wireless_disable()
+{
+ wirelessbuttonwlan0->setEnabled(false);
+}
+
+
+class wlan1_settings: public TriggeredConfigurationGroup {
+public:
+ wlan1_settings():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+
+ HostComboBox *HOSTESSIDwlan1 = new HostComboBox("HOSTESSIDwlan1",true);
+ HOSTESSIDwlan1->setLabel(QObject::tr("ESSID"));
+ HOSTESSIDwlan1->addSelection("MythVantage");
+ HOSTESSIDwlan1->addSelection("home_lan");
+ HOSTESSIDwlan1->addSelection("type_it_here");
+ HOSTESSIDwlan1->setHelpText(QObject::tr("ESSID"));
+ addChild(HOSTESSIDwlan1);
+
+
+ HostComboBox *HostUseEncryptionwlan1 = new HostComboBox("HostUseEncryptionwlan1");
+ HostUseEncryptionwlan1->setLabel(QObject::tr("Encryption"));
+ HostUseEncryptionwlan1->setHelpText(QObject::tr("WPA, WEP, none"));
+ HostUseEncryptionwlan1->addSelection("none");
+ HostUseEncryptionwlan1->addSelection("WPA");
+ HostUseEncryptionwlan1->addSelection("WEP");
+
+ Setting* HostUseEncryption = HostUseEncryptionwlan1;
+ addChild(HostUseEncryption);
+ setTrigger(HostUseEncryption);
+
+ HostLineEdit *Hostkeywlan1 = new HostLineEdit("Hostkeywlan1");
+ Hostkeywlan1->setLabel(QObject::tr("key"));
+ Hostkeywlan1->setHelpText(QObject::tr("Key to use for encryption"));
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
+ settings->addChild(Hostkeywlan1);
+ addTarget("none", new GridConfigurationGroup(1,false));
+ addTarget("WPA", settings);
+ addTarget("WEP", settings);
+
+ };
+};
+
+NetworkSettingswlan1::NetworkSettingswlan1():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("Network Settings"));
+
+ HostIPwlan1 = new HostLineEdit("HostIPwlan1");
+ HostIPwlan1->setLabel(QObject::tr("Ip address"));
+ HostIPwlan1->setValue("192.168.1.12");
+ HostIPwlan1->setHelpText(QObject::tr("IP address of the new installation"));
+
+ HostNETMASKwlan1 = new HostComboBox("HostNETMASKwlan1");
+ HostNETMASKwlan1->setLabel(QObject::tr("Netmask"));
+ HostNETMASKwlan1->addSelection("/0 0.0.0.0");
+ HostNETMASKwlan1->addSelection("/1 128.0.0.0");
+ HostNETMASKwlan1->addSelection("/2 192.0.0.0");
+ HostNETMASKwlan1->addSelection("/3 224.0.0.0");
+ HostNETMASKwlan1->addSelection("/4 240.0.0.0");
+ HostNETMASKwlan1->addSelection("/5 248.0.0.0");
+ HostNETMASKwlan1->addSelection("/6 252.0.0.0");
+ HostNETMASKwlan1->addSelection("/7 254.0.0.0");
+ HostNETMASKwlan1->addSelection("/8 255.0.0.0");
+ HostNETMASKwlan1->addSelection("/9 255.128.0.0");
+ HostNETMASKwlan1->addSelection("/10 255.192.0.0 ");
+ HostNETMASKwlan1->addSelection("/11 255.224.0.0");
+ HostNETMASKwlan1->addSelection("/12 255.240.0.0");
+ HostNETMASKwlan1->addSelection("/13 255.248.0.0");
+ HostNETMASKwlan1->addSelection("/14 255.252.0.0");
+ HostNETMASKwlan1->addSelection("/15 255.254.0.0");
+ HostNETMASKwlan1->addSelection("/16 255.255.0.0");
+ HostNETMASKwlan1->addSelection("/17 255.255.128.0");
+ HostNETMASKwlan1->addSelection("/18 255.255.192.0");
+ HostNETMASKwlan1->addSelection("/19 255.255.224.0");
+ HostNETMASKwlan1->addSelection("/20 255.255.240.0");
+ HostNETMASKwlan1->addSelection("/21 255.255.248.0");
+ HostNETMASKwlan1->addSelection("/22 255.255.252.0");
+ HostNETMASKwlan1->addSelection("/23 255.255.254.0");
+ HostNETMASKwlan1->addSelection("/24 255.255.255.0");
+ HostNETMASKwlan1->addSelection("/25 255.255.255.128");
+ HostNETMASKwlan1->addSelection("/26 255.255.255.192");
+ HostNETMASKwlan1->addSelection("/27 255.255.255.224");
+ HostNETMASKwlan1->addSelection("/28 255.255.255.240");
+ HostNETMASKwlan1->addSelection("/29 255.255.255.248");
+ HostNETMASKwlan1->addSelection("/30 255.255.255.252");
+ HostNETMASKwlan1->addSelection("/31 255.255.255.254");
+ HostNETMASKwlan1->addSelection("/32 255.255.255.255");
+ HostNETMASKwlan1->setHelpText(QObject::tr("Netmask"));
+ HostNETMASKwlan1->setValue(24);
+
+ HostGWwlan1 = new HostLineEdit("HostGWwlan1");
+ HostGWwlan1->setLabel(QObject::tr("Gateway"));
+ HostGWwlan1->setValue("192.168.1.1");
+ HostGWwlan1->setHelpText(QObject::tr("This is the default route"));
+
+
+ HostDNSwlan1 = new HostLineEdit("HostDNSwlan1");
+ HostDNSwlan1->setLabel(QObject::tr("Name server"));
+ HostDNSwlan1->setValue("192.168.1.1");
+ HostDNSwlan1->setHelpText(QObject::tr("Name server"));
+
+
+ HostActiveonbootwlan1 = new HostCheckBox("HostActiveonbootwlan1");
+ HostActiveonbootwlan1->setLabel(QObject::tr("Active"));
+ HostActiveonbootwlan1->setValue(false);
+ HostActiveonbootwlan1->setHelpText(QObject::tr("Network is started on boot"));
+
+ HostUseDHCPwlan1 = new HostCheckBox("HostUseDHCPwlan1");
+ HostUseDHCPwlan1 ->setLabel(QObject::tr("Static ip address"));
+ HostUseDHCPwlan1 ->setValue(false);
+ HostUseDHCPwlan1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
+
+ wirelessbuttonwlan1 = new TransButtonSetting();
+ wirelessbuttonwlan1->setLabel(tr("Wireless Settings"));
+ connect(wirelessbuttonwlan1, SIGNAL(pressed()), this, SLOT(wlan1_wireless_settings()));
+
+ HostDefaultwlan1 = new HostCheckBox("HostDefaultwlan1");
+ HostDefaultwlan1->setLabel(QObject::tr("Default"));
+ HostDefaultwlan1->setValue(false);
+ HostDefaultwlan1->setHelpText(QObject::tr("Will be used as the primary interface"));
+ connect(HostDefaultwlan1, SIGNAL(valueChanged(bool)), this, SLOT(wlan1_disable_others()));
+
+
+ ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false, false);
+ settings1->addChild(HostActiveonbootwlan1);
+ settings1->addChild(HostDefaultwlan1);
+ settings1-> addChild(wirelessbuttonwlan1);
+
+ addChild(settings1);
+
+ Setting* dhcpEnabled = HostUseDHCPwlan1;
+ addChild(dhcpEnabled);
+ setTrigger(dhcpEnabled);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ settings->addChild(HostIPwlan1);
+ settings->addChild(HostNETMASKwlan1);
+ settings->addChild(HostGWwlan1);
+ settings->addChild(HostDNSwlan1);
+
+ addTarget("0", new VerticalConfigurationGroup(true));
+ addTarget("1", settings);
+};
+
+wlan1options::wlan1options()
+{
+ VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ rec->setLabel(QObject::tr("Wireless configuration for wlan1"));
+ rec->addChild(new wlan1_settings);
+ addChild(rec);
+}
+void NetworkSettingswlan1::wlan1_disable_others()
+{
+ QString my_current_value;
+ my_current_value = HostDefaultwlan1->getValue();
+ if ( my_current_value == "1" )
+ {
+ hostparm.ThisHostDefaultInterface="wlan1";
+ emit wlan1_is_default();
+ }
+}
+
+void NetworkSettingswlan1::wlan1_disabled()
+{
+ HostDefaultwlan1->setValue(0);
+}
+void NetworkSettingswlan1::wlan1_wireless_disable()
+{
+ wirelessbuttonwlan1->setEnabled(false);
+}
+
+void NetworkSettingswlan1::wlan1_wireless_settings(void)
+{
+ wlan1options wlan1screen;
+ wlan1screen.exec();
+}
+
+//---
+
+class ath0_settings: public TriggeredConfigurationGroup {
+public:
+ ath0_settings():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+
+ HostComboBox *HOSTESSIDath0 = new HostComboBox("HOSTESSIDath0",true);
+ HOSTESSIDath0->setLabel(QObject::tr("ESSID"));
+ HOSTESSIDath0->addSelection("MythVantage");
+ HOSTESSIDath0->addSelection("home_lan");
+ HOSTESSIDath0->addSelection("type_it_here");
+ HOSTESSIDath0->setHelpText(QObject::tr("ESSID"));
+ addChild(HOSTESSIDath0);
+
+ HostComboBox *HostUseEncryptionath0 = new HostComboBox("HostUseEncryptionath0");
+ HostUseEncryptionath0->setLabel(QObject::tr("Encryption"));
+ HostUseEncryptionath0->setHelpText(QObject::tr("WPA, WEP, none"));
+ HostUseEncryptionath0->addSelection("none");
+ HostUseEncryptionath0->addSelection("WPA");
+ HostUseEncryptionath0->addSelection("WEP");
+
+ Setting* HostUseEncryption = HostUseEncryptionath0;
+ addChild(HostUseEncryption);
+ setTrigger(HostUseEncryption);
+
+ HostLineEdit *Hostkeyath0 = new HostLineEdit("Hostkeyath0");
+ Hostkeyath0->setLabel(QObject::tr("key"));
+ Hostkeyath0->setHelpText(QObject::tr("Key to use for encryption"));
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
+ settings->addChild(Hostkeyath0);
+ addTarget("none", new GridConfigurationGroup(1,false));
+ addTarget("WPA", settings);
+ addTarget("WEP", settings);
+ //-
+
+ };
+};
+
+
+NetworkSettingsath0::NetworkSettingsath0():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("Network Settings"));
+ HostLineEdit *HostIPath0 = new HostLineEdit("HostIPath0");
+ HostIPath0->setLabel(QObject::tr("Ip address"));
+ HostIPath0->setValue("192.168.1.12");
+ HostIPath0->setHelpText(QObject::tr("IP address of the new installation"));
+
+ HostComboBox *HostNETMASKath0 = new HostComboBox("HostNETMASKath0");
+ HostNETMASKath0->setLabel(QObject::tr("Netmask"));
+ HostNETMASKath0->addSelection("/0 0.0.0.0");
+ HostNETMASKath0->addSelection("/1 128.0.0.0");
+ HostNETMASKath0->addSelection("/2 192.0.0.0");
+ HostNETMASKath0->addSelection("/3 224.0.0.0");
+ HostNETMASKath0->addSelection("/4 240.0.0.0");
+ HostNETMASKath0->addSelection("/5 248.0.0.0");
+ HostNETMASKath0->addSelection("/6 252.0.0.0");
+ HostNETMASKath0->addSelection("/7 254.0.0.0");
+ HostNETMASKath0->addSelection("/8 255.0.0.0");
+ HostNETMASKath0->addSelection("/9 255.128.0.0");
+ HostNETMASKath0->addSelection("/10 255.192.0.0 ");
+ HostNETMASKath0->addSelection("/11 255.224.0.0");
+ HostNETMASKath0->addSelection("/12 255.240.0.0");
+ HostNETMASKath0->addSelection("/13 255.248.0.0");
+ HostNETMASKath0->addSelection("/14 255.252.0.0");
+ HostNETMASKath0->addSelection("/15 255.254.0.0");
+ HostNETMASKath0->addSelection("/16 255.255.0.0");
+ HostNETMASKath0->addSelection("/17 255.255.128.0");
+ HostNETMASKath0->addSelection("/18 255.255.192.0");
+ HostNETMASKath0->addSelection("/19 255.255.224.0");
+ HostNETMASKath0->addSelection("/20 255.255.240.0");
+ HostNETMASKath0->addSelection("/21 255.255.248.0");
+ HostNETMASKath0->addSelection("/22 255.255.252.0");
+ HostNETMASKath0->addSelection("/23 255.255.254.0");
+ HostNETMASKath0->addSelection("/24 255.255.255.0");
+ HostNETMASKath0->addSelection("/25 255.255.255.128");
+ HostNETMASKath0->addSelection("/26 255.255.255.192");
+ HostNETMASKath0->addSelection("/27 255.255.255.224");
+ HostNETMASKath0->addSelection("/28 255.255.255.240");
+ HostNETMASKath0->addSelection("/29 255.255.255.248");
+ HostNETMASKath0->addSelection("/30 255.255.255.252");
+ HostNETMASKath0->addSelection("/31 255.255.255.254");
+ HostNETMASKath0->addSelection("/32 255.255.255.255");
+ HostNETMASKath0->setHelpText(QObject::tr("Netmask"));
+ HostNETMASKath0->setValue(24);
+
+ HostLineEdit *HostGWath0 = new HostLineEdit("HostGWath0");
+ HostGWath0->setLabel(QObject::tr("Gateway"));
+ HostGWath0->setValue("192.168.1.1");
+ HostGWath0->setHelpText(QObject::tr("This is the default route"));
+
+
+ HostLineEdit *HostDNSath0 = new HostLineEdit("HostDNSath0");
+ HostDNSath0->setLabel(QObject::tr("Name server"));
+ HostDNSath0->setValue("192.168.1.1");
+ HostDNSath0->setHelpText(QObject::tr("Name server"));
+
+
+ HostCheckBox *HostActiveonbootath0 = new HostCheckBox("HostActiveonbootath0");
+ HostActiveonbootath0->setLabel(QObject::tr("Active"));
+ HostActiveonbootath0->setValue(false);
+ HostActiveonbootath0->setHelpText(QObject::tr("Network is started on boot"));
+
+ HostDefaultath0 = new HostCheckBox("HostDefaultath0");
+ HostDefaultath0->setLabel(QObject::tr("Default"));
+ HostDefaultath0->setValue(false);
+ HostDefaultath0->setHelpText(QObject::tr("Will be used as the primary interface"));
+ connect(HostDefaultath0, SIGNAL(valueChanged(bool)), this, SLOT(ath0_disable_others()));
+
+ HostCheckBox *HostUseDHCPath0 = new HostCheckBox("HostUseDHCPath0");
+ HostUseDHCPath0 ->setLabel(QObject::tr("Static ip address"));
+ HostUseDHCPath0 ->setValue(false);
+ HostUseDHCPath0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used."));
+
+ wirelessbuttonath0 = new TransButtonSetting();
+ wirelessbuttonath0->setLabel(tr("Wireless Settings"));
+ connect(wirelessbuttonath0, SIGNAL(pressed()), this, SLOT(ath0_wireless_settings()));
+
+ ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false);
+ settings1->addChild(HostActiveonbootath0);
+ settings1->addChild(HostDefaultath0);
+ settings1-> addChild(wirelessbuttonath0);
+
+ addChild(settings1);
+
+ Setting* dhcpEnabled = HostUseDHCPath0;
+ addChild(dhcpEnabled);
+ setTrigger(dhcpEnabled);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ settings->addChild(HostIPath0);
+ settings->addChild(HostNETMASKath0);
+ settings->addChild(HostGWath0);
+ settings->addChild(HostDNSath0);
+
+ addTarget("0", new VerticalConfigurationGroup(false,false,false,false));
+ addTarget("1", settings);
+};
+ath0options::ath0options()
+{
+
+ VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ rec->setLabel(QObject::tr("Wireless configuration for ath0"));
+ rec->addChild(new ath0_settings);
+ addChild(rec);
+}
+
+void NetworkSettingsath0::ath0_disable_others()
+{
+ QString my_current_value;
+ my_current_value = HostDefaultath0->getValue();
+ if ( my_current_value == "1" )
+ {
+ hostparm.ThisHostDefaultInterface="ath0";
+ emit ath0_is_default();
+ }
+}
+void NetworkSettingsath0::ath0_disabled()
+{
+ HostDefaultath0->setValue(0);
+}
+
+void NetworkSettingsath0::ath0_wireless_settings(void)
+{
+ ath0options ath0screen;
+ ath0screen.exec();
+}
+
+void NetworkSettingsath0::ath0_wireless_disable()
+{
+ wirelessbuttonath0->setEnabled(false);
+}
+
+
+//--
+
+class NetworkSettingsFrame:
+ public TriggeredConfigurationGroup {
+public:
+ NetworkSettingsFrame():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ setLabel(QObject::tr("Network Settings (1/2)"));
+ Setting* netdevice = HostNetDevice();
+ addChild(netdevice);
+ setTrigger(netdevice);
+
+ NetworkSettingswlan0 *Nwlan0 = new NetworkSettingswlan0 ;
+ NetworkSettingswlan1 *Nwlan1 = new NetworkSettingswlan1 ;
+ NetworkSettingseth0 *Neth0 = new NetworkSettingseth0 ;
+ NetworkSettingseth1 *Neth1 = new NetworkSettingseth1 ;
+ NetworkSettingsath0 *Nath0 = new NetworkSettingsath0 ;
+
+ QString found_wireless=findnet_wireless();
+
+ if ( not found_wireless.contains("eth0"))
+ {
+ Neth0->eth0_wireless_disable();
+ hostparm.ThisHOST_iswirelesseth0="0";
+ }
+ else
+ {
+ hostparm.ThisHOST_iswirelesseth0="1";
+ }
+
+ if ( not found_wireless.contains("eth1"))
+ {
+ Neth1->eth1_wireless_disable();
+ hostparm.ThisHOST_iswirelesseth1="0";
+ }
+ else
+ {
+ hostparm.ThisHOST_iswirelesseth1="1";
+ }
+
+ if ( not found_wireless.contains("wlan0"))
+ {
+ Nwlan0->wlan0_wireless_disable();
+ hostparm.ThisHOST_iswirelesswlan0="0";
+ }
+ else
+ {
+ hostparm.ThisHOST_iswirelesswlan0="1";
+ }
+
+ if ( not found_wireless.contains("wlan1"))
+ {
+ Nwlan1->wlan1_wireless_disable();
+ hostparm.ThisHOST_iswirelesswlan1="0";
+ }
+ else
+ {
+ hostparm.ThisHOST_iswirelesswlan0="1";
+ }
+
+ if ( not found_wireless.contains("ath0"))
+ {
+ Nath0->ath0_wireless_disable();
+ hostparm.ThisHOST_iswirelessath0="0";
+ }
+ else
+ {
+ hostparm.ThisHOST_iswirelessath0="1";
+ }
+ connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Nwlan0, SLOT(wlan0_disabled()));
+ connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Neth0, SLOT(eth0_disabled()));
+ connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Neth1, SLOT(eth1_disabled()));
+ connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Nath0, SLOT(ath0_disabled()));
+
+ connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Nwlan1, SLOT(wlan1_disabled()));
+ connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Neth0, SLOT(eth0_disabled()));
+ connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Neth1, SLOT(eth1_disabled()));
+ connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Nath0, SLOT(ath0_disabled()));
+
+ connect(Neth1, SIGNAL(eth1_is_default(void)), Nwlan1, SLOT(wlan1_disabled()));
+ connect(Neth1, SIGNAL(eth1_is_default(void)), Nwlan0, SLOT(wlan0_disabled()));
+ connect(Neth1, SIGNAL(eth1_is_default(void)), Neth0, SLOT(eth0_disabled()));
+ connect(Neth1, SIGNAL(eth1_is_default(void)), Nath0, SLOT(ath0_disabled()));
+
+ connect(Neth0, SIGNAL(eth0_is_default(void)), Nwlan0, SLOT(wlan0_disabled()));
+ connect(Neth0, SIGNAL(eth0_is_default(void)), Nwlan1, SLOT(wlan1_disabled()));
+ connect(Neth0, SIGNAL(eth0_is_default(void)), Neth1, SLOT(eth1_disabled()));
+ connect(Neth0, SIGNAL(eth0_is_default(void)), Nath0, SLOT(ath0_disabled()));
+
+ connect(Nath0, SIGNAL(ath0_is_default(void)), Nwlan0, SLOT(wlan0_disabled()));
+ connect(Nath0, SIGNAL(ath0_is_default(void)), Nwlan1, SLOT(wlan1_disabled()));
+ connect(Nath0, SIGNAL(ath0_is_default(void)), Neth1, SLOT(eth1_disabled()));
+ connect(Nath0, SIGNAL(ath0_is_default(void)), Neth0, SLOT(eth0_disabled()));
+
+
+ HostLineEdit *HostMTUeth0 = new HostLineEdit("HostMTUeth0");
+ HostMTUeth0->setLabel(QObject::tr("MTU"));
+ HostMTUeth0->setValue("");
+ HostMTUeth0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
+
+ ConfigurationGroup* settingseth0 = new GridConfigurationGroup(1,false, false, false, false);
+ settingseth0->addChild(Neth0);
+ settingseth0->addChild(HostMTUeth0);
+
+
+ HostLineEdit *HostMTUeth1 = new HostLineEdit("HostMTUeth1");
+ HostMTUeth1->setLabel(QObject::tr("MTU"));
+ HostMTUeth1->setValue("");
+ HostMTUeth1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
+
+ ConfigurationGroup* settingseth1 = new GridConfigurationGroup(1,false, false, true, true);
+ settingseth1->addChild(Neth1);
+ settingseth1->addChild(HostMTUeth1);
+
+ HostLineEdit *HostMTUwlan0 = new HostLineEdit("HostMTUwlan0");
+ HostMTUwlan0->setLabel(QObject::tr("MTU"));
+ HostMTUwlan0->setValue("");
+ HostMTUwlan0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
+
+ ConfigurationGroup* settingswlan0 = new GridConfigurationGroup(1,false, false, false, false);
+ settingswlan0->addChild(Nwlan0);
+ settingswlan0->addChild(HostMTUwlan0);
+
+ HostLineEdit *HostMTUwlan1 = new HostLineEdit("HostMTUwlan1");
+ HostMTUwlan1->setLabel(QObject::tr("MTU"));
+ HostMTUwlan1->setValue("");
+ HostMTUwlan1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
+
+ ConfigurationGroup* settingswlan1 = new GridConfigurationGroup(1,false, false, false, false);
+ settingswlan1->addChild(Nwlan1);
+ settingswlan1->addChild(HostMTUwlan1);
+
+ HostLineEdit *HostMTUath0 = new HostLineEdit("HostMTUath0");
+ HostMTUath0->setLabel(QObject::tr("MTU"));
+ HostMTUath0->setValue("");
+ HostMTUath0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device."));
+
+ ConfigurationGroup* settingsath0 = new GridConfigurationGroup(1,false, false, false, false);
+ settingsath0->addChild(Nath0);
+ settingsath0->addChild(HostMTUath0);
+
+ addTarget("wlan0", settingswlan0);
+ addTarget("wlan1", settingswlan1);
+ addTarget("eth0", settingseth0);
+ addTarget("eth1", settingseth1);
+ addTarget("ath0", settingsath0);
+ };
+};
+
+
+
+NetworkOptionsFrame::NetworkOptionsFrame():
+ VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("Network Settings (2/2)"));
+ HostMyhostname = new HostComboBox("HostMyhostname",true);
+ HostMyhostname->setLabel(QObject::tr("Hostname"));
+ HostMyhostname->addSelection("Envy");
+ HostMyhostname->addSelection("Greed");
+ HostMyhostname->addSelection("Lust");
+ HostMyhostname->addSelection("Sloth");
+ HostMyhostname->addSelection("Wrath");
+ HostMyhostname->addSelection("Gluttony");
+ HostMyhostname->addSelection("Pride");
+ HostMyhostname->addSelection("Humility");
+ HostMyhostname->addSelection("Generosity");
+ HostMyhostname->addSelection("Love");
+ HostMyhostname->addSelection("Kindness");
+ HostMyhostname->addSelection("SelfControl");
+ HostMyhostname->addSelection("Faith");
+ HostMyhostname->addSelection("Zeal");
+ HostMyhostname->addSelection("type_hostname_here");
+ HostMyhostname->setHelpText(QObject::tr("The hostname must resolve via DNS. If DNS is not available then append .local to the end of the hostname. When using .local, names must not include an additional ."));
+
+ FetchDhcpHostnameButton = new TransButtonSetting();
+ FetchDhcpHostnameButton ->setLabel(tr("Ask DHCP server for hostname"));
+ connect(FetchDhcpHostnameButton, SIGNAL(pressed()), this, SLOT(fetch_hostname()));
+
+ networklabel = new TransLabelSetting();
+ QString labelstring;
+ labelstring = "Will use " + hostparm.ThisHostDefaultInterface + " to check for hostname";
+ networklabel->setValue(labelstring);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false);
+ settings->addChild(HostMyhostname);
+ settings->addChild(networklabel);
+ settings->addChild(FetchDhcpHostnameButton);
+
+ addChild(settings);
+
+}
+
+QString NetworkOptionsFrame::find_hostname()
+{
+ QString new_host;
+ QString cmdtxt;
+ new_host="null";
+ cmdtxt="sudo ";
+ cmdtxt.append(MV_ROOT) ;
+ cmdtxt.append("bin/systemconfig.py -m dhcp_request -d " );
+ cmdtxt.append(hostparm.ThisHostDefaultInterface);
+ myth_system(cmdtxt);
+ system(cmdtxt);
+ QString line;
+ QFile file("/tmp/mvnetwork.dhcpinfo");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.contains("new_host_name"))
+ {
+ QString s = line.simplifyWhiteSpace();
+ s = s.section( "=", 1, 1 ); // s == "surname"
+ new_host = s.simplifyWhiteSpace();
+ }
+ }
+ file.close();
+ }
+
+ return new_host;
+}
+
+void NetworkOptionsFrame::fetch_hostname()
+{
+ QString new_host;
+ new_host=find_hostname();
+ if ( new_host != "null" )
+ {
+ networklabel->setValue("Updated the hostname.");
+ HostMyhostname->addSelection(new_host);
+ HostMyhostname->setValue(new_host);
+ }
+ else
+ networklabel->setValue("DHCP server did not return a hostname.");
+}
+
+static HostCheckBox *HostAutodown()
+{
+ HostCheckBox *gc = new HostCheckBox("HostAutodown");
+ gc->setLabel(QObject::tr("Turn off machine at a specified time"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Will turn off this system."));
+ return gc;
+};
+
+static HostSpinBox *HostWakeupTime()
+{
+ HostSpinBox *gc = new HostSpinBox("HostWakeupTime", -1, 23, 1, true);
+ gc->setLabel(QObject::tr("Power on time"));
+ gc->setValue(6);
+ gc->setHelpText(QObject::tr("Select the hour to auto poweron this system. Use -1 to disable" ));
+ return gc;
+}
+
+static HostSpinBox *HostShutdownTime()
+{
+ HostSpinBox *gc = new HostSpinBox("HostShutdownTime", -1, 23, 1, true);
+ gc->setLabel(QObject::tr("Auto Shutdown time"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Select the hour to poweroff this syste. Times are in 24hour format. Use -1 to disable" ));
+ return gc;
+}
+
+static HostSpinBox *HostShutdownTime2()
+{
+ HostSpinBox *gc = new HostSpinBox("HostShutdownTime2", -1, 23, 1, true);
+ gc->setLabel(QObject::tr("2nd auto Shutdown time"));
+ gc->setValue(2);
+ gc->setHelpText(QObject::tr("Select the hour to poweroff this syste. Times are in 24hour format. Use -1 to disable" ));
+ return gc;
+}
+
+
+
+static HostCheckBox *HostUseWOL()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseWOL");
+ gc->setLabel(QObject::tr("Use Wake on Lan to turn on system"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Unless you know what your doing leave it checked"));
+ return gc;
+};
+
+static HostCheckBox *HostUseNVRAM()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseNVRAM");
+ gc->setLabel(QObject::tr("Use nvram to turn on system"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Leaved checked unless nvram causes problems."));
+ return gc;
+};
+
+
+static HostCheckBox *HostUseXLargeMouse()
+{
+ HostCheckBox *gc = new HostCheckBox("HostUseXLargeMouse");
+ gc->setLabel(QObject::tr("Large Mouse Pointer"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Use an extra large mouse pointer. This takes effect the next time the frontend is started."));
+ return gc;
+};
+
+
+
+class WakeSettings: public TriggeredConfigurationGroup {
+public:
+ WakeSettings():
+
+ TriggeredConfigurationGroup(true) {
+ setLabel(QObject::tr("Shutdown Settings"));
+ Setting* Autodown = HostAutodown();
+ addChild(Autodown);
+ setTrigger(Autodown);
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+ settings->addChild(HostShutdownTime());
+ settings->addChild(HostShutdownTime2());
+ // settings->addChild(HostWakeupTime());
+ // settings->addChild(HostUseNVRAM());
+ // settings->addChild(HostUseWOL());
+ addTarget("0", new VerticalConfigurationGroup(true));
+ addTarget("1", settings);
+ };
+};
+
+class Frontend_settings_group: public TriggeredConfigurationGroup {
+public:
+ Frontend_settings_group():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+ Setting* fe = HostRunFrontend();
+ addChild(fe);
+ setTrigger(fe);
+ ConfigurationGroup* setting1 = new GridConfigurationGroup(2,false);
+
+ setting1->addChild(HostUseXLargeMouse());
+ setting1->addChild(HostUsemythfrontend());
+// setting1->addChild(HostXres());
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+ settings->addChild(setting1);
+
+// settings->addChild(new HostRemoteType);
+
+ addTarget("0", new VerticalConfigurationGroup(false));
+ addTarget("1", settings);
+
+ };
+};
+
+SystemtypeGroup::SystemtypeGroup(): TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+ setLabel(QObject::tr("System Type"));
+ HostSystemType = new HostComboBox("HostSystemType");
+ HostSystemType->setLabel(QObject::tr("System Type"));
+ HostSystemType->addSelection("Master_backend");
+ HostSystemType->addSelection("Frontend_only");
+// HostSystemType->addSelection("Standalone");
+ HostSystemType->addSelection("Slave_backend");
+
+ if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" ))
+ HostSystemType->setEnabled(false);
+
+ addChild(HostSystemType);
+ setTrigger(HostSystemType);
+
+ ConfigurationGroup* fe1 = new GridConfigurationGroup(2,false,false,true,true);
+ fe1->addChild(HostUseXLargeMouse());
+ fe1->addChild(HostUsemythfrontend());
+
+ ConfigurationGroup* standalone = new VerticalConfigurationGroup(false,false,true,true);
+// standalone->addChild(HostXres());
+ //FIXME
+// standalone->addChild(new HostRemoteType);
+ standalone->addChild(fe1);
+
+
+ ConfigurationGroup* frontend = new VerticalConfigurationGroup(false,false,true,true);
+ frontend->addChild(HostMysqlserverip_listbox());
+// frontend->addChild(HostXres());
+ //FIXME
+// frontend->addChild(new HostRemoteType);
+ frontend->addChild(fe1);
+
+ ConfigurationGroup* backend = new VerticalConfigurationGroup(false,false,false,false);
+ backend->addChild( new Frontend_settings_group);
+
+ ConfigurationGroup* slave = new VerticalConfigurationGroup(false,false,true,true);
+ slave->addChild(HostMysqlserverip_listbox());
+ slave->addChild( new Frontend_settings_group);
+
+
+ addTarget("Standalone", standalone);
+ addTarget("Frontend_only", frontend);
+ addTarget("Master_backend", backend);
+ addTarget("Slave_backend", slave);
+ connect(HostSystemType, SIGNAL(valueChanged(const QString&)),
+ this, SLOT(SystemtypeHelp()));
+
+};
+
+void SystemtypeGroup::SystemtypeHelp(void)
+{
+ QString msg = (QObject::tr("Type of configuration for this system"));
+ QString selectedhostype;
+ selectedhostype = HostSystemType->getValue();
+ if ( selectedhostype.isEmpty())
+ {
+ HostSystemType->setHelpText(msg) ;
+ return;
+ }
+
+ if (selectedhostype == "Standalone")
+ msg="Complete System, that doesn't allow outside connections.";
+ if (selectedhostype == "Frontend_only")
+ msg="Frontend_only needs a primary system (master backend) already on the network.";
+ if (selectedhostype == "Master_backend")
+ msg="Primary system with tuners, scheduling and database. This allows for remote frontend and slave backends.";
+ if (selectedhostype == "Slave_backend")
+ msg="Secondary system for extra tuners.";
+
+ HostSystemType->setHelpText(msg) ;
+}
+
+
+
+// HostRemoteType::HostRemoteType():
+// HostImageSelect("HostRemoteType") {
+// setLabel(QObject::tr("Remote"));
+// QString dirtxt;
+// dirtxt=MV_ROOT;
+// dirtxt.append("templates/remotes");
+// QDir remotes(dirtxt);
+// remotes.setFilter(QDir::Dirs);
+// remotes.setSorting(QDir::Name | QDir::IgnoreCase);
+// QFileInfoList fil = remotes.entryInfoList(QDir::Dirs);
+// for( QFileInfoList::iterator it = fil.begin();
+// it != fil.end();
+// ++it )
+// {
+// QFileInfo &remote = *it;
+// if (remote.fileName() == "." || remote.fileName() == ".." )
+// continue;
+//
+// QString name = remote.fileName();
+// QString defaultpreview = remotes.absolutePath();
+// defaultpreview += "/";
+// defaultpreview += name;
+// defaultpreview += "/preview.jpg";
+// QFileInfo preview(defaultpreview);
+// if (!preview.exists())
+// {
+// LOG(VB_GENERAL, LOG_ERR, QString("Theme %1 missing preview image.").arg(remote.fileName()));
+// }
+// else
+// {
+// QImage* previewImage = new QImage(preview.absoluteFilePath());
+// if (previewImage->width() == 0 || previewImage->height() == 0)
+// LOG(VB_GENERAL, LOG_ERR, QString("Problem reading remote preview %1").arg(preview.filePath()));
+//
+// //Add the remote
+// addImageSelection(name, previewImage, remote.fileName());
+// LOG(VB_GENERAL, LOG_DEBUG, QString("Adding remote %1.").arg(name));
+// }
+// }
+//
+// }
+
+class AdvancedSettings: public TriggeredConfigurationGroup {
+public:
+
+ AdvancedSettings():
+ TriggeredConfigurationGroup(true,true,true,true,true,true,true,true)
+ {
+
+ setLabel(QObject::tr("Advanced Settings (1/2)"));
+ Setting* Autodown = HostAutodown();
+ setTrigger(Autodown);
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+ ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false);
+ checkbox->addChild(HostServiceMythWEB());
+ // checkbox->addChild(HostServiceNFS());
+ checkbox->addChild(Hostbootsplash());
+ checkbox->addChild(HostncidClient());
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+ if ( hostparm.ThisSystemType == "Standalone" )
+ {
+ // smb_busy_box();
+ settings->addChild(new NCIDsettings);
+ // settings->addChild(new SAMBAsettings);
+ // checkbox->addChild(HostServiceRRD() );
+ settings->addChild(checkbox) ;
+ }
+ else if (hostparm.ThisSystemType == "Master_backend" )
+ {
+ // smb_busy_box();
+// checkbox->addChild(GlobalPKG_MIRROR());
+ settings->addChild(new NCIDsettings);
+ // settings->addChild(new SAMBAsettings);
+ // checkbox->addChild(HostServiceRRD() );
+ settings->addChild(checkbox) ;
+ }
+ else if (hostparm.ThisSystemType == "Frontend_only" )
+ {
+ settings->addChild(Hostbootsplash());
+ settings->addChild(HostncidClient());
+// settings->addChild(HostServiceRRD() );
+ }
+ else if (hostparm.ThisSystemType == "Slave_backend" )
+ {
+ settings->addChild(Hostbootsplash());
+ settings->addChild(HostncidClient());
+
+// settings->addChild(HostServiceRRD() );
+
+// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR")) == "1")
+// settings->addChild(HostPKG_MIRROR());
+ };
+ addTarget("", settings);
+ };
+};
+
+
+class AdvancedSettings_2: public TriggeredConfigurationGroup {
+public:
+ AdvancedSettings_2():
+ TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+ setLabel(QObject::tr("Advanced Settings (2/2)"));
+ Setting* Autodown = HostAutodown();
+ setTrigger(Autodown);
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+/*
+ ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false);
+ checkbox->addChild(HostServiceMythWEB());
+ checkbox->addChild(HostServiceNFS());
+ checkbox->addChild(Hostbootsplash());
+ checkbox->addChild(HostncidClient());*/
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+ if ( hostparm.ThisSystemType == "Standalone" )
+ {
+ settings->addChild(HostRunDHCP());
+ settings->addChild(HostBEWait());
+ //settings->addChild(new Evroutersettings);
+ }
+ else if (hostparm.ThisSystemType == "Master_backend" )
+ {
+ settings->addChild(new Backupsettings);
+ settings->addChild(HostRunDHCP());
+ settings->addChild(HostBEWait());
+ //settings->addChild(new Evroutersettings);
+ }
+ else if (hostparm.ThisSystemType == "Frontend_only" )
+ {
+ //settings->addChild(new Evroutersettings);
+ settings->addChild(HostBEWait());
+ }
+ else if (hostparm.ThisSystemType == "Slave_backend" )
+ {
+ //settings->addChild(new Evroutersettings);
+ settings->addChild(HostBEWait());
+ };
+
+ addTarget("", settings);
+ };
+};
+
+
+/*_______________________________Sound settings ____________________*/
+SoundSettings::SoundSettings():
+ TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+ setLabel(QObject::tr("Audio Settings"));
+
+ HostAudiotype = new HostComboBox("HostAudiotype",false);
+ HostAudiotype->setLabel(QObject::tr("Sound Card Driver"));
+ HostAudiotype->addSelection("OSS");
+ HostAudiotype->addSelection("ALSA");
+ HostAudiotype->addSelection("tinker");
+
+ HostAudiotype->setHelpText(QObject::tr("Select the sound driver, OSS or ALSA." ) );
+ addChild(HostAudiotype);
+ setTrigger(HostAudiotype);
+
+// HostsyncXine = new HostCheckBox("HostsyncXine");
+// HostsyncXine->setLabel(QObject::tr("Xine"));
+// HostsyncXine->setValue(true);
+//
+// HostsyncMplayer = new HostCheckBox("HostsyncMplayer");
+// HostsyncMplayer->setLabel(QObject::tr("mplayer"));
+// HostsyncMplayer->setValue(true);
+//
+// HostsyncMythMusic = new HostCheckBox("HostsyncMythMusic");
+// HostsyncMythMusic->setLabel(QObject::tr("mythmusic"));
+// HostsyncMythMusic->setValue(true);
+//
+// HostsyncMythFrontend = new HostCheckBox("HostsyncMythFrontend");
+// HostsyncMythFrontend->setLabel(QObject::tr("mythfrontend"));
+// HostsyncMythFrontend->setValue(true);
+
+
+
+
+// HorizontalConfigurationGroup *syncboxes = new HorizontalConfigurationGroup(false, false, true, true);
+// syncboxes->addChild(HostsyncXine);
+// syncboxes->addChild(HostsyncMplayer);
+// syncboxes->addChild(HostsyncMythMusic);
+// syncboxes->addChild(HostsyncMythFrontend);
+
+ HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true);
+ HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true);
+
+ TransButtonSetting *LoadOSSbutton = new TransButtonSetting();
+ LoadOSSbutton->setLabel(tr("Load OSS driver"));
+ TransButtonSetting *LoadALSAbutton = new TransButtonSetting();
+ LoadALSAbutton->setLabel(tr("Load ALSA driver"));
+
+ TransButtonSetting *TestAudiobutton = new TransButtonSetting();
+ TestAudiobutton->setLabel(tr("Test Audio Settings"));
+ lp->addChild(TestAudiobutton);
+ lp->addChild(LoadOSSbutton);
+
+ TransButtonSetting *TestALSAAudiobutton = new TransButtonSetting();
+ TestALSAAudiobutton->setLabel(tr("Test ALSA Audio Settings"));
+ lpalsa->addChild(TestALSAAudiobutton);
+ lpalsa->addChild(LoadALSAbutton);
+
+ TransLabelSetting *osslabel = new TransLabelSetting();
+ osslabel->setValue("The original OSS! More information can be found at:");
+
+ TransLabelSetting *osslabel1 = new TransLabelSetting();
+ osslabel1->setValue("http://www.opensound.com \n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n");
+
+ TransLabelSetting *AlsaLabel = new TransLabelSetting();
+ AlsaLabel->setValue("ALSA, the alternative to OSS\n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n");
+
+// OSS GROUP
+ SoundOSSsettings *OSS = new SoundOSSsettings ;
+ ConfigurationGroup* osssettings = new VerticalConfigurationGroup(false);
+ osssettings->addChild(osslabel);
+ osssettings->addChild(osslabel1);
+ osssettings->addChild(OSS);
+ // osssettings->addChild(syncboxes);
+ osssettings->addChild(lp);
+ connect(this, SIGNAL(oss_sig()),
+ OSS, SLOT(soundossgathersettings()));
+ connect(TestAudiobutton, SIGNAL(pressed()),
+ this, SLOT(soundossgathersettings_1()));
+ connect(LoadOSSbutton, SIGNAL(pressed()),
+ OSS, SLOT(loadossdriver()));
+
+// ALSA GROUP
+ SoundALSAsettings *ALSA = new SoundALSAsettings ;
+ ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false);
+ alsasettings->addChild(AlsaLabel);
+ alsasettings->addChild(ALSA);
+// alsasettings->addChild(syncboxes);
+ alsasettings->addChild(lpalsa);
+
+ connect(this, SIGNAL(alsa_sig()),
+ ALSA, SLOT(soundalsagathersettings()));
+ connect(TestALSAAudiobutton, SIGNAL(pressed()),
+ this, SLOT(soundalsagathersettings_1()));
+ connect(LoadALSAbutton, SIGNAL(pressed()),
+ ALSA, SLOT(loadalsadriver()));
+ addTarget("ALSA", alsasettings);
+ addTarget("OSS", osssettings);
+ addTarget("tinker", new VerticalConfigurationGroup(false));
+};
+
+
+SoundOSSsettings::SoundOSSsettings():
+ TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+{
+ SetVertical(true);
+ HostSoundTypeout = new HostComboBox("HostSoundTypeout");
+ HostSoundTypeout->setLabel(QObject::tr("Type"));
+ HostSoundTypeout->addSelection("Analog");
+ HostSoundTypeout->addSelection("Digital");
+ HostSoundTypeout->setHelpText(QObject::tr(""));
+
+ HostSoundOssAnalog = new HostComboBox("HostSoundOssAnalog");
+ HostSoundOssDigital = new HostComboBox("HostSoundOssDigital");
+ fillossselection();
+ int findossanalog=HostSoundOssAnalog->findSelection(hostparm.OLDHostSoundOSSAnalog );
+ int findossdigital=HostSoundOssDigital->findSelection(hostparm.OLDHostSoundOSSDigital );
+ HostSoundOssAnalog->setValue(findossanalog);
+ HostSoundOssDigital->setValue(findossdigital);
+ addChild(HostSoundTypeout);
+ setTrigger(HostSoundTypeout);
+ addTarget("Analog", HostSoundOssAnalog);
+ addTarget("Digital", HostSoundOssDigital);
+};
+
+SoundALSAsettings::SoundALSAsettings():
+ TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+{
+ SetVertical(true);
+ HostSoundALSATypeout = new HostComboBox("HostSoundALSATypeout");
+ HostSoundALSATypeout->setLabel(QObject::tr("Type"));
+ HostSoundALSATypeout->addSelection("Analog");
+ HostSoundALSATypeout->addSelection("Digital");
+ HostSoundALSATypeout->setHelpText(QObject::tr(""));
+
+ HostSoundALSAAnalog = new HostComboBox("HostSoundALSAAnalog");
+ HostSoundALSADigital = new HostComboBox("HostSoundALSADigital");
+ fillALSAselection();
+ int findalsaanalog=HostSoundALSAAnalog->findSelection(hostparm.OLDHostSoundALSAAnalog );
+ int findalsadigital=HostSoundALSADigital->findSelection(hostparm.OLDHostSoundALSADigital );
+ HostSoundALSAAnalog->setValue(findalsaanalog);
+ HostSoundALSADigital->setValue(findalsadigital);
+ addChild(HostSoundALSATypeout);
+ setTrigger(HostSoundALSATypeout);
+ addTarget("Analog", HostSoundALSAAnalog);
+ addTarget("Digital", HostSoundALSADigital);
+};
+
+void SoundOSSsettings::loadossdriver()
+{
+// Add info popup right here
+ QString cmdtxt;
+ cmdtxt="sudo ";
+ cmdtxt.append(MV_ROOT) ;
+ cmdtxt.append("bin/soundconfig.sh -t LOAD -i OSS &");
+ system(cmdtxt);
+ int return_code = 0;
+
+ QString msgtext = "Loading OSS driver" ;
+
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,
+ "ossbusy");
+
+ int progressbar=1;
+ MythProgressDialog *popupProgress = NULL;
+ popupProgress = new MythProgressDialog(msgtext, 50);
+ if (popupProgress)
+ {
+ popupProgress->setProgress(progressbar);
+ }
+
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+
+ while ( return_code == 0 )
+ {
+ progressbar++;
+ popupProgress->setProgress(progressbar);
+ if (progressbar > 50 )
+ progressbar = 10;
+
+ return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null");
+ qApp->processEvents ();
+ usleep(900);
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+
+ if (popupProgress)
+ {
+ popupProgress->Close();
+ popupProgress->deleteLater();
+ }
+
+ fillossselection();
+
+}
+void SoundALSAsettings::loadalsadriver()
+{
+ QString cmdtxt;
+ cmdtxt="sudo ";
+ cmdtxt.append(MV_ROOT) ;
+ cmdtxt.append("bin/soundconfig.sh -t LOAD -i ALSA &");
+ system(cmdtxt);
+ int return_code = 0;
+ QString msgtext = "Loading ALSA driver" ;
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+
+ int progressbar=1;
+ MythProgressDialog *popupProgress = NULL;
+ popupProgress = new MythProgressDialog(msgtext, 50);
+ if (popupProgress)
+ {
+ popupProgress->setProgress(progressbar);
+ }
+
+
+ while ( return_code == 0 )
+ {
+ progressbar++;
+ popupProgress->setProgress(progressbar);
+ if (progressbar > 50 )
+ progressbar = 10;
+
+ return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null");
+ qApp->processEvents ();
+ usleep(900);
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+ if (popupProgress)
+ {
+ popupProgress->Close();
+ popupProgress->deleteLater();
+ }
+
+ HostSoundALSAAnalog-> clearSelections();
+ HostSoundALSADigital-> clearSelections();
+
+ fillALSAselection();
+
+}
+void SoundOSSsettings::fillossselection()
+{
+ myth_system("ossinfo -v1 -a |grep device > /tmp/ossdevices");
+ QString currentitem;
+ QString currentfile = "/tmp/ossdevices";
+ QString line;
+ QString legacy_device;
+ QString simpleitem;
+ QString currentitemtext;
+ QRegExp sep( "\t" );
+ QFile file(currentfile);
+ QString ossfound="false";
+ HostSoundOssAnalog->clearSelections();
+ HostSoundOssDigital-> clearSelections();
+
+
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if (line.contains("device index") )
+ {
+ legacy_device = t.readLine();
+ legacy_device= legacy_device.section( "/",2,2);
+ currentitemtext=line.section( "/" , 0 ,0 );
+ simpleitem = currentitemtext.simplifyWhiteSpace();
+ simpleitem = simpleitem.remove ( "(" );
+ simpleitem = simpleitem.remove ( ")" );
+ simpleitem.append(" (");
+ simpleitem.append(legacy_device);
+ simpleitem.append(")");
+ if (line.contains("spdout") || line.contains("digital") )
+ HostSoundOssDigital->addSelection(simpleitem);
+ else
+ HostSoundOssAnalog->addSelection(simpleitem);
+ ossfound="true";
+ }
+ }
+ if (ossfound=="false")
+ {
+ simpleitem="No cards found, try loading the OSS drivers";
+ HostSoundOssAnalog->addSelection(simpleitem);
+ HostSoundOssDigital->addSelection(simpleitem);
+ }
+ }
+ return ;
+};
+
+
+void SoundALSAsettings::fillALSAselection()
+{
+ HostSoundALSAAnalog-> clearSelections();
+ HostSoundALSADigital-> clearSelections();
+ myth_system("aplay -l > /tmp/alsadevices");
+ QString currentfile = "/tmp/alsadevices";
+ QString line;
+ QString hwdevice;
+ QString alsadescription;
+ QString alsadescription2;
+ QString temphwdevice;
+ QString simpleitem;
+ QFile file(currentfile);
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if (line.startsWith("card") )
+ {
+ if (line.contains("snd_ctl_card_info"))
+ {
+ simpleitem="Try loading the alsa drivers";
+ HostSoundALSAAnalog->addSelection(simpleitem);
+ HostSoundALSADigital->addSelection(simpleitem);
+ break;
+ }
+ //card 0: I82801DBICH4:q [Intel 82801DB-ICH4], device 0: Intel ICH [Intel 82801DB-ICH4]
+ alsadescription=line.section( "," , 0 ,0 );
+ alsadescription=alsadescription.section(":",1,1);
+
+ alsadescription2=line.section( "," , 1 ,1 );
+ //alsadescription2=alsadescription.section(":",0,0);
+
+ hwdevice=line.section( ":" , 0 ,0 );
+ hwdevice=hwdevice.section( " " , -1,-1 );
+ //grabbing 2nd half of device
+ temphwdevice=line.section(",",1,1);
+ temphwdevice=temphwdevice.section(":",0,0);
+ temphwdevice=temphwdevice.section(" ",-1,-1 );
+ hwdevice.append(",");
+ hwdevice.append(temphwdevice);
+ simpleitem=alsadescription2 + "(hw:" + hwdevice + ")";
+ if (line.contains("IEC958") || line.contains("Digital"))
+ HostSoundALSADigital->addSelection(simpleitem);
+ else
+ HostSoundALSAAnalog->addSelection(simpleitem);
+ }
+ }
+ }
+ return ;
+
+}
+
+void SoundSettings::soundossgathersettings_1 (void)
+{
+ hostparm.ThisHostAudiotype = HostAudiotype->getValue();
+// hostparm.ThisHostsyncXine = HostsyncXine->getValue();
+// hostparm.ThisHostsyncMplayer = HostsyncMplayer->getValue();
+// hostparm.ThisHostsyncMythMusic = HostsyncMythMusic->getValue();
+// hostparm.ThisHostsyncMythFrontend = HostsyncMythFrontend->getValue();
+ // emit the signal to call soundossgathersetting.
+ emit oss_sig();
+};
+void SoundSettings::soundalsagathersettings_1 (void)
+{
+ hostparm.ThisHostAudiotype = HostAudiotype->getValue();
+// hostparm.ThisHostsyncXine = HostsyncXine->getValue();
+// hostparm.ThisHostsyncMplayer = HostsyncMplayer->getValue();
+// hostparm.ThisHostsyncMythMusic = HostsyncMythMusic->getValue();
+// hostparm.ThisHostsyncMythFrontend = HostsyncMythFrontend->getValue();
+ // emit the signal to call soundALSAgathersetting.
+ emit alsa_sig();
+};
+
+
+void SoundOSSsettings::soundossgathersettings(void)
+{
+ hostparm.ThisHostSoundTypeout = HostSoundTypeout->getValue() ;
+ hostparm.ThisHostSoundOSSAnalog = HostSoundOssAnalog->getValue();
+ hostparm.ThisHostSoundOSSDigital = HostSoundOssDigital->getValue();
+ QString tempdevice;
+ if ( hostparm.ThisHostSoundTypeout == "Analog" )
+ {
+ tempdevice = hostparm.ThisHostSoundOSSAnalog ;
+ }
+ else
+ {
+ tempdevice = hostparm.ThisHostSoundOSSDigital ;
+ };
+ tempdevice = tempdevice.section( "(", 1,1 );
+ tempdevice = tempdevice.section( ")", 0,0 );
+ hostparm.ThisHostSoundDevice = "/dev/";
+ hostparm.ThisHostSoundDevice.append(tempdevice);
+ // Add info popup right here
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/soundconfig.sh -t test -i OSS -d " + hostparm.ThisHostSoundDevice + "&");
+ system(cmdtxt);
+ int return_code = 0;
+ QString msgtext = "Playing sample audio" ;
+
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+
+ int progressbar=1;
+ MythProgressDialog *popupProgress = NULL;
+ popupProgress = new MythProgressDialog(msgtext, 50);
+ if (popupProgress)
+ {
+ popupProgress->setProgress(progressbar);
+ }
+
+
+
+
+
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+
+
+
+ while ( return_code == 0 )
+ {
+ progressbar++;
+ popupProgress->setProgress(progressbar);
+ if (progressbar > 50 )
+ progressbar = 10;
+
+ return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null");
+ qApp->processEvents ();
+ usleep(900);
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+ if (popupProgress)
+ {
+ popupProgress->Close();
+ popupProgress->deleteLater();
+ }
+
+};
+
+void SoundALSAsettings::soundalsagathersettings(void)
+{
+
+ hostparm.ThisHostSoundALSATypeout = HostSoundALSATypeout->getValue() ;
+ hostparm.ThisHostSoundALSAAnalog = HostSoundALSAAnalog->getValue();
+ hostparm.ThisHostSoundALSADigital = HostSoundALSADigital->getValue();
+
+ QString tempdevice;
+ if ( hostparm.ThisHostSoundALSATypeout == "Analog" )
+ {
+ tempdevice = hostparm.ThisHostSoundALSAAnalog ;
+ }
+ else
+ {
+ tempdevice = hostparm.ThisHostSoundALSADigital ;
+ };
+ tempdevice = tempdevice.section( "(", 1,1 );
+ tempdevice = tempdevice.section( ")", 0,0 );
+ hostparm.ThisHostSoundDevice = tempdevice;
+ // Add info popup right here
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/soundconfig.sh -t test -i ALSA -d " + hostparm.ThisHostSoundDevice + "&");
+ system(cmdtxt);
+ int return_code = 0;
+ QString msgtext = "Playing sample audio" ;
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+ int progressbar=1;
+ MythProgressDialog *popupProgress = NULL;
+ popupProgress = new MythProgressDialog(msgtext, 50);
+ if (popupProgress)
+ {
+ popupProgress->setProgress(progressbar);
+ }
+
+
+
+ while ( return_code == 0 )
+ {
+ progressbar++;
+ popupProgress->setProgress(progressbar);
+ if (progressbar > 50 )
+ progressbar = 10;
+
+
+ return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null");
+ qApp->processEvents ();
+ usleep(900);
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+ if (popupProgress)
+ {
+ popupProgress->Close();
+ popupProgress->deleteLater();
+ }
+
+
+
+
+};
+
+
+/* __________________________ END OF CLASSES_________________________*/
+
+void pre_writesettings ()
+{
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+ hostparm.ThisDBhost = gCoreContext->GetSetting("HostMysqlServer");
+ hostparm.ThisHostName = gCoreContext->GetSetting("HostMyhostname");
+
+ if ( hostparm.ThisSystemType == "Standalone" )
+ {
+ hostparm.ThisDBhost = "localhost" ;
+ hostparm.ThisRunfrontend = "1" ;
+ gCoreContext->SaveSetting("HostRunFrontend", hostparm.ThisRunfrontend );
+ // disable pkgmirror
+// hostparm.ThisHostPKG_MIRROR = "0";
+// //gCoreContext->SaveSetting("GlobalPKG_MIRROR", hostparm.ThisHostPKG_MIRROR );
+// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("GlobalServiceHobbitserver");
+// if (hostparm.ThisHostServiceHobbit == "" )
+// {
+// hostparm.ThisHostServiceHobbit = "1";
+// QString s = "GlobalServiceHobbitserver";
+// gCoreContext->SaveSettingOnHost(s, hostparm.ThisHostServiceHobbit ,NULL);
+// }
+ }
+ else if (hostparm.ThisSystemType == "Master_backend" )
+ {
+ if ( hostparm.ThisNFS =="" && gCoreContext->GetSetting("HostServiceNFS") == "" )
+ {
+ hostparm.ThisNFS = "1";
+ gCoreContext->SaveSetting("HostServiceNFS",hostparm.ThisNFS );
+ }
+ hostparm.ThisDBhost = "127.0.0.1" ;
+ //GlobalPKG is only an option for MBE
+// hostparm.ThisHostPKG_MIRROR = (gCoreContext->GetSetting("GlobalPKG_MIRROR")) ;
+// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("GlobalServiceHobbitserver");
+// if (hostparm.ThisHostServiceHobbit == "" )
+// {
+// hostparm.ThisHostServiceHobbit = "1";
+// QString s = "GlobalServiceHobbitserver";
+// gCoreContext->SaveSettingOnHost(s, hostparm.ThisHostServiceHobbit,NULL );
+// }
+ }
+ else if (hostparm.ThisSystemType == "Frontend_only" )
+ {
+ hostparm.ThisRunfrontend = "1" ;
+ hostparm.ThisSamba = "0";
+ hostparm.ThisNFS = "0";
+ hostparm.ThisMythWEB = "0";
+ gCoreContext->SaveSetting("HostRunFrontend", hostparm.ThisRunfrontend );
+ gCoreContext->SaveSetting("HostServiceSamba", hostparm.ThisSamba );
+ gCoreContext->SaveSetting("HostServiceNFS", hostparm.ThisNFS );
+ gCoreContext->SaveSetting("HostServiceMythWEB",hostparm.ThisMythWEB );
+ // if GBL is enabled, then check for host setting, else disable it
+// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR") ) == "1" )
+// {
+// hostparm.ThisHostPKG_MIRROR = gCoreContext->GetSetting("HostPKG_MIRROR");
+// }
+// else
+// {
+// hostparm.ThisHostPKG_MIRROR = "0";
+// };
+//
+// if ( ((gCoreContext->GetSetting("GlobalServiceHobbitserver") ) == "1") || install_hobbit )
+// {
+// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient");
+// }
+// else
+// {
+// hostparm.ThisHostServiceHobbit = "0";
+// }
+//
+// gCoreContext->SaveSetting("HostPKG_MIRROR", hostparm.ThisHostPKG_MIRROR );
+// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit);
+
+ }
+ else if (hostparm.ThisSystemType == "Slave_backend" )
+ {
+ hostparm.ThisSamba = "0";
+ hostparm.ThisNFS = "0";
+ hostparm.ThisMythWEB = "0";
+ gCoreContext->SaveSetting("HostServiceSamba", hostparm.ThisSamba );
+ gCoreContext->SaveSetting("HostServiceNFS", hostparm.ThisNFS );
+ gCoreContext->SaveSetting("HostServiceMythWEB",hostparm.ThisMythWEB );
+// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR") ) == "1" )
+// {
+// hostparm.ThisHostPKG_MIRROR = gCoreContext->GetSetting("HostPKG_MIRROR");
+// }
+// else
+// {
+// hostparm.ThisHostPKG_MIRROR = "0";
+// }
+// if ( ((gCoreContext->GetSetting("GlobalServiceHobbitserver") ) == "1") || install_hobbit )
+// {
+// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient");
+// }
+// else
+// {
+//
+// hostparm.ThisHostServiceHobbit = "0";
+// }
+//
+// gCoreContext->SaveSetting("HostPKG_MIRROR", hostparm.ThisHostPKG_MIRROR );
+// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit);
+
+ };
+
+// if ( hostparm.ThisHostDefaultInterface == "" )
+// {
+// if ( gCoreContext->GetSetting("HostDefaulteth0") == "1" )
+// hostparm.ThisHostDefaultInterface = "eth0";
+// else if ( gCoreContext->GetSetting("HostDefaulteth1") == "1" )
+// hostparm.ThisHostDefaultInterface = "eth1";
+// else if ( gCoreContext->GetSetting("HostDefaultwlan0") == "1" )
+// hostparm.ThisHostDefaultInterface = "wlan0";
+// else if ( gCoreContext->GetSetting("HostDefaultwlan1") == "1" )
+// hostparm.ThisHostDefaultInterface = "wlan1";
+// else if ( gCoreContext->GetSetting("HostActiveonbooteth0") == "1" )
+// hostparm.ThisHostDefaultInterface = "eth0";
+// else if ( gCoreContext->GetSetting("HostActiveonbooteth1") == "1" )
+// hostparm.ThisHostDefaultInterface = "eth1";
+// else if ( gCoreContext->GetSetting("HostActiveonbootwlan0") == "1" )
+// hostparm.ThisHostDefaultInterface = "wlan0";
+// else if ( gCoreContext->GetSetting("HostActiveonbootwlan1") == "1" )
+// hostparm.ThisHostDefaultInterface = "wlan1";
+// else
+// hostparm.ThisHostDefaultInterface = "ack";
+// }
+// Even after all the above, it's still possible to set the Default interface to one that isn't active.
+
+ hostparm.ThisDBhost = hostparm.ThisDBhost.section( "\t", 0, 0 );
+ if ( hostparm.ThisHostName == "" || hostparm.ThisHostName == "type_hostname_here")
+ hostparm.ThisHostName = "diamonds";
+ //remove spaces from hostname
+ QString s = hostparm.ThisHostName.replace ( QRegExp(" "),"");
+ hostparm.ThisHostName = s;
+ if ( hostparm.ThisHostName == "" )
+ {
+ hostparm.ThisHostName=gCoreContext->GetHostName();
+ }
+
+ // piece togther the timezone
+ QString tz;
+ QString tregion;
+ QString tsubregion;
+//-----------------
+//I don't think this is needed anymore
+ tz=gCoreContext->GetSetting("HostTimeZone");
+ if ( tz.isEmpty() || (tz == "Unknown"))
+ timezone_unknown = TRUE;
+//-----------
+
+ tregion=gCoreContext->GetSetting("HostTimeZoneRegion");
+ tsubregion=gCoreContext->GetSetting("HostTimeZoneRegion_"+tregion);
+ if ( tsubregion.isEmpty() )
+ hostparm.ThisTimeZone = tregion;
+ else
+ hostparm.ThisTimeZone = tregion + "/" + tsubregion;
+
+ gCoreContext->SaveSetting("HostMyhostname" , hostparm.ThisHostName );
+ gCoreContext->SaveSetting("HostMysqlserver", hostparm.ThisDBhost );
+ gCoreContext->SaveSetting("HostTimeZone", hostparm.ThisTimeZone );
+}
+
+void run_systemconfig(QString modulelist, bool restart, QString dbcommand)
+{
+ QString cmdtxt;
+ cmdtxt="sudo ";
+ cmdtxt.append(MV_ROOT) ;
+ cmdtxt.append("bin/systemconfig.sh " + modulelist + " &");
+ myth_system(cmdtxt);
+ int return_code = 0;
+ QString msgtext = "Please wait while " ;
+ msgtext.append(gCoreContext->GetSetting("HostMyhostname"));
+ msgtext.append(" is configured");
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+ while ( return_code == 0 )
+ {
+ return_code = myth_system("ps -ef|grep systemconfig.sh|grep -v grep > /dev/null");
+ qApp->processEvents ();
+ usleep(900);
+ }
+
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+
+
+ if (restart)
+ {
+ return_code = 1;
+ int loopnumber=0 ;
+ bool doloop = true;
+
+ QString msgtext = "Transferring database settings" ;
+ MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
+ MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy");
+ if (busyPopup->Create())
+ {
+ popupStack->AddScreen(busyPopup, false);
+ }
+ else
+ {
+ delete busyPopup;
+ busyPopup = NULL;
+ }
+
+
+
+
+ while ( doloop )
+ {
+ return_code = myth_system(dbcommand);
+ qApp->processEvents ();
+ usleep(100);
+ loopnumber++ ;
+ if ( return_code == 0 || loopnumber >= 20000000 )
+ doloop=false;
+ }
+ if (busyPopup)
+ {
+ busyPopup->Close();
+ busyPopup = NULL;
+ }
+
+ };
+
+
+
+}
+
+
+
+int runsettings (bool mysqlonly , bool shownetwork , bool showhostype,
+ bool showmisc , bool showshutdown, bool showadvanced,
+ bool showsound,bool showadvancedX, bool showaccesscontrol,
+ bool showplugins , bool showsoftware, bool showuser ,
+ bool showwebuser , bool showddns , bool showinfrared ,
+ bool showscreensaver , bool showsupplemental,
+ bool showremotesonly, bool showvnc, bool showfileshare)
+{
+ displaymysqlonly = false ;
+ displayshownetwork =false ;
+ displayshowhostype = false ;
+ displayshowmisc =false ;
+ displayshowshutdown =false ;
+ displayshowadvanced = false;
+ displayshowsound = false ;
+ displayshowadvancedX = false;
+ displayaccesscontrol= false;
+ displayplugins= false;
+ displaysoftware= false;
+ displayuser = false;
+ displaywebuser = false;
+ displayddns = false;
+ displayinfrared = false;
+ displayscreensaver = false;
+ displaysupplemental = false;
+ displayremotesonly = false;
+ displayvnc = false;
+ displayfileshare = false;
+
+ //gCoreContext->ActivateSettingsCache(true);
+ //gCoreContext->ClearSettingsCache();
+ bool runothers=false;
+ bool continuerun=true;
+ int retc = 0 ;
+ displaymysqlonly = mysqlonly;
+
+ if (displaymysqlonly )
+ {
+ MythInstallSettings mysqlsettings;
+ mysqlsettings.Load();
+ mysqlsettings.Save();
+ if ( mysqlsettings.exec() == QDialog::Accepted )
+ {
+ retc = 1;
+ }
+ else
+ {
+ retc=2;
+ };
+ };
+
+ if ( shownetwork )
+ {
+ displayshownetwork = shownetwork;
+ MythInstallSettings settings;
+ settings.Load();
+ settings.Save();
+ if ( settings.exec() == QDialog::Accepted )
+ {
+ retc = 1;
+ }
+ else
+ {
+ continuerun=false;
+ retc=2;
+ };
+ displayshownetwork = false;
+ };
+
+ if ( showhostype && continuerun )
+ {
+ displayshowhostype = showhostype;
+ system ("avahi-browse -l -r -t _mysql._tcp > /tmp/mysqllist");
+ MythInstallSettings settings1;
+ settings1.Load();
+ settings1.Save();
+ if ( settings1.exec() == QDialog::Accepted )
+ {
+ retc = 1;
+ }
+ else
+ {
+ continuerun=false;
+ retc=2;
+ };
+ displayshowhostype=false;
+ }
+
+ if ( showmisc || showshutdown || showsound || showadvancedX || showadvanced || showaccesscontrol || showplugins || showsoftware || showuser || showwebuser || showddns || showinfrared || showscreensaver || showsupplemental || showremotesonly || showvnc || showfileshare)
+ {
+ runothers=true;
+ displayshowmisc = showmisc;
+ displayshowshutdown = showshutdown;
+ displayshowadvanced = showadvanced;
+ displayshowsound = showsound;
+ displayshowadvancedX = showadvancedX;
+ hostparm.displayshowadvancedX=showadvancedX;
+ displayaccesscontrol = showaccesscontrol ;
+ displayplugins = showplugins;
+ displaysoftware = showsoftware;
+ displayuser = showuser;
+ displaywebuser = showwebuser;
+ displayddns = showddns ;
+ displayinfrared = showinfrared;
+ displayscreensaver = showscreensaver;
+ displaysupplemental = showsupplemental ;
+ displayremotesonly = showremotesonly ;
+ displayvnc = showvnc ;
+ displayfileshare = showfileshare;
+// if (displayshowadvancedX)
+// {
+// ReadDDCvalues();
+// }
+ };
+
+
+ if ( runothers && continuerun )
+ {
+ //do I need this prewerite?
+ pre_writesettings();
+ //FINDME
+ DatabaseParams params = gContext->GetDatabaseParams();
+ QString cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/timezip.py -m ");
+ QString zipcommand=cmdtxt;
+ zipcommand.append(hostparm.ThisDBhost);
+ //FINDME
+ zipcommand.append(" -d " + params.dbHostName );
+ //cout << zipcommand << endl;
+ myth_system(zipcommand);
+ //hostparm.ThisHostZipcode = gCoreContext->GetSetting("HostZipcode");
+ hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone");
+// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient");
+// if ( hostparm.ThisHostServiceHobbit == "1" )
+// install_hobbit = true;
+
+ MythInstallSettings settings2;
+ settings2.Load();
+ settings2.Save();
+// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit );
+ if ( settings2.exec() == QDialog::Accepted )
+ {
+ retc = 1;
+ }
+ else
+ {
+ continuerun=false;
+ retc=2;
+ };
+ };
+ pre_writesettings();
+ if ( mysqlonly )
+ {
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/systemconfig.sh Mysql_only " + hostparm.ThisDBhost);
+ myth_system(cmdtxt);
+ }
+ else
+ {
+ if (retc == 1)
+ writesettings();
+ }
+ return retc;
+};
+
+
+
+void writesettings ()
+{
+ // ofstream myfile;
+ gCoreContext->ClearSettingsCache();
+ //gCoreContext->ActivateSettingsCache(false);
+ hostparm.language = gCoreContext->GetSetting("language");
+ hostparm.ThisHostName = gCoreContext->GetSetting("HostMyhostname").toLower();
+ hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone");
+
+ hostparm.ThisHostIPeth0 = gCoreContext->GetSetting("HostIPeth0");
+ hostparm.ThisHostNETMASKeth0 = gCoreContext->GetSetting("HostNETMASKeth0");
+ hostparm.ThisHostDNSeth0 = gCoreContext->GetSetting("HostDNSeth0");
+ hostparm.ThisHostUSEDHCPeth0 = gCoreContext->GetSetting("HostUseDHCPeth0");
+ hostparm.ThisHostGWeth0 = gCoreContext->GetSetting("HostGWeth0");
+ hostparm.ThisHostActiveonbooteth0 = gCoreContext->GetSetting("HostActiveonbooteth0");
+ hostparm.ThisHOSTESSIDeth0 = gCoreContext->GetSetting("HOSTESSIDeth0");
+ hostparm.ThisHostUseEncryptioneth0 = gCoreContext->GetSetting("HostUseEncryptioneth0");
+ hostparm.ThisHostkeyeth0 = gCoreContext->GetSetting("Hostkeyeth0");
+ hostparm.ThisHostMTUeth0 = gCoreContext->GetSetting("HostMTUeth0");
+
+ hostparm.ThisHostIPeth1 = gCoreContext->GetSetting("HostIPeth1");
+ hostparm.ThisHostNETMASKeth1 = gCoreContext->GetSetting("HostNETMASKeth1");
+ hostparm.ThisHostDNSeth1 = gCoreContext->GetSetting("HostDNSeth1");
+ hostparm.ThisHostUSEDHCPeth1 = gCoreContext->GetSetting("HostUseDHCPeth1");
+ hostparm.ThisHostGWeth1 = gCoreContext->GetSetting("HostGWeth1");
+ hostparm.ThisHostActiveonbooteth1 = gCoreContext->GetSetting("HostActiveonbooteth1");
+ hostparm.ThisHOSTESSIDeth1 = gCoreContext->GetSetting("HOSTESSIDeth1");
+ hostparm.ThisHostUseEncryptioneth1 = gCoreContext->GetSetting("HostUseEncryptioneth1");
+ hostparm.ThisHostkeyeth1 = gCoreContext->GetSetting("Hostkeyeth1");
+ hostparm.ThisHostMTUeth1 = gCoreContext->GetSetting("HostMTUeth1");
+
+ hostparm.ThisHostIPwlan0 = gCoreContext->GetSetting("HostIPwlan0");
+ hostparm.ThisHostNETMASKwlan0 = gCoreContext->GetSetting("HostNETMASKwlan0");
+ hostparm.ThisHostDNSwlan0 = gCoreContext->GetSetting("HostDNSwlan0");
+ hostparm.ThisHostUSEDHCPwlan0 = gCoreContext->GetSetting("HostUseDHCPwlan0");
+ hostparm.ThisHostGWwlan0 = gCoreContext->GetSetting("HostGWwlan0");
+ hostparm.ThisHostActiveonbootwlan0 = gCoreContext->GetSetting("HostActiveonbootwlan0");
+ hostparm.ThisHOSTESSIDwlan0 = gCoreContext->GetSetting("HOSTESSIDwlan0");
+ hostparm.ThisHostUseEncryptionwlan0 = gCoreContext->GetSetting("HostUseEncryptionwlan0");
+ hostparm.ThisHostkeywlan0 = gCoreContext->GetSetting("Hostkeywlan0");
+ hostparm.ThisHostMTUwlan0 = gCoreContext->GetSetting("HostMTUwlan0");
+
+ hostparm.ThisHostIPwlan1 = gCoreContext->GetSetting("HostIPwlan1");
+ hostparm.ThisHostNETMASKwlan1 = gCoreContext->GetSetting("HostNETMASKwlan1");
+ hostparm.ThisHostDNSwlan1 = gCoreContext->GetSetting("HostDNSwlan1");
+ hostparm.ThisHostUSEDHCPwlan1 = gCoreContext->GetSetting("HostUseDHCPwlan1");
+ hostparm.ThisHostGWwlan1 = gCoreContext->GetSetting("HostGWwlan1");
+ hostparm.ThisHostActiveonbootwlan1 = gCoreContext->GetSetting("HostActiveonbootwlan1");
+ hostparm.ThisHOSTESSIDwlan1 = gCoreContext->GetSetting("HOSTESSIDwlan1");
+ hostparm.ThisHostUseEncryptionwlan1 = gCoreContext->GetSetting("HostUseEncryptionwlan1");
+ hostparm.ThisHostkeywlan1 = gCoreContext->GetSetting("Hostkeywlan1");
+ hostparm.ThisHostMTUwlan1 = gCoreContext->GetSetting("HostMTUwlan1");
+
+ hostparm.ThisHostIPath0 = gCoreContext->GetSetting("HostIPath0");
+ hostparm.ThisHostNETMASKath0 = gCoreContext->GetSetting("HostNETMASKath0");
+ hostparm.ThisHostDNSath0 = gCoreContext->GetSetting("HostDNSath0");
+ hostparm.ThisHostUSEDHCPath0 = gCoreContext->GetSetting("HostUseDHCPath0");
+ hostparm.ThisHostGWath0 = gCoreContext->GetSetting("HostGWath0");
+ hostparm.ThisHostActiveonbootath0 = gCoreContext->GetSetting("HostActiveonbootath0");
+ hostparm.ThisHOSTESSIDath0 = gCoreContext->GetSetting("HOSTESSIDath0");
+ hostparm.ThisHostUseEncryptionath0 = gCoreContext->GetSetting("HostUseEncryptionath0");
+ hostparm.ThisHostkeyath0 = gCoreContext->GetSetting("Hostkeyath0");
+ hostparm.ThisHostMTUath0 = gCoreContext->GetSetting("HostMTUath0");
+
+
+ // hostparm.ThisHostServiceRRD = gCoreContext->GetSetting("HostServiceRRD");
+ hostparm.ThisSamba = gCoreContext->GetSetting("HostServiceSamba");
+ hostparm.ThisHostServiceSamba_media = gCoreContext->GetSetting("HostServiceSamba_media");
+ hostparm.ThisHostServiceSamba_write = gCoreContext->GetSetting("HostServiceSamba_write");
+ hostparm.ThisHostServiceSamba_home = gCoreContext->GetSetting("HostServiceSamba_home");
+ hostparm.ThisHostServiceSamba_writehome = gCoreContext->GetSetting("HostServiceSamba_writehome");
+ hostparm.ThisHostServiceSamba_domain = gCoreContext->GetSetting("HostServiceSamba_domain");
+ hostparm.ThisNFS = gCoreContext->GetSetting("HostServiceNFS");
+ hostparm.ThisHostCentralNFSallhosts = gCoreContext->GetSetting("HostCentralNFSallhosts");
+ hostparm.ThisMythWEB = gCoreContext->GetSetting("HostServiceMythWEB");
+ hostparm.ThisHostwebauth = gCoreContext->GetSetting("HOSTwebauth");
+
+ hostparm.ThisHostRunDHCP = gCoreContext->GetSetting("HostRunDHCP");
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+
+ // determine the remote based off the host bucket.
+ hostparm.ThisHostRemotebucket = gCoreContext->GetSetting("HostRemotebucket");
+ if ( hostparm.ThisHostRemotebucket == "favorites" )
+ hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_favorites");
+ if ( hostparm.ThisHostRemotebucket == "user" )
+ hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_user");
+ if ( hostparm.ThisHostRemotebucket == "other" )
+ hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_other");
+ if ( hostparm.ThisHostRemotebucket == "hauppauge" )
+ hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_hauppauge");
+ if ( hostparm.ThisHostRemotebucket == "ATI" )
+ hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_ATI");
+
+ hostparm.ThisHostBEWait = gCoreContext->GetSetting("HostBEWait");
+ hostparm.ThisHostLircWait = gCoreContext->GetSetting("HostLircWait");
+
+ hostparm.ThisHDHRlirc_device = gCoreContext->GetSetting("HostHDHRlirc_device");
+ hostparm.ThisReceiverType = gCoreContext->GetSetting("HostReceiverType");
+ hostparm.ThisHostSerialPortlirc = gCoreContext->GetSetting("HostSerialPortlirc");
+ // hostparm.ThisHostUseEvrouter = gCoreContext->GetSetting("HostRunEvrouter");
+ // hostparm.ThisHostEvrouterConfig = gCoreContext->GetSetting("HostEvrouterConfig");
+ hostparm.ThisXres = gCoreContext->GetSetting("HostXres");
+ hostparm.ThisHostUseXLargeMouse = gCoreContext->GetSetting("HostUseXLargeMouse");
+ hostparm.ThisAutodown = gCoreContext->GetSetting("HostAutodown");
+ hostparm.ThisShutdowntime = gCoreContext->GetSetting("HostShutdownTime");
+ hostparm.ThisShutdowntime2 = gCoreContext->GetSetting("HostShutdownTime2");
+ hostparm.ThisWakeuptime = gCoreContext->GetSetting("HostWakeupTime");
+ hostparm.ThisUseNVRAM = gCoreContext->GetSetting("HostUseNVRAM");
+ hostparm.ThisUseWOL = gCoreContext->GetSetting("HostUseWOL");
+ hostparm.ThisKeepPackage = gCoreContext->GetSetting("HostKeepPackages");
+ hostparm.ThisMythWelcome = gCoreContext->GetSetting("HostUseMythWelcome");
+ hostparm.ThisHaveNFS = gCoreContext->GetSetting("HostHaveCentralNFS");
+ hostparm.ThisNFSserver = gCoreContext->GetSetting("HostCentralNFSIP");
+ hostparm.ThisNFSmountpoint = gCoreContext->GetSetting("HostNFSmountpoint");
+ hostparm.ThisHostupdateplan = gCoreContext->GetSetting("Hostupdateplan");
+ hostparm.ThisShowToolTips = gCoreContext->GetSetting("HostShowToolTips");
+ hostparm.ThisRunfrontend = gCoreContext->GetSetting("HostRunFrontend");
+ //hostparm.ThisHostZipcode = gCoreContext->GetSetting("HostZipcode");
+ hostparm.ThisHostncidClient = gCoreContext->GetSetting("HostncidClient");
+ hostparm.ThisHostncidDaemon = gCoreContext->GetSetting("HostncidDaemon");
+ hostparm.ThisHostSerialPortncid = gCoreContext->GetSetting("HostSerialPortncid");
+ hostparm.ThisHostNcidDeviceNetCallerID = gCoreContext->GetSetting("HostNcidDeviceNetCallerID");
+ hostparm.ThisHostbootsplash = gCoreContext->GetSetting("Hostbootsplash");
+
+ hostparm.ThisXIgnoreConfig =gCoreContext->GetSetting("HostXIgnoreConfig");
+ hostparm.ThisXcardtype =gCoreContext->GetSetting("HostXcardtype");
+ hostparm.ThisXUseAdvanced =gCoreContext->GetSetting("HostXUseAdvanced");
+ hostparm.ThisXIgnoreEDID =gCoreContext->GetSetting("HostXIgnoreEDID");
+ hostparm.ThisXconnection =gCoreContext->GetSetting("HostXconnection");
+ hostparm.ThisXDisplaysize =gCoreContext->GetSetting("HostXDisplaysize");
+ hostparm.ThisHostXNvidia1080p =gCoreContext->GetSetting("HostXNvidia1080p");
+ hostparm.ThisHostXNvidia1080i =gCoreContext->GetSetting("HostXNvidia1080i");
+ hostparm.ThisHostXNvidia720p =gCoreContext->GetSetting("HostXNvidia720p");
+ hostparm.ThisHostXNvidia480p =gCoreContext->GetSetting("HostXNvidia480p");
+// EDID settings
+ QString tempstring;
+ tempstring = gCoreContext->GetSetting("HostXHsyncLow");
+ tempstring.append(" - ");
+ tempstring.append(gCoreContext->GetSetting("HostXHsyncHigh") );
+ hostparm.ThisXHsync=tempstring;
+ tempstring ="";
+ tempstring=gCoreContext->GetSetting("HostXVrefreshLow");
+ tempstring.append(" - ");
+ tempstring.append(gCoreContext->GetSetting("HostXVrefreshHigh"));
+ hostparm.ThisXVrefresh=tempstring;
+
+// Assemble the advanced modeline string
+ QString modelinetype = gCoreContext->GetSetting("HostXModelineCatagory");;
+ QString tempmodeline = "HostXadvancedres" + modelinetype ;
+ QString modeline = gCoreContext->GetSetting(tempmodeline);
+ hostparm.ThisXresadvanced = modelinetype +"_"+modeline;
+
+// Gather settings based on card type
+ if ( hostparm.ThisXcardtype == "nVidia" )
+ {
+ hostparm.ThisXTVstandard = gCoreContext->GetSetting("HostXnVidiaTVstandard");
+ hostparm.ThisXTVconnection= gCoreContext->GetSetting("HostXnVidiaTVformat");
+ modelinetype = gCoreContext->GetSetting("HostXNvidiaModelineCatagory");;
+ tempmodeline = "HostXNvidiaadvancedres" + modelinetype ;
+ modeline = gCoreContext->GetSetting(tempmodeline);
+ hostparm.ThisXresadvanced = modelinetype +"_"+modeline;
+ }
+ else if ( hostparm.ThisXcardtype == "ATI" )
+ {
+ hostparm.ThisXTVstandard = gCoreContext->GetSetting("HostXATITVstandard");
+ hostparm.ThisXTVconnection= gCoreContext->GetSetting("HostXati-tvformat");
+ }
+
+
+//*********************************************************************************************
+// AUDIO SETTINGS
+//******************************************************************************************
+ hostparm.ThisHostAudiotype = gCoreContext->GetSetting("HostAudiotype");
+// hostparm.ThisHostsyncXine = gCoreContext->GetSetting("HostsyncXine");
+// hostparm.ThisHostsyncMplayer = gCoreContext->GetSetting("HostsyncMplayer");
+// hostparm.ThisHostsyncMythMusic = gCoreContext->GetSetting("HostsyncMythMusic");
+// hostparm.ThisHostsyncMythFrontend = gCoreContext->GetSetting("HostsyncMythFrontend");
+ hostparm.ThisHostSoundTypeout = gCoreContext->GetSetting("HostSoundTypeout") ;
+ hostparm.ThisHostSoundOSSAnalog = gCoreContext->GetSetting("HostSoundOssAnalog");
+ hostparm.ThisHostSoundOSSDigital = gCoreContext->GetSetting("HostSoundOssDigital");
+ hostparm.ThisHostSoundALSATypeout = gCoreContext->GetSetting("HostSoundALSATypeout") ;
+ hostparm.ThisHostSoundALSAAnalog = gCoreContext->GetSetting("HostSoundALSAAnalog");
+ hostparm.ThisHostSoundALSADigital = gCoreContext->GetSetting("HostSoundALSADigital");
+
+ if ( hostparm.ThisHostAudiotype == "OSS" )
+ {
+ QString tempdevice;
+ QChar tempchar ;
+ hostparm.ThisHostSoundDevice = "/dev/dsp";
+ if ( hostparm.ThisHostSoundTypeout == "Analog" )
+ tempdevice = hostparm.ThisHostSoundOSSAnalog ;
+
+ if ( hostparm.ThisHostSoundTypeout == "Digital" )
+ tempdevice = hostparm.ThisHostSoundOSSDigital ;
+
+ int tlength=(tempdevice.length() -2 );
+ if ( tlength > 0 )
+ {
+ tempchar = tempdevice.at( tlength);
+ hostparm.ThisHostSoundDevice.append(tempchar);
+ };
+ }
+
+
+ if ( hostparm.ThisHostAudiotype == "ALSA" )
+ {
+ QString tempdevice;
+ hostparm.ThisHostSoundTypeout = hostparm.ThisHostSoundALSATypeout;
+ if ( hostparm.ThisHostSoundTypeout == "Digital" )
+ tempdevice=hostparm.ThisHostSoundALSADigital;
+ if ( hostparm.ThisHostSoundTypeout == "Analog" )
+ tempdevice=hostparm.ThisHostSoundALSAAnalog;
+
+ tempdevice = tempdevice.section( "(", 1,1 );
+ tempdevice = tempdevice.section( ")", 0,0 );
+ hostparm.ThisHostSoundDevice = tempdevice;
+ }
+// Turn off internal audio controls is digital audio is seleced
+ if ( hostparm.ThisHostSoundTypeout == "Digital" )
+ gCoreContext->SaveSetting("MythControlsVolume","0");
+
+// LCD TYPE
+ hostparm.ThisHostLCDType = gCoreContext->GetSetting("HostLCDType");
+ if ( hostparm.ThisHostLCDType != "no_lcd" && hostparm.ThisHostLCDType != "tinker" && hostparm.ThisHostLCDType != "" )
+ {
+ // enable mythtv lcddevice
+ gCoreContext->SaveSetting("LCDEnable","1");
+ };
+// Backupsettings
+ hostparm.ThisHostRemoteBackup = gCoreContext->GetSetting("HostRemoteBackup");
+ hostparm.ThisHostRemoteBackupDir = gCoreContext->GetSetting("HostRemoteBackupDir");
+//plugins
+ hostparm.ThisHostpluginmytharchive = gCoreContext->GetSetting("Hostpluginmytharchive");
+ hostparm.ThisHostpluginmythbrowser = gCoreContext->GetSetting("Hostpluginmythbrowser");
+ //hostparm.ThisHostpluginmythcontrols = gCoreContext->GetSetting("Hostpluginmythcontrols");
+ hostparm.ThisHostpluginmythnetvision = gCoreContext->GetSetting("Hostpluginmythnetvision");
+ hostparm.ThisHostpluginmythgallery = gCoreContext->GetSetting("Hostpluginmythgallery");
+ hostparm.ThisHostpluginmythgame = gCoreContext->GetSetting("Hostpluginmythgame");
+ // hostparm.ThisHostpluginmythmovietime = gCoreContext->GetSetting("Hostpluginmythmovietime");
+ hostparm.ThisHostpluginmythmusic = gCoreContext->GetSetting("Hostpluginmythmusic");
+ hostparm.ThisHostpluginmythnews = gCoreContext->GetSetting("Hostpluginmythnews");
+// hostparm.ThisHostpluginmythphone = gCoreContext->GetSetting("Hostpluginmythphone");
+// hostparm.ThisHostpluginmythsmolt = gCoreContext->GetSetting("Hostpluginmythsmolt");
+// hostparm.ThisHostpluginmythvideo = gCoreContext->GetSetting("Hostpluginmythvideo");
+ hostparm.ThisHostpluginmythweather = gCoreContext->GetSetting("Hostpluginmythweather");
+ hostparm.ThisHostpluginmythzoneminder = gCoreContext->GetSetting("Hostpluginmythzoneminder");
+ hostparm.ThisHostpluginmythgamefceux = gCoreContext->GetSetting("Hostpluginmythgamefceux");
+ hostparm.ThisHostpluginmythgamesnes9x = gCoreContext->GetSetting("Hostpluginmythgamesnes9x");
+ hostparm.ThisHostpluginmythgameMame = gCoreContext->GetSetting("HostpluginmythgameMame");
+ hostparm.ThisHostpluginmythgameDolphin = gCoreContext->GetSetting("HostpluginmythgameDolphin");
+ hostparm.ThisHostpluginmythgameXe = gCoreContext->GetSetting("HostpluginmythgameXe");
+
+ hostparm.ThisHostpluginmythvideo_dvdcss = gCoreContext->GetSetting("Hostpluginmythvideo_dvdcss");
+ hostparm.ThisHostpluginmythappletrailers= gCoreContext->GetSetting("Hostpluginmythappletrailers");
+// hostparm.ThisHostpluginmythstream= gCoreContext->GetSetting("Hostpluginmythstream");
+// hostparm.ThisHostpluginmythvodka= gCoreContext->GetSetting("Hostpluginmythvodka");
+ hostparm.ThisHostMiro= gCoreContext->GetSetting("HostMiro");
+ hostparm.ThisHostpluginmythgameMednafen= gCoreContext->GetSetting("HostpluginmythgameMednafen");
+ hostparm.ThisHostpluginmythgameROMDB= gCoreContext->GetSetting("HostpluginmythgameROMDB");
+ hostparm.ThisHostpluginmythgameMupen64= gCoreContext->GetSetting("HostpluginmythgameMupen64");
+// hostparm.ThisHostXine = gCoreContext->GetSetting("HostXine");
+// hostparm.ThisHostwebmin = gCoreContext->GetSetting("Hostwebmin");
+// hostparm.ThisHostfuppes = gCoreContext->GetSetting("Hostfuppes");
+ hostparm.ThisHostHuluDesktop = gCoreContext->GetSetting("HostHuluDesktop");
+ hostparm.ThisHostwebonlinhes = gCoreContext->GetSetting("HostWebonlinhes");
+
+// hostparm.ThisHostfuppes = gCoreContext->GetSetting("Hostfuppes");
+
+
+
+
+ hostparm.ThisHostfoldingathome = gCoreContext->GetSetting("Hostfoldingathome");
+ hostparm.ThisHostfoldingusername = gCoreContext->GetSetting("Hostfoldingusername");
+ hostparm.ThisHostfoldingworksize = gCoreContext->GetSetting("Hostfoldingworksize");
+ hostparm.ThisHostDDnslogin = gCoreContext->GetSetting("HostDDnslogin");
+ hostparm.ThisHostDDnspassword = gCoreContext->GetSetting("HostDDnspassword");
+ hostparm.ThisHostDDnshostname = gCoreContext->GetSetting("HostDDnshostname");
+ hostparm.ThisHostDDnsEnable = gCoreContext->GetSetting("HostDDnsEnable");
+ hostparm.ThisHostscreensavertype = gCoreContext->GetSetting("Hostscreensavertype");
+ hostparm.ThisHostscreensaveridle = gCoreContext->GetSetting("Hostscreensaveridle");
+ if (gCoreContext->GetSetting("HostScreensaverBlank") == "1" )
+ hostparm.ThisHostscreensavertheme="Blank";
+ else if (gCoreContext->GetSetting("HostScreensaverRandom") == "1" )
+ hostparm.ThisHostscreensavertheme="Random";
+ else
+ {
+ if ( hostparm.ThisHostscreensavertype == "gscreensaver" )
+ hostparm.ThisHostscreensavertheme = gCoreContext->GetSetting("HostGScreensavertheme");
+ if ( hostparm.ThisHostscreensavertype == "xscreensaver" )
+ hostparm.ThisHostscreensavertheme = gCoreContext->GetSetting("HostXScreensavertheme");
+ }
+
+ hostparm.ThisHostTransmitproto_1 =
+ gCoreContext->GetSetting("HostTransmitproto_1");
+ hostparm.ThisHostTransmitproto_2 =
+ gCoreContext->GetSetting("HostTransmitproto_2");
+ hostparm.ThisHostTransmitproto_3 =
+ gCoreContext->GetSetting("HostTransmitproto_3");
+ hostparm.ThisHostTransmitproto_4 =
+ gCoreContext->GetSetting("HostTransmitproto_4");
+ hostparm.ThisHostBlasterType =
+ gCoreContext->GetSetting("HostBlasterType");
+ hostparm.ThisHostSerialPort_blasterlirc =
+ gCoreContext->GetSetting("HostSerialPort_blasterlirc");
+ hostparm.ThisHostnumblaster = "1";
+ if ( hostparm.ThisHostBlasterType == "CommandIR" )
+ hostparm.ThisHostnumblaster = "4" ;
+ if ( hostparm.ThisHostBlasterType == "MCE" )
+ hostparm.ThisHostnumblaster = "2" ;
+
+ hostparm.ThisHostTransmitDelay_1 =
+ gCoreContext->GetSetting("HostTransmitDelay_1");
+ hostparm.ThisHostTransmitSend_after_1 =
+ gCoreContext->GetSetting("HostTransmitSend_after_1");
+
+ hostparm.ThisHostTransmitDelay_2 =
+ gCoreContext->GetSetting("HostTransmitDelay_2");
+ hostparm.ThisHostTransmitSend_after_2 =
+ gCoreContext->GetSetting("HostTransmitSend_after_2");
+
+ hostparm.ThisHostTransmitDelay_3 =
+ gCoreContext->GetSetting("HostTransmitDelay_3");
+ hostparm.ThisHostTransmitSend_after_3 =
+ gCoreContext->GetSetting("HostTransmitSend_after_3");
+
+
+ hostparm.ThisHostTransmitDelay_4 =
+ gCoreContext->GetSetting("HostTransmitDelay_4");
+ hostparm.ThisHostTransmitSend_after_4 =
+ gCoreContext->GetSetting("HostTransmitSend_after_4");
+
+
+ hostparm.ThisHOSTrootSSH = gCoreContext->GetSetting("HOSTrootSSH");
+
+
+
+ hostparm.ThisHostSupplemental = gCoreContext->GetSetting("HostSupplemental");
+ hostparm.ThisHostWindowManager = gCoreContext->GetSetting("HostWindowManager");
+ hostparm.ThisHostEnhancedWMStyle = gCoreContext->GetSetting("HostEnhancedWMStyle");
+
+ hostparm.ThisHostVNCEnable = gCoreContext->GetSetting("HostVNCEnable");
+ hostparm.ThisHostVNCpassword = gCoreContext->GetSetting("HostVNCpassword");
+ hostparm.ThisHostXVNCEnable = gCoreContext->GetSetting("HostXVNCEnable");
+ hostparm.ThisHostXVNCpassword = gCoreContext->GetSetting("HostXVNCpassword");
+
+
+
+
+
+//______________________WRITE OUT THE FILE__________________________
+ QString systemheader;
+ QString divider;
+
+ QFile f( "/etc/systemconfig" );
+ if( !f.open( IO_WriteOnly ) )
+ std::cout << "Failed to open file /etc/systemconfig." << std::endl;
+ QTextStream myfile( &f );
+
+ divider = "#-----------------------------\n";
+ systemheader= "\n# Language \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "language=\"" + hostparm.language + "\"\n";
+
+ divider = "#-----------------------------\n";
+ systemheader= "\n# Hostype \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "SystemType=\"" + hostparm.ThisSystemType + "\"\n";
+ myfile << "dbhost=\"" + hostparm.ThisDBhost + "\"\n";
+ myfile << "RunFrontend=\"" + hostparm.ThisRunfrontend + "\"\n";
+ myfile << "UseMythWelcome=\"" + hostparm.ThisMythWelcome + "\"\n";
+
+ systemheader= "\n# Network config\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "hostname=\"" + hostparm.ThisHostName + "\"\n";
+ myfile << "default_interface=\"" + hostparm.ThisHostDefaultInterface + "\"\n";
+
+
+
+ if ( hostparm.ThisHostActiveonbooteth0 == "1" )
+ {
+ systemheader= "\n# Network config for eth0 \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Hostipeth0=\"" + hostparm.ThisHostIPeth0 + "\"\n";
+ myfile << "Hostnetmasketh0=\"" +hostparm.ThisHostNETMASKeth0 + "\"\n";
+ myfile << "HostDNSeth0=\"" +hostparm.ThisHostDNSeth0 + "\"\n";
+ myfile << "HostUSEDHCPeth0=\"" +hostparm.ThisHostUSEDHCPeth0 + "\"\n";
+ myfile << "HostGWeth0=\"" +hostparm.ThisHostGWeth0 + "\"\n";
+ myfile << "HostActiveeth0=\"" +hostparm.ThisHostActiveonbooteth0 + "\"\n";
+ myfile << "HostESSIDeth0=\"" + hostparm.ThisHOSTESSIDeth0 + "\"\n";
+ myfile << "HostUseEncryptioneth0=\"" + hostparm.ThisHostUseEncryptioneth0 + "\"\n";
+ myfile << "HostKeyeth0=\"" + hostparm.ThisHostkeyeth0 + "\"\n";
+ myfile << "HOST_iswirelesseth0=\"" + hostparm.ThisHOST_iswirelesseth0 + "\"\n";
+ myfile << "HostMTUeth0=\"" + hostparm.ThisHostMTUeth0 + "\"\n";
+ }
+
+ if ( hostparm.ThisHostActiveonbooteth1 == "1" )
+ {
+ systemheader= "\n# Network config for eth1 \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Hostipeth1=\"" + hostparm.ThisHostIPeth1 + "\"\n";
+ myfile << "Hostnetmasketh1=\"" +hostparm.ThisHostNETMASKeth1 + "\"\n";
+ myfile << "HostDNSeth1=\"" +hostparm.ThisHostDNSeth1 + "\"\n";
+ myfile << "HostUSEDHCPeth1=\"" +hostparm.ThisHostUSEDHCPeth1 + "\"\n";
+ myfile << "HostGWeth1=\"" +hostparm.ThisHostGWeth1 + "\"\n";
+ myfile << "HostActiveeth1=\"" +hostparm.ThisHostActiveonbooteth1 + "\"\n";
+ myfile << "HostESSIDeth1=\"" + hostparm.ThisHOSTESSIDeth1 + "\"\n";
+ myfile << "HostUseEncryptioneth1=\"" + hostparm.ThisHostUseEncryptioneth1 + "\"\n";
+ myfile << "HostKeyeth1=\"" + hostparm.ThisHostkeyeth1 + "\"\n";
+ myfile << "HOST_iswirelesseth1=\"" + hostparm.ThisHOST_iswirelesseth1 + "\"\n";
+ myfile << "HostMTUeth1=\"" + hostparm.ThisHostMTUeth1 + "\"\n";
+ }
+ if ( hostparm.ThisHostActiveonbootwlan0 == "1" )
+ {
+ systemheader= "\n# Network config for wlan0 \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Hostipwlan0=\"" + hostparm.ThisHostIPwlan0 + "\"\n";
+ myfile << "Hostnetmaskwlan0=\"" +hostparm.ThisHostNETMASKwlan0 + "\"\n";
+ myfile << "HostDNSwlan0=\"" +hostparm.ThisHostDNSwlan0 + "\"\n";
+ myfile << "HostUSEDHCPwlan0=\"" +hostparm.ThisHostUSEDHCPwlan0 + "\"\n";
+ myfile << "HostGWwlan0=\"" +hostparm.ThisHostGWwlan0 + "\"\n";
+ myfile << "HostActivewlan0=\"" +hostparm.ThisHostActiveonbootwlan0 + "\"\n";
+ myfile << "HostESSIDwlan0=\"" + hostparm.ThisHOSTESSIDwlan0 + "\"\n";
+ myfile << "HostUseEncryptionwlan0=\"" + hostparm.ThisHostUseEncryptionwlan0 + "\"\n";
+ myfile << "HostKeywlan0=\"" + hostparm.ThisHostkeywlan0 + "\"\n";
+ myfile << "HOST_iswirelesswlan0=\"" + hostparm.ThisHOST_iswirelesswlan0 + "\"\n";
+ myfile << "HostMTUwlan0=\"" + hostparm.ThisHostMTUwlan0 + "\"\n";
+ }
+ if ( hostparm.ThisHostActiveonbootwlan1 == "1" )
+ {
+ systemheader= "\n# Network config for wlan1 \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Hostipwlan1=\"" + hostparm.ThisHostIPwlan1 + "\"\n";
+ myfile << "Hostnetmaskwlan1=\"" +hostparm.ThisHostNETMASKwlan1 + "\"\n";
+ myfile << "HostDNSwlan1=\"" +hostparm.ThisHostDNSwlan1 + "\"\n";
+ myfile << "HostUSEDHCPwlan1=\"" +hostparm.ThisHostUSEDHCPwlan1 + "\"\n";
+ myfile << "HostGWwlan1=\"" +hostparm.ThisHostGWwlan1 + "\"\n";
+ myfile << "HostActivewlan1=\"" +hostparm.ThisHostActiveonbootwlan1 + "\"\n";
+ myfile << "HostESSIDwlan1=\"" + hostparm.ThisHOSTESSIDwlan1 + "\"\n";
+ myfile << "HostUseEncryptionwlan1=\"" + hostparm.ThisHostUseEncryptionwlan1 + "\"\n";
+ myfile << "HostKeywlan1=\"" + hostparm.ThisHostkeywlan1 + "\"\n";
+ myfile << "HOST_iswirelesswlan1=\"" + hostparm.ThisHOST_iswirelesswlan1 + "\"\n";
+ myfile << "HostMTUwlan1=\"" + hostparm.ThisHostMTUwlan1 + "\"\n";
+ }
+
+ if ( hostparm.ThisHostActiveonbootath0 == "1" )
+ {
+ systemheader= "\n# Network config for ath0 \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Hostipath0=\"" + hostparm.ThisHostIPath0 + "\"\n";
+ myfile << "Hostnetmaskath0=\"" +hostparm.ThisHostNETMASKath0 + "\"\n";
+ myfile << "HostDNSath0=\"" +hostparm.ThisHostDNSath0 + "\"\n";
+ myfile << "HostUSEDHCPath0=\"" +hostparm.ThisHostUSEDHCPath0 + "\"\n";
+ myfile << "HostGWath0=\"" +hostparm.ThisHostGWath0 + "\"\n";
+ myfile << "HostActiveath0=\"" +hostparm.ThisHostActiveonbootath0 + "\"\n";
+ myfile << "HostESSIDath0=\"" + hostparm.ThisHOSTESSIDath0 + "\"\n";
+ myfile << "HostUseEncryptionath0=\"" + hostparm.ThisHostUseEncryptionath0 + "\"\n";
+ myfile << "HostKeyath0=\"" + hostparm.ThisHostkeyath0 + "\"\n";
+ myfile << "HOST_iswirelessath0=\"" + hostparm.ThisHOST_iswirelessath0 + "\"\n";
+ myfile << "HostMTUath0=\"" + hostparm.ThisHostMTUath0 + "\"\n";
+ }
+
+
+ systemheader= "\n# Misc \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "timezone=\"" + hostparm.ThisTimeZone + "\"\n";
+ myfile << "Hostupdateplan=\"" + hostparm.ThisHostupdateplan + "\"\n";
+ myfile << "ShowTips=\"" + hostparm.ThisShowToolTips + "\"\n";
+
+
+ systemheader= "\n# Advanced \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "bewait=\"" + hostparm.ThisHostBEWait + "\"\n";
+ myfile << "ncidclient=\"" + hostparm.ThisHostncidClient + "\"\n";
+ myfile << "Runncidd=\"" + hostparm.ThisHostncidDaemon + "\"\n";
+ myfile << "nciddSerialPort=\"" + hostparm.ThisHostSerialPortncid + "\"\n";
+ myfile << "nciddDeviceNetCallerID=\"" + hostparm.ThisHostNcidDeviceNetCallerID + "\"\n";
+ myfile << "Usebootsplash=\"" + hostparm.ThisHostbootsplash + "\"\n";
+ myfile << "RemoteBackup=\"" + hostparm.ThisHostRemoteBackup + "\"\n";
+ myfile << "RemoteBackupDir=\"" + hostparm.ThisHostRemoteBackupDir + "\"\n";
+ // special keys
+ // myfile << "UseEvrouter=\"" + hostparm.ThisHostUseEvrouter + "\"\n";
+ // myfile << "EvrouterConfig=\"" + hostparm.ThisHostEvrouterConfig + "\"\n";
+ //run dhcp server
+ myfile << "RunDHCP=\"" + hostparm.ThisHostRunDHCP + "\"\n";
+ myfile << "UseMythWEB=\"" + hostparm.ThisMythWEB + "\"\n";
+
+ systemheader= "\n# fileshare \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "UseSamba=\"" + hostparm.ThisSamba + "\"\n";
+ myfile << "Samba_media=\"" + hostparm.ThisHostServiceSamba_media + "\"\n";
+ myfile << "Samba_mediareadonly=\"" + hostparm.ThisHostServiceSamba_write + "\"\n";
+ myfile << "Samba_home=\"" + hostparm.ThisHostServiceSamba_home + "\"\n";
+ myfile << "Samba_homereadonly=\"" + hostparm.ThisHostServiceSamba_writehome + "\"\n";
+ myfile << "Samba_domain=\"" + hostparm.ThisHostServiceSamba_domain + "\"\n";
+ myfile << "UseNFS=\"" + hostparm.ThisNFS + "\"\n";
+ myfile << "HaveCentralNFS=\"" + hostparm.ThisHaveNFS + "\"\n";
+ myfile << "NFSserver=\"" + hostparm.ThisNFSserver + "\"\n";
+ myfile << "NFSmount=\"" + hostparm.ThisNFSmountpoint + "\"\n";
+ myfile << "CentralNFSallhosts=\"" + hostparm.ThisHostCentralNFSallhosts + "\"\n";
+
+
+
+
+
+ //not used anymore
+ // myfile << "UseDHCP=\"" + hostparm.ThisDHCP + "\"\n";
+
+
+ systemheader= "\n# sleep \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "AutoShutdown=\"" + hostparm.ThisAutodown + "\"\n";
+ myfile << "Shutdowntime=\"" + hostparm.ThisShutdowntime + "\"\n";
+ myfile << "Shutdowntime2=\"" + hostparm.ThisShutdowntime2 + "\"\n";
+
+ //myfile << "Wakeuptime=\"" + hostparm.ThisWakeuptime + "\"\n";
+ //myfile << "UseNVRAM=\"" + hostparm.ThisUseNVRAM + "\"\n";
+ //myfile << "UseWOL=\"" + hostparm.ThisUseWOL + "\"\n";
+ //not used
+ //myfile << "KeepPackages=\"" + hostparm.ThisKeepPackage + "\"\n";
+ // myfile << "PKG_MIRROR=\"" + hostparm.ThisHostPKG_MIRROR + "\"\n";
+ //myfile << "zipcode=\"" + hostparm.ThisHostZipcode + "\"\n";
+
+
+
+
+
+
+ systemheader= "\n# X display settings \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "XIgnoreConfig=\"" + hostparm.ThisXIgnoreConfig + "\"\n";
+ myfile << "Xcardtype=\"" + hostparm.ThisXcardtype + "\"\n";
+ myfile << "XUseAdvanced=\"" + hostparm.ThisXUseAdvanced + "\"\n";
+ myfile << "Xres=\"" + hostparm.ThisXres + "\"\n";
+ myfile << "UseXLargeMouse=\"" + hostparm.ThisHostUseXLargeMouse + "\"\n";
+// myfile << "XIgnoreEDID=\"" + hostparm.ThisXIgnoreEDID + "\"\n";
+// myfile << "Xconnection=\"" + hostparm.ThisXconnection + "\"\n";
+// myfile << "XHsync=\"" + hostparm.ThisXHsync + "\"\n";
+// myfile << "XVrefresh=\"" + hostparm.ThisXVrefresh+ "\"\n";
+// myfile << "Xresadvanced=\"" + hostparm.ThisXresadvanced + "\"\n";
+// myfile << "XTVstandard=\"" + hostparm.ThisXTVstandard + "\"\n";
+// myfile << "XTVconnection=\"" + hostparm.ThisXTVconnection + "\"\n";
+// myfile << "XDisplaysize=\"" + hostparm.ThisXDisplaysize + "\"\n";
+// myfile << "XnVidia1080p=\"" + hostparm.ThisHostXNvidia1080p+ "\"\n";
+// myfile << "XnVidia1080i=\"" + hostparm.ThisHostXNvidia1080i+ "\"\n";
+// myfile << "XnVidia720p=\"" + hostparm.ThisHostXNvidia720p+ "\"\n";
+// myfile << "XnVidia480p=\"" + hostparm.ThisHostXNvidia480p+ "\"\n";
+
+ systemheader= "\n# Audio settings\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Audiotype=\"" + hostparm.ThisHostAudiotype + "\"\n";
+ myfile << "Audiotypeout=\"" + hostparm.ThisHostSoundTypeout + "\"\n";
+ myfile << "SoundDevice=\"" + hostparm.ThisHostSoundDevice+ "\"\n";
+// myfile << "syncXine=\"" + hostparm.ThisHostsyncXine + "\"\n";
+// myfile << "syncMplayer=\"" + hostparm.ThisHostsyncMplayer + "\"\n";
+// myfile << "syncMythMusic=\"" + hostparm.ThisHostsyncMythMusic + "\"\n";
+// myfile << "syncMythFrontend=\"" + hostparm.ThisHostsyncMythFrontend + "\"\n";
+
+
+ systemheader= "\n# Software settings\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "mytharchive=\"" + hostparm.ThisHostpluginmytharchive + "\"\n";
+ myfile << "mythbrowser=\"" + hostparm.ThisHostpluginmythbrowser + "\"\n";
+ myfile << "mythnetvision=\"" + hostparm.ThisHostpluginmythnetvision + "\"\n";
+ myfile << "mythgallery=\"" + hostparm.ThisHostpluginmythgallery + "\"\n";
+ myfile << "mythgame=\"" + hostparm.ThisHostpluginmythgame + "\"\n";
+ myfile << "mythmusic=\"" + hostparm.ThisHostpluginmythmusic + "\"\n";
+ myfile << "mythnews=\"" + hostparm.ThisHostpluginmythnews + "\"\n";
+ myfile << "mythzoneminder=\"" + hostparm.ThisHostpluginmythzoneminder + "\"\n";
+ myfile << "mythweather=\"" + hostparm.ThisHostpluginmythweather + "\"\n";
+ myfile << divider ;
+ //game emulator
+ myfile << "romdb=\"" + hostparm.ThisHostpluginmythgameROMDB + "\"\n";
+ myfile << "snes9x=\"" + hostparm.ThisHostpluginmythgamesnes9x + "\"\n";
+ myfile << "fceux=\"" + hostparm.ThisHostpluginmythgamefceux + "\"\n";
+ myfile << "mame=\"" + hostparm.ThisHostpluginmythgameMame + "\"\n";
+ myfile << "mednafen=\"" + hostparm.ThisHostpluginmythgameMednafen + "\"\n";
+ myfile << "mupen64=\"" + hostparm.ThisHostpluginmythgameMupen64 + "\"\n";
+ myfile << "dolphinemu=\"" + hostparm.ThisHostpluginmythgameDolphin + "\"\n";
+ myfile << "xe=\"" + hostparm.ThisHostpluginmythgameXe + "\"\n";
+ myfile << divider ;
+ //other
+ myfile << "dvdcss=\"" + hostparm.ThisHostpluginmythvideo_dvdcss + "\"\n";
+ myfile << "mythappletrailers=\"" + hostparm.ThisHostpluginmythappletrailers + "\"\n";
+
+ myfile << "miro=\"" + hostparm.ThisHostMiro + "\"\n";
+ myfile << "webonlinhes=\"" + hostparm.ThisHostwebonlinhes + "\"\n";
+ myfile << "huludesktop=\"" + hostparm.ThisHostHuluDesktop + "\"\n";
+ //myfile << "fuppes=\"" + hostparm.ThisHostfuppes + "\"\n";
+ myfile << "foldingathome=\"" + hostparm.ThisHostfoldingathome + "\"\n";
+ myfile << "foldingusername=\"" + hostparm.ThisHostfoldingusername + "\"\n";
+ myfile << "foldingworksize=\"" + hostparm.ThisHostfoldingworksize + "\"\n";
+ //myfile << "mythstream=\"" + hostparm.ThisHostpluginmythstream + "\"\n";
+ // myfile << "mythphone=\"" + hostparm.ThisHostpluginmythphone + "\"\n";
+ // myfile << "mythsmolt=\"" + hostparm.ThisHostpluginmythsmolt + "\"\n";
+ // myfile << "mythvideo=\"" + hostparm.ThisHostpluginmythvideo + "\"\n";
+ // myfile << "mythcontrols=\"" + hostparm.ThisHostpluginmythcontrols + "\"\n";
+ // myfile << "mythmovietime=\"" + hostparm.ThisHostpluginmythmovietime + "\"\n";
+ // myfile << "mythvodka=\"" +hostparm.ThisHostpluginmythvodka + "\"\n";
+ // myfile << "xine=\"" + hostparm.ThisHostXine + "\"\n";
+ // myfile << "webmin=\"" + hostparm.ThisHostwebmin + "\"\n";er + "\"\n";
+
+
+ systemheader="\n# ddns settings\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "DDnslogin=\"" + hostparm.ThisHostDDnslogin + "\"\n";
+ myfile << "DDnspassword=\"" + hostparm.ThisHostDDnspassword + "\"\n";
+ myfile << "DDnshostname=\"" + hostparm.ThisHostDDnshostname + "\"\n";
+ myfile << "DDnsEnable=\"" + hostparm.ThisHostDDnsEnable + "\"\n";
+
+ systemheader="\n# screensaver settings\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Screensavertype=\"" + hostparm.ThisHostscreensavertype + "\"\n";
+ myfile << "Screensaveridle=\"" + hostparm.ThisHostscreensaveridle + "\"\n";
+ myfile << "Screensavertheme=\"" + hostparm.ThisHostscreensavertheme + "\"\n";
+
+ systemheader="\n# IR settings\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "Remotetype=\"" + hostparm.ThisRemote + "\"\n";
+ myfile << "Remotebucket=\"" + hostparm.ThisHostRemotebucket + "\"\n";
+ myfile << "ReceiverType=\"" + hostparm.ThisReceiverType + "\"\n";
+ myfile << "HDHRlirc_device=\"" + hostparm.ThisHDHRlirc_device + "\"\n";
+ myfile << "HostLircWait=\"" + hostparm.ThisHostLircWait + "\"\n";
+
+ myfile << "ReceiverSerialport=\"" + hostparm.ThisHostSerialPortlirc + "\"\n";
+ myfile << "HostTransmitproto_1=\"" + hostparm.ThisHostTransmitproto_1 + "\"\n";
+ myfile << "HostTransmitproto_2=\"" + hostparm.ThisHostTransmitproto_2 + "\"\n";
+ myfile << "HostTransmitproto_3=\"" + hostparm.ThisHostTransmitproto_3 + "\"\n";
+ myfile << "HostTransmitproto_4=\"" + hostparm.ThisHostTransmitproto_4 + "\"\n";
+
+ myfile << "HostTransmitDelay_1=\"" + hostparm.ThisHostTransmitDelay_1 + "\"\n";
+ myfile << "HostTransmitDelay_2=\"" + hostparm.ThisHostTransmitDelay_2 + "\"\n";
+ myfile << "HostTransmitDelay_3=\"" + hostparm.ThisHostTransmitDelay_3 + "\"\n";
+ myfile << "HostTransmitDelay_4=\"" + hostparm.ThisHostTransmitDelay_4 + "\"\n";
+
+// myfile << "HostTransmitSend_after_1=\"" + hostparm.ThisHostTransmitSend_after_1 + "\"\n";
+// myfile << "HostTransmitSend_after_2=\"" + hostparm.ThisHostTransmitSend_after_2 + "\"\n";
+// myfile << "HostTransmitSend_after_3=\"" + hostparm.ThisHostTransmitSend_after_3 + "\"\n";
+// myfile << "HostTransmitSend_after_4=\"" + hostparm.ThisHostTransmitSend_after_4 + "\"\n";
+
+ myfile << "HostBlasterType=\"" + hostparm.ThisHostBlasterType + "\"\n";
+ myfile << "HostSerialPort_blasterlirc=\"" + hostparm.ThisHostSerialPort_blasterlirc + "\"\n";
+ myfile << "Hostnumblaster=\"" + hostparm.ThisHostnumblaster + "\"\n";
+ myfile << "LCDtype=\"" + hostparm.ThisHostLCDType + "\"\n";
+
+
+ systemheader="\n# user settings\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "rootSSH=\"" + hostparm.ThisHOSTrootSSH + "\"\n";
+
+ systemheader="\n# Supplemental\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "supplemental=\"" + hostparm.ThisHostSupplemental + "\"\n";
+ myfile << "windowmanager=\"" + hostparm.ThisHostWindowManager + "\"\n";
+ myfile << "EnhancedWMStyle=\"" + hostparm.ThisHostEnhancedWMStyle + "\"\n";
+
+ systemheader="\n# VNC\n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "vncenable=\"" + hostparm.ThisHostVNCEnable + "\"\n";
+ myfile << "vncpassword=\"" + hostparm.ThisHostVNCpassword + "\"\n";
+ myfile << "xvncenable=\"" + hostparm.ThisHostXVNCEnable + "\"\n";
+ myfile << "xvncpassword=\"" + hostparm.ThisHostXVNCpassword + "\"\n";
+
+ systemheader= "\n# webuser \n" ;
+ myfile << systemheader ;
+ myfile << divider ;
+ myfile << "UseMythWEB_auth=\"" + hostparm.ThisHostwebauth + "\"\n";
+
+
+
+ f.close();
+
+}
+
+
+MythInstallSettings::MythInstallSettings()
+{
+ VerticalConfigurationGroup* vcg = new VerticalConfigurationGroup(false,false,true,true);
+ VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true);
+ TransLabelSetting *deniedlabel = new TransLabelSetting();
+ deniedlabel->setValue(" Access to these settings is disabled.\n Access can be enabled in Access Settings." );
+ denied->addChild(deniedlabel);
+ if ( displaymysqlonly )
+ {
+ vcg->addChild(HostMysqlserverip_listbox());
+ vcg->addChild(ThemePainter());
+ addChild(vcg);
+ }
+ else
+ {
+ // This is needed to stop default=interface from being wiped every time
+ if ( gCoreContext->GetSetting("HostDefaulteth0") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth0";
+ else if ( gCoreContext->GetSetting("HostDefaulteth1") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth1";
+ else if ( gCoreContext->GetSetting("HostDefaultwlan0") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan0";
+ else if ( gCoreContext->GetSetting("HostDefaultwlan1") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan1";
+ else if ( gCoreContext->GetSetting("HostActiveonbooteth0") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth0";
+ else if ( gCoreContext->GetSetting("HostActiveonbooteth1") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth1";
+ else if ( gCoreContext->GetSetting("HostActiveonbootwlan0") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan0";
+ else if ( gCoreContext->GetSetting("HostActiveonbootwlan1") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan1";
+ else if ( gCoreContext->GetSetting("HostActiveonbootath0") == "1" )
+ hostparm.ThisHostDefaultInterface = "ath0";
+ else
+ hostparm.ThisHostDefaultInterface = "eth0";
+
+
+
+ vcg->setLabel(QObject::tr("Host Settings"));
+ // Check to see if screen should appear
+ if ( displayshownetwork )
+ {
+ //Check to see if screen is allowed to appear
+ if ( ((gCoreContext->GetSetting("Hostaccessnetwork")) == "0" ) )
+ {
+ denied ->setLabel(QObject::tr("Network Settings"));
+ addChild(denied);
+ }
+ else
+ {
+
+ hostparm.ThisHostnetOLD = gCoreContext->GetSetting("HostNetDevice");
+ QString s = "HostActiveonboot";
+ s+=hostparm.ThisHostnetOLD;
+ hostparm.ThisHostnetActiveOLD = gCoreContext->GetSetting(s);
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTNetDevice'; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+
+ if ( gCoreContext->GetSetting("HostDefaulteth0") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth0";
+ else if ( gCoreContext->GetSetting("HostDefaulteth1") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth1";
+ else if ( gCoreContext->GetSetting("HostDefaultwlan0") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan0";
+ else if ( gCoreContext->GetSetting("HostDefaultwlan1") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan1";
+ else if ( gCoreContext->GetSetting("HostActiveonbooteth0") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth0";
+ else if ( gCoreContext->GetSetting("HostActiveonbooteth1") == "1" )
+ hostparm.ThisHostDefaultInterface = "eth1";
+ else if ( gCoreContext->GetSetting("HostActiveonbootwlan0") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan0";
+ else if ( gCoreContext->GetSetting("HostActiveonbootwlan1") == "1" )
+ hostparm.ThisHostDefaultInterface = "wlan1";
+ else if ( gCoreContext->GetSetting("HostActiveonbootath0") == "1" )
+ hostparm.ThisHostDefaultInterface = "ath0";
+ else
+ hostparm.ThisHostDefaultInterface = "eth0";
+
+
+ NetworkOptionsFrame *networkoptionsframe = new NetworkOptionsFrame();
+ NetworkSettingsFrame *netsettingsframe = new NetworkSettingsFrame();
+
+ addChild(netsettingsframe);
+ addChild(networkoptionsframe);
+
+ };
+ }
+
+ if ( displayshowhostype )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccesshostype")) =="0" ))
+ {
+ denied ->setLabel(QObject::tr("Host Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ SystemtypeGroup *systemtypegroup = new SystemtypeGroup();
+ vcg->addChild(systemtypegroup);
+ addChild(vcg);
+ }
+ }
+
+ if ( displayremotesonly )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" ))
+ {
+ denied ->setLabel(QObject::tr("Remotes Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ IRFrame *irframe = new IRFrame();
+ addChild(irframe);
+ }
+ }
+
+ if ( displayshowadvancedX )
+ {
+ if ( ((gCoreContext->GetSetting("HostaccessadvancedX")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("Display Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ AdvancedXSettings *advancedXsettings = new AdvancedXSettings();
+ addChild(advancedXsettings);
+ }
+ }
+
+ if ( displayvnc )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessvnc")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("VNC Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ VNChostsettings* vnchostsettings= new VNChostsettings();
+ addChild(vnchostsettings);
+ }
+ }
+
+ if ( displayfileshare )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessfileshare")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("File Sharing Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ FileShareMainFrameClient *nfsclient = new FileShareMainFrameClient();
+ addChild(nfsclient);
+
+ FileShareMainFrameServer *fileserver = new FileShareMainFrameServer();
+ addChild(fileserver);
+ }
+ }
+
+ if ( displayshowmisc )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessmisc")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("Miscellanous"));
+ addChild(denied);
+ }
+ else
+ {
+ MiscMainFrame *miscsettings = new MiscMainFrame();
+ // MiscMainFrame2 *miscsettings2 = new MiscMainFrame2();
+ addChild(miscsettings);
+ // addChild(miscsettings2);
+ }
+ }
+
+ if ( displaysupplemental )
+ {
+ //JM VERBOSE(VB_IMPORTANT, "screensaver");
+ Supplementalhostsettings *supplemental = new Supplementalhostsettings();
+ addChild(supplemental);
+ }
+
+ if ( displayshowshutdown )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccesssleep")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("Shutdown Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ WakeSettings *wakesettings = new WakeSettings();
+ addChild(wakesettings);
+ }
+ }
+
+ if ( displayshowadvanced )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessadvanced")) == "0" ) )
+ {
+ denied ->setLabel(QObject::tr("Advanced Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ AdvancedSettings *advancedsettings = new AdvancedSettings();
+ AdvancedSettings_2 *advancedsettings_2 = new AdvancedSettings_2();
+
+ addChild(advancedsettings);
+ addChild(advancedsettings_2);
+ }
+ }
+
+ if ( displayshowsound )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccesssound")) =="0") )
+ {
+ denied ->setLabel(QObject::tr("Audio Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ //remove old sound card setting from the db. This is useful for when the saved setting is no longer valid for this machine.
+ // Later search the list and set the value to the old setting if found in the dropdown.
+ hostparm.OLDHostSoundOSSAnalog = gCoreContext->GetSetting("HostSoundOssAnalog");
+ hostparm.OLDHostSoundOSSDigital = gCoreContext->GetSetting("HostSoundOssDigital");
+ hostparm.OLDHostSoundALSAAnalog = gCoreContext->GetSetting("HostSoundALSAAnalog");
+ hostparm.OLDHostSoundALSADigital= gCoreContext->GetSetting("HostSoundALSADigital");
+
+
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssAnalog'; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+ query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSAAnalog'; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+ query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSADigital'; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+ query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssDigital'; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+
+ SoundSettings *soundsettings = new SoundSettings();
+ addChild(soundsettings);
+ }
+ }
+
+ if ( displayaccesscontrol )
+ {
+ VerticalConfigurationGroup* accessettings =
+ new VerticalConfigurationGroup(false,true,false,false);
+ ConfigurationGroup *GridAccess =
+ new GridConfigurationGroup(2,false,false,false,false);
+
+ GridAccess->addChild(Hostaccessadvanced());
+ GridAccess->addChild(Hostaccesssound());
+ GridAccess->addChild(HostaccessadvancedX());
+ GridAccess->addChild(Hostaccessddns());
+ GridAccess->addChild(Hostaccessfileshare());
+ GridAccess->addChild(Hostaccessmisc());
+ GridAccess->addChild(Hostaccessnetwork());
+ GridAccess->addChild(Hostaccessplugins());
+ GridAccess->addChild(Hostaccessir());
+ GridAccess->addChild(Hostaccessscreensaver());
+//screensaver
+ GridAccess->addChild(Hostaccessvnc());
+ GridAccess->addChild(Hostaccesssleep());
+// GridAccess->addChild(Hostaccessuser());
+ GridAccess->addChild(Hostaccesswebuser());
+
+// accessettings->addChild(Hostaccessnetwork());
+ accessettings->addChild(new ACCESShostsettings);
+ accessettings->addChild(GridAccess);
+ accessettings ->setLabel(QObject::tr("Access Settings"));
+ addChild(accessettings);
+ }
+
+ if ( displayplugins )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("Programs"));
+ addChild(denied);
+ }
+ else
+ {
+ ConfigurationGroup *GridShowPlugin = new GridConfigurationGroup(2,false);
+ GridShowPlugin->setLabel(QObject::tr("Programs (1/4)"));
+ GridShowPlugin->addChild(Hostpluginmytharchive());
+ GridShowPlugin->addChild(Hostpluginmythbrowser());
+ //GridShowPlugin->addChild(Hostpluginmythcontrols());
+ GridShowPlugin->addChild(Hostpluginmythnetvision());
+ GridShowPlugin->addChild(Hostpluginmythgallery());
+ //GridShowPlugin->addChild(Hostpluginmythmovietime());
+
+ //ConfigurationGroup *GridShowPlugin2 = new GridConfigurationGroup(2);
+ GridShowPlugin->addChild(Hostpluginmythmusic());
+ GridShowPlugin->addChild(Hostpluginmythnews());
+ //GridShowPlugin2->addChild(Hostpluginmythphone());
+ //GridShowPlugin2->addChild(Hostpluginmythsmolt());
+ GridShowPlugin->addChild(Hostpluginmythweather());
+ GridShowPlugin->addChild(Hostpluginmythzoneminder());
+
+
+// ConfigurationGroup *Mythvideoplugin = new HorizontalConfigurationGroup();
+// Mythvideoplugin->addChild(Hostpluginmythvideo());
+// Mythvideoplugin->addChild(Hostpluginmythvideo_dvdcss());
+
+
+ ConfigurationGroup *GridShowPlugin3 = new VerticalConfigurationGroup(false,true);
+ GridShowPlugin3->setLabel(QObject::tr("Programs (2/4)"));
+ GridShowPlugin3->addChild(new MythGamesettings);
+ GridShowPlugin3->addChild(Hostpluginmythvideo_dvdcss());
+ //GridShowPlugin3->addChild(Mythvideoplugin);
+
+ addChild(GridShowPlugin);
+// addChild(GridShowPlugin2);
+ addChild(GridShowPlugin3);
+ }
+ }
+
+ if ( displaysoftware )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("Programs"));
+ addChild(denied);
+ }
+ else
+ {
+ ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false);
+ GridShowPlugin4->setLabel(QObject::tr("Programs (3/4)"));
+ GridShowPlugin4->addChild(Hostpluginmythappletrailers());
+ //GridShowPlugin4->addChild(Hostpluginmythstream());
+ //GridShowPlugin4->addChild(Hostpluginmythvodka());
+ GridShowPlugin4->addChild(HostMiro());
+ //GridShowPlugin4->addChild(HostXine());
+ //GridShowPlugin4->addChild(Hostwebmin());
+ //GridShowPlugin4->addChild(Hostfuppes());
+ GridShowPlugin4->addChild(HostHuluDesktop());
+ GridShowPlugin4->addChild(Hostwebonlinhes());
+
+
+ ConfigurationGroup *GridShowPlugin5 = new GridConfigurationGroup(2);
+ //GridShowPlugin5->addChild(Hostfuppes());
+
+ ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true);
+ GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)"));
+ GridShowPlugin6->addChild(Hostfoldingathome());
+ GridShowPlugin6->addChild(Hostfoldingusername());
+ GridShowPlugin6->addChild(Hostfoldingworksize());
+
+ addChild(GridShowPlugin4);
+ //addChild(GridShowPlugin5);
+ addChild(GridShowPlugin6);
+ }
+ }
+ if ( displayuser )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessuser")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("User Accounts"));
+ addChild(denied);
+ }
+ else
+ {
+ UserManagement *usermanagement = new UserManagement();
+ addChild(usermanagement);
+ }
+ }
+
+ if ( displaywebuser )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccesswebuser")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("Web Security Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ WebPasswordFrame *webpasswordframe = new WebPasswordFrame();
+ addChild(webpasswordframe);
+ }
+
+ }
+
+ if ( displayddns )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessddns")) == "0" ))
+ {
+ denied ->setLabel(QObject::tr("DDNS Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ DDnssettings *ddnsframe = new DDnssettings();
+ addChild(ddnsframe);
+ }
+ }
+
+ if ( displayinfrared )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" ))
+ {
+ denied ->setLabel(QObject::tr("Remotes Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ IRFrame *irframe = new IRFrame();
+ IR_TransmitFrame *transmitframe = new IR_TransmitFrame();
+ LCDFrame *lcdframe = new LCDFrame();
+ addChild(irframe);
+ addChild(transmitframe);
+ addChild(lcdframe);
+ }
+ }
+
+ if ( displayscreensaver )
+ {
+ if ( ((gCoreContext->GetSetting("Hostaccessscreensaver")) =="0" ))
+ {
+ denied ->setLabel(QObject::tr("Screensaver Settings"));
+ addChild(denied);
+ }
+ else
+ {
+ //JM VERBOSE(VB_IMPORTANT, "screensaver");
+ Screensaverhostsettings *screensaver = new Screensaverhostsettings();
+ addChild(screensaver);
+ }
+ }
+
+
+ }
+
+};
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h
new file mode 100755
index 0000000..23c00f0
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h
@@ -0,0 +1,589 @@
+#ifndef WELCOMESETTINGS_H
+#define WELCOMESETTINGS_H
+
+#include <settings.h>
+#include "mythdialogs.h"
+#include "libmyth/mythdialogs.h"
+#include "libmyth/mythwidgets.h"
+#include "compat-mv.h"
+
+class SystemtypeGroup: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ SystemtypeGroup();
+ HostComboBox *HostSystemType;
+public slots:
+ void SystemtypeHelp();
+};
+
+//-------------------------------------------
+class NetworkSettingseth0:
+ public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ NetworkSettingseth0();
+
+ HostLineEdit *HostIPeth0;
+ HostComboBox *HostNETMASKeth0;
+ HostLineEdit *HostGWeth0;
+ HostLineEdit *HostDNSeth0;
+ HostCheckBox *HostActiveonbooteth0;
+ HostCheckBox *HostUseDHCPeth0 ;
+ HostCheckBox *HostDefaulteth0;
+ TransButtonSetting *wirelessbuttoneth0;
+
+signals:
+ void eth0_is_default(void);
+public slots:
+ void eth0_wireless_settings();
+ void eth0_disable_others();
+ void eth0_disabled();
+ void eth0_wireless_disable();
+};
+
+class eth0options : public ConfigurationWizard
+{
+public:
+ eth0options();
+};
+
+
+class NetworkSettingseth1:
+ public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ NetworkSettingseth1();
+
+ HostLineEdit *HostIPeth1;
+ HostComboBox *HostNETMASKeth1;
+ HostLineEdit *HostGWeth1;
+ HostLineEdit *HostDNSeth1;
+ HostCheckBox *HostActiveonbooteth1;
+ HostCheckBox *HostUseDHCPeth1 ;
+ HostCheckBox *HostDefaulteth1;
+ TransButtonSetting *wirelessbuttoneth1;
+signals:
+ void eth1_is_default(void);
+public slots:
+ void eth1_wireless_settings();
+ void eth1_disable_others();
+ void eth1_disabled();
+ void eth1_wireless_disable();
+};
+
+class eth1options : public ConfigurationWizard
+{
+public:
+ eth1options();
+};
+
+
+
+class NetworkSettingswlan0:
+ public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ NetworkSettingswlan0();
+
+ HostLineEdit *HostIPwlan0;
+ HostComboBox *HostNETMASKwlan0;
+ HostLineEdit *HostGWwlan0;
+ HostLineEdit *HostDNSwlan0;
+ HostCheckBox *HostActiveonbootwlan0;
+ HostCheckBox *HostUseDHCPwlan0 ;
+ HostCheckBox *HostDefaultwlan0;
+ TransButtonSetting *wirelessbuttonwlan0;
+signals:
+ void wlan0_is_default(void);
+public slots:
+ void wlan0_wireless_settings();
+ void wlan0_disable_others();
+ void wlan0_disabled();
+ void wlan0_wireless_disable();
+};
+
+class Wlan0options : public ConfigurationWizard
+{
+public:
+ Wlan0options();
+};
+
+
+class NetworkSettingswlan1:
+ public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ NetworkSettingswlan1();
+
+ HostLineEdit *HostIPwlan1;
+ HostComboBox *HostNETMASKwlan1;
+ HostLineEdit *HostGWwlan1;
+ HostLineEdit *HostDNSwlan1;
+ HostCheckBox *HostActiveonbootwlan1;
+ HostCheckBox *HostUseDHCPwlan1 ;
+ HostCheckBox *HostDefaultwlan1;
+ TransButtonSetting *wirelessbuttonwlan1;
+signals:
+ void wlan1_is_default(void);
+public slots:
+ void wlan1_wireless_settings();
+ void wlan1_disable_others();
+ void wlan1_disabled();
+ void wlan1_wireless_disable();
+};
+
+class wlan1options : public ConfigurationWizard
+{
+public:
+ wlan1options();
+};
+
+
+
+class NetworkSettingsath0:
+ public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ NetworkSettingsath0();
+
+ HostLineEdit *HostIPath0;
+ HostComboBox *HostNETMASKath0;
+ HostLineEdit *HostGWath0;
+ HostLineEdit *HostDNSath0;
+ HostCheckBox *HostActiveonbootath0;
+ HostCheckBox *HostUseDHCPath0 ;
+ HostCheckBox *HostDefaultath0;
+ TransButtonSetting *wirelessbuttonath0;
+signals:
+ void ath0_is_default(void);
+public slots:
+ void ath0_wireless_settings();
+ void ath0_disable_others();
+ void ath0_disabled();
+ void ath0_wireless_disable();
+};
+
+class ath0options : public ConfigurationWizard
+{
+public:
+ ath0options();
+};
+
+class NetworkOptionsFrame: public VerticalConfigurationGroup {
+ Q_OBJECT
+public:
+ NetworkOptionsFrame();
+ TransButtonSetting *FetchDhcpHostnameButton;
+ TransLabelSetting *networklabel;
+ HostComboBox *HostMyhostname;
+ QString find_hostname();
+public slots:
+ void fetch_hostname();
+};
+
+
+//--------------------------------------------
+
+
+class SoundSettings: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ SoundSettings();
+ HostComboBox *HostAudiotype;
+ HostCheckBox *HostsyncXine;
+ HostCheckBox *HostsyncMplayer;
+ HostCheckBox *HostsyncMythMusic;
+ HostCheckBox *HostsyncMythFrontend;
+
+
+signals:
+ void oss_sig(void);
+ void alsa_sig(void);
+public slots:
+ void soundossgathersettings_1();
+ void soundalsagathersettings_1();
+
+};
+
+
+class SoundOSSsettings: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ SoundOSSsettings();
+ HostComboBox *HostSoundOssAnalog;
+ HostComboBox *HostSoundOssDigital;
+ HostComboBox *HostSoundTypeout;
+ void fillossselection();
+public slots:
+ void soundossgathersettings();
+ void loadossdriver();
+};
+
+class SoundALSAsettings: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ SoundALSAsettings();
+ HostComboBox *HostSoundALSAAnalog;
+ HostComboBox *HostSoundALSADigital;
+ HostComboBox *HostSoundALSATypeout;
+ void fillALSAselection();
+public slots:
+ void soundalsagathersettings();
+ void loadalsadriver();
+
+};
+
+
+//############################################
+class MythInstallSettings: public ConfigurationWizard
+{
+
+public:
+ MythInstallSettings();
+ void testme();
+private:
+ MythPopupBox *popup;
+
+};
+/*
+#include "mythstorage.h"
+
+class MPUBLIC ImageSelectSetting: public SelectSetting {
+ Q_OBJECT
+public:
+ ImageSelectSetting(Storage *_storage) :
+ SelectSetting(_storage),
+ bxwidget(NULL), imagelabel(NULL), combo(NULL),
+ m_hmult(1.0f), m_wmult(1.0f) { }
+ virtual QWidget* configWidget(ConfigurationGroup *cg, QWidget* parent,
+ const char* widgetName = 0);
+ virtual void widgetInvalid(QObject *obj);
+ virtual void deleteLater(void);
+ virtual void setHelpText(const QString &str);
+
+ virtual void addImageSelection(const QString& label,
+ QImage* image,
+ QString value=QString::null,
+ bool select=false);
+
+protected slots:
+ void imageSet(int);
+
+protected:
+ void Teardown(void);
+ virtual ~ImageSelectSetting();
+
+protected:
+ vector<QImage*> images;
+ QWidget *bxwidget;
+ QLabel *imagelabel;
+ MythComboBox *combo;
+ float m_hmult, m_wmult;
+};
+
+
+class MPUBLIC HostImageSelect : public ImageSelectSetting, public HostDBStorage
+{
+public:
+ HostImageSelect(const QString &name) :
+ ImageSelectSetting(this), HostDBStorage(this, name) { }
+};*/
+
+
+class HostRemoteType: public HostImageSelect {
+public:
+ HostRemoteType();
+};
+
+
+
+#define MV_ROOT "/usr/MythVantage/"
+int runsettings(bool = false , bool = false , bool = false ,bool = false ,bool = false, bool = false,bool = false,bool = false , bool = false , bool = false , bool = false, bool = false , bool = false , bool = false , bool = false, bool = false , bool = false , bool = false , bool = false, bool = false);
+//void ReadDDCifno(void);
+void run_systemconfig(QString,bool = false,QString = "");
+void writesettings();
+
+//void testXconfiguration();
+
+
+
+
+
+struct HostParms
+{
+
+ QString language;
+ QString ThisHostName;
+ //QString ThisHostDHCPhostname;
+
+ QString ThisHostIP;
+ QString ThisNETMASK;
+ QString ThisGW;
+ QString ThisDNS;
+ QString ThisDHCP;
+ QString ThisHostnetOLD;
+ QString ThisHostnetActiveOLD;
+
+ QString ThisHostDefaultInterface;
+ QString ThisHostIPeth0;
+ QString ThisHostNETMASKeth0;
+ QString ThisHostDNSeth0;
+ QString ThisHostUSEDHCPeth0;
+ QString ThisHostGWeth0;
+ QString ThisHOST_iswirelesseth0;
+ QString ThisHostActiveonbooteth0;
+ QString ThisHOSTESSIDeth0;
+ QString ThisHostUseEncryptioneth0;
+ QString ThisHostkeyeth0;
+ QString ThisHostMTUeth0;
+
+
+ QString ThisHostIPeth1;
+ QString ThisHostNETMASKeth1;
+ QString ThisHostDNSeth1;
+ QString ThisHostUSEDHCPeth1;
+ QString ThisHostGWeth1;
+ QString ThisHostActiveonbooteth1 ;
+ QString ThisHOST_iswirelesseth1;
+ QString ThisHOSTESSIDeth1;
+ QString ThisHostUseEncryptioneth1;
+ QString ThisHostkeyeth1;
+ QString ThisHostMTUeth1;
+
+ QString ThisHostIPwlan0;
+ QString ThisHostNETMASKwlan0;
+ QString ThisHostDNSwlan0;
+ QString ThisHostUSEDHCPwlan0;
+ QString ThisHostGWwlan0;
+ QString ThisHostActiveonbootwlan0;
+ QString ThisHOST_iswirelesswlan0;
+ QString ThisHOSTESSIDwlan0;
+ QString ThisHostUseEncryptionwlan0;
+ QString ThisHostkeywlan0;
+ QString ThisHostMTUwlan0;
+
+
+ QString ThisHostIPwlan1;
+ QString ThisHostNETMASKwlan1;
+ QString ThisHostDNSwlan1;
+ QString ThisHostUSEDHCPwlan1;
+ QString ThisHostGWwlan1;
+ QString ThisHostActiveonbootwlan1;
+ QString ThisHOST_iswirelesswlan1;
+ QString ThisHOSTESSIDwlan1;
+ QString ThisHostUseEncryptionwlan1;
+ QString ThisHostkeywlan1;
+ QString ThisHostMTUwlan1;
+
+ QString ThisHostIPath0;
+ QString ThisHostNETMASKath0;
+ QString ThisHostDNSath0;
+ QString ThisHostUSEDHCPath0;
+ QString ThisHostGWath0;
+ QString ThisHostActiveonbootath0;
+ QString ThisHOST_iswirelessath0;
+ QString ThisHOSTESSIDath0;
+ QString ThisHostUseEncryptionath0;
+ QString ThisHostkeyath0;
+ QString ThisHostMTUath0;
+
+
+ QString ThisRemote;
+ QString ThisHostRemotebucket;
+
+ QString ThisTimeZone;
+ QString ThisSamba;
+ QString ThisHostServiceSamba_media;
+ QString ThisHostServiceSamba_home;
+ QString ThisHostServiceSamba_writehome;
+ QString ThisHostServiceSamba_write;
+ QString ThisHostServiceSamba_domain;
+ QString ThisNFS;
+ QString ThisMythWEB;
+ QString ThisHostwebauth;
+ // QString ThisHostServiceHobbit;
+ // QString ThisHostServiceRRD;
+
+ QString ThisHostRunDHCP;
+ QString ThisSystemType;
+// QString ThisBlaster;
+
+ QString ThisHostTransmitproto_1;
+ QString ThisHostTransmitproto_2;
+ QString ThisHostTransmitproto_3;
+ QString ThisHostTransmitproto_4;
+ QString ThisHostBlasterType;
+ QString ThisHostSerialPort_blasterlirc;
+ QString ThisHostnumblaster;
+ QString ThisHostTransmitDelay_1;
+ QString ThisHostTransmitSend_after_1;
+ QString ThisHostTransmitDelay_2;
+ QString ThisHostTransmitSend_after_2;
+ QString ThisHostTransmitDelay_3;
+ QString ThisHostTransmitSend_after_3;
+ QString ThisHostTransmitDelay_4;
+ QString ThisHostTransmitSend_after_4;
+
+
+
+
+
+
+
+ QString ThisReceiverType;
+ QString ThisHDHRlirc_device;
+ QString ThisHostLircWait;
+ QString ThisHostSerialPortlirc;
+ QString ThisHostUseEvrouter;
+ QString ThisHostEvrouterConfig;
+ QString ThisDBhost;
+ QString ThisXres;
+
+
+
+ QString ThisHostBEWait;
+ QString ThisHostUseXLargeMouse;
+ QString ThisShutdowntime;
+ QString ThisShutdowntime2;
+ QString ThisWakeuptime;
+ QString ThisAutodown;
+ QString ThisUseNVRAM;
+ QString ThisUseWOL;
+ QString ThisKeepPackage;
+ QString ThisMythWelcome;
+ QString ThisHaveNFS;
+ QString ThisNFSserver;
+ QString ThisNFSmountpoint;
+ QString ThisHostCentralNFSallhosts;
+ QString ThisHostupdateplan;
+ // QString ThisOSS;
+ QString ThisShowToolTips;
+ // QString ThisHostPKG_MIRROR;
+ QString ThisRunfrontend;
+ QString ThisHostZipcode;
+ QString ThisHostncidClient;
+ QString ThisHostncidDaemon;
+ QString ThisHostSerialPortncid;
+ QString ThisHostNcidDeviceNetCallerID;
+
+ QString ThisHostbootsplash;
+ QString ThisXIgnoreConfig;
+ QString ThisXcardtype;
+ QString ThisXUseAdvanced;
+ QString ThisXIgnoreEDID;
+ QString ThisXconnection;
+ QString ThisXHsync;
+ QString ThisXVrefresh;
+ QString ThisXresadvanced;
+ QString ThisXTVstandard;
+ QString ThisXTVconnection;
+ QString ThisXDisplaysize ;
+
+ QString ThisHostXNvidia1080p;
+ QString ThisHostXNvidia1080i;
+ QString ThisHostXNvidia720p;
+ QString ThisHostXNvidia480p;
+ QString ThisHostAudiotype;
+
+ QString ThisHostSoundTypeout;
+ QString ThisHostSoundOSSAnalog;
+ QString OLDHostSoundOSSAnalog;
+ QString ThisHostSoundOSSDigital;
+ QString OLDHostSoundOSSDigital;
+
+ QString ThisHostSoundDigital;
+ QString ThisHostSoundDevice;
+
+ QString ThisHostSoundALSAAnalog;
+ QString OLDHostSoundALSAAnalog;
+ QString ThisHostSoundALSADigital;
+ QString OLDHostSoundALSADigital;
+ QString ThisHostSoundALSATypeout;
+
+
+ QString ThisHostsyncXine;
+ QString ThisHostsyncMplayer;
+ QString ThisHostsyncMythMusic;
+ QString ThisHostsyncMythFrontend;
+ QString ThisHostLCDType;
+ QString ThisHostRemoteBackup;
+ QString ThisHostRemoteBackupDir;
+ QString ThisHostpluginmytharchive;
+ QString ThisHostpluginmythbrowser;
+ QString ThisHostpluginmythcontrols;
+ QString ThisHostpluginmythnetvision;
+ QString ThisHostpluginmythgallery;
+ QString ThisHostpluginmythgame;
+ QString ThisHostpluginmythmovietime;
+ QString ThisHostpluginmythmusic;
+ QString ThisHostpluginmythnews;
+ QString ThisHostpluginmythphone;
+ QString ThisHostpluginmythsmolt;
+ QString ThisHostpluginmythvideo;
+ QString ThisHostpluginmythweather;
+ QString ThisHostpluginmythzoneminder;
+
+
+
+ QString ThisHostpluginmythvideo_dvdcss;
+ QString ThisHostpluginmythappletrailers;
+ QString ThisHostpluginmythstream;
+ QString ThisHostpluginmythvodka;
+
+ QString ThisHostMiro;
+ QString ThisHostwebonlinhes;
+ QString ThisHostHuluDesktop;
+
+ QString ThisHostpluginmythgameMame;
+ QString ThisHostpluginmythgamefceux;
+ QString ThisHostpluginmythgamesnes9x;
+ QString ThisHostpluginmythgameMednafen;
+ QString ThisHostpluginmythgameROMDB;
+ QString ThisHostpluginmythgameMupen64;
+ QString ThisHostpluginmythgameDolphin;
+ QString ThisHostpluginmythgameXe;
+
+// QString ThisHostXine;
+// QString ThisHostwebmin;
+// QString ThisHostfuppes;
+ QString ThisHostfoldingathome;
+ QString ThisHostfoldingusername;
+ QString ThisHostfoldingworksize;
+
+ QString ThisHostDDnslogin;
+ QString ThisHostDDnspassword;
+ QString ThisHostDDnshostname;
+ QString ThisHostDDnsEnable;
+ QString ThisHostscreensavertype;
+ QString ThisHostscreensaveridle;
+ QString ThisHostscreensavertheme;
+ QString ThisHOSTrootSSH;
+ bool displayshowadvancedX;
+
+ // supplemental
+ QString ThisHostSupplemental;
+ QString ThisHostWindowManager;
+ QString ThisHostEnhancedWMStyle;
+
+ //VNC
+ QString ThisHostVNCEnable;
+ QString ThisHostVNCpassword;
+ QString ThisHostXVNCEnable;
+ QString ThisHostXVNCpassword;
+
+};
+
+struct DDCinfo
+{
+ QString XVrefresh;
+ QString XHsync;
+ QString Displaysize;
+};
+
+
+
+
+
+
+
+#endif
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp
new file mode 100755
index 0000000..fa16918
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp
@@ -0,0 +1,597 @@
+//#include <qapplication.h>
+//Added by qt3to4:
+#include <Q3TextStream>
+
+
+#include "installdialog.h"
+#include "installsettings.h"
+#include "password_manage.h"
+#include "autocard.h"
+#include "settemplate.h"
+
+
+
+
+// Qt
+#include <QApplication>
+#include <QFileInfo>
+#include <QDir>
+
+
+
+#include <cstdlib>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+
+
+#include <stdio.h>
+
+//MythTV
+#include "langsettings.h"
+#include "mythcontext.h"
+#include "mythversion.h"
+#include "mythtranslation.h"
+#include "mythdbcon.h"
+#include "exitcodes.h"
+#include "compat.h"
+#include "lcddevice.h"
+#include "commandlineparser.h"
+#include "mythlogging.h"
+#include "dialogbox.h"
+
+
+// libmythui
+#include "mythmainwindow.h"
+#include "mythuihelper.h"
+
+
+//??
+#include "myththemebase.h"
+
+
+HostParms hostparm;
+DDCinfo ddcinfo;
+
+
+void initKeys(void)
+{
+ REG_KEY("Welcome", "STARTXTERM", "Open an Xterm window", "F12");
+ REG_KEY("Welcome", "SHOWSETTINGS", "Show Mythshutdown settings", "F11");
+}
+
+int main(int argc, char **argv)
+{
+ bool showLang = false;
+ bool bShowSettings = false;
+ bool bShowNetwork = false;
+ bool bShowHostype = false;
+ bool bShowMisc = false;
+ bool bShowshutdown = false;
+ bool bShowadvanced = false;
+ bool bShowsound = false;
+ bool bShowadvancedX = false;
+ bool bShowAccesscontrol = false;
+ bool bShowplugins = false;
+ bool bShowsoftware = false;
+ bool bShowTemplate = false;
+ bool bShowuser = false;
+ bool bShowwebuser = false;
+ bool bRunSetup = false;
+ bool bShowHelp = false;
+ bool bShowReadme = false;
+ bool bShowddns = false;
+ bool bShowinfrared = false;
+ bool bShowscreensaver = false;
+ bool bShowquestion = false;
+ bool bShowsupplemental = false;
+ bool bShowremotes_only = false;
+ bool bShowvnc = false;
+ bool bShowFileshare = false;
+
+ QStringList template_c_line ;
+ QString modulelist = "" ;
+ QString templateop="";
+ QString templatename="";
+ QString templatehostname="";
+ QString question;
+
+
+ int FRONTEND_EXIT_NO_MYTHCONTEXT = 1;
+ int FRONTEND_EXIT_INVALID_CMDLINE =1 ;
+ QApplication a(argc, argv);
+ QCoreApplication::setApplicationName("mythinstall");
+
+ // Check command line arguments
+ MythInstallCommandLineParser cmdline;
+ int retval;
+ if ((retval = cmdline.ConfigureLogging()) != GENERIC_EXIT_OK)
+ return retval;
+
+ if (!cmdline.Parse(argc, argv))
+ {
+ cmdline.PrintHelp();
+ return 4;
+ return GENERIC_EXIT_INVALID_CMDLINE;
+ }
+
+ if (cmdline.toBool("showhelp"))
+ {
+ cmdline.PrintHelp();
+ return GENERIC_EXIT_OK;
+ }
+
+ if (cmdline.toBool("showversion"))
+ {
+ cmdline.PrintVersion();
+ return GENERIC_EXIT_OK;
+ }
+//--------------------Start of real stuff---------------------
+ gContext = new MythContext(MYTH_BINARY_VERSION);
+
+ if (!gContext->Init())
+ {
+ LOG(VB_GENERAL, LOG_ERR,
+ "mythinstall: Could not initialize MythContext. Exiting.");
+ return GENERIC_EXIT_NO_MYTHCONTEXT;
+ }
+
+ if (!MSqlQuery::testDBConnection())
+ {
+ LOG(VB_GENERAL, LOG_ERR,
+ "mythinstall: Could not open the database. Exiting.");
+ return -1;
+ }
+
+ if (cmdline.toBool("screen"))
+ {
+ bShowSettings = true;
+ LOG(VB_GENERAL, LOG_INFO, QString("mythinstall: Screen stuff"));
+ QString tmpArg = (cmdline.toString("screen")) ;
+ QStringList pairs = QStringList::split(",", tmpArg);
+ for (unsigned int index = 0; index < pairs.size(); ++index)
+ {
+ if ( pairs[index] == "network" )
+ {
+ bShowNetwork = true;
+ modulelist.append("network,");
+ }
+ else if ( pairs[index] == "misc" )
+ {
+ bShowMisc = true;
+ modulelist.append("misc,");
+ }
+ else if ( pairs[index] == "sleep" )
+ {
+ bShowshutdown = true;
+ modulelist.append("sleep,");
+ }
+ else if ( pairs[index] == "hostype" )
+ {
+ bShowHostype = true;
+ modulelist.append("hostype,");
+ }
+ else if ( pairs[index] == "advanced" )
+ {
+ bShowadvanced = true;
+ modulelist.append("advanced,");
+ }
+ else if ( pairs[index] == "sound" )
+ {
+ bShowsound = true;
+ modulelist.append("audio,");
+ }
+ else if ( pairs[index] == "advancedX" )
+ {
+ bShowadvancedX = true;
+ modulelist.append("advancedX,");
+ }
+ else if ( pairs[index] == "accesscontrol" )
+ {
+ bShowAccesscontrol = true;
+ modulelist.append("accesscontrol,");
+ }
+ else if ( pairs[index] == "plugins" )
+ {
+ bShowplugins = true;
+ modulelist.append("plugins,");
+ }
+ else if ( pairs[index] == "software" )
+ {
+ bShowsoftware = true;
+ modulelist.append("software,");
+ }
+ else if ( pairs[index] == "user" )
+ {
+ bShowuser = true;
+ modulelist.append("user,");
+ }
+ else if ( pairs[index] == "webuser" )
+ {
+ bShowwebuser = true;
+ modulelist.append("webuser,");
+ }
+ else if ( pairs[index] == "ddns" )
+ {
+ bShowddns = true;
+ modulelist.append("ddns,");
+ }
+ else if ( pairs[index] == "ir" )
+ {
+ bShowinfrared = true;
+ modulelist.append("ir,");
+ }
+ else if ( pairs[index] == "screensaver" )
+ {
+ bShowscreensaver = true;
+ modulelist.append("screensaver,");
+ }
+ else if ( pairs[index] == "supplemental" )
+ {
+ bShowsupplemental = true;
+ modulelist.append("supplemental,");
+ }
+ else if ( pairs[index] == "remotes_only" )
+ {
+ bShowremotes_only = true;
+ modulelist.append("remotes_only,");
+ }
+ else if ( pairs[index] == "vnc" )
+ {
+ bShowvnc = true;
+ modulelist.append("vnc,");
+ }
+ else if ( pairs[index] == "fileshare" )
+ {
+ bShowFileshare = true;
+ modulelist.append("fileshare,");
+ }
+ } //for loop
+ }
+
+ if (cmdline.toBool("help"))
+ bShowHelp = true;
+
+ if (cmdline.toBool("readme"))
+ {
+ bShowReadme = true;
+ }
+ if (cmdline.toBool("question"))
+ {
+ bShowquestion = true;
+ question = (cmdline.toString("question")) ;
+ }
+
+ if (cmdline.toBool("run_mythsetup"))
+ bRunSetup = true;
+
+ if (cmdline.toBool("show_lang"))
+ showLang = true;
+
+ LCD::SetupLCD();
+ if (class LCD *lcd = LCD::Get())
+ lcd->switchToTime();
+
+
+ MythTranslation::load("mythfrontend");
+ GetMythUI()->LoadQtConfig();
+ MythMainWindow *mainWindow = GetMythMainWindow();
+ mainWindow->Init();
+
+// if parms were passed to -t then doen't init the screen.
+// if ( template_c_line.size() == 0 )
+// {
+// gCoreContext->SaveSetting("HOSTtemplatetype","Do Nothing" );
+// mainWindow->Init();
+// findme
+// gContext->SetMainWindow(mainWindow);
+//
+// MythThemeBase *themeBase = new MythThemeBase();
+// initKeys();
+// };
+
+ gCoreContext->ActivateSettingsCache(false);
+ gCoreContext->ClearSettingsCache();
+ gCoreContext->ActivateSettingsCache(false);
+
+ if (bShowSettings)
+ {
+ gCoreContext->ActivateSettingsCache(false);
+ gCoreContext->ClearSettingsCache();
+ bool runconfig = false;
+ system("cp -f /etc/systemconfig /tmp/systemconfig.bak");
+ QString olddb = gCoreContext->GetSetting("HostMysqlserver");
+ QString oldhostype = gCoreContext->GetSetting("HostSystemType");
+ runsettings(false,bShowNetwork,bShowHostype,bShowMisc,bShowshutdown,bShowadvanced,bShowsound,bShowadvancedX,bShowAccesscontrol,bShowplugins,bShowsoftware,bShowuser,bShowwebuser,bShowddns,bShowinfrared,bShowscreensaver,bShowsupplemental,bShowremotes_only,bShowvnc,bShowFileshare);
+ QString newdb = gCoreContext->GetSetting("HostMysqlserver");
+ QString newhostype = gCoreContext->GetSetting("HostSystemType");
+ int status = system("diff /tmp/systemconfig.bak /etc/systemconfig");
+ bool restart = false;
+ //save my settings in case db switches
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb);
+ system(cmdtxt);
+
+ if ( status != 0 )
+ {
+ runconfig = true;
+ }
+
+ if ( newdb != olddb )
+ {
+ runconfig = true;
+ restart = true;
+ //db changed save setting from olddb
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb ) ;
+ system(cmdtxt);
+ }
+
+ if ( runconfig )
+ {
+ //LOG(VB_GENERAL, LOG_ERR,
+ // "mythinstall: this is where i stalled");
+ if ( newhostype != oldhostype )
+ modulelist.append("hostypec,");
+ // trim off last ,
+ modulelist.truncate(modulelist.length()-1);
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/myth_settings_wrapper.sh -c restore -t syssettings -d ");
+ QString dbcommand = cmdtxt;
+ dbcommand.append(newdb);
+ run_systemconfig(modulelist,restart,dbcommand);
+
+
+
+ }
+ system("rm -f /tmp/systemconfig.bak");
+ gCoreContext->ActivateSettingsCache(false);
+ gCoreContext->ClearSettingsCache();
+ if ( restart )
+ {
+ DialogBox *dia = NULL;
+ QString prompt;
+ QString *problems = new QString("The network address of the database has changed.");
+ problems->append("\n");
+ problems->append("The frontend will need to restart to connect to the new database.");
+ problems->append("\n");
+ dia = new DialogBox(mainWindow, problems->append("\n" ));
+ dia->AddButton(QObject::tr("OK"));
+ int returncode = 0;
+ returncode = dia->exec();
+ dia->deleteLater();
+ //cout << "restarting" << endl;
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/systemconfig.sh reloadfe" );
+ system(cmdtxt);
+ }
+ gCoreContext->ActivateSettingsCache(false);
+ gCoreContext->ClearSettingsCache();
+ gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE");
+
+
+
+ }//run settings
+
+ else if (bShowTemplate)
+ {
+// if ( template_c_line.size() == 2)
+// {
+// templateop=template_c_line[0];
+// templatename=template_c_line[1];
+// }
+// else if ( template_c_line.size() == 3)
+// {
+// templateop=template_c_line[0];
+// templatename=template_c_line[1];
+// templatehostname=template_c_line[2];
+// };
+// choosetemplate(templateop,templatename,templatehostname);
+ }
+
+ else if (bRunSetup)
+ {
+ DialogBox *dia = NULL;
+ QString prompt;
+ QString *problems = new QString("To configure the TV cards and program guide the setup program needs to be run.");
+ problems->append("\n");
+ problems->append("\n");
+
+ problems->append("For those in North America, guide data is provided by Schedules Direct.");
+ problems->append("\n");
+ problems->append("Visit http://www.schedulesdirect.org/ to signup for your account today");
+ problems->append("\n");
+ problems->append("\n");
+ problems->append("\n");
+
+ problems->append("If you choose to not run mythtv-setup now, the program can be run at any time by typing mythtv-setup or hitting ALT+s");
+ problems->append("\n");
+
+ problems->append("\n");
+ prompt = QObject::tr("Do you wish to run mythtv-setup ?");
+
+ dia = new DialogBox(mainWindow, problems->append("\n" + prompt));
+ dia->AddButton(QObject::tr("Yes"));
+ dia->AddButton(QObject::tr("Yes and try to autodetect cards"));
+ dia->AddButton(QObject::tr("No"));
+ int returncode = 0;
+ returncode = dia->exec();
+ DialogCode dcode = dia->exec();
+ dia->deleteLater();
+ if (kDialogCodeButton0 == dcode )
+ returncode = 0;
+ if (kDialogCodeButton1 == dcode )
+ returncode = 1;
+ if (kDialogCodeButton2 == dcode )
+ returncode = 2;
+/*
+ if (returncode == 1)
+ {
+ AutoCard listcards;
+ listcards.exec();
+ }*/
+
+ return returncode;
+ }
+
+ else if (bShowHelp)
+ {
+ DialogBox *dia = NULL;
+ QString prompt;
+ QString *problems = new QString("LinHES Help");
+ problems->append("\n");
+ problems->append("Visit http://linhes.org for additional help.");
+ problems->append("\n");
+ problems->append("\n");
+ problems->append("------Keyboard Shortcuts---------------------------------");
+ problems->append("\n");
+ problems->append("Alt + h: This Screen");
+ problems->append("\n");
+#ifdef __MVAPP__
+ problems->append("F2: Open/Close Terminal");
+ problems->append("\n");
+ problems->append("Shift + Return: Open New Terminal (xterm)");
+ problems->append("\n");
+ problems->append("Alt + F2: Show 2nd desktop Alt + F1 To Go Back");
+ problems->append("\n");
+ problems->append("Alt + c: Capture Myth Screenshot");
+ problems->append("\n");
+#else
+ problems->append("Alt + x: Open New Terminal (xterm)");
+ problems->append("\n");
+ problems->append("Alt + m: Open mythfrontend");
+ problems->append("\n");
+ problems->append("m in mythfrontend: Display Power/About Menu");
+ problems->append("\n");
+#endif
+ problems->append("Alt + 1: Start Master mythbackend");
+ problems->append("\n");
+ problems->append("Alt + 2: Stop Master mythbackend");
+ problems->append("\n");
+ problems->append("Alt + 3: Restart Master mythbackend");
+ problems->append("\n");
+ problems->append("Alt + s: Open mythtv-setup");
+ problems->append("\n");
+ problems->append("Alt + u: Unhide/Hide Mouse Pointer");
+ problems->append("\n");
+ problems->append("Alt + w: Open Web Browser (Chrome if installed)");
+ problems->append("\n");
+ problems->append("Alt + f: Restart Window Manager");
+ problems->append("\n");
+
+
+ dia = new DialogBox(mainWindow, problems->append("\n" ));
+ dia->AddButton(QObject::tr("OK"));
+ int returncode = 0;
+ returncode = dia->exec();
+ dia->deleteLater();
+ DestroyMythMainWindow();
+ delete gContext;
+ return returncode;
+ }
+ else if (bShowReadme)
+ {
+ DialogBox *dia = NULL;
+ QString prompt;
+ QString line;
+ QString *problems = new QString("");
+ problems->append("\n");
+ QFile file("/usr/MythVantage/README");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ problems->append(line);
+ problems->append("\n");
+ }
+ file.close();
+ }
+ else
+ problems->append("Couldn't open file");
+ dia = new DialogBox(mainWindow, problems->append("\n" ));
+ dia->AddButton(QObject::tr("OK"));
+ int returncode = 0;
+ returncode = dia->exec();
+ dia->deleteLater();
+ DestroyMythMainWindow();
+ delete gContext;
+ return returncode;
+ }
+
+ else if (bShowquestion)
+ {
+ //LOG(VB_GENERAL, LOG_INFO, QString(question));
+ DialogBox *dia = NULL;
+ QString prompt;
+ QString *problems = new QString("");
+ problems->append("\n");
+ problems->append("\n");
+ problems->append(question);
+ dia = new DialogBox(mainWindow, problems->append("\n" ));
+ dia->AddButton(QObject::tr("Yes"));
+ dia->AddButton(QObject::tr("No"));
+ int returncode = 0;
+
+ returncode = dia->exec();
+ dia->deleteLater();
+ DestroyMythMainWindow();
+ delete gContext;
+
+ return returncode;
+ }
+ else
+ {
+ if (LanguageSelection::prompt(showLang)){
+ //taken from reloadTheme mythtv-setup
+ MythTranslation::reload();
+ GetMythMainWindow()->ReinitDone();
+
+ }
+
+ MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
+ WelcomeDialog *welcome = new WelcomeDialog(mainStack, "Welcome");
+ if (welcome->Create())
+ {
+ mainStack->AddScreen(welcome, true);
+ }
+ else
+ return -1;
+
+ do
+ {
+
+ qApp->processEvents();
+ usleep(5000);
+ } while (mainStack->TotalScreens() > 0);
+
+
+ // DestroyMythMainWindow();
+ // delete gContext;
+ // gContext = NULL;
+ // delete qApp;
+
+ }
+ DestroyMythMainWindow();
+
+ //gCoreContext->GetSetting("MasterServerIP");
+ //gCoreContext->GetSetting("BackendServerIP");
+
+
+
+ delete gContext;
+ gContext = NULL ;
+ //delete qApp;
+
+ return 0;
+}
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp
new file mode 100755
index 0000000..43f360a
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp
@@ -0,0 +1,623 @@
+#include <unistd.h>
+#include "misc_settings.h"
+#include "mv_common.h"
+//Added by qt3to4:
+#include <Q3TextStream>
+#include "mythuihelper.h"
+#include "mythsystemlegacy.h"
+
+extern HostParms hostparm;
+
+static HostCheckBox *HostShowToolTips()
+{
+ HostCheckBox *gc = new HostCheckBox("HostShowToolTips");
+ gc->setLabel(QObject::tr("Show Shortcuts"));
+ gc->setValue(true);
+ gc->setHelpText(QObject::tr("Shows a window describing how to open a console and various other items."));
+ return gc;
+};
+
+static HostComboBox *Hostupdateplan()
+{
+ HostComboBox *gc = new HostComboBox("Hostupdateplan");
+ gc->setLabel(QObject::tr("Automatic Updates"));
+ gc->addSelection("None");
+ gc->addSelection("Myth_only");
+ gc->addSelection("All");
+ gc->setHelpText("None: Do not install updates automatically.\nMyth_only: Automatically installs updates for MythTV only.\nAll: Automatically installs all updates for LinHES.");
+ return gc;
+
+}
+// static HostLineEdit *HostZipcode()
+// {
+// HostLineEdit *gc = new HostLineEdit("HostZipcode");
+// gc->setLabel(QObject::tr("Zip Code"));
+// gc->setHelpText(QObject::tr("The zipcode will be used to configure MythMovieTimes. Leave it blank to use the existing value. People located outside the U.S.A should probably leave this blank"));
+// //gc->setRW();
+// //gc->setRO();
+// return gc;
+// };
+
+//_______________Misc main frame
+MiscMainFrame::MiscMainFrame():
+ VerticalConfigurationGroup(false,false,false,false)
+
+{
+ setLabel(QObject::tr("Miscellaneous Settings"));
+ bool MVAPP;
+#ifdef __MVAPP__
+ MVAPP = true ;
+#else
+ MVAPP = false ;
+#endif
+ bool showLabels;
+ hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
+ if ( hostparm.ThisSystemType == "Standalone" || hostparm.ThisSystemType=="Master_backend")
+ {
+ showLabels = false;
+ }
+ else
+ {
+ showLabels = true;
+ }
+ TransLabelSetting *temptimezone = new TransLabelSetting();
+ temptimezone->setValue("Timezone: " + hostparm.ThisTimeZone );
+// TransLabelSetting *tempzipcode = new TransLabelSetting();
+// tempzipcode->setValue("Zipcode: " + hostparm.ThisHostZipcode );
+// GridConfigurationGroup* miscsettings_2 =
+// new GridConfigurationGroup(1,true, true,false,false);
+//
+// if ( showLabels && ( hostparm.ThisHostZipcode != "" ))
+// if (MVAPP)
+// miscsettings_2->addChild(tempzipcode);
+// else
+// miscsettings_2->addChild(HostZipcode());
+// else
+// miscsettings_2->addChild(HostZipcode());
+
+ TimezoneRegion *timezoneregion = new TimezoneRegion();
+// TimezoneButton *timezonebutton = new TimezoneButton();
+
+ VerticalConfigurationGroup* miscsettings =
+ new VerticalConfigurationGroup(false, true,false,false);
+// miscsettings->addChild(timezonebutton);
+ if ( showLabels && ( hostparm.ThisTimeZone != "" ))
+ {
+ if (MVAPP)
+ {
+ miscsettings->addChild(temptimezone);
+// timezonebutton->disableButton();
+ }
+ else
+ miscsettings->addChild(timezoneregion);
+ }
+ else
+ miscsettings->addChild(timezoneregion);
+
+ miscsettings->addChild(HostShowToolTips());
+ miscsettings->addChild(Hostupdateplan());
+
+
+ //miscsettings->addChild(miscsettings_2);
+ addChild(miscsettings);
+
+
+
+
+
+
+// connect(timezonebutton, SIGNAL(mf_launch_tzgui()),timezoneregion ,SLOT(timezone_gathersettings()));
+
+ connect(timezoneregion,SIGNAL(mf_show_tz(QString)),this,SLOT(mf_show_tz(QString)));
+ connect(this,SIGNAL(update_timezone(QString)),timezoneregion,SLOT(update_timezone_values(QString)));
+
+ autoLaunchTimer = new QTimer(this);
+// connect(autoLaunchTimer, SIGNAL(timeout()), timezonebutton, SLOT(launch_tzgui()));
+ autoLaunchTimer->start(0);
+}
+
+QString MiscMainFrame::mf_show_tz(QString tz)
+{
+ QString GTimezone;
+ int rc;
+ bool showLabels;
+ if (autoLaunchTimer->isActive())
+ {
+ autoLaunchTimer->stop();
+
+ // This was triggered by the timer. Only launch the timezone gui if the timezone is unknown.
+ if ( hostparm.ThisTimeZone != "" )
+ return NULL;
+ }
+
+ if ( hostparm.ThisTimeZone == "" )
+ tz = "guess";
+
+ //launch tzgui and load output into Gtimezone
+ int m_screenheight = 0, m_screenwidth = 0;
+ float m_wmult = 0, m_hmult = 0;
+ QString m_height , m_width , cmd;
+ GetMythUI()->GetScreenSettings(m_screenwidth, m_wmult, m_screenheight, m_hmult);
+ m_height.setNum(m_screenheight);
+ m_width.setNum(m_screenwidth);
+ QString tzpath;
+ tzpath=MV_ROOT;
+ tzpath.append("bin/timezone.bin");
+ cmd=tzpath + " -z " + tz + " -h " + m_height + " -w " + m_width + " > /tmp/.selected_tz" ;
+ rc=myth_system(cmd);
+ if ( rc == 0 )
+ {
+ //read in value
+ QString line;
+ QFile file("/tmp/.selected_tz");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.contains("/"))
+ {
+ GTimezone = line.simplifyWhiteSpace();
+ break;
+ }
+ }
+ file.close();
+ }
+ timezone_unknown = FALSE;
+ emit update_timezone(GTimezone);
+ }
+
+ return GTimezone;
+}
+
+// //_______________Misc main frame
+// MiscMainFrame2::MiscMainFrame2():
+// VerticalConfigurationGroup(false,false,false,false)
+// {
+// VerticalConfigurationGroup* miscsettings =
+// new VerticalConfigurationGroup(false, true,false,false);
+//
+// GridConfigurationGroup* miscsettings_2 =
+// new GridConfigurationGroup(1,false, false,false,false);
+// miscsettings_2->addChild(HostShowToolTips());
+// miscsettings_2->addChild(Hostupdateplan());
+//
+// // NFSSettings *nfssettings = new NFSSettings();
+// //
+// // miscsettings->addChild(nfssettings);
+// miscsettings->addChild(miscsettings_2);
+//
+// addChild(miscsettings);
+// }
+
+
+//_______________Misc time timezone
+/*
+TimezoneButton::TimezoneButton():
+ VerticalConfigurationGroup(false,false,false,false)
+{
+ TZButton = new TransButtonSetting;
+ TZButton->setLabel("Hitchhikers guide to timezones");
+ addChild(TZButton);
+ connect(TZButton, SIGNAL(pressed()),this,SLOT(launch_tzgui()));
+
+};
+
+void TimezoneButton::launch_tzgui()
+{
+ emit mf_launch_tzgui();
+}
+
+void TimezoneButton::disableButton()
+{
+ TZButton->setEnabled(false);
+}
+*/
+//This is used for the timezone
+QStringList findFilesRecursively ( QStringList paths, QString fileTypes ) {
+ if ( fileTypes.isEmpty() ) fileTypes = "*";
+ QStringList result, more;
+ QStringList::Iterator it;
+ for ( uint i = 0 ; i < paths.size() ; i++ )
+ { // inefficient...whatever
+ QDir dir( paths[i] );
+ dir.setSorting( QDir::Reversed );
+ more = dir.entryList( fileTypes, QDir::Files );
+ for ( it = more.begin() ; it != more.end() ; ++it )
+ result.append( paths[i] + "/" + *it );
+ // reg exp in next line excludes . and .. dirs (and .* actually)
+ more = dir.entryList( QDir::Dirs ).grep( QRegExp( "[^.]" ) );
+ for ( it = more.begin() ; it != more.end() ; ++it )
+ *it = paths[i] + "/" + *it;
+ more = findFilesRecursively( more, fileTypes );
+ for ( it = more.begin() ; it != more.end() ; ++it )
+ result.append( *it );
+ }
+ return result; // yields absolute paths
+}
+
+void TimezoneRegion::timezoneregion_fillselection_zone()
+{
+ HostTimeZoneRegion->setLabel(QObject::tr("Time Zone"));
+ HostTimeZoneRegion->addSelection("US");
+ HostTimeZoneRegion->addSelection("Pacific");
+ HostTimeZoneRegion->addSelection("Mideast");
+ HostTimeZoneRegion->addSelection("Mexico");
+ HostTimeZoneRegion->addSelection("Indian");
+ HostTimeZoneRegion->addSelection("Europe");
+ HostTimeZoneRegion->addSelection("Etc");
+ HostTimeZoneRegion->addSelection("Chile");
+ HostTimeZoneRegion->addSelection("Canada");
+ HostTimeZoneRegion->addSelection("Brazil");
+ HostTimeZoneRegion->addSelection("Australia");
+ HostTimeZoneRegion->addSelection("Atlantic");
+ HostTimeZoneRegion->addSelection("Asia");
+ HostTimeZoneRegion->addSelection("Arctic");
+ HostTimeZoneRegion->addSelection("Antarctica");
+ HostTimeZoneRegion->addSelection("America");
+ HostTimeZoneRegion->addSelection("Africa");
+ //--single region
+ HostTimeZoneRegion->addSelection("Zulu");
+ HostTimeZoneRegion->addSelection("WET");
+ HostTimeZoneRegion->addSelection("W-SU");
+ HostTimeZoneRegion->addSelection("Universal");
+ HostTimeZoneRegion->addSelection("UTC");
+ HostTimeZoneRegion->addSelection("UCT");
+ HostTimeZoneRegion->addSelection("Turkey");
+ HostTimeZoneRegion->addSelection("Singapore");
+ HostTimeZoneRegion->addSelection("ROK");
+ HostTimeZoneRegion->addSelection("ROC");
+ HostTimeZoneRegion->addSelection("Portugal");
+ HostTimeZoneRegion->addSelection("Poland");
+ HostTimeZoneRegion->addSelection("PST8PDT");
+ HostTimeZoneRegion->addSelection("PRC");
+ HostTimeZoneRegion->addSelection("Navajo");
+ HostTimeZoneRegion->addSelection("NZ-CHAT");
+ HostTimeZoneRegion->addSelection("NZ");
+ HostTimeZoneRegion->addSelection("MST7MDT");
+ HostTimeZoneRegion->addSelection("MST");
+ HostTimeZoneRegion->addSelection("MET");
+ HostTimeZoneRegion->addSelection("Libya");
+ HostTimeZoneRegion->addSelection("Kwajalein");
+ HostTimeZoneRegion->addSelection("Japan");
+ HostTimeZoneRegion->addSelection("Jamaica");
+ HostTimeZoneRegion->addSelection("Israel");
+ HostTimeZoneRegion->addSelection("Iran");
+ HostTimeZoneRegion->addSelection("Iceland");
+ HostTimeZoneRegion->addSelection("Hongkong");
+ HostTimeZoneRegion->addSelection("HST");
+ HostTimeZoneRegion->addSelection("Greenwich");
+ HostTimeZoneRegion->addSelection("GMT0");
+ HostTimeZoneRegion->addSelection("GMT-0");
+ HostTimeZoneRegion->addSelection("GMT+0");
+ HostTimeZoneRegion->addSelection("GMT");
+ HostTimeZoneRegion->addSelection("GB-Eire");
+ HostTimeZoneRegion->addSelection("GB");
+ HostTimeZoneRegion->addSelection("Factory");
+ HostTimeZoneRegion->addSelection("Eire");
+ HostTimeZoneRegion->addSelection("Egypt");
+ HostTimeZoneRegion->addSelection("EST5EDT");
+ HostTimeZoneRegion->addSelection("EST");
+ HostTimeZoneRegion->addSelection("EET");
+ HostTimeZoneRegion->addSelection("Cuba");
+ HostTimeZoneRegion->addSelection("CST6CDT");
+ HostTimeZoneRegion->addSelection("CET");
+ HostTimeZoneRegion->setHelpText(QObject::tr("Time Zone Region"));
+}
+
+void TimezoneRegion::timezoneregion_fillselection(QString tzonefile )
+{
+ QString currentitem;
+ QString tzfile_with_path="/usr/share/zoneinfo/posix/";
+ bool foundtab;
+ int foundslashes;
+ QStringList timezonefile;
+ tzfile_with_path.append(tzonefile);
+ timezonefile.append(tzfile_with_path);
+ QStringList answer = findFilesRecursively( timezonefile, "*" );
+ QStringList onlyfiles ;
+ QStringList::Iterator it;
+ for ( it = answer.begin(); it != answer.end(); ++it )
+ {
+ currentitem = *it;
+
+ foundtab=currentitem.contains(".tab");
+ if ( ! foundtab )
+ {
+ foundslashes=currentitem.count("/");
+ currentitem = currentitem.section( '/', 6, foundslashes );
+ if ( tzonefile == "US")
+ HostTimezoneRegion_US->addSelection(currentitem);
+ else if ( tzonefile == "Pacific")
+ HostTimezoneRegion_Pacific->addSelection(currentitem);
+ else if ( tzonefile == "Mideast")
+ HostTimezoneRegion_Mideast->addSelection(currentitem);
+ else if ( tzonefile == "Mexico")
+ HostTimezoneRegion_Mexico->addSelection(currentitem);
+ else if ( tzonefile == "Indian")
+ HostTimezoneRegion_Indian->addSelection(currentitem);
+ else if ( tzonefile == "Europe")
+ HostTimezoneRegion_Europe->addSelection(currentitem);
+ else if ( tzonefile == "Etc")
+ HostTimezoneRegion_Etc->addSelection(currentitem);
+ else if ( tzonefile == "Chile")
+ HostTimezoneRegion_Chile->addSelection(currentitem);
+ else if ( tzonefile == "Canada")
+ HostTimezoneRegion_Canada->addSelection(currentitem);
+ else if ( tzonefile == "Brazil")
+ HostTimezoneRegion_Brazil->addSelection(currentitem);
+ else if ( tzonefile == "Australia")
+ HostTimezoneRegion_Australia->addSelection(currentitem);
+ else if ( tzonefile == "Atlantic")
+ HostTimezoneRegion_Atlantic->addSelection(currentitem);
+ else if ( tzonefile == "Asia")
+ HostTimezoneRegion_Asia->addSelection(currentitem);
+ else if ( tzonefile == "Arctic")
+ HostTimezoneRegion_Arctic->addSelection(currentitem);
+ else if ( tzonefile == "Antarctica")
+ HostTimezoneRegion_Antarctica->addSelection(currentitem);
+ else if ( tzonefile == "America")
+ HostTimezoneRegion_America->addSelection(currentitem);
+ else if ( tzonefile == "Africa")
+ HostTimezoneRegion_Africa->addSelection(currentitem);
+ }
+ }
+};
+
+void TimezoneRegion::timezone_gathersettings()
+{
+ QString tz;
+ QString subregion;
+ QString region=HostTimeZoneRegion->getValue();
+ if ( region == "US")
+ subregion=HostTimezoneRegion_US->getValue();
+ else if ( region == "Pacific")
+ subregion=HostTimezoneRegion_Pacific->getValue();
+ else if ( region == "Mideast")
+ subregion=HostTimezoneRegion_Mideast->getValue();
+ else if ( region == "Mexico")
+ subregion=HostTimezoneRegion_Mexico->getValue();
+ else if ( region == "Indian")
+ subregion=HostTimezoneRegion_Indian->getValue();
+ else if ( region == "Europe")
+ subregion=HostTimezoneRegion_Europe->getValue();
+ else if ( region == "Etc")
+ subregion=HostTimezoneRegion_Etc->getValue();
+ else if ( region == "Chile")
+ subregion=HostTimezoneRegion_Chile->getValue();
+ else if ( region == "Canada")
+ subregion=HostTimezoneRegion_Canada->getValue();
+ else if ( region == "Brazil")
+ subregion=HostTimezoneRegion_Brazil->getValue();
+ else if ( region == "Australia")
+ subregion=HostTimezoneRegion_Australia->getValue();
+ else if ( region == "Atlantic")
+ subregion=HostTimezoneRegion_Atlantic->getValue();
+ else if ( region == "Asia")
+ subregion=HostTimezoneRegion_Asia->getValue();
+ else if ( region == "Arctic")
+ subregion=HostTimezoneRegion_Arctic->getValue();
+ else if ( region == "Antarctica")
+ subregion=HostTimezoneRegion_Antarctica->getValue();
+ else if ( region == "America")
+ subregion=HostTimezoneRegion_America->getValue();
+ else if ( region == "Africa")
+ subregion=HostTimezoneRegion_Africa->getValue();
+
+ tz=region+"/"+subregion;
+ emit mf_show_tz(tz);
+}
+
+TimezoneRegion::TimezoneRegion():
+ TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+{
+ SetVertical(false);
+ HostTimeZoneRegion= new HostComboBox("HostTimeZoneRegion");
+ timezoneregion_fillselection_zone();
+ Setting* trigger = HostTimeZoneRegion;
+ addChild(trigger);
+ setTrigger(trigger);
+ //define all the new comboboxes
+ HostTimezoneRegion_US = new HostComboBox("HostTimezoneRegion_US");
+ HostTimezoneRegion_Pacific = new HostComboBox("HostTimezoneRegion_Pacific");
+ HostTimezoneRegion_Mideast = new HostComboBox("HostTimezoneRegion_Mideast");
+ HostTimezoneRegion_Mexico = new HostComboBox("HostTimezoneRegion_Mexico");
+ HostTimezoneRegion_Indian = new HostComboBox("HostTimezoneRegion_Indian");
+ HostTimezoneRegion_Europe = new HostComboBox("HostTimezoneRegion_Europe");
+ HostTimezoneRegion_Etc = new HostComboBox("HostTimezoneRegion_Etc");
+ HostTimezoneRegion_Chile = new HostComboBox("HostTimezoneRegion_Chile");
+ HostTimezoneRegion_Canada = new HostComboBox("HostTimezoneRegion_Canada");
+ HostTimezoneRegion_Brazil = new HostComboBox("HostTimezoneRegion_Brazil");
+ HostTimezoneRegion_Australia = new HostComboBox("HostTimezoneRegion_Australia");
+ HostTimezoneRegion_Atlantic = new HostComboBox("HostTimezoneRegion_Atlantic");
+ HostTimezoneRegion_Asia = new HostComboBox("HostTimezoneRegion_Asia");
+ HostTimezoneRegion_Arctic = new HostComboBox("HostTimezoneRegion_Arctic");
+ HostTimezoneRegion_Antarctica = new HostComboBox("HostTimezoneRegion_Antarctica");
+ HostTimezoneRegion_America = new HostComboBox("HostTimezoneRegion_America");
+ HostTimezoneRegion_Africa = new HostComboBox("HostTimezoneRegion_Africa");
+ //fill the new comboboxes
+ timezoneregion_fillselection("US");
+ timezoneregion_fillselection("Pacific");
+ timezoneregion_fillselection("Mideast");
+ timezoneregion_fillselection("Mexico");
+ timezoneregion_fillselection("Indian");
+ timezoneregion_fillselection("Europe");
+ timezoneregion_fillselection("Etc");
+ timezoneregion_fillselection("Chile");
+ timezoneregion_fillselection("Canada");
+ timezoneregion_fillselection("Brazil");
+ timezoneregion_fillselection("Australia");
+ timezoneregion_fillselection("Atlantic");
+ timezoneregion_fillselection("Asia");
+ timezoneregion_fillselection("Arctic");
+ timezoneregion_fillselection("Antarctica");
+ timezoneregion_fillselection("America");
+ timezoneregion_fillselection("Africa");
+
+ // Add subregions to regions
+ addTarget("US", HostTimezoneRegion_US );
+ addTarget("Pacific", HostTimezoneRegion_Pacific );
+ addTarget("Mideast", HostTimezoneRegion_Mideast );
+ addTarget("Mexico", HostTimezoneRegion_Mexico );
+ addTarget("Indian", HostTimezoneRegion_Indian );
+ addTarget("Europe", HostTimezoneRegion_Europe );
+ addTarget("Etc", HostTimezoneRegion_Etc );
+ addTarget("Chile", HostTimezoneRegion_Chile );
+ addTarget("Canada", HostTimezoneRegion_Canada );
+ addTarget("Brazil", HostTimezoneRegion_Brazil );
+ addTarget("Australia", HostTimezoneRegion_Australia );
+ addTarget("Atlantic", HostTimezoneRegion_Atlantic );
+ addTarget("Asia", HostTimezoneRegion_Asia );
+ addTarget("Arctic", HostTimezoneRegion_Arctic );
+ addTarget("Antarctica", HostTimezoneRegion_Antarctica );
+ addTarget("America", HostTimezoneRegion_America );
+ addTarget("Africa", HostTimezoneRegion_Africa );
+ //--single region
+ addTarget("Zulu", new VerticalConfigurationGroup(false, false));
+ addTarget("WET", new VerticalConfigurationGroup(false, false));
+ addTarget("W-SU", new VerticalConfigurationGroup(false, false));
+ addTarget("Universal", new VerticalConfigurationGroup(false, false));
+ addTarget("UTC", new VerticalConfigurationGroup(false, false));
+ addTarget("UCT", new VerticalConfigurationGroup(false, false));
+ addTarget("Turkey", new VerticalConfigurationGroup(false, false));
+ addTarget("Singapore", new VerticalConfigurationGroup(false, false));
+ addTarget("ROK", new VerticalConfigurationGroup(false, false));
+ addTarget("ROC", new VerticalConfigurationGroup(false, false));
+ addTarget("Portugal", new VerticalConfigurationGroup(false, false));
+ addTarget("Poland", new VerticalConfigurationGroup(false, false));
+ addTarget("PST8PDT", new VerticalConfigurationGroup(false, false));
+ addTarget("PRC", new VerticalConfigurationGroup(false, false));
+ addTarget("Navajo", new VerticalConfigurationGroup(false, false));
+ addTarget("NZ-CHAT", new VerticalConfigurationGroup(false, false));
+ addTarget("NZ", new VerticalConfigurationGroup(false, false));
+ addTarget("MST7MDT", new VerticalConfigurationGroup(false, false));
+ addTarget("MST", new VerticalConfigurationGroup(false, false));
+ addTarget("MET", new VerticalConfigurationGroup(false, false));
+ addTarget("Libya", new VerticalConfigurationGroup(false, false));
+ addTarget("Kwajalein", new VerticalConfigurationGroup(false, false));
+ addTarget("Japan", new VerticalConfigurationGroup(false, false));
+ addTarget("Jamaica", new VerticalConfigurationGroup(false, false));
+ addTarget("Israel", new VerticalConfigurationGroup(false, false));
+ addTarget("Iran", new VerticalConfigurationGroup(false, false));
+ addTarget("Iceland", new VerticalConfigurationGroup(false, false));
+ addTarget("Hongkong", new VerticalConfigurationGroup(false, false));
+ addTarget("HST", new VerticalConfigurationGroup(false, false));
+ addTarget("Greenwich", new VerticalConfigurationGroup(false, false));
+ addTarget("GMT0", new VerticalConfigurationGroup(false, false));
+ addTarget("GMT-0", new VerticalConfigurationGroup(false, false));
+ addTarget("GMT+0", new VerticalConfigurationGroup(false, false));
+ addTarget("GMT", new VerticalConfigurationGroup(false, false));
+ addTarget("GB-Eire", new VerticalConfigurationGroup(false, false));
+ addTarget("GB", new VerticalConfigurationGroup(false, false));
+ addTarget("Factory", new VerticalConfigurationGroup(false, false));
+ addTarget("Eire", new VerticalConfigurationGroup(false, false));
+ addTarget("Egypt", new VerticalConfigurationGroup(false, false));
+ addTarget("EST5EDT", new VerticalConfigurationGroup(false, false));
+ addTarget("EST", new VerticalConfigurationGroup(false, false));
+ addTarget("EET", new VerticalConfigurationGroup(false, false));
+ addTarget("Cuba", new VerticalConfigurationGroup(false, false));
+ addTarget("CST6CDT", new VerticalConfigurationGroup(false, false));
+ addTarget("CET", new VerticalConfigurationGroup(false, false));
+};
+
+void TimezoneRegion::update_timezone_values(QString Gtimezone)
+{
+ QString region;
+ QString subregion;
+ region=Gtimezone.section('/',0,0);
+ subregion=Gtimezone.section('/',1,1);
+ HostTimeZoneRegion->setValue(region);
+
+ if ( region == "US")
+ HostTimezoneRegion_US->setValue(subregion);
+ else if ( region == "Pacific")
+ HostTimezoneRegion_Pacific->setValue(subregion);
+ else if ( region == "Mideast")
+ HostTimezoneRegion_Mideast->setValue(subregion);
+ else if ( region == "Mexico")
+ HostTimezoneRegion_Mexico->setValue(subregion);
+ else if ( region == "Indian")
+ HostTimezoneRegion_Indian->setValue(subregion);
+ else if ( region == "Europe")
+ HostTimezoneRegion_Europe->setValue(subregion);
+ else if ( region == "Etc")
+ HostTimezoneRegion_Etc->setValue(subregion);
+ else if ( region == "Chile")
+ HostTimezoneRegion_Chile->setValue(subregion);
+ else if ( region == "Canada")
+ HostTimezoneRegion_Canada->setValue(subregion);
+ else if ( region == "Brazil")
+ HostTimezoneRegion_Brazil->setValue(subregion);
+ else if ( region == "Australia")
+ HostTimezoneRegion_Australia->setValue(subregion);
+ else if ( region == "Atlantic")
+ HostTimezoneRegion_Atlantic->setValue(subregion);
+ else if ( region == "Asia")
+ HostTimezoneRegion_Asia->setValue(subregion);
+ else if ( region == "Arctic")
+ HostTimezoneRegion_Arctic->setValue(subregion);
+ else if ( region == "Antarctica")
+ HostTimezoneRegion_Antarctica->setValue(subregion);
+ else if ( region == "America")
+ HostTimezoneRegion_America->setValue(subregion);
+ else if ( region == "Africa")
+ HostTimezoneRegion_Africa->setValue(subregion);
+}
+
+/*
+//________________Misc (NFS) Screen SETTINGS_________________________
+static HostComboBox *HostHaveCentralNFS()
+{
+ HostComboBox *gc = new HostComboBox("HostHaveCentralNFS");
+ gc->setLabel(QObject::tr("Central NFS server"));
+ gc->addSelection("no");
+ gc->addSelection("yes") ;
+ gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the masterbackend. Say no if you are confused."));
+
+ return gc;
+}
+
+static HostComboBox *HostCentralNFSIP()
+{
+ HostComboBox *gc = new HostComboBox("HostCentralNFSIP",true);
+ gc->setLabel(QObject::tr("NFS server and sharename "));
+ gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, for example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file"));
+ gc->addSelection("file:nfsmap") ;
+ gc->addSelection("") ;
+ return gc;
+};
+
+static HostComboBox *HostNFSmountpoint()
+{
+#ifdef __MVAPP__
+ HostComboBox *gc = new HostComboBox("HostNFSmountpoint");
+ gc->addSelection("/data/media");
+#else
+ HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true);
+ gc->addSelection("/myth");
+#endif
+ gc->setLabel(QObject::tr("Local mount point of NFS share"));
+ gc->addSelection("/mnt") ;
+ gc->setHelpText(QObject::tr(""));
+ return gc;
+}
+
+
+NFSSettings::NFSSettings():
+ TriggeredConfigurationGroup(false,false,false,true,true,false,false,true)
+{
+ setLabel(QObject::tr("Misc Settings"));
+
+ Setting* havenfs = HostHaveCentralNFS();
+ addChild(havenfs);
+ setTrigger(havenfs);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup();
+ settings->addChild(HostCentralNFSIP());
+ settings->addChild(HostNFSmountpoint());
+
+ addTarget("no", new VerticalConfigurationGroup());
+ addTarget("yes", settings);
+};
+*/
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h
new file mode 100755
index 0000000..325fc0e
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h
@@ -0,0 +1,97 @@
+#include <mythcontext.h>
+#include <unistd.h>
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+#include "settings.h"
+#include "installsettings.h"
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+
+#include <stdlib.h>
+#include <cstdlib>
+#include <mythtv/mythdbcon.h>
+#include <qdir.h>
+#include <qapplication.h>
+#include "mythmiscutil.h"
+
+
+class MiscMainFrame: public VerticalConfigurationGroup {
+ Q_OBJECT
+public:
+ MiscMainFrame();
+ QTimer *autoLaunchTimer;
+
+public slots:
+ QString mf_show_tz(QString);
+
+signals:
+ void update_timezone(QString);
+};
+
+class MiscMainFrame2: public VerticalConfigurationGroup {
+ Q_OBJECT
+public:
+ MiscMainFrame2();
+};
+
+/*
+class TimezoneButton: public VerticalConfigurationGroup {
+ Q_OBJECT
+public:
+ TimezoneButton();
+ TransButtonSetting *TZButton;
+ void disableButton();
+public slots:
+ void launch_tzgui();
+signals:
+ QString mf_launch_tzgui();
+
+};
+*/
+class TimezoneRegion: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ TimezoneRegion();
+ HostComboBox *HostTimeZoneRegion;
+ HostComboBox *HostTimezoneRegion_US;
+ HostComboBox *HostTimezoneRegion_Pacific;
+ HostComboBox *HostTimezoneRegion_Mideast;
+ HostComboBox *HostTimezoneRegion_Mexico;
+ HostComboBox *HostTimezoneRegion_Indian;
+ HostComboBox *HostTimezoneRegion_Europe;
+ HostComboBox *HostTimezoneRegion_Etc;
+ HostComboBox *HostTimezoneRegion_Chile;
+ HostComboBox *HostTimezoneRegion_Canada;
+ HostComboBox *HostTimezoneRegion_Brazil;
+ HostComboBox *HostTimezoneRegion_Australia;
+ HostComboBox *HostTimezoneRegion_Atlantic;
+ HostComboBox *HostTimezoneRegion_Asia;
+ HostComboBox *HostTimezoneRegion_Arctic;
+ HostComboBox *HostTimezoneRegion_Antarctica;
+ HostComboBox *HostTimezoneRegion_America;
+ HostComboBox *HostTimezoneRegion_Africa;
+ void timezoneregion_fillselection(QString);
+ void timezoneregion_fillselection_zone();
+
+
+public slots:
+ void update_timezone_values(QString);
+ void timezone_gathersettings();
+signals:
+ void mf_show_tz(QString);
+};
+
+/*
+class NFSSettings: public
+ TriggeredConfigurationGroup {
+public:
+ NFSSettings();
+
+};*/
+
+
+
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h b/abs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h
new file mode 100755
index 0000000..720655c
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h
@@ -0,0 +1,5 @@
+//#define __MVAPP__ LinHES
+#define RELEASEFILE "LinHES-release"
+
+extern int timezone_unknown;
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro
new file mode 100755
index 0000000..225d755
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro
@@ -0,0 +1,55 @@
+#This is the path to the mythtv src
+
+
+
+PREFIX = /usr/include/mythtv
+LIBVERSION = 0.27
+VERSION = 0.27.0
+
+
+
+
+INCLUDEPATH += $$PREFIX/libmythui $$PREFIX $$PREFIX/libmyth
+
+LIBS += -L /usr/local/lib
+
+
+
+LIBS += -lmythtv-$$LIBVERSION
+#LIBS += -lmythdb-$$LIBVERSION
+LIBS += -lmythui-$$LIBVERSION
+LIBS += -lmyth-$$LIBVERSION
+LIBS+= -lmythbase-$$LIBVERSION
+
+
+
+mingw {
+ LIBS += -lpthread
+ CONFIG += console
+}
+
+TEMPLATE = app
+CONFIG += thread
+TARGET = mythinstall
+target.path = $${PREFIX}/bin
+
+INSTALLS = target
+
+uifiles.path = $${PREFIX}/share/mythtv/themes/default
+uifiles.files = install-ui.xml images/*.png
+
+INSTALLS += uifiles
+
+QMAKE_CLEAN += $(TARGET)
+
+# Input
+//HEADERS += commandlineparser.h
+//SOURCES += main.cpp commandlineparser.cpp
+
+HEADERS += installdialog.h commandlineparser.h installsettings.h settemplate.h installationtype.h autocard.h xorgsettings.h password_manage.h misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h vnc.h fileshare.h
+SOURCES += main.cpp commandlineparser.cpp installdialog.cpp installsettings.cpp settemplate.cpp installationtype.cpp autocard.cpp xorgsettings.cpp password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp supplemental.cpp vnc.cpp fileshare.cpp
+
+
+#The following line was inserted by qt3to4
+QT += qt3support sql xml network
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp
new file mode 100755
index 0000000..4acfb9d
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp
@@ -0,0 +1,436 @@
+#include <unistd.h>
+#include "password_manage.h"
+//Added by qt3to4:
+#include <Q3TextStream>
+
+#include <qapplication.h>
+#include "mythmiscutil.h"
+#include "mythsystemlegacy.h"
+
+#include <qdir.h>
+#include <iostream>
+
+/****************************************************************************/
+typedef enum {
+ UseraddPopup_OK = 0,
+ UseraddPopup_CANCEL,
+ UseraddPopup_DELETE
+}
+UseraddPopupResult;
+bool passtoggle = TRUE;
+QString invalid_chars = "&<>/~`;:!";
+
+class AddUserPopup
+{
+public:
+ static UseraddPopupResult showPopup(MythMainWindow *parent, QString title,
+ QString message, QString& text);
+};
+
+UseraddPopupResult AddUserPopup::showPopup(MythMainWindow *parent,
+ QString title, QString message, QString& text)
+{
+ MythPopupBox *popup = new MythPopupBox(parent, title);
+ popup->addLabel(message);
+
+ MythLineEdit *textEdit = new MythLineEdit(popup, "chooseEdit");
+ textEdit->setText(text);
+ popup->addWidget(textEdit);
+
+ popup->addButton(QObject::tr("OK"), popup, SLOT(accept()));
+ popup->addButton(QObject::tr("Cancel"), popup, SLOT(reject()));
+
+ textEdit->setFocus();
+
+ bool ok = (MythDialog::Accepted == popup->ExecPopup());
+ if (ok)
+ text = textEdit->text();
+ popup->hide();
+ popup->deleteLater();
+ return (ok) ? UseraddPopup_OK : UseraddPopup_CANCEL;
+}
+
+/****************************************************************************/
+
+
+void UserManagement::user_fillselection()
+{
+ //only add users with UID above 1000
+ QString line;
+ QString user;
+ QString quid;
+ int uid;
+ QFile file("/etc/passwd");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ user = line.section(":",0,0);
+ quid = line.section(":",2,2);
+ uid=quid.toInt();
+ if ( uid >= 1000 )
+ userlist->addSelection(user);
+ }
+ file.close();
+ }
+
+}
+
+bool UserManagement::user_exisit_check(QString name)
+{
+ QString line;
+ QString user;
+ QString quid;
+ bool founduser;
+ founduser=false;
+ int uid;
+ QFile file("/etc/passwd");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ user = line.section(":",0,0);
+ quid = line.section(":",2,2);
+ uid=quid.toInt();
+ if ( user == name )
+ {
+ founduser=true;
+ break;
+ }
+ }
+ file.close();
+ }
+
+ return founduser;
+
+}
+
+bool UserManagement::user_valid_check(QString check_string)
+{
+ QChar current_char;
+ int upperlimit;
+ bool found_char;
+ int i ;
+ upperlimit = invalid_chars.length() -1 ;
+ for(i= 0; i <= upperlimit; i++)
+ {
+ found_char = FALSE;
+ current_char = invalid_chars.at(i);
+ found_char = check_string.contains(current_char,FALSE);
+ if ( found_char )
+ return FALSE;
+ }
+ return TRUE ;
+
+}
+
+UserManagement::UserManagement():
+ VerticalConfigurationGroup(false,false,false,false)
+{
+ setLabel(QObject::tr("User Accounts"));
+ userlist = new TransComboBoxSetting(false);
+ userlist->setLabel(QObject::tr("User"));
+ userlist->addSelection("root");
+ userlist->addSelection("mythtv");
+ user_fillselection();
+ userlist->setHelpText(QObject::tr("Select the user to change the user password or delete the user account."));
+
+ userpass1= new TransLineEditSetting(true);
+ userpass1->setLabel("Password");
+ userpass1->SetPasswordEcho(passtoggle);
+ userpass1->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars));
+
+
+ passToggleButton = new TransButtonSetting;
+ passToggleButton->setLabel("Toggle Password View");
+ passToggleButton->setHelpText(QObject::tr("Hide or show the password."));
+
+ info = new TransLabelSetting;
+ info->setValue("");
+
+ userapplyButton = new TransButtonSetting;
+ userapplyButton->setLabel("Apply New Password");
+
+ usercreateButton = new TransButtonSetting;
+ usercreateButton->setLabel("Create New User Account");
+ usercreateButton->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars));
+
+ userdeleteButton = new TransButtonSetting;
+ userdeleteButton->setLabel("Delete User Account");
+ ConfigurationGroup *buttonlist = new GridConfigurationGroup(2,false,false);
+ buttonlist-> addChild(passToggleButton);
+ buttonlist-> addChild(userapplyButton);
+ buttonlist-> addChild(usercreateButton);
+ buttonlist-> addChild(userdeleteButton);
+
+// ConfigurationGroup *buttonlist2 = new GridConfigurationGroup(2,false);
+// buttonlist2-> addChild(passToggleButton);
+// buttonlist2-> addChild(userapplyButton);
+
+ rootSSH = new HostCheckBox("HOSTrootSSH");
+ rootSSH->setLabel("Enable remote access for the root user account");
+ rootSSH->setHelpText(QObject::tr("If checked, ssh for the root account will be enabled. If you are unsure leave this unchecked."));
+ rootSSH->setValue(false);
+
+ addChild(userlist);
+ addChild(userpass1);
+ addChild(rootSSH);
+// addChild(buttonlist2);
+ addChild(buttonlist);
+ addChild(info);
+
+ connect(userapplyButton, SIGNAL(pressed()), this, SLOT(applychanges()));
+ connect(userlist, SIGNAL(valueChanged(const QString&)), this, SLOT(userchanged()));
+ connect(usercreateButton, SIGNAL(pressed()), this, SLOT(usercreatepopup()));
+ connect(userdeleteButton, SIGNAL(pressed()), this, SLOT(userdeletepopup()));
+ connect(passToggleButton, SIGNAL(pressed()), this, SLOT(togglepass()));
+};
+
+void UserManagement::togglepass()
+{
+ if ( passtoggle)
+ passtoggle = false;
+ else
+ passtoggle = true;
+
+ userpass1->SetPasswordEcho(passtoggle);
+}
+
+void UserManagement::applychanges()
+{
+ QString user;
+ QString password;
+ QString user_e;
+
+ user=userlist->getValue();
+ password=userpass1->getValue();
+
+ user_e = QRegExp::escape( user );
+ password = QRegExp::escape( password );
+ if ( ! user_valid_check (password))
+ {
+ info->setValue("ERROR: The password contains invalid characters!");
+ return;
+ }
+ info->setValue("The password has been changed for user " + user + ".");
+ QString cmdtxt;
+ cmdtxt="sudo ";
+ cmdtxt.append("myth_user_call -c pass -u " + user_e + " -p " + password );
+ myth_system(cmdtxt);
+}
+
+void UserManagement::userchanged()
+{
+ info->setValue(" ");
+ userpass1->setValue("");
+}
+
+void UserManagement::usercreatepopup()
+{
+ QString name;
+ QString name_e;
+ int key = 0;
+ UseraddPopupResult result = AddUserPopup::showPopup(
+ GetMythMainWindow(),
+ tr(""),
+ tr("Enter New User Name"), name);
+ if (result == UseraddPopup_CANCEL)
+ return;
+ //check if name exisit || add it
+ if ( user_exisit_check(name) )
+ {
+ info->setValue("User name " + name + " already exists. Cannot create user.");
+ userlist->setFocus();
+ key = Qt::Key_Down;
+ QApplication::postEvent(GetMythMainWindow(),
+ new ExternalKeycodeEvent(key));
+
+ return;
+ }
+
+ if ( ! user_valid_check (name))
+ {
+ info->setValue("ERROR: The user name contains invalid characters!");
+ return;
+ }
+ userlist->addSelection(name);
+ userlist->setValue(name);
+ //run program to add user right here
+ QString cmdtxt;
+ name_e = QRegExp::escape( name );
+
+ cmdtxt="sudo ";
+ cmdtxt.append("myth_user_call -c add -u " + name_e );
+ myth_system(cmdtxt);
+
+ info->setValue("Enter a password for " + name + " and press Apply New Password.");
+ //Set focus to userlist, then press down three times to set focus to the password box.
+ userlist->setFocus();
+
+ key = Qt::Key_Down;
+ QApplication::postEvent(GetMythMainWindow(),
+ new ExternalKeycodeEvent(key));
+ key = Qt::Key_Down;
+ QApplication::postEvent(GetMythMainWindow(),
+ new ExternalKeycodeEvent(key));
+ key = Qt::Key_Down;
+ QApplication::postEvent(GetMythMainWindow(),
+ new ExternalKeycodeEvent(key));
+
+}
+
+void UserManagement::userdeletepopup()
+{
+ QString user;
+ QString user_e;
+ user=userlist->getValue();
+ QString message = "Remove " + user + "?" ;
+
+ DialogCode value = MythPopupBox::Show2ButtonPopup(
+ GetMythMainWindow(), "", message,
+ tr("Remove User"),
+ tr("Do NOT Remove User"),
+ kDialogCodeButton1);
+
+ if (kDialogCodeButton0 == value)
+ {
+ info->setValue("Removed user: " + user);
+ if ( user == "root" || user == "mythtv" )
+ {
+ info->setValue("Cannot remove user: " + user);
+ return;
+ }
+ userlist->setValue("root");
+ userlist->removeSelection(user);
+ //run program to remove user
+ QString cmdtxt;
+ user_e = QRegExp::escape( user );
+ cmdtxt="sudo ";
+ cmdtxt.append("myth_user_call -c delete -u " + user_e );
+ myth_system(cmdtxt);
+ info->setValue("Removed user: " + user);
+ }
+ else
+ info->setValue("Did not remove user: " + user);
+}
+
+WebPassword::WebPassword():
+ TriggeredConfigurationGroup(false,false,true,true,true,true,true,true)
+{
+ setLabel(QObject::tr("Web Security Settings"));
+ webAuth = new HostCheckBox("HOSTwebauth");
+ webAuth->setLabel("Enable Password");
+ webAuth->setHelpText(QObject::tr("Use password protection for the local website."));
+ webAuth->setValue(false);
+ webuser = new HostLineEdit("Hostwebuser");
+ webuser->setLabel("Username");
+ webuser->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars));
+
+ webpassword = new HostLineEdit("Hostwebpassword");
+ webpassword->setLabel("Password");
+ webpassword->SetPasswordEcho(passtoggle);
+ webpassword->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars));
+
+ webpassToggleButton = new TransButtonSetting;
+ webpassToggleButton->setLabel("Toggle Password View");
+ webpassToggleButton->setHelpText(QObject::tr("Hide or show the password."));
+
+ webapplyButton = new TransButtonSetting;
+ webapplyButton->setLabel("Apply New Password");
+
+ info = new TransLabelSetting;
+ info->setValue("");
+
+ connect(webpassToggleButton, SIGNAL(pressed()), this, SLOT(togglepass()));
+ connect(webapplyButton, SIGNAL(pressed()),this , SLOT(webpassword_gathersettings()));
+
+ ConfigurationGroup* webpassgroup = new VerticalConfigurationGroup(false);
+ webpassgroup->addChild(webuser);
+ webpassgroup->addChild(webpassword);
+ webpassgroup->addChild(info);
+ webpassgroup->addChild(webpassToggleButton);
+ webpassgroup->addChild(webapplyButton);
+
+ addChild(webAuth);
+ setTrigger(webAuth);
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", webpassgroup);
+
+}
+
+
+void WebPassword::togglepass()
+{
+ if ( passtoggle)
+ passtoggle = false;
+ else
+ passtoggle = true;
+ webpassword->SetPasswordEcho(passtoggle);
+}
+
+bool WebPassword::valid_check(QString check_string)
+{
+ // QString invalid_chars;
+ QChar current_char;
+ int upperlimit;
+ bool found_char;
+ int i ;
+ //invalid_chars = "&<>/~`;";
+ upperlimit = invalid_chars.length() -1 ;
+ for(i= 0; i <= upperlimit; i++)
+ {
+ found_char = FALSE;
+ current_char = invalid_chars.at(i);
+ found_char = check_string.contains(current_char,FALSE);
+ if ( found_char )
+ return FALSE;
+ }
+ return TRUE ;
+
+}
+
+void WebPassword::webpassword_gathersettings()
+{
+
+ QString pass_enabled;
+ QString web_user;
+ QString web_pass;
+ QString webuser_e;
+ QString webpass_e;
+ pass_enabled=webAuth->getValue();
+ web_user=webuser->getValue();
+ web_pass=webpassword->getValue();
+ webuser_e = QRegExp::escape( web_user );
+ webpass_e = QRegExp::escape( web_pass );
+ if ( ! valid_check (webuser_e))
+ {
+ info->setValue("ERROR: The user name contains invalid characters!");
+ return;
+ }
+
+ if ( ! valid_check (webpass_e))
+ {
+ info->setValue("ERROR: The password contains invalid characters!");
+ return;
+ }
+ cout << "Running program to make the changes for web password" << endl;
+ QString cmdtxt;
+
+ cmdtxt="sudo ";
+ cmdtxt.append("myth_user_call -c web -u " + webuser_e + " -p " + webpass_e );
+ myth_system(cmdtxt);
+ info->setValue("The user name and password have been added.");
+
+}
+
+WebPasswordFrame::WebPasswordFrame():
+ VerticalConfigurationGroup()
+{
+ WebPassword *webpassword = new WebPassword();
+ addChild(webpassword);
+}
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h
new file mode 100755
index 0000000..3b4b471
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h
@@ -0,0 +1,60 @@
+#include <settings.h>
+#include "mythdialogs.h"
+#include "libmyth/mythdialogs.h"
+#include "libmyth/mythwidgets.h"
+#include "installsettings.h"
+
+
+class UserManagement: public VerticalConfigurationGroup {
+ Q_OBJECT
+public:
+ UserManagement();
+ TransComboBoxSetting *userlist;
+ TransLineEditSetting *userpass1;
+ TransButtonSetting *userapplyButton;
+ TransButtonSetting *usercreateButton;
+ TransButtonSetting *userdeleteButton;
+ TransButtonSetting *passToggleButton;
+ TransLabelSetting *info;
+ TransCheckBoxSetting *lockaccount;
+ HostCheckBox *rootSSH;
+ void user_fillselection(void);
+ bool user_exisit_check(QString);
+ bool user_valid_check(QString);
+
+public slots:
+ void applychanges();
+ void userchanged();
+ void usercreatepopup();
+ void userdeletepopup();
+ void togglepass();
+};
+
+
+
+class WebPassword: public
+ TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ WebPassword();
+ HostLineEdit *webuser;
+ HostLineEdit *webpassword;
+ HostCheckBox *webAuth;
+ TransButtonSetting *webpassToggleButton;
+ TransLabelSetting *info;
+ bool valid_check(QString);
+ TransButtonSetting *webapplyButton;
+
+public slots:
+ void webpassword_gathersettings();
+ void togglepass();
+};
+
+class WebPasswordFrame: public
+ VerticalConfigurationGroup {
+ Q_OBJECT
+public:
+ WebPasswordFrame();
+ TransButtonSetting *webapplyButton;
+
+};
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp
new file mode 100755
index 0000000..f7f9963
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp
@@ -0,0 +1,409 @@
+#include <mythcontext.h>
+#include "installsettings.h"
+#include "settemplate.h"
+#include <stdlib.h>
+
+
+void create_temp_table (QString create_table_name,QString like_name)
+{
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare("create table " + create_table_name + " like " + like_name + ";" );
+ query.exec();
+ if ( like_name == "settings")
+ {
+ query.prepare("Alter table " + create_table_name + " add unique ( value ) ; " );
+ query.exec();
+ }
+ query.prepare(" truncate " + create_table_name + ";" );
+ query.exec();
+};
+
+void drop_temp_table (QString tname)
+{
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare("drop table " + tname + ";" );
+ query.exec();
+}
+
+void restart_frontend ()
+{
+
+ QString cmdtxt;
+ cmdtxt=MV_ROOT ;
+ cmdtxt.append("bin/systemconfig.sh reloadfe" );
+ //cout << "Calling systemconfig.sh reloadfe" << endl;
+ system(cmdtxt);
+ //system("/root/systemconfig.sh reloadfe" );
+}
+
+void choosetemplate (QString templateop, QString templatename , QString templatehostname = "")
+{
+ if ( templateop == "" )
+ {
+ MythCtemplate setting;
+// setting.load();
+// setting.save();
+ setting.exec();
+ };
+
+ QString thistemplate;
+ QString thisoperation;
+ QString thishost;
+ //QString runcommand = "/root/restore_default_settings.sh";
+ QString runcommand = "echo ";
+ // //cout << templateop << endl;
+ // //cout << templatename << endl;
+ // //cout << templatehostname << endl;
+
+ if (templateop == "")
+ thisoperation = gCoreContext->GetSetting("HOSTtemplatetype");
+ else
+ thisoperation = templateop;
+
+ thistemplate = "none";
+
+
+ if ( thisoperation == "save" )
+ {
+ if (templatename == "" )
+ thistemplate = gCoreContext->GetSetting("HostTemplateSave");
+ else
+ thistemplate = templatename;
+
+ savesettings(thistemplate);
+ }
+ else if ( thisoperation == "restore" )
+ {
+ if (templatename == "" )
+ thistemplate = gCoreContext->GetSetting("HostTemplateRestore");
+ else
+ thistemplate = templatename;
+
+ if ( thistemplate == "default_1")
+ c_from("default_1" , thistemplate);
+ else if ( thistemplate == "default_2")
+ c_from("default_2" ,thistemplate);
+ else
+ restoresettings(thistemplate);
+
+ }
+ else if ( thisoperation == "copy_from" )
+ {
+ if (templatename == "" )
+ {
+ thishost = gCoreContext->GetSetting("HostSelectcopy_from");
+ thistemplate = gCoreContext->GetSetting("HostTemplateRestore");
+ }
+ else
+ {
+ thishost=templatehostname;
+ thistemplate=templatename;
+ };
+
+ c_from(thishost,thistemplate);
+ }
+
+
+// if ( thistemplate != "none" )
+// {
+// std:://cout << runcommand << endl;
+ // system(runcommand);
+ //}
+};
+
+
+void savesettings (QString templatenumber )
+{
+ //cout << "SAVING....." << templatenumber << endl;
+ QString templatename = "settings_" + templatenumber ;
+ // Remove old saved values
+ MSqlQuery query(MSqlQuery::InitCon());
+ query.prepare( "delete from " + templatename + " where hostname=:HOSTNAME ;" );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+ //insert all new settings
+ query.prepare( "replace into " + templatename + " (select * from settings where hostname=:HOSTNAME ) ;" ) ;
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ // repeat for keybindings
+ templatename = "keybindings_" + templatenumber ;
+ query.prepare( "delete from " + templatename + " where hostname=:HOSTNAME ;" );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ query.prepare( "replace into " + templatename + " (select * from keybindings where hostname=:HOSTNAME ) ;" );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+}
+
+void restoresettings (QString templatenumber )
+{
+//cout << "RESTORING....." << templatenumber << endl;
+// DEFAULT settings are handled by the copy from routine
+ MSqlQuery query(MSqlQuery::InitCon());
+ QStringList tablelist ;
+ QStringList::Iterator it;
+ QString current_table;
+ tablelist.append ("settings");
+ tablelist.append ("keybindings");
+ QString templatename;
+
+ for ( it = tablelist.begin(); it != tablelist.end(); ++it )
+ {
+ current_table = *it ;
+ //find template table to use
+ QString templatename = current_table + "_" + templatenumber ;
+ QString temptable="temp_table_" + current_table + "_" + gCoreContext->GetHostName() ;
+ // create temp table for merging settings, The merge is needed to ac//coutn for any new settings.
+ create_temp_table(temptable, current_table );
+
+ // copy in current settings
+ query.prepare( "replace into " + temptable + " (select * from " + current_table + " where hostname=:HOSTNAME ) ; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ // need to remove all non HOST settigns
+
+ // copy in stored settings
+ query.prepare( "replace into " + temptable + " (select * from " + templatename + " where hostname=:HOSTNAME ) ; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ // remove current settings. Need to remove because the old table allows for duplicates and replace into doesn' seem to "replace"
+ query.prepare( "delete from " + current_table + " where hostname=:HOSTNAME ;" );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+
+ // copy new settings from temp to current
+ query.prepare( "replace into " + current_table + " (select * from " + temptable + " );" );
+ query.exec();
+
+ // drop temptable
+ drop_temp_table(temptable);
+
+ }
+ restart_frontend();
+};
+
+void c_from(QString copyhost, QString templatenumber)
+{
+ //cout << "Copying....." + copyhost + " " + "templatenumber" << endl;
+ MSqlQuery query(MSqlQuery::InitCon());
+ //Create temp table, copy in settings from host_template, update hostname for new host,copy temp_table to settings.
+ QStringList tablelist ;
+ QStringList::Iterator it;
+ QString current_table ;
+ tablelist.append ("settings");
+ tablelist.append ("keybindings");
+ QString templatename;
+ QString temptable;
+ for ( it = tablelist.begin(); it != tablelist.end(); ++it )
+ {
+ current_table = *it ;
+ //cout << current_table << endl;
+ //find template table to use
+ if ( templatenumber == "Current" )
+ templatename = current_table ;
+ else
+ templatename = current_table + "_" + templatenumber ;
+
+ temptable="temp_table_" + current_table + "_" + gCoreContext->GetHostName() ;
+ // create temp table for merging settings
+
+ create_temp_table(temptable, current_table );
+ //cout << temptable + " " + current_table << endl;
+
+ // copy current settings from this host into temptable minus all Mythvantage settings
+ if ( current_table == "settings")
+ {
+ query.prepare( "replace into " + temptable + " (select * from " + current_table + " where hostname=:HOSTNAME and value not like 'HOST%' ) ; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ }
+ else
+ query.prepare( "replace into " + temptable + " (select * from " + current_table + " where hostname=:HOSTNAME ) ; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ // update hostname to match whatever the hostname of the template is
+ query.prepare ("update " + temptable + " set hostname=:HOSTNAME ; " );
+ query.bindValue( ":HOSTNAME" , copyhost );
+ query.exec();
+
+ // copy current settings from copy host into temptable minus all Mythvantage settings
+ if ( current_table == "settings")
+ query.prepare( "replace into " + temptable + " (select * from " + templatename + " where hostname=:HOSTNAME and value not like 'HOST%' ) ; " );
+
+ else
+ query.prepare( "replace into " + temptable + " (select * from " + templatename + " where hostname=:HOSTNAME ) ; " );
+
+ query.bindValue( ":HOSTNAME" , copyhost );
+ query.exec();
+
+ //update hostname
+ query.prepare ("update " + temptable + " set hostname=:HOSTNAME ; " );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ query.exec();
+
+ // delete old settings from settings table
+ if ( current_table == "settings")
+ {
+ query.prepare( "delete from " + current_table + " where hostname=:HOSTNAME and value not like 'HOST%' ;" );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ }
+ else
+ {
+ query.prepare( "delete from " + current_table + " where hostname=:HOSTNAME ;" );
+ query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() );
+ }
+ query.exec();
+
+ // copy settings from temptable to settings
+ if ( current_table == "settings")
+ query.prepare( "replace into " + current_table + " (select * from " + temptable + " where value not like 'HOST% ' ) ;" );
+ else
+ query.prepare( "replace into " + current_table + " (select * from " + temptable + " );" );
+
+
+ query.exec();
+
+ // drop temptable
+ // drop_temp_table(temptable);
+
+
+ restart_frontend();
+ };
+
+
+};
+
+
+
+
+static HostComboBox *HOSTtemplatetype()
+{
+ HostComboBox *gc = new HostComboBox("HOSTtemplatetype");
+ gc->setLabel(QObject::tr("Template options"));
+ gc->addSelection("Do Nothing") ;
+ gc->addSelection("restore");
+ gc->addSelection("save") ;
+ gc->addSelection("copy_from");
+
+ gc->setHelpText(QObject::tr("Select the name to save, this will make a copy of your keybindings and videoplayback. Choose none if you do not wish to change anything."));
+
+ return gc;
+}
+
+static HostComboBox *HostTemplateSave()
+{
+ HostComboBox *gc = new HostComboBox("HostTemplateSave");
+ gc->setLabel(QObject::tr("Save Template"));
+// gc->addSelection("none");
+ gc->addSelection("user1") ;
+ gc->addSelection("user2") ;
+ gc->addSelection("user3") ;
+ gc->setHelpText(QObject::tr("Select the name to save, this will make a copy of your keybindings and videoplayback. Choose none if you do not wish to change anything."));
+
+ return gc;
+}
+static HostComboBox *HostTemplateCopy_restore()
+{
+ HostComboBox *gc = new HostComboBox("HostTemplateRestore");
+ gc->setLabel(QObject::tr("Template"));
+ // gc->addSelection("none");
+ gc->addSelection("Current");
+ gc->addSelection("user1") ;
+ gc->addSelection("user2") ;
+ gc->addSelection("user3") ;
+ gc->setHelpText(QObject::tr("Select the template you wish to restore. This will change the way Myth repsonds to you remote buttons. Choose none if you do not wish to change anything."));
+
+ return gc;
+}
+
+static HostComboBox *HostTemplateRestore()
+{
+ HostComboBox *gc = new HostComboBox("HostTemplateRestore");
+ gc->setLabel(QObject::tr("Template"));
+ // gc->addSelection("none");
+ gc->addSelection("default_1");
+ gc->addSelection("default_2");
+ gc->addSelection("user1") ;
+ gc->addSelection("user2") ;
+ gc->addSelection("user3") ;
+ gc->setHelpText(QObject::tr("Select the template you wish to restore. This will change the way Myth repsonds to you remote buttons. Choose none if you do not wish to change anything."));
+
+ return gc;
+}
+
+static HostComboBox *HostSelectcopy_from()
+{
+ HostComboBox *gc = new HostComboBox("HostSelectcopy_from");
+ gc->setLabel(QObject::tr("Host"));
+ // gc->addSelection("none");
+
+ QString tempItem;
+
+ MSqlQuery query(MSqlQuery::InitCon());
+
+ query.prepare( "SELECT DISTINCT hostname from settings where hostname is not null;");
+
+ if (query.exec() && query.isActive() && query.size() > 0)
+ {
+ while (query.next())
+ {
+ tempItem = query.value(0).toString();
+ gc->addSelection(tempItem);
+
+ }
+ }
+ gc->setHelpText(QObject::tr("Select the Host you wish to copy settings from."));
+
+ return gc;
+}
+
+class TemplateSettings:
+ public TriggeredConfigurationGroup {
+public:
+ TemplateSettings():
+ //ConfigurationGroup(false, true, false, false),
+ //VerticalConfigurationGroup(false, true, false, false),
+ TriggeredConfigurationGroup(true) {
+ setLabel(QObject::tr("Manage templates"));
+// setUseLabel(false);
+
+ Setting* Mtemplate = HOSTtemplatetype();
+ addChild(Mtemplate);
+ setTrigger(Mtemplate);
+
+
+ ConfigurationGroup* trestore = new VerticalConfigurationGroup(false);
+ trestore->addChild(HostTemplateRestore());
+
+ ConfigurationGroup* tsave = new VerticalConfigurationGroup(false);
+ tsave->addChild(HostTemplateSave());
+
+ ConfigurationGroup* tcopy = new VerticalConfigurationGroup(false);
+ tcopy->addChild(HostSelectcopy_from());
+ tcopy->addChild(HostTemplateCopy_restore());
+
+
+ addTarget("Do Nothing", new VerticalConfigurationGroup(true));
+ addTarget("restore", trestore);
+ addTarget("save", tsave);
+ addTarget("copy_from", tcopy);
+
+ };
+};
+
+MythCtemplate::MythCtemplate()
+{
+
+ TemplateSettings *templatesettings = new TemplateSettings();
+ addChild(templatesettings);
+
+}
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h
new file mode 100755
index 0000000..a730cf5
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h
@@ -0,0 +1,13 @@
+#include <settings.h>
+#include "mythdialogs.h"
+
+class MythCtemplate: public ConfigurationWizard {
+public:
+ MythCtemplate();
+
+};
+
+void choosetemplate(QString,QString,QString);
+void savesettings(QString);
+void restoresettings(QString);
+void c_from(QString , QString="current" );
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp
new file mode 100755
index 0000000..26d83ee
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp
@@ -0,0 +1,92 @@
+#include <unistd.h>
+#include "misc_settings.h"
+#include "mv_common.h"
+//Added by qt3to4:
+#include <Q3TextStream>
+#include "mythuihelper.h"
+
+#include "supplemental.h"
+
+
+using namespace std;
+
+extern HostParms hostparm;
+static HostComboBox *HostWindowManager()
+{
+ HostComboBox *gc = new HostComboBox("HostWindowManager");
+ gc->setLabel(QObject::tr("WindowManger"));
+ gc->addSelection("enlightenment");
+ gc->addSelection("fluxbox");
+ gc->addSelection("windowmaker");
+ gc->setValue("enlightenment");
+ gc->setHelpText(QObject::tr("Windowmanager to use. Most people will want to use the default of enlightenment"));
+ return gc;
+}
+
+WindowManager_settings::WindowManager_settings():
+ TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
+ Setting* trigger = HostWindowManager() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ QString systemtype = gCoreContext->GetSetting("HostSystemType");
+ QString runfe = gCoreContext->GetSetting("HostRunFrontend");
+
+
+
+ HostSupplemental = new HostCheckBox("HOSTSupplemental");
+ HostSupplemental->setLabel("Install supplemental package");
+ HostSupplemental->setHelpText(QObject::tr("Checking this will enable xymon and an alternate local website ."));
+ HostSupplemental->setValue(true);
+
+
+ HostEnhancedWMStyle = new HostCheckBox("HostEnhancedWMStyle");
+ HostEnhancedWMStyle->setLabel(QObject::tr("Use Enhanced Sytle"));
+ HostEnhancedWMStyle->setHelpText(QObject::tr("Enhanced will change the startup behaviour of Mythtv and messages. Checking enhanced will also install supplemental"));
+ HostEnhancedWMStyle->setValue(true);
+
+
+
+ connect(HostEnhancedWMStyle, SIGNAL(valueChanged(bool)),
+ this, SLOT(change_supplemental(bool)));
+
+
+ ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true);
+ ConfigurationGroup* settings = new GridConfigurationGroup(2,true);
+ settings->addChild(HostEnhancedWMStyle);
+// if ( systemtype == "Master_backend" || systemtype == "Standalone" )
+// settings->addChild(HostSupplemental);
+
+ addTarget("enlightenment", settings);
+ addTarget("windowmaker", settings );
+ addTarget("fluxbox", settings);
+ };
+//};
+
+void WindowManager_settings::change_supplemental(bool newvalue)
+{
+ if ( newvalue == true )
+ HostSupplemental->setValue(true);
+}
+
+
+Supplementalhostsettings::Supplementalhostsettings():
+ VerticalConfigurationGroup(false,false,false,false)
+ {
+ WindowManager_settings *wmsettings = new WindowManager_settings();
+ QString systemtype = gCoreContext->GetSetting("HostSystemType");
+ QString runfe = gCoreContext->GetSetting("HostRunFrontend");
+ if (systemtype == "Standalone" || runfe == "1" )
+ addChild(wmsettings);
+
+// HostComboBox *HostAudiotype;
+// HostAudiotype = new HostComboBox("HostAudiotype",false);
+// HostAudiotype->setLabel(QObject::tr("Sound card driver"));
+// HostAudiotype->addSelection("ALSA");
+// HostAudiotype->addSelection("OSS");
+// HostAudiotype->addSelection("tinker");
+//
+// HostAudiotype->setHelpText(QObject::tr("Select the sound driver set to use (OSS or ALSA)." ) );
+// addChild(HostAudiotype);
+
+ }
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h
new file mode 100755
index 0000000..835d161
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h
@@ -0,0 +1,44 @@
+#include <mythcontext.h>
+#include <unistd.h>
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+#include "settings.h"
+#include "installsettings.h"
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+
+#include <stdlib.h>
+#include <cstdlib>
+#include <mythtv/mythdbcon.h>
+#include <qdir.h>
+#include <qapplication.h>
+#include "mythmiscutil.h"
+
+class WindowManager_settings: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ WindowManager_settings();
+ HostCheckBox *HostEnhancedWMStyle;
+ HostCheckBox *HostSupplemental;
+ signals:
+ void eth0_is_default(void);
+ public slots:
+ void change_supplemental(bool);
+};
+
+
+
+class Supplementalhostsettings: public VerticalConfigurationGroup {
+ // Q_OBJECT
+public:
+ Supplementalhostsettings();
+ // HostCheckBox *HostSupplemental;
+ // HostComboBox *HostAudiotype; //duplicated
+
+};
+
+
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp
new file mode 100755
index 0000000..9f53f18
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp
@@ -0,0 +1,112 @@
+#include <unistd.h>
+#include "misc_settings.h"
+#include "mv_common.h"
+//Added by qt3to4:
+#include <Q3TextStream>
+#include "mythuihelper.h"
+
+#include "vnc.h"
+
+
+using namespace std;
+
+extern HostParms hostparm;
+
+// static HostLineEdit *HostVNClogin()
+// {
+// HostLineEdit *gc = new HostLineEdit("HostVNClogin");
+// gc->setLabel(QObject::tr("Login"));
+// gc->setValue("");
+// gc->setHelpText(QObject::tr("Login for vnc account"));
+// return gc;
+// };
+//---------x11vnc
+static HostLineEdit *HostXVNCpassword()
+{
+ HostLineEdit *gc = new HostLineEdit("HostXVNCpassword");
+ gc->setLabel(QObject::tr("Password"));
+ gc->setValue("");
+ gc->SetPasswordEcho(true);
+ gc->setHelpText(QObject::tr("Password for XVNC account must be at least 5 characters long. Passwords shorter than 5 characters long will silently fail."));
+ return gc;
+};
+
+static HostCheckBox *HostXVNCEnable()
+{
+ HostCheckBox *gc = new HostCheckBox("HostXVNCEnable");
+ gc->setLabel(QObject::tr("Enable XVNC"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("This will allow you to remotely see what is currently displayed on the main screen. The session will be available on vnc:2 (port 5902)."));
+ return gc;
+};
+
+class XVNCsettings: public TriggeredConfigurationGroup {
+public:
+ XVNCsettings():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("XVNC Settings"));
+ SetVertical(true);
+ Setting* trigger = HostXVNCEnable() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false);
+ //settings->addChild(HostXVNClogin());
+ settings->addChild(HostXVNCpassword());
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", settings);
+ };
+};
+
+
+//------------------
+static HostLineEdit *HostVNCpassword()
+{
+ HostLineEdit *gc = new HostLineEdit("HostVNCpassword");
+ gc->setLabel(QObject::tr("Password"));
+ gc->setValue("");
+ gc->SetPasswordEcho(true);
+ gc->setHelpText(QObject::tr("Password for VNC account must be at least 5 characters long. Passwords shorter than 5 characters long will silently fail."));
+ return gc;
+};
+
+static HostCheckBox *HostVNCEnable()
+{
+ HostCheckBox *gc = new HostCheckBox("HostVNCEnable");
+ gc->setLabel(QObject::tr("Enable VNC"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("This will start a seperate VNC session that can be used for remote administration. The session will be available on vnc:1 (port 5901)."));
+ return gc;
+};
+
+class VNCsettings: public TriggeredConfigurationGroup {
+public:
+ VNCsettings():
+ TriggeredConfigurationGroup(false,false,false,false) {
+ setLabel(QObject::tr("VNC Settings"));
+ SetVertical(true);
+ Setting* trigger = HostVNCEnable() ;
+ addChild(trigger);
+ setTrigger(trigger);
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false);
+ //settings->addChild(HostVNClogin());
+ settings->addChild(HostVNCpassword());
+
+ addTarget("0", new VerticalConfigurationGroup(false, false));
+ addTarget("1", settings);
+ };
+};
+
+
+
+VNChostsettings::VNChostsettings():
+ VerticalConfigurationGroup(false,false,false,false)
+ {
+ setLabel(QObject::tr("Screen Sharing Settings"));
+ VNCsettings *vncframe = new VNCsettings();
+ XVNCsettings *xvncframe = new XVNCsettings();
+ addChild(vncframe);
+ addChild(xvncframe);
+ }
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h
new file mode 100755
index 0000000..3b1b349
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h
@@ -0,0 +1,28 @@
+#include <mythcontext.h>
+#include <unistd.h>
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+#include "settings.h"
+#include "installsettings.h"
+#include <qsqldatabase.h>
+#include <qsqlquery.h>
+
+#include <stdlib.h>
+#include <cstdlib>
+#include <mythtv/mythdbcon.h>
+#include <qdir.h>
+#include <qapplication.h>
+#include "mythmiscutil.h"
+
+
+class VNChostsettings: public VerticalConfigurationGroup {
+public:
+ VNChostsettings();
+
+};
+
+
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp
new file mode 100755
index 0000000..00a375e
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp
@@ -0,0 +1,696 @@
+#include <unistd.h>
+
+
+
+//Added by qt3to4:
+#include <Q3TextStream>
+#include "mythcontext.h"
+//#include "tv.h"
+#include <stdlib.h>
+
+#include "xorgsettings.h"
+
+#include <qdir.h>
+#include <cstdlib>
+
+
+extern HostParms hostparm;
+extern DDCinfo ddcinfo;
+// __________________All the Xorg settings______________
+void ReadDDCvalues (void)
+{
+ QString line;
+ QString currentitem;
+ // system ("/usr/sbin/ddcprobe > /tmp/ddcinfo");
+ QFile file("/tmp/ddcinfo");
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.contains("Timing ranges:") )
+ {
+ currentitem = line.section( "=", 1,1 );
+ ddcinfo.XVrefresh = line.section( "=", 2,2 );
+ ddcinfo.XHsync = currentitem.section( "," , 0,0 );
+ }
+ else if ( line.contains (" Dimensions") )
+ {
+ ddcinfo.Displaysize= line.section( ":", 1,1 );
+ };
+ }
+ file.close();
+ }
+};
+
+static HostCheckBox *HostXUseAdvanced()
+{
+ HostCheckBox *gc = new HostCheckBox("HostXUseAdvanced");
+ gc->setLabel(QObject::tr("Advanced xorg configuration"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr("Displays more settings for Xorg"));
+ return gc;
+};
+
+static HostComboBox *HostXgeneric_connection()
+{
+ HostComboBox *gc = new HostComboBox("HostXgenericConnection",false);
+ gc->setLabel(QObject::tr("Connection"));
+ gc->addSelection("VGA");
+ gc->addSelection("DVI");
+ gc->addSelection("TV");
+ gc->addSelection("AUTO");
+ gc->setHelpText(QObject::tr("Video-out"));
+ return gc;
+}
+
+
+static HostCheckBox *HostXIgnoreEDID()
+{
+ HostCheckBox *gc = new HostCheckBox("HostXIgnoreEDID");
+ gc->setLabel(QObject::tr("Ignore data provided by monitor"));
+ gc->setValue(false);
+ gc->setHelpText(QObject::tr(""));
+ return gc;
+};
+
+
+static HostSpinBox *HostXHsyncLow()
+{
+ HostSpinBox *gc = new HostSpinBox("HostXHsyncLow", 1, 200, 1, true);
+ gc->setLabel(QObject::tr("Hsync"));
+ gc->setValue(6);
+ gc->setHelpText(QObject::tr("" ));
+ return gc;
+}
+static HostSpinBox *HostXHsyncHigh()
+{
+ HostSpinBox *gc = new HostSpinBox("HostXHsyncHigh", 1, 200, 1, true);
+ gc->setLabel(QObject::tr(""));
+ gc->setValue(6);
+ gc->setHelpText(QObject::tr("" ));
+ return gc;
+}
+
+static HostSpinBox *HostXVrefreshLow()
+{
+ HostSpinBox *gc = new HostSpinBox("HostXVrefreshLow", 1, 200, 1, true);
+ gc->setLabel(QObject::tr("Vrefresh"));
+ gc->setValue(6);
+ gc->setHelpText(QObject::tr("" ));
+ return gc;
+}
+static HostSpinBox *HostXVrefreshHigh()
+{
+ HostSpinBox *gc = new HostSpinBox("HostXVrefreshHigh", 1, 200, 1, true);
+ gc->setLabel(QObject::tr(""));
+ gc->setValue(6);
+ gc->setHelpText(QObject::tr("" ));
+ return gc;
+}
+
+static HostComboBox *HostXDisplaysize()
+{
+ HostComboBox *gc = new HostComboBox("HostXdisplaysize",true);
+ gc->setLabel(QObject::tr("Display size"));
+ gc->setHelpText(QObject::tr("Format should be two numbers 320 250" ));
+ gc->addSelection("487 274 _ 1920x1080 at 100dpi (16:9)");
+ gc->addSelection("325 182 _ 1280x720 at 100dpi (16:9)");
+ gc->addSelection("325 243 _ 1280x960 at 100dpi (4:3)");
+ gc->addSelection("260 195 _ 1024x768 at 100dpi (4:3)");
+ gc->addSelection("203 153 _ 800x600 at 100dpi (4:3)");
+ gc->addSelection("162 121 _ 640x480 at 100dpi (4:3)");
+ gc->addSelection("Custom");
+ return gc;
+}
+
+class EDIDprobedinfo : public TransLabelSetting
+{
+public:
+ EDIDprobedinfo()
+ {
+ QString currentitem = "Reported info \n";
+ currentitem.append("Hsync: ");
+ currentitem.append (ddcinfo.XHsync);
+ currentitem.append (" Vrefresh: ");
+ currentitem.append(ddcinfo.XVrefresh );
+ currentitem.append (" Displaysize: ");
+ currentitem.append(ddcinfo.Displaysize);
+ setLabel(currentitem);
+ };
+};
+
+
+void AdvancedXGeneric_modelines::generic_fillselection(QString modelinefile )
+{
+ if ( hostparm.displayshowadvancedX )
+ {
+ QString currentitem;
+ QString cfiletxt;
+ cfiletxt=MV_ROOT;
+ cfiletxt.append("templates/xorg/modeline." );
+ QString currentfile = cfiletxt;
+ currentfile.append(modelinefile);
+ QString line;
+ QRegExp sep( "\"" );
+ QFile file(currentfile);
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith("ModeLine"))
+ {
+ currentitem = line.section( sep , 1,1 );
+ if ( modelinefile == "VESA")
+ HostXadvancedresVESA->addSelection(currentitem);
+ else if ( modelinefile == "ATSC")
+ HostXadvancedresATSC->addSelection(currentitem);
+ else if ( modelinefile == "DVD")
+ HostXadvancedresDVD->addSelection(currentitem);
+ else if ( modelinefile == "NTSC")
+ HostXadvancedresNTSC->addSelection(currentitem);
+ else if ( modelinefile == "Custom")
+ HostXadvancedresCustom->addSelection(currentitem);
+ }
+ }
+ file.close();
+ }
+ }
+ return ;
+
+}
+
+
+class UseEDID: public TriggeredConfigurationGroup {
+public:
+ UseEDID():
+ TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
+ Setting* useedid = HostXIgnoreEDID();
+ addChild(useedid);
+ setTrigger(useedid);
+
+ ConfigurationGroup* XSYNC = new GridConfigurationGroup(2,false);
+ XSYNC->addChild(HostXHsyncLow());
+ XSYNC->addChild(HostXHsyncHigh());
+
+ ConfigurationGroup* XVREFRESH = new GridConfigurationGroup(2,false);
+ XVREFRESH->addChild(HostXVrefreshLow());
+ XVREFRESH->addChild(HostXVrefreshHigh());
+
+
+ ConfigurationGroup* settings = new GridConfigurationGroup(1,false);
+ settings->addChild(new EDIDprobedinfo);
+ settings->addChild( XSYNC);
+ settings->addChild(XVREFRESH);
+ settings->addChild(HostXDisplaysize());
+
+ addTarget("0", new GridConfigurationGroup(1,false));
+ addTarget("1", settings);
+ };
+};
+
+
+EDIDOptions::EDIDOptions()
+{
+ VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false);
+ rec->setLabel(QObject::tr("Advanced X options"));
+ rec->setUseLabel(false);
+ rec->addChild(new UseEDID);
+ addChild(rec);
+}
+
+
+AdvancedXGeneric_modelines::AdvancedXGeneric_modelines():
+ TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+{
+ SetVertical(false);
+ HostXModelineCatagory = new HostComboBox("HostXModelineCatagory");
+ HostXModelineCatagory->setLabel(QObject::tr("Type"));
+ HostXModelineCatagory->addSelection("Auto");
+ HostXModelineCatagory->addSelection("VESA");
+ HostXModelineCatagory->addSelection("ATSC");
+ HostXModelineCatagory->addSelection("DVD");
+ HostXModelineCatagory->addSelection("NTSC");
+ HostXModelineCatagory->addSelection("Custom");
+ //HostXModelineCatagory->addSelection("Nvidia_modeline");
+ HostXModelineCatagory->setHelpText(QObject::tr(""));
+
+ HostXadvancedresVESA = new HostComboBox("HostXadvancedresVESA");
+ HostXadvancedresATSC = new HostComboBox("HostXadvancedresATSC");
+ HostXadvancedresDVD = new HostComboBox("HostXadvancedresDVD");
+ HostXadvancedresNTSC = new HostComboBox("HostXadvancedresNTSC");
+ HostXadvancedresCustom= new HostComboBox("HostXadvancedresCustom");
+
+ generic_fillselection("VESA");
+ generic_fillselection("ATSC");
+ generic_fillselection("DVD");
+ generic_fillselection("NTSC");
+ generic_fillselection("Custom");
+
+ addChild(HostXModelineCatagory);
+ setTrigger(HostXModelineCatagory);
+
+ addTarget("VESA", HostXadvancedresVESA);
+ addTarget("ATSC", HostXadvancedresATSC);
+ addTarget("DVD", HostXadvancedresDVD);
+ addTarget("NTSC", HostXadvancedresNTSC);
+ addTarget("Custom",HostXadvancedresCustom);
+ addTarget("Auto", new VerticalConfigurationGroup(false, false));
+
+};
+
+void AdvancedXGeneric_modelines::AdvancedXGeneric_modelines_GatherSettings(void)
+{
+ QString modelinetype = HostXModelineCatagory->getValue();
+ QString tempmodeline = "HostXadvancedres" + modelinetype ;
+ QString modeline;
+ if ( modelinetype == "VESA")
+ modeline= HostXadvancedresVESA->getValue() ;
+ else if ( modelinetype == "ATSC")
+ modeline= HostXadvancedresATSC->getValue() ;
+ else if ( modelinetype == "DVD")
+ modeline= HostXadvancedresDVD->getValue();
+ else if ( modelinetype == "NTSC")
+ modeline= HostXadvancedresNTSC->getValue();
+ else if ( modelinetype == "Custom")
+ modeline= HostXadvancedresCustom->getValue();
+ hostparm.ThisXresadvanced = modelinetype +"_"+modeline;
+ // Jump to final step
+ testXconfiguration();
+}
+
+
+// --------------------------------------------start of nvidia specific ------------------------------------
+
+
+AdvancedXNvidiaConnections::AdvancedXNvidiaConnections():
+ TriggeredConfigurationGroup(false,false,true,true,true,true,true,true) {
+
+ HostXNvidiaConnection = new HostComboBox("HostXNvidiaConnection",false);
+ HostXNvidiaConnection->setLabel(QObject::tr("Connection"));
+ HostXNvidiaConnection->addSelection("Auto");
+ HostXNvidiaConnection->addSelection("DVI");
+ HostXNvidiaConnection->addSelection("VGA");
+ HostXNvidiaConnection->addSelection("TV");
+ HostXNvidiaConnection->setHelpText(QObject::tr("Video-out"));
+
+ addChild(HostXNvidiaConnection);
+ setTrigger(HostXNvidiaConnection);
+ AdvancedXNvidia_modelines *ADVANCEDXNVIDIA_MODELINES = new AdvancedXNvidia_modelines;
+
+ HostXnVidiaTVstandard = new HostComboBox("HostXnVidiaTVstandard");
+ HostXnVidiaTVstandard->setLabel(QObject::tr("nVidia-out"));
+ HostXnVidiaTVstandard->addSelection("PAL-B" );
+ HostXnVidiaTVstandard->addSelection("PAL-D" );
+ HostXnVidiaTVstandard->addSelection("PAL-G" );
+ HostXnVidiaTVstandard->addSelection("PAL-H" );
+ HostXnVidiaTVstandard->addSelection("PAL-I" );
+ HostXnVidiaTVstandard->addSelection("PAL-K1");
+ HostXnVidiaTVstandard->addSelection("PAL-M" );
+ HostXnVidiaTVstandard->addSelection("PAL-N" );
+ HostXnVidiaTVstandard->addSelection("PAL-NC");
+ HostXnVidiaTVstandard->addSelection("NTSC-J");
+ HostXnVidiaTVstandard->addSelection("NTSC-M");
+ HostXnVidiaTVstandard->addSelection("HD480i" );
+ HostXnVidiaTVstandard->addSelection("HD480p" );
+ HostXnVidiaTVstandard->addSelection("HD720p" );
+ HostXnVidiaTVstandard->addSelection("HD1080i" );
+ HostXnVidiaTVstandard->addSelection("HD1080p");
+ HostXnVidiaTVstandard->addSelection("HD576i" );
+ HostXnVidiaTVstandard->addSelection("HD576p" );
+ HostXnVidiaTVstandard->setHelpText(QObject::tr("Indrustry standard resolution to send to the TV"));
+
+ HostXnVidiaTVformat = new HostComboBox("HostXnVidiaTVformat");
+ HostXnVidiaTVformat->setLabel(QObject::tr("TV-Format(nvidia)"));
+ HostXnVidiaTVformat->addSelection("AUTOSELECT");
+ HostXnVidiaTVformat->addSelection("COMPOSITE");
+ HostXnVidiaTVformat->addSelection("SVIDEO");
+ HostXnVidiaTVformat->addSelection("COMPONENT");
+ HostXnVidiaTVformat->addSelection("SCART");
+ HostXnVidiaTVformat->setHelpText(QObject::tr("Physical connection to the nvidia card"));
+
+ ConfigurationGroup* nvtvout = new VerticalConfigurationGroup(false);
+ nvtvout ->addChild(HostXnVidiaTVformat);
+ nvtvout->addChild(HostXnVidiaTVstandard);
+
+ addTarget("Auto",ADVANCEDXNVIDIA_MODELINES );
+ addTarget("DVI", ADVANCEDXNVIDIA_MODELINES );
+ addTarget("VGA",ADVANCEDXNVIDIA_MODELINES);
+ addTarget("TV", nvtvout);
+
+ connect(this, SIGNAL(nVidia_sig(void)),
+ ADVANCEDXNVIDIA_MODELINES, SLOT(AdvancedXNvidia_modelines_GatherSettings()));
+};
+
+
+
+
+void AdvancedXNvidia_modelines::Nvidia_fillselection(QString modelinefile )
+{
+ if ( hostparm.displayshowadvancedX )
+ {
+ QString currentitem;
+ QString cfiletxt;
+ cfiletxt=MV_ROOT;
+ cfiletxt.append("templates/xorg/modeline." );
+ QString currentfile = cfiletxt;
+ currentfile.append(modelinefile);
+ QString line;
+ QRegExp sep( "\"" );
+ QFile file(currentfile);
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ if ( line.startsWith("ModeLine"))
+ {
+ currentitem = line.section( sep , 1,1 );
+ if ( modelinefile == "VESA")
+ HostXNvidiaadvancedresVESA->addSelection(currentitem);
+ else if ( modelinefile == "ATSC")
+ HostXNvidiaadvancedresATSC->addSelection(currentitem);
+ else if ( modelinefile == "DVD")
+ HostXNvidiaadvancedresDVD->addSelection(currentitem);
+ else if ( modelinefile == "NTSC")
+ HostXNvidiaadvancedresNTSC->addSelection(currentitem);
+ else if ( modelinefile == "Custom")
+ HostXNvidiaadvancedresCustom->addSelection(currentitem);
+ }
+ }
+ file.close();
+ }
+ }
+ return ;
+
+}
+
+
+
+AdvancedXNvidia_modelines::AdvancedXNvidia_modelines():
+ TriggeredConfigurationGroup(true,false,true,true,true,true,true,true)
+{
+ SetVertical(true);
+ HostXNvidiaModelineCatagory = new HostComboBox("HostXNvidiaModelineCatagory");
+ HostXNvidiaModelineCatagory->setLabel(QObject::tr("Category"));
+ //HostXNvidiaModelineCatagory->addSelection("Auto");
+ // HostXNvidiaModelineCatagory->addSelection("VESA");
+ // HostXNvidiaModelineCatagory->addSelection("ATSC");
+ // HostXNvidiaModelineCatagory->addSelection("DVD");
+ // HostXNvidiaModelineCatagory->addSelection("NTSC");
+ // HostXNvidiaModelineCatagory->addSelection("Custom");
+ HostXNvidiaModelineCatagory->addSelection("Nvidia_modeline");
+ HostXNvidiaModelineCatagory->setHelpText(QObject::tr(""));
+
+// HostXNvidiaadvancedresVESA = new HostComboBox("HostXNvidiaadvancedresVESA");
+// HostXNvidiaadvancedresATSC = new HostComboBox("HostXNvidiaadvancedresATSC");
+// HostXNvidiaadvancedresDVD = new HostComboBox("HostXNvidiaadvancedresDVD");
+// HostXNvidiaadvancedresNTSC = new HostComboBox("HostXNvidiaadvancedresNTSC");
+// HostXNvidiaadvancedresCustom= new HostComboBox("HostXNvidiaadvancedresCustom");
+//
+// Nvidia_fillselection("VESA");
+// Nvidia_fillselection("ATSC");
+// Nvidia_fillselection("DVD");
+// Nvidia_fillselection("NTSC");
+// Nvidia_fillselection("Custom");
+
+ HostXnVidia1080p = new HostCheckBox("HostXnVidia1080p");
+ HostXnVidia1080p->setLabel(QObject::tr("1080p"));
+ HostXnVidia1080p->setValue(true);
+ HostXnVidia1080p->setHelpText(QObject::tr(" "));
+
+ HostXnVidia1080i = new HostCheckBox("HostXnVidia1080i");
+ HostXnVidia1080i->setLabel(QObject::tr("1080i"));
+ HostXnVidia1080i->setValue(true);
+ HostXnVidia1080i->setHelpText(QObject::tr(" "));
+
+ HostXnVidia720p = new HostCheckBox("HostXnVidia720p");
+ HostXnVidia720p->setLabel(QObject::tr("720p"));
+ HostXnVidia720p->setValue(true);
+ HostXnVidia720p->setHelpText(QObject::tr(" "));
+
+ HostXnVidia480p = new HostCheckBox("HostXnVidia480p");
+ HostXnVidia480p->setLabel(QObject::tr("480p"));
+ HostXnVidia480p->setValue(true);
+ HostXnVidia480p->setHelpText(QObject::tr(" "));
+
+ ConfigurationGroup* nVidiastandard = new GridConfigurationGroup(2,false,false,true,true);
+ nVidiastandard ->addChild(HostXnVidia480p);
+ nVidiastandard ->addChild(HostXnVidia720p);
+ nVidiastandard ->addChild(HostXnVidia1080p);
+ nVidiastandard ->addChild(HostXnVidia1080i);
+ nVidiastandard ->addChild(HostXres());
+ nVidiastandard ->setLabel(QObject::tr("Standard Nvidia Modelines"));
+
+
+ addChild(HostXNvidiaModelineCatagory);
+ setTrigger(HostXNvidiaModelineCatagory);
+
+// addTarget("VESA", HostXNvidiaadvancedresVESA);
+// addTarget("ATSC", HostXNvidiaadvancedresATSC);
+// addTarget("DVD", HostXNvidiaadvancedresDVD);
+// addTarget("NTSC", HostXNvidiaadvancedresNTSC);
+// addTarget("Custom",HostXNvidiaadvancedresCustom);
+ addTarget("Nvidia_modeline",nVidiastandard);
+ addTarget("Auto", new VerticalConfigurationGroup(false, false));
+
+};
+
+
+void AdvancedXNvidiaConnections::AdvancedXNvidiaConnectionsGatherSettings(void)
+{
+ //cout << "inside AdvancedXNvidiaConnectionsGatherSettings" << endl;
+ hostparm.ThisXconnection = HostXNvidiaConnection->getValue();
+ hostparm.ThisXTVstandard = HostXnVidiaTVformat->getValue();
+ hostparm.ThisXTVconnection = HostXnVidiaTVstandard->getValue();
+ emit nVidia_sig(); // jump to AdvancedXNvidia_modelines_GatherSettings
+
+};
+
+
+void AdvancedXNvidia_modelines::AdvancedXNvidia_modelines_GatherSettings(void)
+{
+ QString modelinecatagory = HostXNvidiaModelineCatagory->getValue();
+ QString tempmodeline = "HostXadvancedres" + modelinecatagory ;
+ QString modeline;
+
+ if ( modelinecatagory == "VESA")
+ modeline= HostXNvidiaadvancedresVESA->getValue() ;
+ else if ( modelinecatagory == "ATSC")
+ modeline= HostXNvidiaadvancedresATSC->getValue() ;
+ else if ( modelinecatagory == "DVD")
+ modeline= HostXNvidiaadvancedresDVD->getValue();
+ else if ( modelinecatagory == "NTSC")
+ modeline= HostXNvidiaadvancedresNTSC->getValue();
+ else if ( modelinecatagory == "Custom")
+ modeline= HostXNvidiaadvancedresCustom->getValue();
+ else if ( modelinecatagory == "Nvidia_modeline" )
+ modeline = "Builtin" ;
+ // need to add stuff to find the built in nvidia modelines
+ hostparm.ThisXresadvanced = modelinecatagory +"_"+modeline;
+ // Jump to final step
+ testXconfiguration();
+};
+// ----------------------------------------END nvidia specific
+
+
+
+AdvancedXcardtype::AdvancedXcardtype():
+ TriggeredConfigurationGroup(false,false,true,true,true,true,false,false) {
+ HostXcardtype = new HostComboBox("HostXcardtype",false);
+ HostXcardtype->setLabel(QObject::tr("Video card/driver"));
+ HostXcardtype->addSelection("nVidia");
+ //HostXcardtype->addSelection("ATI");
+ HostXcardtype->addSelection("VMWARE");
+ HostXcardtype->addSelection("Intel");
+ //HostXcardtype->addSelection("Via");
+ HostXcardtype->setHelpText(QObject::tr("Force video card driver to use."));
+ addChild(HostXcardtype);
+ setTrigger(HostXcardtype);
+
+ AdvancedXGeneric_modelines *ADVANCEDXGENERICMODELINES = new AdvancedXGeneric_modelines;
+ AdvancedXNvidiaConnections *ADVANCEDXNVIDIACONNECTIONS = new AdvancedXNvidiaConnections;
+
+
+
+
+ addTarget("VMWARE", HostXres());
+ addTarget("Intel", HostXres());
+ //addTarget("nVidia",HostXres());
+
+ //addTarget("VMWARE", ADVANCEDXGENERICMODELINES);
+ //addTarget("Intel", ADVANCEDXGENERICMODELINES);
+ addTarget("nVidia",ADVANCEDXNVIDIACONNECTIONS);
+
+ //addTarget("Via", ADVANCEDXGENERICMODELINES);
+ //addTarget("ATI",ADVANCEDXGENERICMODELINES);
+
+ //connect(this, SIGNAL(go(void)),
+ // ADVANCEDXGENERICMODELINES, SLOT(AdvancedXGeneric_modelines_GatherSettings()));
+ //connect(this, SIGNAL(gonVidia(void)),
+ // ADVANCEDXNVIDIACONNECTIONS, SLOT(AdvancedXNvidiaConnectionsGatherSettings()));
+
+};
+
+void AdvancedXcardtype::AdvancedXcardgatherSettings(void)
+{
+ //called when test button is pressed
+ hostparm.ThisXcardtype = HostXcardtype->getValue() ;
+ if (hostparm.ThisXcardtype == "nVidia")
+ emit gonVidia();
+ else if (hostparm.ThisXcardtype =="ATI")
+ emit goATI();
+ else
+ emit go();
+};
+
+
+// AdvancedXSettings::AdvancedXSettings():
+// TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+// setLabel(QObject::tr("Display Settings"));
+// Setting* Advancedxsettings = HostXUseAdvanced();
+// addChild(Advancedxsettings);
+// setTrigger(Advancedxsettings);
+// HostXIgnoreConfig = new HostCheckBox("HostXIgnoreConfig");
+// HostXIgnoreConfig->setLabel(QObject::tr("User supplied config. "));
+// HostXIgnoreConfig->setValue(false);
+// #ifdef __MVAPP__
+// HostXIgnoreConfig->setHelpText(QObject::tr("When this is checked, the system will use the configuration file provided by YOU. Place the file you want to use in /data/home/mythtv/templates/xorg.user."));
+// #else
+// HostXIgnoreConfig->setHelpText(QObject::tr("When this is checked, the system will use the configuration file provided by YOU. Place the file you want to use in /home/mythtv/templates/xorg.user."));
+// #endif
+// // HorizontalConfigurationGroup *lp =
+// // new HorizontalConfigurationGroup(false, false, true, true);
+// //
+// // TransButtonSetting *EDIDbutton = new TransButtonSetting();
+// // EDIDbutton->setLabel(tr("Display Settings"));
+// //
+// // TransButtonSetting *TestXbutton = new TransButtonSetting();
+// // TestXbutton->setLabel(tr("Test X Configuration"));
+// // lp->addChild(EDIDbutton);
+// // lp->addChild(TestXbutton);
+//
+// AdvancedXcardtype *AXCT = new AdvancedXcardtype ;
+//
+// ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+// // settings->addChild(AXCT);
+// //settings->addChild(lp);
+//
+// ConfigurationGroup* setting1 = new GridConfigurationGroup(1,false);
+// setting1->addChild(HostXres());
+// setting1->addChild(HostXIgnoreConfig);
+//
+// // connect(EDIDbutton, SIGNAL(pressed()), this, SLOT(ADJUSTEDID()));
+// // connect(TestXbutton, SIGNAL(pressed()), AXCT, SLOT(AdvancedXcardgatherSettings()));
+// addTarget("0",setting1);
+// addTarget("1", settings);
+//
+//
+//
+//
+// };
+
+AdvancedXSettings::AdvancedXSettings():
+ TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
+ setLabel(QObject::tr("Display Settings"));
+
+
+
+
+ HostXIgnoreConfig = new HostCheckBox("HostXIgnoreConfig");
+ HostXIgnoreConfig->setLabel(QObject::tr("User Supplied Configuration"));
+ HostXIgnoreConfig->setValue(false);
+#ifdef __MVAPP__
+ HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user."));
+#else
+ HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user."));
+#endif
+
+ Setting* Advancedxsettings = HostXIgnoreConfig;
+ addChild(Advancedxsettings);
+ setTrigger(Advancedxsettings);
+
+
+
+
+
+
+ ConfigurationGroup* settings = new VerticalConfigurationGroup(false);
+
+
+ ConfigurationGroup* setting1 = new GridConfigurationGroup(1,false);
+ setting1->addChild(HostXres());
+
+ addTarget("0",setting1);
+ addTarget("1", settings);
+
+
+
+
+};
+
+
+
+void AdvancedXSettings::ADJUSTEDID(void)
+{
+ EDIDOptions edidscreen;
+ edidscreen.exec();
+}
+
+
+void testXconfiguration(void)
+{
+ hostparm.ThisXIgnoreEDID =gCoreContext->GetSetting("HostXIgnoreEDID");
+ QString tempstring ;
+ tempstring = gCoreContext->GetSetting("HostXHsyncLow");
+ tempstring.append(" - ");
+ tempstring.append(gCoreContext->GetSetting("HostXHsyncHigh") );
+ hostparm.ThisXHsync=tempstring;
+
+ tempstring ="";
+ tempstring=gCoreContext->GetSetting("HostXVrefreshLow");
+ tempstring.append(" - ");
+ tempstring.append(gCoreContext->GetSetting("HostXVrefreshHigh"));
+ hostparm.ThisXVrefresh=tempstring;
+ hostparm.ThisXDisplaysize= gCoreContext->GetSetting("HostXDisplaysize");
+
+ QString commandline = "xconfig.sh test 0 ";
+ commandline.append(hostparm.ThisXcardtype);
+ commandline.append(" " );
+ commandline.append(hostparm.ThisXIgnoreEDID );
+ commandline.append(" " );
+ commandline.append(hostparm.ThisXconnection );
+ commandline.append(" \"" );
+ commandline.append(hostparm.ThisXHsync );
+ commandline.append(" \" " );
+ commandline.append(" \"" );
+ commandline.append(hostparm.ThisXVrefresh);
+ commandline.append(" \" " );
+ commandline.append(hostparm.ThisXresadvanced );
+ commandline.append(" " );
+ commandline.append(hostparm.ThisXTVconnection );
+ commandline.append(" " );
+ commandline.append(" \"" );
+ commandline.append(hostparm.ThisXDisplaysize);
+ commandline.append(" \" " );
+
+ QString message;
+ message = "Someday this button will do something, but for right now all it does is show this message.";
+ message.append ("\n");
+
+ message.append(commandline);
+ MythPopupBox::showOkPopup(
+ GetMythMainWindow(), QObject::tr("Test X button"),
+ message);
+};
+
+
+
+
+
+
+
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h
new file mode 100755
index 0000000..f8985cd
--- /dev/null
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h
@@ -0,0 +1,130 @@
+#include <settings.h>
+#include "mythdialogs.h"
+#include "libmyth/mythdialogs.h"
+#include "libmyth/mythwidgets.h"
+#include "installsettings.h"
+
+#include <Q3TextStream>
+#include <qdir.h>
+
+
+class AdvancedXNvidiaConnections: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ AdvancedXNvidiaConnections();
+ HostComboBox *HostXNvidiaConnection;
+ HostComboBox *HostXnVidiaTVformat;
+ HostComboBox *HostXnVidiaTVstandard;
+
+public slots:
+ void AdvancedXNvidiaConnectionsGatherSettings();
+signals:
+ void nVidia_sig(void);
+};
+
+
+class AdvancedXNvidia_modelines: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ AdvancedXNvidia_modelines();
+ HostComboBox *HostXNvidiaModelineCatagory;
+ HostComboBox *HostXNvidiaadvancedresVESA;
+ HostComboBox *HostXNvidiaadvancedresATSC;
+ HostComboBox *HostXNvidiaadvancedresDVD;
+ HostComboBox *HostXNvidiaadvancedresNTSC;
+ HostComboBox *HostXNvidiaadvancedresCustom;
+ HostCheckBox *HostXnVidia1080p;
+ HostCheckBox *HostXnVidia1080i;
+ HostCheckBox *HostXnVidia720p;
+ HostCheckBox *HostXnVidia480p;
+ void Nvidia_fillselection(QString);
+public slots:
+ void AdvancedXNvidia_modelines_GatherSettings(void);
+};
+
+
+//-------------------------------------------------
+
+class AdvancedXcardtype: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ AdvancedXcardtype();
+ HostComboBox *HostXcardtype;
+
+public slots:
+ void AdvancedXcardgatherSettings();
+signals:
+ void go(void );
+ void goATI(void);
+ void gonVidia(void);
+};
+
+
+class AdvancedXSettings: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ AdvancedXSettings();
+ HostCheckBox *HostXIgnoreConfig;
+protected slots:
+ void ADJUSTEDID(void);
+};
+
+
+class AdvancedXGeneric_modelines: public TriggeredConfigurationGroup {
+ Q_OBJECT
+public:
+ AdvancedXGeneric_modelines();
+ HostComboBox *HostXModelineCatagory;
+ HostComboBox *HostXadvancedresVESA;
+ HostComboBox *HostXadvancedresATSC;
+ HostComboBox *HostXadvancedresDVD;
+ HostComboBox *HostXadvancedresNTSC;
+ HostComboBox *HostXadvancedresCustom;
+ void generic_fillselection(QString);
+public slots:
+ void AdvancedXGeneric_modelines_GatherSettings(void);
+};
+
+
+class EDIDOptions : public ConfigurationWizard
+{
+public:
+ EDIDOptions();
+};
+
+
+void testXconfiguration();
+void ReadDDCvalues();
+
+
+
+
+#include <iostream>
+
+static HostComboBox *HostXres()
+//Used in the simple config
+{
+ HostComboBox *gc = new HostComboBox("HostXres");
+ gc->setLabel(QObject::tr("Initial Resolution"));
+ gc->addSelection("Auto") ;
+ gc->setHelpText(QObject::tr(""));
+ system ("print_xorg_res.py");
+
+ QFile file("/tmp/modelines");
+ QString line;
+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
+ {
+ Q3TextStream t( &file ); // use a text stream
+ while ( !t.eof() )
+ {
+ line = t.readLine();
+ gc->addSelection(line) ;
+ }
+ file.close();
+ }
+
+ return gc;
+}
+
+
+
diff --git a/abs/core/mythinstall/PKGBUILD b/abs/core/mythinstall/PKGBUILD
index f5265a6..96f7b8d 100644
--- a/abs/core/mythinstall/PKGBUILD
+++ b/abs/core/mythinstall/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Jams
pkgname=mythinstall
pkgver=8.1
-pkgrel=4
+pkgrel=5
pkgdesc="LinHES installer/systemconfig GUI."
arch=('i686' 'x86_64')
depends=('mythtv>=0.27')
@@ -9,26 +9,36 @@ makedepends=('mythtv>=0.27')
logofiles=`ls logo*.png`
source=('install-ui.xml' $logofiles)
+build() {
+# if [ -d $srcdir/MythVantage-app ]
+# then
+# msg "Removing old MythVantage-app src"
+# rm -rf $srcdir/MythVantage-app
+# fi
+ msg "Copying MythVantage-app to src"
+# cp -a $startdir/MythVantage-app $srcdir
+ rsync -au $startdir/MythVantage-app $srcdir
+
+ msg "Building mythinstall"
+ cd $srcdir/MythVantage-app/mythinstall && qmake
+ make || exit 1
+}
+
package() {
-# It is assumed that you have built the mythtv package in the same
- #cd $startdir
- #cd -
- #install -D MythVantage-app/mythinstall/install-ui.xml $pkgdir/usr/share/mythtv/themes/default/install-ui.xml
install -D $srcdir/install-ui.xml $pkgdir/usr/share/mythtv/themes/default/install-ui.xml
MVBINDIR=$pkgdir/usr/MythVantage/bin
mkdir -p $MVBINDIR
- install -m 0755 $startdir/mythinstall.bin $MVBINDIR/MythVantage
+ install -m 0755 $srcdir/MythVantage-app/mythinstall/mythinstall $MVBINDIR/MythVantage
cd $MVBINDIR
ln -s MythVantage mythvantage
ln -s MythVantage mythinstall
- #cd -
echo $logofiles
for i in $logofiles
do
- install -D -m 0755 $srcdir/$i $pkgdir/usr/MythVantage/logos/$i
+ install -D -m 0755 $srcdir/$i $pkgdir/usr/MythVantage/logos/$i
done
-
}
+
md5sums=('39d6b7bd1ee305c5523a3cf66d4c2338'
'3291ad55fe6d7884fc732313f1cc2924'
'80c0326a253df275afbe875a8ec14a3c'
diff --git a/abs/core/mythinstall/checkout_MythVantage.sh b/abs/core/mythinstall/checkout_MythVantage.sh
index ae4bcc7..1b6fe97 100755
--- a/abs/core/mythinstall/checkout_MythVantage.sh
+++ b/abs/core/mythinstall/checkout_MythVantage.sh
@@ -76,9 +76,6 @@ sed -i "s/mythvantage/LinHES/g" $MYDIR/src/MythVantage-app-patched/mythinstall/m
#echo 'INCLUDEPATH += $$MYTHPATH/mythtv/libs/libmythtv/' >> $MYDIR/src/MythVantage-app/mythinstall/mythinstall.pro
-#patch -N $MYDIR/src/MythVantage-app/mythinstall/installdialog.cpp < $MYDIR/installdialog.cpp.patch
-#patch -N $MYDIR/src/MythVantage-app/mythinstall/installationtype.cpp < $MYDIR/installationtype.cpp.patch
-
cd $MYDIR/src/MythVantage-app-patched/mythinstall && qmake
make || exit 1
#cd $MYDIR/src/MythVantage-app/mythbeselect && qmake
diff --git a/abs/core/mythinstall/fileshare.cpp.patch b/abs/core/mythinstall/fileshare.cpp.patch
deleted file mode 100644
index d220705..0000000
--- a/abs/core/mythinstall/fileshare.cpp.patch
+++ /dev/null
@@ -1,156 +0,0 @@
---- fileshare.cpp.orig 2013-12-07 16:36:24.882995387 +0000
-+++ fileshare.cpp 2013-12-07 17:52:59.075231547 +0000
-@@ -24,10 +24,10 @@
- static HostComboBox *HostHaveCentralNFS()
- {
- HostComboBox *gc = new HostComboBox("HostHaveCentralNFS");
-- gc->setLabel(QObject::tr("Central NFS server"));
-+ gc->setLabel(QObject::tr("Central NFS Server"));
- gc->addSelection("no");
- gc->addSelection("yes") ;
-- gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the masterbackend. Say no if you are confused."));
-+ gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the master backend. Select no if you are unsure."));
-
- return gc;
- }
-@@ -35,8 +35,8 @@
- static HostComboBox *HostCentralNFSIP()
- {
- HostComboBox *gc = new HostComboBox("HostCentralNFSIP",true);
-- gc->setLabel(QObject::tr("NFS server"));
-- gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, for example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file"));
-+ gc->setLabel(QObject::tr("NFS Server"));
-+ gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, For example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file."));
- gc->addSelection("example ip:share") ;
- gc->addSelection("file:nfsmap_auto") ;
- gc->addSelection("file:nfsmap") ;
-@@ -57,7 +57,7 @@
-
- HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true);
- gc->addSelection("/data/storage/central_nfs");
-- gc->setLabel(QObject::tr("Mount point"));
-+ gc->setLabel(QObject::tr("Mount Point"));
- gc->setHelpText(QObject::tr(""));
- return gc;
- }
-@@ -65,9 +65,9 @@
- static HostCheckBox *HostCentralNFSallhosts()
- {
- HostCheckBox *gc = new HostCheckBox("HostCentralNFSallhosts");
-- gc->setLabel(QObject::tr("All hosts use this share"));
-+ gc->setLabel(QObject::tr("All Hosts Use This Share"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("If checked then all new hosts added to the cluster will try to access the same share"));
-+ gc->setHelpText(QObject::tr("If checked then all new hosts added to the cluster will try to access the same share."));
- return gc;
- };
-
-@@ -111,6 +111,7 @@
- FileShareMainFrameClient::FileShareMainFrameClient():
- VerticalConfigurationGroup(false,false,false,false)
- {
-+ setLabel(QObject::tr("File Sharing Settings (1/2)"));
- VerticalConfigurationGroup* fileshareframeclientsettings =
- new VerticalConfigurationGroup(false, true,false,false);
-
-@@ -125,26 +126,26 @@
- static HostCheckBox *HostServiceNFS()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceNFS");
-- gc->setLabel(QObject::tr("Standard file sharing using NFS"));
-+ gc->setLabel(QObject::tr("File Sharing using NFS"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Allow any machine on your network access to media via NFS"));
-+ gc->setHelpText(QObject::tr("If checked, any device on the network can access media via NFS."));
- return gc;
- };
- static HostCheckBox *HostServiceSamba()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba");
-- gc->setLabel(QObject::tr("Windows sharing"));
-+ gc->setLabel(QObject::tr("File Sharing using SMB (Windows Sharing)"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Allow window machines to access media via windows file sharing"));
-+ gc->setHelpText(QObject::tr("If checked, any device on the network can access media via Windows SMB file sharing."));
- return gc;
- };
-
- static HostCheckBox *HostServiceSamba_write()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write");
-- gc->setLabel(QObject::tr("Readonly"));
-+ gc->setLabel(QObject::tr("ReadOnly"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. "));
-+ gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked, remote clients will have write and delete abilities."));
- return gc;
- };
-
-@@ -152,16 +153,16 @@
- static HostCheckBox *HostServiceSamba_writehome()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome");
-- gc->setLabel(QObject::tr("Readonly"));
-+ gc->setLabel(QObject::tr("ReadOnly"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. "));
-+ gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked, remote clients will have write and delete abilities."));
- return gc;
- };
-
- static HostCheckBox *HostServiceSamba_media()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media");
-- gc->setLabel(QObject::tr("share media"));
-+ gc->setLabel(QObject::tr("Share media"));
- gc->setValue(true);
- gc->setHelpText(QObject::tr(" "));
- return gc;
-@@ -170,7 +171,7 @@
- static HostCheckBox *HostServiceSamba_home()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home");
-- gc->setLabel(QObject::tr("share home"));
-+ gc->setLabel(QObject::tr("Share home"));
- gc->setValue(true);
- gc->setHelpText(QObject::tr(" "));
- return gc;
-@@ -182,7 +183,7 @@
- {
- HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true);
- gc->setLabel(QObject::tr("Workgroup"));
-- gc->setHelpText(QObject::tr("Workgroup for smb share"));
-+ gc->setHelpText(QObject::tr("Workgroup for Windows SMB shares."));
- gc->addSelection("WORKGROUP");
- QString currentitem;
- QString line;
-@@ -231,7 +232,7 @@
-
- void smb_busy_box() {
- system ("nmbscan -d > /tmp/smbdomainlist & ");
-- QString msgtext="Searching for windows workgroups";
-+ QString msgtext="Searching for Windows Workgroups";
- int return_code;
- MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
- MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,
-@@ -286,15 +287,17 @@
-
- //_______________Server NFS Frame
- FileShareMainFrameServer::FileShareMainFrameServer():
--VerticalConfigurationGroup(true,false,false,false)
-+VerticalConfigurationGroup(false,false,false,false)
- {
-+ setLabel(QObject::tr("File Sharing Settings (2/2)"));
-+
- VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true);
- TransLabelSetting *deniedlabel = new TransLabelSetting();
-- deniedlabel->setValue(" File sharing is not available for Front end only systems " );
-+ deniedlabel->setValue(" File sharing is not available for frontend_only systems." );
- denied->addChild(deniedlabel);
-
- VerticalConfigurationGroup* fileshare_frame_serversettings =
-- new VerticalConfigurationGroup(false, true,false,false);
-+ new VerticalConfigurationGroup(false,false,false,false);
- fileshare_frame_serversettings->addChild(HostServiceNFS());
- fileshare_frame_serversettings->addChild(new SAMBAsettings);
-
diff --git a/abs/core/mythinstall/infrared.cpp.patch b/abs/core/mythinstall/infrared.cpp.patch
deleted file mode 100644
index 7c3b2cf..0000000
--- a/abs/core/mythinstall/infrared.cpp.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- infrared.cpp.orig 2013-12-06 18:56:39.300263083 +0000
-+++ infrared.cpp 2013-12-06 21:52:25.071935902 +0000
-@@ -339,7 +339,7 @@
- gc->addSelection("user");
- gc->addSelection("other");
-
-- gc->setHelpText(QObject::tr("Remote classification. Favorites are remotes fully supported by LinHES."));
-+ gc->setHelpText(QObject::tr("Remote classification. Favorites are remotes fully supported by LinHES."));
-
- return gc;
- };
-@@ -391,6 +391,7 @@
- IRFrame::IRFrame():
- VerticalConfigurationGroup(false,false,false,false)
- {
-+ setLabel(QObject::tr("Remotes Settings"));
- LIRC_ReceiverSettings *receiversettings = new LIRC_ReceiverSettings();
- //addChild(new HostRemoteTypeIR());
- addChild(new Remote_bucket());
-@@ -685,6 +686,7 @@
- IR_TransmitFrame::IR_TransmitFrame():
- VerticalConfigurationGroup(false,false,false,false)
- {
-+ setLabel(QObject::tr("Blaster Settings"));
- LIRC_BlasterSettings *blastersettings = new LIRC_BlasterSettings();
- addChild(blastersettings);
- }
-@@ -724,6 +726,7 @@
- LCDFrame::LCDFrame():
- VerticalConfigurationGroup(false,false,false,false)
- {
-+ setLabel(QObject::tr("LCD Settings"));
- addChild(HostLCDType());
- }
-
diff --git a/abs/core/mythinstall/installationtype.cpp.patch b/abs/core/mythinstall/installationtype.cpp.patch
deleted file mode 100644
index bbb2693..0000000
--- a/abs/core/mythinstall/installationtype.cpp.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- installationtype.cpp.orig 2013-12-06 01:40:00.625732158 +0000
-+++ installationtype.cpp 2013-12-06 17:28:37.733758564 +0000
-@@ -28,13 +28,13 @@
- static HostComboBox *HOSTinstallationtype()
- {
- HostComboBox *gc = new HostComboBox("HOSTinstallationtype");
-- gc->setLabel(QObject::tr("Upgrade or Full install"));
-+ gc->setLabel(QObject::tr("Installation Type"));
- gc->addSelection("Full/Auto") ;
-
- gc->addSelection("Upgrade");
-
- //gc->setValue("Full/Auto");
-- gc->setHelpText(QObject::tr("A full install will erase the entire drive and repartition. An upgrade will only format or overlay the first parition of the drive."));
-+ gc->setHelpText(QObject::tr("Full install will erase the entire drive and repartition. Upgrade will format only the first parition of the drive. Only LinHES R8.0 or newer can use Upgrade."));
-
- return gc;
- }
-@@ -48,7 +48,7 @@
- #endif
- gc->setLabel(QObject::tr("OS size (GB)"));
- gc->setValue(2);
-- gc->setHelpText(QObject::tr("" ));
-+ gc->setHelpText(QObject::tr("Amount of space allocated for the root OS." ));
-
- return gc;
- }
-@@ -68,7 +68,7 @@
- HostSpinBox *gc = new HostSpinBox("HOSTHOMEsize", 1, 1500, 1, true);
- gc->setLabel(QObject::tr("Home dir size (GB)"));
- gc->setValue(3);
-- gc->setHelpText(QObject::tr("Amount of space allocated for home directories. Three - Five GB will be sufficient for most people. This space will be formatted the same as the root OS" ));
-+ gc->setHelpText(QObject::tr("Amount of space allocated for the home directories partition. Three to five GB will be sufficient for most people. The home partition will be the same filesystem as the root OS." ));
-
- return gc;
- }
-@@ -79,7 +79,7 @@
- HostSpinBox *gc = new HostSpinBox("HOSTDatabasesize", 1, 20, 1, true);
- gc->setLabel(QObject::tr("Database partition size (GB)"));
- gc->setValue(4);
-- gc->setHelpText(QObject::tr("Amount of space allocated for the database. One or Two GB is more then enough for the avg user. This space will be formated with ext3" ));
-+ gc->setHelpText(QObject::tr("Amount of space allocated for the database partition. Two GB is more then enough for most people. The database partition space will be formatted with the ext3 filesystem." ));
-
- return gc;
- }
-@@ -111,7 +111,7 @@
- HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 128, 128000, 128, true);
- gc->setLabel(QObject::tr("Swapspace size (MB)"));
- gc->setValue(mem);
-- gc->setHelpText(QObject::tr("" ));
-+ gc->setHelpText(QObject::tr("Amount of space allocated for the swap partition." ));
-
- return gc;
- }
-@@ -130,7 +130,7 @@
- HostCheckBox *gc = new HostCheckBox("HostUseALLdata");
- gc->setLabel(QObject::tr("Use all remaining space for data"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("If checked myth will use the rest of the drive for the data. Otherwise you will be able to set the size of the partition."));
-+ gc->setHelpText(QObject::tr("If checked the remaining space on the drive will be used for storage. Otherwise you can set the size of the partition."));
- return gc;
- };
-
-@@ -146,7 +146,7 @@
- gc->addSelection("xfs");
- //gc->addSelection("btrfs");
-
-- gc->setHelpText(QObject::tr("Filesystem for data. "));
-+ gc->setHelpText(QObject::tr("Filesystem type for data storage."));
-
- return gc;
- }
-@@ -163,7 +163,7 @@
- //gc->addSelection("btrfs");
- gc->addSelection("Do_not_format");
-
-- gc->setHelpText(QObject::tr("Filesystem for OS. "));
-+ gc->setHelpText(QObject::tr("Filesystem type for OS. "));
-
- return gc;
- }
-@@ -179,7 +179,7 @@
- //gc->addSelection("btrfs");
- //gc->addSelection("xfs");
-
-- gc->setHelpText(QObject::tr("Filesystem for OS. "));
-+ gc->setHelpText(QObject::tr("Filesystem type for root OS."));
-
- return gc;
- }
-@@ -233,6 +233,7 @@
- public:
- Installationtype():
- TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) {
-+ setLabel(QObject::tr("LinHES Install"));
- Setting *Mtemplate = HOSTinstallationtype();
- addChild(Mtemplate);
- setTrigger(Mtemplate);
diff --git a/abs/core/mythinstall/installdialog.cpp.patch b/abs/core/mythinstall/installdialog.cpp.patch
deleted file mode 100644
index b188bab..0000000
--- a/abs/core/mythinstall/installdialog.cpp.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- installdialog.cpp.orig 2013-12-05 21:06:13.358926594 +0000
-+++ installdialog.cpp 2013-12-06 17:26:16.491833828 +0000
-@@ -881,50 +881,32 @@
- }
- if ( flag )
- {
-- tflag = 1;
-- }
-- else
-- {
-- cout << "searching for knoppmyth-versin" << endl;
-- //couldn't open /etc/systemconfig, so now look for /tmp/etc/Knoppmyth-version
-- QFile file("/tmp/etc/KnoppMyth-version");
-- if ( file.exists() )
-- { //appears to be a knoppmyth version, proceed
-- cout << "found knoppmyth-version" << endl;
-- QFile kmfile("/tmp/etc/hostname");
-- if ( kmfile.open(QIODevice::ReadOnly | QIODevice::Text) )
-- {
-- Q3TextStream t( &kmfile ); // use a text stream
-- line = t.readLine();
-- flag=true;
-- currentitem = line.stripWhiteSpace();
-- current_hostname = currentitem ;
-- //gCoreContext->ActivateSettingsCache(true);
-- gCoreContext->ClearSettingsCache();
-- //FixME
-- //gCoreContext->SetSetting("HostMyhostname",current_hostname);
-- gCoreContext->SaveSetting("HostMyhostname",current_hostname);
-- }
-- kmfile.close();
-- runNextSetting = ask_validate_network();
-- }
-- else
-+ //check if LinHES-release is 8.0 or newer
-+ cout << "searching for LinHES-release" << endl;
-+ //look for /tmp/etc/LinHES-release
-+ QFile file("/tmp/etc/LinHES-release");
-+ if ( file.open(QIODevice::ReadOnly | QIODevice::Text) )
- {
-- //popup things went wrong
-- DialogCode returncode = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(),
-- QString(""),
-- QObject::tr("Couldn't find the old config file, proceed with update?"),
-- QObject::tr("No"), QObject::tr("Yes"), kDialogCodeButton1);
-- if ( returncode == kDialogCodeButton1 )
-+ Q3TextStream t( &file ); // use a text stream
-+ while ( !t.eof() )
- {
-- runNextSetting = ask_validate_network();
-- }
-- else if ( returncode == kDialogCodeButton0 )
-- {
-- runNextSetting = 1;
-+ line = t.readLine();
-+ if ( line.contains("8.") )
-+ {
-+ tflag = 1;
-+ }
- }
-+ file.close();
- }
--
-+ }
-+ if ( tflag == 0 )
-+ {
-+ //popup install doesn't look like R8
-+ MythPopupBox::showOkPopup(
-+ GetMythMainWindow(),
-+ QObject::tr(""),
-+ QObject::tr("The selected disk cannot be upgraded because it is older than LinHES R8.0."));
-+ runNextSetting = 1;
- }
- }
- }
diff --git a/abs/core/mythinstall/installsettings.cpp.patch b/abs/core/mythinstall/installsettings.cpp.patch
deleted file mode 100644
index 461d26d..0000000
--- a/abs/core/mythinstall/installsettings.cpp.patch
+++ /dev/null
@@ -1,532 +0,0 @@
---- installsettings.cpp.orig 2013-12-06 17:34:15.794137303 +0000
-+++ installsettings.cpp 2013-12-07 17:31:13.642325676 +0000
-@@ -67,7 +67,7 @@
- HostLineEdit *gc = new HostLineEdit("HostDDnslogin");
- gc->setLabel(QObject::tr("Login"));
- gc->setValue("");
-- gc->setHelpText(QObject::tr("Login for ddns account"));
-+ gc->setHelpText(QObject::tr("Login for DDNS account."));
- return gc;
- };
-
-@@ -77,7 +77,7 @@
- gc->setLabel(QObject::tr("Password"));
- gc->setValue("");
- gc->SetPasswordEcho(true);
-- gc->setHelpText(QObject::tr("Password for ddns account."));
-+ gc->setHelpText(QObject::tr("Password for DDNS account."));
- return gc;
- };
-
-@@ -93,7 +93,7 @@
- static HostCheckBox *HostDDnsEnable()
- {
- HostCheckBox *gc = new HostCheckBox("HostDDnsEnable");
-- gc->setLabel(QObject::tr("Enable DDNS support"));
-+ gc->setLabel(QObject::tr("Enable DDNS"));
- gc->setValue(false);
- gc->setHelpText(QObject::tr("Update DDNS records at dyndns.com. Visit http://dyndns.com to setup your account."));
- return gc;
-@@ -103,7 +103,7 @@
- public:
- DDnssettings():
- TriggeredConfigurationGroup(false,false,false,false) {
-- setLabel(QObject::tr("DDNS settings"));
-+ setLabel(QObject::tr("DDNS Settings"));
- SetVertical(true);
- Setting* trigger = HostDDnsEnable() ;
- addChild(trigger);
-@@ -321,9 +321,9 @@
- static HostCheckBox *HostBEWait()
- {
- HostCheckBox *gc = new HostCheckBox("HostBEWait");
-- gc->setLabel(QObject::tr("Delay starting the frontend until the server is ready"));
-+ gc->setLabel(QObject::tr("Delay starting mythfrontend until mythbackend is running"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("The system will check if the backend is online before starting mythfrontend. This is useful to avoid unwanted connection errors or configuration screens. "));
-+ gc->setHelpText(QObject::tr("The system will check if mythbackend is online before starting mythfrontend. This will avoid connection errors and configuration screens."));
- return gc;
- };
-
-@@ -370,9 +370,9 @@
- static HostCheckBox *HostServiceMythWEB()
- {
- HostCheckBox *gc = new HostCheckBox("HostServiceMythWEB");
-- gc->setLabel(QObject::tr("Enable Mythweb"));
-+ gc->setLabel(QObject::tr("Enable MythWeb"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Allow scheduling using a web browser"));
-+ gc->setHelpText(QObject::tr("Allow MythTV scheduling using a web browser."));
- return gc;
- };
-
-@@ -416,9 +416,9 @@
- static HostCheckBox *HostRunDHCP()
- {
- HostCheckBox *gc = new HostCheckBox("HostRunDHCP");
-- gc->setLabel(QObject::tr("DHCP server"));
-+ gc->setLabel(QObject::tr("DHCP Server"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Only one dhcp server should run on a network. Leave this unchecked if your unsure."));
-+ gc->setHelpText(QObject::tr("Only one DHCP server should run on a network. Leave this unchecked if you are not sure."));
- return gc;
- };
-
-@@ -436,16 +436,16 @@
- HostCheckBox *gc = new HostCheckBox("HostUseMythWelcome");
- gc->setLabel(QObject::tr("Run MythWelcome"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("If this option is checked mythwelcome will be started first."));
-+ gc->setHelpText(QObject::tr("If checked mythwelcome will be started instead of mythfrontend."));
- return gc;
- };
-
- static HostCheckBox *HostRunFrontend()
- {
- HostCheckBox *gc = new HostCheckBox("HostRunFrontend");
-- gc->setLabel(QObject::tr("Run the Frontend."));
-+ gc->setLabel(QObject::tr("Run Frontend"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("When checked the frontend will start. Most people will want this checked."));
-+ gc->setHelpText(QObject::tr("If checked the frontend X windows GUI will start. Most people will want this checked. Disable the frontend if you want the system to run without a display connected."));
- return gc;
- };
-
-@@ -500,7 +500,7 @@
- HostCheckBox *gc = new HostCheckBox("HostRemoteBackup");
- gc->setLabel(QObject::tr("Remote Backup"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Copy the system backup file to another dir or host. Supplemental services must be installed to copy the file to a remote host."));
-+ gc->setHelpText(QObject::tr("Copy the system backup file to another directory or host."));
- return gc;
- };
-
-@@ -509,7 +509,7 @@
- {
- QString tempItem;
- HostComboBox *gc = new HostComboBox("HostRemoteBackupDir",true);
-- gc->setLabel(QObject::tr("dir or host" ));
-+ gc->setLabel(QObject::tr(" Dir or Host" ));
- gc->addSelection("dir:/data/storage/disk0");
- MSqlQuery query(MSqlQuery::InitCon());
-
-@@ -573,18 +573,18 @@
- static HostCheckBox *HostncidClient()
- {
- HostCheckBox *gc = new HostCheckBox("HostncidClient");
-- gc->setLabel(QObject::tr("Show Callerid"));
-+ gc->setLabel(QObject::tr("Show CallerID"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Callerid popup, backend must be running the callerid program"));
-+ gc->setHelpText(QObject::tr("Show CallerID popup. The backend must be running the CallerID program."));
- return gc;
- };
-
- static HostCheckBox *HostncidDaemon()
- {
- HostCheckBox *gc = new HostCheckBox("HostncidDaemon");
-- gc->setLabel(QObject::tr("Run Callerid "));
-+ gc->setLabel(QObject::tr("Run CallerID"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Run Daemon to collect callerid info"));
-+ gc->setHelpText(QObject::tr("Run daemon to collect CallerID information."));
- return gc;
- };
-
-@@ -614,9 +614,9 @@
- static HostCheckBox *Hostbootsplash()
- {
- HostCheckBox *gc = new HostCheckBox("Hostbootsplash");
-- gc->setLabel(QObject::tr("Enable bootsplash"));
-+ gc->setLabel(QObject::tr("Enable Boot Splash"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Covers up boot messages. "));
-+ gc->setHelpText(QObject::tr("Covers up boot messages with LinHES logo."));
- return gc;
- };
-
-@@ -752,80 +752,80 @@
- static HostCheckBox *Hostaccessnetwork()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccessnetwork");
-- gc->setLabel(QObject::tr("Network "));
-+ gc->setLabel(QObject::tr("Network"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Control access to network screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Network Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccesshostype()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccesshostype");
-- gc->setLabel(QObject::tr("hostype "));
-+ gc->setLabel(QObject::tr("Host"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to hostype screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Host Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *HostaccesshostypeSystemtype()
- {
- HostCheckBox *gc = new HostCheckBox("HostaccesshostypeSystemtype");
-- gc->setLabel(QObject::tr("Change hostype"));
-+ gc->setLabel(QObject::tr("Change System Type"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Ability to change sql server and system type. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Ability to change the System Type in Host Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccessmisc()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccessmisc");
-- gc->setLabel(QObject::tr("misc "));
-+ gc->setLabel(QObject::tr("Miscellanous"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to misc screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Miscellanous Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccesssleep()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccesssleep");
-- gc->setLabel(QObject::tr("sleep "));
-+ gc->setLabel(QObject::tr("Shutdown"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to sleep screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Shutdown Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccessadvanced()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccessadvanced");
-- gc->setLabel(QObject::tr("advanced "));
-+ gc->setLabel(QObject::tr("Advanced"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to advanced screen. Checked means the screen is enabled. "));
-+ gc->setHelpText(QObject::tr("Control access to Advanced Settings. Checked means the screen is enabled. "));
- return gc;
- };
-
- static HostCheckBox *HostaccessadvancedX()
- {
- HostCheckBox *gc = new HostCheckBox("HostaccessadvancedX");
-- gc->setLabel(QObject::tr("advancedX "));
-+ gc->setLabel(QObject::tr("Display"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to advancedX screen. Checked means the screen is enabled. "));
-+ gc->setHelpText(QObject::tr("Control access to Display Settings. Checked means the screen is enabled. "));
- return gc;
- };
- static HostCheckBox *Hostaccesssound()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccesssound");
-- gc->setLabel(QObject::tr("sound "));
-+ gc->setLabel(QObject::tr("Audio"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to sound screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Audio Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccessplugins()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccessplugins");
-- gc->setLabel(QObject::tr("plugins"));
-+ gc->setLabel(QObject::tr("Programs"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to plugin screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Programs. Checked means the screen is enabled."));
- return gc;
- };
-
-@@ -834,25 +834,25 @@
- HostCheckBox *gc = new HostCheckBox("Hostaccessuser");
- gc->setLabel(QObject::tr("User"));
- gc->setValue(false);
-- gc->setHelpText(QObject::tr("Control access to the user managment screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to User Management Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccesswebuser()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccesswebuser");
-- gc->setLabel(QObject::tr("Web password"));
-+ gc->setLabel(QObject::tr("Web Security"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to the web password screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to Web Security Settings. Checked means the screen is enabled."));
- return gc;
- };
-
- static HostCheckBox *Hostaccessvnc()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccessvnc");
-- gc->setLabel(QObject::tr("VNC "));
-+ gc->setLabel(QObject::tr("VNC"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to the vnc password screen. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to VNC Settings. Checked means the screen is enabled."));
- return gc;
- };
-
-@@ -860,9 +860,9 @@
- static HostCheckBox *Hostaccessfileshare()
- {
- HostCheckBox *gc = new HostCheckBox("Hostaccessfileshare");
-- gc->setLabel(QObject::tr("fileshare "));
-+ gc->setLabel(QObject::tr("File Sharing"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Control access to the fileshare. Checked means the screen is enabled."));
-+ gc->setHelpText(QObject::tr("Control access to File Sharing Settings. Checked means the screen is enabled."));
- return gc;
- };
-
-@@ -2202,7 +2202,7 @@
- public:
- NetworkSettingsFrame():
- TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) {
-- setLabel(QObject::tr("Network Settings Page (1/2)"));
-+ setLabel(QObject::tr("Network Settings (1/2)"));
- Setting* netdevice = HostNetDevice();
- addChild(netdevice);
- setTrigger(netdevice);
-@@ -2349,6 +2349,7 @@
- NetworkOptionsFrame::NetworkOptionsFrame():
- VerticalConfigurationGroup(false,false,false,false)
- {
-+ setLabel(QObject::tr("Network Settings (2/2)"));
- HostMyhostname = new HostComboBox("HostMyhostname",true);
- HostMyhostname->setLabel(QObject::tr("Hostname"));
- HostMyhostname->addSelection("Envy");
-@@ -2366,9 +2367,7 @@
- HostMyhostname->addSelection("Faith");
- HostMyhostname->addSelection("Zeal");
- HostMyhostname->addSelection("type_hostname_here");
-- HostMyhostname->setHelpText(QObject::tr("The hostname must resolve via DNS. \
-- If DNS is not available then append .local to the end of the hostname. \
-- When using .local, names must not include additional ."));
-+ HostMyhostname->setHelpText(QObject::tr("The hostname must resolve via DNS. If DNS is not available then append .local to the end of the hostname. When using .local, names must not include an additional ."));
-
- FetchDhcpHostnameButton = new TransButtonSetting();
- FetchDhcpHostnameButton ->setLabel(tr("Ask DHCP server for hostname"));
-@@ -2494,9 +2493,9 @@
- static HostCheckBox *HostUseXLargeMouse()
- {
- HostCheckBox *gc = new HostCheckBox("HostUseXLargeMouse");
-- gc->setLabel(QObject::tr("Large mouse pointer"));
-+ gc->setLabel(QObject::tr("Large Mouse Pointer"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Use extra large mouse pointer(requires restart of frontend)"));
-+ gc->setHelpText(QObject::tr("Use an extra large mouse pointer. This takes effect the next time the frontend is started."));
- return gc;
- };
-
-@@ -2549,7 +2548,7 @@
- SystemtypeGroup::SystemtypeGroup(): TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
- setLabel(QObject::tr("System Type"));
- HostSystemType = new HostComboBox("HostSystemType");
-- HostSystemType->setLabel(QObject::tr("Type of system setup"));
-+ HostSystemType->setLabel(QObject::tr(" System Type"));
- HostSystemType->addSelection("Master_backend");
- HostSystemType->addSelection("Frontend_only");
- // HostSystemType->addSelection("Standalone");
-@@ -2608,13 +2607,13 @@
- }
-
- if (selectedhostype == "Standalone")
-- msg="Complete System, that doesn't allow outside connections";
-+ msg="Complete System, that doesn't allow outside connections.";
- if (selectedhostype == "Frontend_only")
-- msg="Frontend only, needs a primary system (master backend) already on the network";
-+ msg="Frontend_only needs a primary system (master backend) already on the network.";
- if (selectedhostype == "Master_backend")
-- msg="Primary system with tuners, scheduling and database. This allows for remote frontend and slave backends";
-+ msg="Primary system with tuners, scheduling and database. This allows for remote frontend and slave backends.";
- if (selectedhostype == "Slave_backend")
-- msg="Secondary system for extra tuners";
-+ msg="Secondary system for extra tuners.";
-
- HostSystemType->setHelpText(msg) ;
- }
-@@ -2670,7 +2669,7 @@
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true)
- {
-
-- setLabel(QObject::tr("Advanced settings (1/2)"));
-+ setLabel(QObject::tr("Advanced Settings (1/2)"));
- Setting* Autodown = HostAutodown();
- setTrigger(Autodown);
- hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
-@@ -2723,7 +2722,7 @@
- public:
- AdvancedSettings_2():
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
-- setLabel(QObject::tr("Advanced settings (2/2)"));
-+ setLabel(QObject::tr("Advanced Settings (2/2)"));
- Setting* Autodown = HostAutodown();
- setTrigger(Autodown);
- hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType");
-@@ -2767,15 +2766,15 @@
- /*_______________________________Sound settings ____________________*/
- SoundSettings::SoundSettings():
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
-- setLabel(QObject::tr("Audio out settings"));
-+ setLabel(QObject::tr("Audio Settings"));
-
- HostAudiotype = new HostComboBox("HostAudiotype",false);
-- HostAudiotype->setLabel(QObject::tr("Sound card driver"));
-+ HostAudiotype->setLabel(QObject::tr("Sound Card Driver"));
- HostAudiotype->addSelection("OSS");
- HostAudiotype->addSelection("ALSA");
- HostAudiotype->addSelection("tinker");
-
-- HostAudiotype->setHelpText(QObject::tr("Select the sound driver set to use (OSS or ALSA)." ) );
-+ HostAudiotype->setHelpText(QObject::tr("Select the sound driver, OSS or ALSA." ) );
- addChild(HostAudiotype);
- setTrigger(HostAudiotype);
-
-@@ -2826,10 +2825,10 @@
- osslabel->setValue("The original OSS! More information can be found at:");
-
- TransLabelSetting *osslabel1 = new TransLabelSetting();
-- osslabel1->setValue("http://www.opensound.com \n\nPlease note to fully configure sound visit the \nmythtv audio setup screens\n");
-+ osslabel1->setValue("http://www.opensound.com \n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n");
-
- TransLabelSetting *AlsaLabel = new TransLabelSetting();
-- AlsaLabel->setValue("ALSA, the alternative to OSS\n\nPlease note to fully configure sound visit the \nmythtv audio setup screens\n");
-+ AlsaLabel->setValue("ALSA, the alternative to OSS\n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n");
-
- // OSS GROUP
- SoundOSSsettings *OSS = new SoundOSSsettings ;
-@@ -4477,7 +4476,7 @@
- //Check to see if screen is allowed to appear
- if ( ((gCoreContext->GetSetting("Hostaccessnetwork")) == "0" ) )
- {
-- denied ->setLabel(QObject::tr("Network settings"));
-+ denied ->setLabel(QObject::tr("Network Settings"));
- addChild(denied);
- }
- else
-@@ -4528,7 +4527,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccesshostype")) =="0" ))
- {
-- denied ->setLabel(QObject::tr("System type"));
-+ denied ->setLabel(QObject::tr("Host Settings"));
- addChild(denied);
- }
- else
-@@ -4548,7 +4547,7 @@
- {
- if ( ((gCoreContext->GetSetting("HostaccessadvancedX")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("AdvancedX Settings"));
-+ denied ->setLabel(QObject::tr("Display Settings"));
- addChild(denied);
- }
- else
-@@ -4562,7 +4561,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessvnc")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("VNC settings"));
-+ denied ->setLabel(QObject::tr("VNC Settings"));
- addChild(denied);
- }
- else
-@@ -4576,7 +4575,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessfileshare")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("File Share settings"));
-+ denied ->setLabel(QObject::tr("File Sharing Settings"));
- addChild(denied);
- }
- else
-@@ -4595,7 +4594,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessmisc")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("Misc"));
-+ denied ->setLabel(QObject::tr("Miscellanous"));
- addChild(denied);
- }
- else
-@@ -4618,7 +4617,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccesssleep")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("WOL settings"));
-+ denied ->setLabel(QObject::tr("Shutdown Settings"));
- addChild(denied);
- }
- else
-@@ -4647,7 +4646,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccesssound")) =="0") )
- {
-- denied ->setLabel(QObject::tr("Sound Settings"));
-+ denied ->setLabel(QObject::tr("Audio Settings"));
- addChild(denied);
- }
- else
-@@ -4705,7 +4704,7 @@
- accessettings->addChild(Hostaccessnetwork());
- accessettings->addChild(new ACCESShostsettings);
- accessettings->addChild(GridAccess);
-- accessettings ->setLabel(QObject::tr("Access control"));
-+ accessettings ->setLabel(QObject::tr("Access Control Settings"));
- addChild(accessettings);
- }
-
-@@ -4713,7 +4712,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("Plugins"));
-+ denied ->setLabel(QObject::tr("Programs"));
- addChild(denied);
- }
- else
-@@ -4754,7 +4753,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("Software"));
-+ denied ->setLabel(QObject::tr("Programs"));
- addChild(denied);
- }
- else
-@@ -4788,7 +4787,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessuser")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("User Management"));
-+ denied ->setLabel(QObject::tr("User Management Settings"));
- addChild(denied);
- }
- else
-@@ -4802,7 +4801,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccesswebuser")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("Web security"));
-+ denied ->setLabel(QObject::tr("Web Security Settings"));
- addChild(denied);
- }
- else
-@@ -4817,7 +4816,7 @@
- {
- if ( ((gCoreContext->GetSetting("Hostaccessddns")) == "0" ))
- {
-- denied ->setLabel(QObject::tr("DDNS security"));
-+ denied ->setLabel(QObject::tr("DDNS Settings"));
- addChild(denied);
- }
- else
diff --git a/abs/core/mythinstall/misc_settings.cpp.patch b/abs/core/mythinstall/misc_settings.cpp.patch
deleted file mode 100644
index 0afaf0a..0000000
--- a/abs/core/mythinstall/misc_settings.cpp.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- misc_settings.cpp.orig 2013-12-07 17:56:37.984108492 +0000
-+++ misc_settings.cpp 2013-12-07 18:14:07.783476609 +0000
-@@ -11,20 +11,20 @@
- static HostCheckBox *HostShowToolTips()
- {
- HostCheckBox *gc = new HostCheckBox("HostShowToolTips");
-- gc->setLabel(QObject::tr("Show shortcuts"));
-+ gc->setLabel(QObject::tr("Show Shortcuts"));
- gc->setValue(true);
-- gc->setHelpText(QObject::tr("Shows a popup window describing how to open a console and various other items."));
-+ gc->setHelpText(QObject::tr("Shows a window describing how to open a console and various other items."));
- return gc;
- };
-
- static HostComboBox *Hostupdateplan()
- {
- HostComboBox *gc = new HostComboBox("Hostupdateplan");
-- gc->setLabel(QObject::tr("Automatic updates"));
-+ gc->setLabel(QObject::tr("Automatic Updates"));
- gc->addSelection("None");
- gc->addSelection("Myth_only");
- gc->addSelection("All");
-- gc->setHelpText("Download and apply updates. None: Will not download any updates , Myth_only: automatic updates for MythTV, All: Automatic updates for the entire system.");
-+ gc->setHelpText("None: Do not install updates automatically.\nMyth_only: Automatically installs updates for MythTV only.\nAll: Automatically installs all updates for LinHES.");
- return gc;
-
- }
-@@ -43,6 +43,7 @@
- VerticalConfigurationGroup(false,false,false,false)
-
- {
-+ setLabel(QObject::tr("Miscellaneous Settings"));
- bool MVAPP;
- #ifdef __MVAPP__
- MVAPP = true ;
-@@ -238,7 +239,7 @@
-
- void TimezoneRegion::timezoneregion_fillselection_zone()
- {
-- HostTimeZoneRegion->setLabel(QObject::tr("TimeZone"));
-+ HostTimeZoneRegion->setLabel(QObject::tr("Time Zone"));
- HostTimeZoneRegion->addSelection("US");
- HostTimeZoneRegion->addSelection("Pacific");
- HostTimeZoneRegion->addSelection("Mideast");
-@@ -302,7 +303,7 @@
- HostTimeZoneRegion->addSelection("Cuba");
- HostTimeZoneRegion->addSelection("CST6CDT");
- HostTimeZoneRegion->addSelection("CET");
-- HostTimeZoneRegion->setHelpText(QObject::tr("Timezone Region"));
-+ HostTimeZoneRegion->setHelpText(QObject::tr("Time Zone Region"));
- }
-
- void TimezoneRegion::timezoneregion_fillselection(QString tzonefile )
diff --git a/abs/core/mythinstall/xorgsettings.cpp.patch b/abs/core/mythinstall/xorgsettings.cpp.patch
deleted file mode 100644
index 7678b9c..0000000
--- a/abs/core/mythinstall/xorgsettings.cpp.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- xorgsettings.cpp.orig 2013-12-06 22:24:53.351187115 +0000
-+++ xorgsettings.cpp 2013-12-06 23:18:44.107475010 +0000
-@@ -551,7 +551,7 @@
-
- // AdvancedXSettings::AdvancedXSettings():
- // TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
--// setLabel(QObject::tr("Advanced X settings"));
-+// setLabel(QObject::tr("Display Settings"));
- // Setting* Advancedxsettings = HostXUseAdvanced();
- // addChild(Advancedxsettings);
- // setTrigger(Advancedxsettings);
-@@ -596,18 +596,18 @@
-
- AdvancedXSettings::AdvancedXSettings():
- TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) {
-- setLabel(QObject::tr("Advanced X settings"));
-+ setLabel(QObject::tr("Display Settings"));
-
-
-
-
- HostXIgnoreConfig = new HostCheckBox("HostXIgnoreConfig");
-- HostXIgnoreConfig->setLabel(QObject::tr("User supplied config. "));
-+ HostXIgnoreConfig->setLabel(QObject::tr("User Supplied Configuration"));
- HostXIgnoreConfig->setValue(false);
- #ifdef __MVAPP__
-- HostXIgnoreConfig->setHelpText(QObject::tr("When this is checked, the system will use the configuration file provided by YOU. Place the file you want to use in /data/home/mythtv/templates/xorg.user."));
-+ HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user."));
- #else
-- HostXIgnoreConfig->setHelpText(QObject::tr("When this is checked, the system will use the configuration file provided by YOU. Place the file you want to use in /home/mythtv/templates/xorg.user."));
-+ HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user."));
- #endif
-
- Setting* Advancedxsettings = HostXIgnoreConfig;
diff --git a/abs/core/mythinstall/xorgsettings.h.patch b/abs/core/mythinstall/xorgsettings.h.patch
deleted file mode 100644
index d774899..0000000
--- a/abs/core/mythinstall/xorgsettings.h.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- xorgsettings.h.orig 2013-12-06 22:40:05.424359651 +0000
-+++ xorgsettings.h 2013-12-06 22:40:31.537678172 +0000
-@@ -105,7 +105,7 @@
- //Used in the simple config
- {
- HostComboBox *gc = new HostComboBox("HostXres");
-- gc->setLabel(QObject::tr("Initial resolution"));
-+ gc->setLabel(QObject::tr("Initial Resolution"));
- gc->addSelection("Auto") ;
- gc->setHelpText(QObject::tr(""));
- system ("print_xorg_res.py");
diff --git a/abs/core/plymouth-theme-linhes/PKGBUILD b/abs/core/plymouth-theme-linhes/PKGBUILD
index da1cbc2..8b7c345 100644
--- a/abs/core/plymouth-theme-linhes/PKGBUILD
+++ b/abs/core/plymouth-theme-linhes/PKGBUILD
@@ -1,12 +1,13 @@
#
pkgname="plymouth-theme-linhes-logo"
pkgver=1
-pkgrel=3
+pkgrel=4
pkgdesc="LinHES theme for plymouth"
arch=('any')
license=('GPL')
depends=('plymouth')
options=('')
+groups=('base')
source=('lh-logo.png' 'linhes-logo.plymouth' 'linhes-logo.script' 'password_field.png'
'progress_dot_off.png' 'progress_dot_on.png')
install=plymouth-linhes.install
diff --git a/abs/core/plymouth/PKGBUILD b/abs/core/plymouth/PKGBUILD
index d0849c7..6126d4f 100644
--- a/abs/core/plymouth/PKGBUILD
+++ b/abs/core/plymouth/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=plymouth
pkgver=0.8.8.52.g37d2e40
-pkgrel=1
+pkgrel=4
pkgdesc="A graphical boot splash screen with kernel mode-setting support (Git version)"
url="http://cgit.freedesktop.org/cgit/plymouth/"
arch=('i686' 'x86_64')
@@ -10,7 +10,7 @@ makedepends=('git' 'docbook-xsl')
optdepends=('ttf-dejavu')
options=('!libtool' '!emptydirs')
install=$pkgname.install
-
+groups=('base')
provides=('plymouth')
conflicts=('plymouth')
backup=('etc/plymouth/plymouthd.conf')