first problem resolved: url bar is no more red if bookmarkfile is empty, and empty or duplicate bookmarks are removed from the list; refs #147

master
Marc Wäckerlin 12 years ago
parent ded89e5c43
commit fbc75df5d5
  1. 4
      src/browser.hxx

@ -878,6 +878,8 @@ class Browser: public QMainWindow, protected Ui::Browser {
if (qobject_cast<QComboBox*>(_url))
for (int i(0); i<qobject_cast<QComboBox*>(_url)->count(); ++i)
urls<<qobject_cast<QComboBox*>(_url)->itemText(i);
urls.removeAll("");
urls.removeDuplicates();
if (_bookmarkfile.writeable()) {
LOG<<"write to bookmark file";
_bookmarkfile.write(urls);
@ -915,6 +917,8 @@ class Browser: public QMainWindow, protected Ui::Browser {
LOG<<"load from settings";
urls = _settings()->value("Window/Urls").toStringList();
}
urls.removeAll("");
urls.removeDuplicates();
if (qobject_cast<QComboBox*>(_url)) {
QString ci(qobject_cast<QComboBox*>(_url)->currentText());
qobject_cast<QComboBox*>(_url)->clear();

Loading…
Cancel
Save