if(bs==2){
QFile a(b[1]);
a.open(QIODevice::ReadOnly);
- read(QString("buttons"),a.readAll());
+ read(conf->value(QString("currenttype")).toString(),a.readAll());
}else{
QMessageBox::warning(this, trUtf8("Error", "title of box if action(\"read\" has too much (or too \"less\") value"), trUtf8("Bad number of value", "text of box if action(\"read\") has too much (or too \"less\") value"));
}
else if(b[0]==QString("use")){
use(c);
}
+ else if(b[0]==QString("sup")){
+ system("su");
+ action(c);
+ system("exit");
+ }
else {
get(conf->value(QString("currenttype")).toString(),a);
bool ok=1;
if(conf->value("askkeyword").toBool())b=QInputDialog::getText(this, trUtf8("chooseDB"), trUtf8("Enter the keyword : "), QLineEdit::Normal, label->text(), &ok);
else b=label->text();
- if(ok)chooseDB(QString("buttons"), b);
+ if(ok)chooseDB(conf->value(QString("currenttype")).toString(), b);
}
void MainWindow::chooseDB(const QString & b){
flush();
void MainWindow::back(){
if(!((video)&&(playlist))){
get(conf->value(QString("currenttype")).toString(),conf->value(QString("menuback")).toString());
- }else if(QString("-")+label->text()==conf->value(QString("menuback")).toString())get(QString("buttons"),way.takeLast());
+ }else if(QString("-")+label->text()==conf->value(QString("menuback")).toString())get(conf->value(QString("currenttype")).toString(),way.takeLast());
else{
get(conf->value(QString("currenttype")).toString(), QString("+video"));
}
connect(m, SIGNAL(downloaded()), this, SLOT(readData()));
}
void MainWindow::readData(){
- read(QString("buttons"), m->downloadedData());
+ read(conf->value(QString("currenttype")).toString(), m->downloadedData());
m->disconnect(m, SIGNAL(downloaded()),this, SLOT(readData()));
}
void MainWindow::action(){