Browse Source

Clean up URL seed code

Center bandwidth limiting dialogs
adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
83cf3aebab
  1. 15
      src/propertieswidget.cpp
  2. 1
      src/speedlimitdlg.h

15
src/propertieswidget.cpp

@ -379,23 +379,14 @@ void PropertiesWidget::loadDynamicData() { @@ -379,23 +379,14 @@ void PropertiesWidget::loadDynamicData() {
}
void PropertiesWidget::loadUrlSeeds(){
QStringList already_added;
listWebSeeds->clear();
QStringList url_seeds = h.url_seeds();
foreach(const QString &url_seed, url_seeds){
if(!url_seed.isEmpty()) {
new QListWidgetItem(url_seed, listWebSeeds);
already_added << url_seed;
}
}
// Load the hard-coded url seeds
qDebug("Loading URL seeds");
QStringList hc_seeds = h.url_seeds();
// Add hard coded url seeds
// Add url seeds
foreach(const QString &hc_seed, hc_seeds){
if(!already_added.contains(hc_seed)){
qDebug("Loading URL seed: %s", hc_seed.toLocal8Bit().data());
new QListWidgetItem(hc_seed, listWebSeeds);
}
}
}
/* Tab buttons */

1
src/speedlimitdlg.h

@ -50,6 +50,7 @@ class SpeedLimitDialog : public QDialog, private Ui_bandwidth_dlg { @@ -50,6 +50,7 @@ class SpeedLimitDialog : public QDialog, private Ui_bandwidth_dlg {
// Connect to slots
connect(bandwidthSlider, SIGNAL(valueChanged(int)), this, SLOT(updateSpinValue(int)));
connect(spinBandwidth, SIGNAL(valueChanged(int)), this, SLOT(updateSliderValue(int)));
move(misc::screenCenter(this));
}
~SpeedLimitDialog(){

Loading…
Cancel
Save