|
|
|
@ -202,6 +202,9 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
|
if (!settings || _kiosk) { |
|
|
|
|
actionSettings->setVisible(false); |
|
|
|
|
actionEditBookmarks->setVisible(false); |
|
|
|
|
actionSaveWindowState->setVisible(false); |
|
|
|
|
actionLoadWindowState->setVisible(false); |
|
|
|
|
delete _bookmarks; _bookmarks=0; |
|
|
|
|
} |
|
|
|
|
if (_kiosk) { |
|
|
|
|
actionNew->setEnabled(false); |
|
|
|
@ -580,6 +583,7 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
|
|
|
|
|
|
void on_actionAddBookmark_triggered() { |
|
|
|
|
QComboBox* url(qobject_cast<QComboBox*>(_url)); |
|
|
|
|
if (!_bookmarks) return; |
|
|
|
|
if (_url) { |
|
|
|
|
url->addItem(url->currentText()); |
|
|
|
|
QAction* a(_bookmarks->addAction(url->currentText())); |
|
|
|
@ -859,11 +863,13 @@ class Browser: public QMainWindow, protected Ui::Browser { |
|
|
|
|
qobject_cast<QComboBox*>(_url)->clear(); |
|
|
|
|
qobject_cast<QComboBox*>(_url)->addItems(urls); |
|
|
|
|
} |
|
|
|
|
_bookmarks->clear(); |
|
|
|
|
for (QStringList::iterator it(urls.begin()); it!=urls.end(); ++it) { |
|
|
|
|
QAction* a(_bookmarks->addAction(*it)); |
|
|
|
|
a->setData(*it); |
|
|
|
|
connect(a, SIGNAL(triggered(bool)), SLOT(loadFromHistory())); |
|
|
|
|
if (_bookmarks) { |
|
|
|
|
_bookmarks->clear(); |
|
|
|
|
for (QStringList::iterator it(urls.begin()); it!=urls.end(); ++it) { |
|
|
|
|
QAction* a(_bookmarks->addAction(*it)); |
|
|
|
|
a->setData(*it); |
|
|
|
|
connect(a, SIGNAL(triggered(bool)), SLOT(loadFromHistory())); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QStringList tabs(_settings()->value("Window/Tabs").toStringList()); |
|
|
|
|
int oldCnt(_tabs->count()); |
|
|
|
|