summaryrefslogtreecommitdiff
path: root/OptionDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'OptionDialog.cpp')
-rwxr-xr-xOptionDialog.cpp337
1 files changed, 219 insertions, 118 deletions
diff --git a/OptionDialog.cpp b/OptionDialog.cpp
index ebc76a7..fcfbf06 100755
--- a/OptionDialog.cpp
+++ b/OptionDialog.cpp
@@ -16,27 +16,27 @@ OptionDialog::OptionDialog() :
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
ignoreCopyEngineListEdition=false;
+ allPluginsIsLoaded=false;
ui->setupUi(this);
ui->treeWidget->topLevelItem(0)->setSelected(true);
- ui->treeWidget->topLevelItem(2)->setExpanded(true);
- ui->pluginList->topLevelItem(0)->setExpanded(true);
- ui->pluginList->topLevelItem(1)->setExpanded(true);
- ui->pluginList->topLevelItem(2)->setExpanded(true);
- ui->pluginList->topLevelItem(3)->setExpanded(true);
- ui->pluginList->topLevelItem(4)->setExpanded(true);
- ui->pluginList->topLevelItem(5)->setExpanded(true);
+ ui->treeWidget->topLevelItem(3)->setTextColor(0,QColor(150, 150, 150, 255));
+ ui->treeWidget->topLevelItem(4)->setTextColor(0,QColor(150, 150, 150, 255));
+ ui->treeWidget->topLevelItem(5)->setTextColor(0,QColor(150, 150, 150, 255));
+ ui->treeWidget->expandAll();
+ ui->pluginList->expandAll();
on_treeWidget_itemSelectionChanged();
//load the plugins
plugins->lockPluginListEdition();
QList<PluginsAvailable> list=plugins->getPlugins();
- foreach(PluginsAvailable currentPlugin,list)
- onePluginAdded(currentPlugin);
qRegisterMetaType<PluginsAvailable>("PluginsAvailable");
+ connect(this,SIGNAL(previouslyPluginAdded(PluginsAvailable)), this,SLOT(onePluginAdded(PluginsAvailable)),Qt::QueuedConnection);
connect(plugins, SIGNAL(onePluginAdded(PluginsAvailable)), this, SLOT(onePluginAdded(PluginsAvailable)));
connect(plugins, SIGNAL(onePluginWillBeRemoved(PluginsAvailable)), this, SLOT(onePluginWillBeRemoved(PluginsAvailable)),Qt::DirectConnection);
- connect(plugins, SIGNAL(pluginListingIsfinish()), this, SLOT(loadOption()));
+ connect(plugins, SIGNAL(pluginListingIsfinish()), this, SLOT(loadOption()),Qt::QueuedConnection);
connect(options, SIGNAL(newOptionValue(QString,QString,QVariant)), this, SLOT(newOptionValue(QString,QString,QVariant)));
+ foreach(PluginsAvailable currentPlugin,list)
+ emit previouslyPluginAdded(currentPlugin);
plugins->unlockPluginListEdition();
defaultImportBackend=PluginsManager::ImportBackend_File;
#ifndef ULTRACOPIER_PLUGIN_SUPPORT
@@ -89,6 +89,27 @@ void OptionDialog::onePluginAdded(PluginsAvailable plugin)
void OptionDialog::onePluginWillBeRemoved(PluginsAvailable plugin)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
+ //remove if have options
+ index=0;
+ loop_size=pluginOptionsWidgetList.size();
+ if(plugin.category==PluginType_CopyEngine || plugin.category==PluginType_Listener || plugin.category==PluginType_PluginLoader || plugin.category==PluginType_SessionLoader)
+ {
+ while(index<loop_size)
+ {
+ if(plugin.category==pluginOptionsWidgetList.at(index).category && plugin.name==pluginOptionsWidgetList.at(index).name)
+ {
+ if(pluginOptionsWidgetList.at(index).item->isSelected())
+ {
+ pluginOptionsWidgetList.at(index).item->setSelected(false);
+ ui->treeWidget->topLevelItem(0)->setSelected(true);
+ }
+ delete pluginOptionsWidgetList.at(index).item;
+ break;
+ }
+ index++;
+ }
+ }
+ //remove from general list
index=0;
loop_size=pluginLink.size();
while(index<loop_size)
@@ -100,8 +121,6 @@ void OptionDialog::onePluginWillBeRemoved(PluginsAvailable plugin)
removeLanguage(plugin);
else if(plugin.category==PluginType_Themes)
removeTheme(plugin);
- else if(plugin.category==PluginType_CopyEngine)
- removeCopyEngine(plugin);
pluginLink.removeAt(index);
return;
}
@@ -134,6 +153,7 @@ void OptionDialog::removeLanguage(PluginsAvailable plugin)
void OptionDialog::addTheme(PluginsAvailable plugin)
{
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"plugin.name: "+plugin.name);
ui->Ultracopier_current_theme->addItem(plugin.name,plugin.name);
}
@@ -151,16 +171,22 @@ void OptionDialog::changeEvent(QEvent *e)
case QEvent::LanguageChange:
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"retranslate the ui");
ui->retranslateUi(this);
+ //old code to reload the widget because it dropped by the translation
+ /*
index=0;
- loop_size=copyEngineList.size();
+ loop_size=pluginOptionsWidgetList.size();
while(index<loop_size)
{
- if(copyEngineList.at(index).options!=NULL)
- ui->treeWidget->topLevelItem(2)->addChild(copyEngineList.at(index).item);
+ if(pluginOptionsWidgetList.at(index).options!=NULL)
+ ui->treeWidget->topLevelItem(2)->addChild(pluginOptionsWidgetList.at(index).item);
else
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("the copy engine %1 have not the options").arg(index));
index++;
- }
+ }*/
+ ui->treeWidget->topLevelItem(2)->setText(0,tr("Copy engine"));
+ ui->treeWidget->topLevelItem(3)->setText(0,tr("Listener"));
+ ui->treeWidget->topLevelItem(4)->setText(0,tr("Plugin loader"));
+ ui->treeWidget->topLevelItem(5)->setText(0,tr("Session loader"));
ui->labelLoadAtSession->setToolTip(tr("Disabled because you have any SessionLoader plugin"));
ui->LoadAtSessionStarting->setToolTip(tr("Disabled because you have any SessionLoader plugin"));
ui->ActionOnManualOpen->setItemText(0,tr("Do nothing"));
@@ -184,34 +210,68 @@ void OptionDialog::on_treeWidget_itemSelectionChanged()
if(listSelectedItem.size()!=1)
return;
QTreeWidgetItem * selectedItem=listSelectedItem.first();
+ //general
if(selectedItem==ui->treeWidget->topLevelItem(0))
ui->stackedWidget->setCurrentIndex(0);
+ //plugins
else if(selectedItem==ui->treeWidget->topLevelItem(1))
ui->stackedWidget->setCurrentIndex(1);
+ //Copy engine
else if(selectedItem==ui->treeWidget->topLevelItem(2))
ui->stackedWidget->setCurrentIndex(2);
- else if(selectedItem==ui->treeWidget->topLevelItem(3))
- ui->stackedWidget->setCurrentIndex(3);
- else if(selectedItem==ui->treeWidget->topLevelItem(4))
- ui->stackedWidget->setCurrentIndex(4);
+ //Listener
+ //do nothing
+ //PluginLoader
+ //do nothing
+ //SessionLoader
+ //do nothing
+ //Themes
+ else if(selectedItem==ui->treeWidget->topLevelItem(6))
+ ui->stackedWidget->setCurrentIndex(7);
+ //log
+ else if(selectedItem==ui->treeWidget->topLevelItem(7))
+ ui->stackedWidget->setCurrentIndex(8);
else
{
- loadedCopyEnginePlugin=0;
- index=0;
- loop_size=copyEngineList.size();
- while(index<loop_size)
+ int index;
+ if(selectedItem->parent()==ui->treeWidget->topLevelItem(2))
{
- if(copyEngineList.at(index).options!=NULL)
- loadedCopyEnginePlugin++;
- if(copyEngineList.at(index).item->isSelected())
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Information,"ui->stackedWidget->setCurrentIndex("+QString::number(3+loadedCopyEnginePlugin)+")");
- ui->stackedWidget->setCurrentIndex(4+loadedCopyEnginePlugin);
- return;
- }
- index++;
+ ui->stackedWidget->setCurrentIndex(3);
+ index=selectedItem->parent()->indexOfChild(selectedItem);
+ if(index!=-1)
+ ui->stackedOptionsCopyEngine->setCurrentIndex(index);
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"selection into of sub item wrong???");
+ }
+ else if(selectedItem->parent()==ui->treeWidget->topLevelItem(3))
+ {
+ ui->stackedWidget->setCurrentIndex(4);
+ index=selectedItem->parent()->indexOfChild(selectedItem);
+ if(index!=-1)
+ ui->stackedOptionsListener->setCurrentIndex(index);
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"selection into of sub item wrong???");
+ }
+ else if(selectedItem->parent()==ui->treeWidget->topLevelItem(4))
+ {
+ ui->stackedWidget->setCurrentIndex(5);
+ index=selectedItem->parent()->indexOfChild(selectedItem);
+ if(index!=-1)
+ ui->stackedOptionsPluginLoader->setCurrentIndex(index);
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"selection into of sub item wrong???");
+ }
+ else if(selectedItem->parent()==ui->treeWidget->topLevelItem(5))
+ {
+ ui->stackedWidget->setCurrentIndex(6);
+ index=selectedItem->parent()->indexOfChild(selectedItem);
+ if(index!=-1)
+ ui->stackedOptionsSessionLoader->setCurrentIndex(index);
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"selection into of sub item wrong???");
}
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"selection into option list cat not found");
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"selection into option list cat not found");
}
}
@@ -263,6 +323,8 @@ void OptionDialog::loadOption()
ui->labelLoadAtSession->setEnabled(false);
ui->LoadAtSessionStarting->setEnabled(false);
}
+ allPluginsIsLoaded=true;
+ on_Ultracopier_current_theme_currentIndexChanged(ui->Ultracopier_current_theme->currentIndex());
}
void OptionDialog::newOptionValue(QString group,QString name,QVariant value)
@@ -273,9 +335,20 @@ void OptionDialog::newOptionValue(QString group,QString name,QVariant value)
{
int index=ui->Ultracopier_current_theme->findData(value.toString());
if(index!=-1)
+ {
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"Themes located: "+value.toString());
ui->Ultracopier_current_theme->setCurrentIndex(index);
- else if(ui->Ultracopier_current_theme->count()>0)
- options->setOptionValue("Themes","Ultracopier_current_theme",ui->Ultracopier_current_theme->itemData(ui->Ultracopier_current_theme->currentIndex()));
+ }
+ else
+ {
+ if(ui->Ultracopier_current_theme->count()>0)
+ {
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Default to the current value: "+ui->Ultracopier_current_theme->itemData(ui->Ultracopier_current_theme->currentIndex()).toString());
+ options->setOptionValue("Themes","Ultracopier_current_theme",ui->Ultracopier_current_theme->itemData(ui->Ultracopier_current_theme->currentIndex()));
+ }
+ else
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"No themes: "+value.toString());
+ }
}
}
else if(group=="Language")
@@ -316,7 +389,18 @@ void OptionDialog::newOptionValue(QString group,QString name,QVariant value)
if(name=="List")
{
if(!ignoreCopyEngineListEdition)
- ui->CopyEngineList->addItems(value.toStringList());
+ {
+ QStringList copyEngine=value.toStringList();
+ copyEngine.removeDuplicates();
+ int index=0;
+ int loop_size=ui->CopyEngineList->count();
+ while(index<loop_size)
+ {
+ copyEngine.removeOne(ui->CopyEngineList->item(index)->text());
+ index++;
+ }
+ ui->CopyEngineList->addItems(copyEngine);
+ }
}
}
else if(group=="Write_log")
@@ -373,13 +457,31 @@ void OptionDialog::newOptionValue(QString group,QString name,QVariant value)
void OptionDialog::on_Ultracopier_current_theme_currentIndexChanged(int index)
{
- if(index!=-1 && plugins->allPluginHaveBeenLoaded())
+ if(index!=-1 && allPluginsIsLoaded)
+ {
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"data value: "+ui->Ultracopier_current_theme->itemData(index).toString()+", string value: "+ui->Ultracopier_current_theme->itemText(index)+", index: "+QString::number(index));
options->setOptionValue("Themes","Ultracopier_current_theme",ui->Ultracopier_current_theme->itemData(index));
+ int index_loop=0;
+ loop_size=pluginOptionsWidgetList.size();
+ while(index_loop<loop_size)
+ {
+ if(pluginOptionsWidgetList.at(index_loop).name==ui->Ultracopier_current_theme->itemData(index).toString())
+ {
+ if(pluginOptionsWidgetList.at(index_loop).options==NULL)
+ ui->stackedWidgetThemes->setCurrentIndex(1);
+ else
+ ui->stackedWidgetThemes->setCurrentWidget(pluginOptionsWidgetList.at(index_loop).options);
+ return;
+ }
+ index_loop++;
+ }
+ ui->stackedWidgetThemes->setCurrentIndex(0);
+ }
}
void OptionDialog::on_Language_currentIndexChanged(int index)
{
- if(index!=-1 && plugins->allPluginHaveBeenLoaded())
+ if(index!=-1 && allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"data value: "+ui->Language->itemData(index).toString()+", string value: "+ui->Language->itemText(index)+", index: "+QString::number(index));
options->setOptionValue("Language","Language",ui->Language->itemData(index));
@@ -388,7 +490,7 @@ void OptionDialog::on_Language_currentIndexChanged(int index)
void OptionDialog::on_Language_autodetect_toggled(bool checked)
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Language","Language_autodetect",checked);
@@ -397,7 +499,7 @@ void OptionDialog::on_Language_autodetect_toggled(bool checked)
void OptionDialog::on_CatchCopyAsDefault_toggled(bool checked)
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("CopyListener","CatchCopyAsDefault",checked);
@@ -406,7 +508,7 @@ void OptionDialog::on_CatchCopyAsDefault_toggled(bool checked)
void OptionDialog::on_LoadAtSessionStarting_toggled(bool checked)
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("SessionLoader","LoadAtSessionStarting",checked);
@@ -415,7 +517,7 @@ void OptionDialog::on_LoadAtSessionStarting_toggled(bool checked)
void OptionDialog::on_CopyEngineList_itemSelectionChanged()
{
- if(ui->CopyEngineList->selectedItems().size()!=0)
+ if(ui->CopyEngineList->selectedItems().size()!=0 && ui->CopyEngineList->count()>1)
{
ui->toolButtonUp->setEnabled(true);
ui->toolButtonDown->setEnabled(true);
@@ -473,89 +575,88 @@ QStringList OptionDialog::copyEngineStringList()
return newList;
}
-void OptionDialog::newThemeOptions(QWidget* theNewOptionsWidget,bool isLoaded,bool havePlugin)
+void OptionDialog::newThemeOptions(QString name,QWidget* theNewOptionsWidget,bool isLoaded,bool havePlugin)
{
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
- while(ui->stackedWidgetThemes->count()>3)
- ui->stackedWidgetThemes->removeWidget(ui->stackedWidgetThemes->widget(3));
+ Q_UNUSED(isLoaded);
+ Q_UNUSED(havePlugin);
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("start: isLoaded: %1, havePlugin: %2, name: %3").arg(isLoaded).arg(havePlugin).arg(name));
+ pluginOptionsWidget tempItem;
+ tempItem.name=name;
+ tempItem.item=NULL;
+ tempItem.options=theNewOptionsWidget;
+ tempItem.category=PluginType_Themes;
+ pluginOptionsWidgetList << tempItem;
if(theNewOptionsWidget!=NULL)
{
ui->stackedWidgetThemes->addWidget(theNewOptionsWidget);
- ui->stackedWidgetThemes->setCurrentWidget(theNewOptionsWidget);
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"set the last page");
}
- else
- {
- if(isLoaded)
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"set the page, no option for this plugin");
- ui->stackedWidgetThemes->setCurrentIndex(1);
- }
- else if(!havePlugin)
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"set the page, no plugin");
- ui->stackedWidgetThemes->setCurrentIndex(2);
- }
- else
- {
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"set the page, unable to load plugin options");
- ui->stackedWidgetThemes->setCurrentIndex(0);
- }
- }
+ on_Ultracopier_current_theme_currentIndexChanged(ui->Ultracopier_current_theme->currentIndex());
}
-void OptionDialog::removeCopyEngine(PluginsAvailable plugin)
+void OptionDialog::addPluginOptionWidget(PluginType category,QString name,QWidget * options)
{
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
- removeCopyEngineWidget(plugin.name);
-}
-
-void OptionDialog::addCopyEngineWidget(QString name,QWidget * options)
-{
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("start: %1").arg(name));
- index=0;
- loop_size=copyEngineList.size();
- while(index<loop_size)
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,QString("start: %1, category: %2").arg(name).arg(category));
+ //prevent send the empty options
+ if(options!=NULL)
{
- if(copyEngineList.at(index).name==name)
+ index=0;
+ loop_size=pluginOptionsWidgetList.size();
+ while(index<loop_size)
{
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"already found: "+name);
+ if(pluginOptionsWidgetList.at(index).name==name)
+ {
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"already found: "+name);
+ return;
+ }
+ index++;
+ }
+ //add to real list
+ pluginOptionsWidget temp;
+ temp.name=name;
+ temp.options=options;
+ temp.item=new QTreeWidgetItem(QStringList() << name);
+ temp.category=category;
+ pluginOptionsWidgetList << temp;
+ //add the specific options
+ switch(category)
+ {
+ case PluginType_CopyEngine:
+ ui->treeWidget->topLevelItem(2)->addChild(pluginOptionsWidgetList.at(index).item);
+ ui->stackedOptionsCopyEngine->addWidget(options);
+ break;
+ case PluginType_Listener:
+ ui->treeWidget->topLevelItem(3)->addChild(pluginOptionsWidgetList.at(index).item);
+ ui->stackedOptionsListener->addWidget(options);
+ break;
+ case PluginType_PluginLoader:
+ ui->treeWidget->topLevelItem(4)->addChild(pluginOptionsWidgetList.at(index).item);
+ ui->stackedOptionsPluginLoader->addWidget(options);
+ break;
+ case PluginType_SessionLoader:
+ ui->treeWidget->topLevelItem(5)->addChild(pluginOptionsWidgetList.at(index).item);
+ ui->stackedOptionsSessionLoader->addWidget(options);
+ break;
+ default:
+ ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"Unable to parse this unknow type of plugin: "+name);
return;
}
- index++;
}
- pluginCopyEngine temp;
- temp.item=new QTreeWidgetItem(QStringList() << name);
- temp.name=name;
- temp.options=options;
- copyEngineList << temp;
- ui->treeWidget->topLevelItem(2)->addChild(copyEngineList.at(index).item);
- ui->stackedWidget->addWidget(options);
-}
-
-void OptionDialog::removeCopyEngineWidget(QString name)
-{
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
- index=0;
- loop_size=copyEngineList.size();
- while(index<loop_size)
+ //only for copy engine
+ if(category==PluginType_CopyEngine)
{
- if(copyEngineList.at(index).name==name)
+ //but can loaded by the previous options
+ index=0;
+ loop_size=ui->CopyEngineList->count();
+ while(index<loop_size)
{
- if(copyEngineList.at(index).options!=NULL)
- ui->stackedWidget->removeWidget(copyEngineList.at(index).options);
- if(copyEngineList.at(index).item->isSelected())
- {
- copyEngineList.at(index).item->setSelected(false);
- ui->treeWidget->topLevelItem(0)->setSelected(true);
- }
- delete copyEngineList.at(index).item;
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"ui->stackedWidget->count(): "+QString::number(ui->stackedWidget->count()));
- return;
+ if(ui->CopyEngineList->item(index)->text()==name)
+ break;
+ index++;
}
- index++;
+ if(index==loop_size)
+ ui->CopyEngineList->addItems(QStringList() << name);
}
- ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"not found is the list: "+name);
}
void OptionDialog::on_pluginList_itemSelectionChanged()
@@ -622,7 +723,7 @@ void OptionDialog::on_pluginAdd_clicked()
void OptionDialog::on_checkBox_Log_clicked()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","enabled",ui->checkBox_Log->isChecked());
@@ -634,7 +735,7 @@ void OptionDialog::on_checkBox_Log_clicked()
void OptionDialog::on_lineEditLog_File_editingFinished()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","file",ui->lineEditLog_File->text());
@@ -643,7 +744,7 @@ void OptionDialog::on_lineEditLog_File_editingFinished()
void OptionDialog::on_lineEditLog_transfer_format_editingFinished()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","transfer_format",ui->lineEditLog_transfer_format->text());
@@ -652,7 +753,7 @@ void OptionDialog::on_lineEditLog_transfer_format_editingFinished()
void OptionDialog::on_lineEditLog_error_format_editingFinished()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","error_format",ui->lineEditLog_error_format->text());
@@ -661,7 +762,7 @@ void OptionDialog::on_lineEditLog_error_format_editingFinished()
void OptionDialog::on_checkBoxLog_transfer_clicked()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","transfer",ui->checkBoxLog_transfer->isChecked());
@@ -670,7 +771,7 @@ void OptionDialog::on_checkBoxLog_transfer_clicked()
void OptionDialog::on_checkBoxLog_error_clicked()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","error",ui->checkBoxLog_error->isChecked());
@@ -679,7 +780,7 @@ void OptionDialog::on_checkBoxLog_error_clicked()
void OptionDialog::on_checkBoxLog_folder_clicked()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","folder",ui->checkBoxLog_folder->isChecked());
@@ -698,7 +799,7 @@ void OptionDialog::on_pushButton_clicked()
void OptionDialog::on_checkBoxLog_sync_clicked()
{
- if(plugins->allPluginHaveBeenLoaded())
+ if(allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start");
options->setOptionValue("Write_log","sync",ui->checkBoxLog_sync->isChecked());
@@ -707,7 +808,7 @@ void OptionDialog::on_checkBoxLog_sync_clicked()
void OptionDialog::on_ActionOnManualOpen_currentIndexChanged(int index)
{
- if(index!=-1 && plugins->allPluginHaveBeenLoaded())
+ if(index!=-1 && allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"data value: "+ui->ActionOnManualOpen->itemData(index).toString()+", string value: "+ui->ActionOnManualOpen->itemText(index)+", index: "+QString::number(index));
options->setOptionValue("Ultracopier","ActionOnManualOpen",index);
@@ -716,7 +817,7 @@ void OptionDialog::on_ActionOnManualOpen_currentIndexChanged(int index)
void OptionDialog::on_GroupWindowWhen_currentIndexChanged(int index)
{
- if(index!=-1 && plugins->allPluginHaveBeenLoaded())
+ if(index!=-1 && allPluginsIsLoaded)
{
ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"data value: "+ui->GroupWindowWhen->itemData(index).toString()+", string value: "+ui->GroupWindowWhen->itemText(index)+", index: "+QString::number(index));
options->setOptionValue("Ultracopier","GroupWindowWhen",index);