diff --git a/bin/locale/cs_CZ.qm b/bin/locale/cs_CZ.qm index adde6a5d7..b9b49eabd 100644 Binary files a/bin/locale/cs_CZ.qm and b/bin/locale/cs_CZ.qm differ diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp index 0d5c0be84..71cb1d572 100644 --- a/src/bookmarks/bookmarkstoolbar.cpp +++ b/src/bookmarks/bookmarkstoolbar.cpp @@ -86,6 +86,7 @@ void BookmarksToolbar::showBookmarkContextMenu(const QPoint &pos) QMenu menu; menu.addAction(IconProvider::fromTheme("go-next"), tr("Move right"), this, SLOT(moveRight()))->setData(buttonPointer); menu.addAction(IconProvider::fromTheme("go-previous"), tr("Move left"), this, SLOT(moveLeft()))->setData(buttonPointer); + menu.addAction(tr("Edit bookmark"), this, SLOT(editBookmark()))->setData(buttonPointer); menu.addSeparator(); menu.addAction(IconProvider::fromTheme("list-remove"), tr("Remove bookmark"), this, SLOT(removeButton()))->setData(buttonPointer); @@ -169,6 +170,57 @@ void BookmarksToolbar::moveLeft() m_layout->insertWidget(index - 1, w); } +void BookmarksToolbar::editBookmark() +{ + QAction* act = qobject_cast (sender()); + if (!act) { + return; + } + + ToolButton* button = static_cast(act->data().value()); + if (!button) { + return; + } + + Bookmark b = button->data().value(); + + QDialog* dialog = new QDialog(this); + QFormLayout* layout = new QFormLayout(dialog); + QLabel* label = new QLabel(dialog); + QLineEdit* editUrl = new QLineEdit(dialog); + QLineEdit* editTitle = new QLineEdit(dialog); + QDialogButtonBox* box = new QDialogButtonBox(dialog); + box->addButton(QDialogButtonBox::Ok); + box->addButton(QDialogButtonBox::Cancel); + connect(box, SIGNAL(rejected()), dialog, SLOT(reject())); + connect(box, SIGNAL(accepted()), dialog, SLOT(accept())); + + label->setText(tr("Edit bookmark: ")); + layout->addRow(label); + layout->addRow(new QLabel(tr("Title: ")), editTitle); + layout->addRow(new QLabel(tr("Url: ")), editUrl); + layout->addRow(box); + + editUrl->setText(b.url.toString()); + editTitle->setText(b.title); + + dialog->setWindowTitle(tr("Edit Bookmark")); + dialog->setMinimumSize(400, 100); + dialog->exec(); + if (dialog->result() == QDialog::Rejected) { + return; + } + + QString url = editUrl->text(); + QString title = editTitle->text(); + + if (url.isEmpty() || title.isEmpty()) { + return; + } + + m_bookmarksModel->editBookmark(b.id, title, url, b.folder); +} + void BookmarksToolbar::removeButton() { QAction* act = qobject_cast (sender()); diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h index c57c8f802..d4fbafeb4 100644 --- a/src/bookmarks/bookmarkstoolbar.h +++ b/src/bookmarks/bookmarkstoolbar.h @@ -21,6 +21,8 @@ #include #include #include +#include +#include #include #include "bookmarksmodel.h" @@ -54,6 +56,7 @@ private slots: void moveRight(); void moveLeft(); + void editBookmark(); void removeButton(); void hidePanel(); diff --git a/src/plugins/speeddial.cpp b/src/plugins/speeddial.cpp index 07d1220fd..79fb5a11c 100644 --- a/src/plugins/speeddial.cpp +++ b/src/plugins/speeddial.cpp @@ -196,6 +196,11 @@ void SpeedDial::removeImageForUrl(const QString &url) } } +QString SpeedDial::getOpenFileName() +{ + return QFileDialog::getOpenFileName(0, tr("Select image..."), QDir::homePath(), "(*.png *.jpg *.jpeg)"); +} + void SpeedDial::thumbnailCreated(const QPixmap &image) { PageThumbnailer* thumbnailer = qobject_cast(sender()); diff --git a/src/plugins/speeddial.h b/src/plugins/speeddial.h index f1db17e9a..30aa582f7 100644 --- a/src/plugins/speeddial.h +++ b/src/plugins/speeddial.h @@ -24,6 +24,7 @@ #include #include #include +#include class PageThumbnailer; class SpeedDial : public QObject @@ -49,6 +50,8 @@ public slots: Q_INVOKABLE void loadThumbnail(const QString &url, bool loadTitle = false); Q_INVOKABLE void removeImageForUrl(const QString &url); + Q_INVOKABLE QString getOpenFileName(); + private slots: void thumbnailCreated(const QPixmap &image); diff --git a/translations/cs_CZ.ts b/translations/cs_CZ.ts index a9160dbb2..0ebc7f8ab 100644 --- a/translations/cs_CZ.ts +++ b/translations/cs_CZ.ts @@ -706,23 +706,52 @@ Posunout doleva - + + Edit bookmark + Upravit záložku + + + Remove bookmark Odstranit záložku - + + Edit bookmark: + Upravit záložku: + + + + Title: + Titulek: + + + + Url: + Url: + + + URL: + Url: + + + + Edit Bookmark + Upravit záložku + + + Most visited Nejnavštěvovanější - + Sites you visited the most Nejvíce navštěvované stránky - - + + Empty Prázdný @@ -4039,7 +4068,12 @@ Po přidání či odstranění cest k certifikátům je nutné k projevení změ SpeedDial - + + Select image... + Zvolte obrázek... + + + Unable to load Nepodařilo se načíst diff --git a/translations/de_DE.ts b/translations/de_DE.ts index b36b859c2..fdeb210e0 100644 --- a/translations/de_DE.ts +++ b/translations/de_DE.ts @@ -706,23 +706,48 @@ Nach links - + + Edit bookmark + + + + Remove bookmark Lesezeichen entfernen - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Meistbesuchte - + Sites you visited the most Meistbesuchte Seiten - - + + Empty Leer @@ -4039,7 +4064,12 @@ Nachdem Speicherpfade hinzugefügt oder gelöscht wurden, muss QupZilla neu gest SpeedDial - + + Select image... + + + + Unable to load Laden nicht möglich diff --git a/translations/el_GR.ts b/translations/el_GR.ts index 5dac1c465..f1a7b8261 100644 --- a/translations/el_GR.ts +++ b/translations/el_GR.ts @@ -706,23 +706,48 @@ Μετακίνηση αριστερά - + + Edit bookmark + + + + Remove bookmark Αφαίρεση σελιδοδείκτη - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Πιο δημοφιλείς - + Sites you visited the most Σελίδες που επισκεφτήκατε περισσότερο - - + + Empty Άδειο @@ -4037,7 +4062,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla SpeedDial - + + Select image... + + + + Unable to load Αδυναμία φόρτωσης diff --git a/translations/empty.ts b/translations/empty.ts index ce0e071d2..13215d014 100644 --- a/translations/empty.ts +++ b/translations/empty.ts @@ -698,23 +698,48 @@ - + + Edit bookmark + + + + Remove bookmark - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited - + Sites you visited the most - - + + Empty @@ -4011,7 +4036,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla SpeedDial - + + Select image... + + + + Unable to load diff --git a/translations/es_ES.ts b/translations/es_ES.ts index fa999c9f1..e784551bd 100644 --- a/translations/es_ES.ts +++ b/translations/es_ES.ts @@ -706,23 +706,48 @@ Mover a la izquierda - + + Edit bookmark + + + + Remove bookmark Eliminar marcador - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Más visitados - + Sites you visited the most Sitios más visitados - - + + Empty Vacío @@ -4036,7 +4061,12 @@ Después de añadir o eliminar rutas de certificados, es necesario reiniciar Qup SpeedDial - + + Select image... + + + + Unable to load No se puede cargar diff --git a/translations/fr_FR.ts b/translations/fr_FR.ts index 8d43359f7..661b0fefb 100644 --- a/translations/fr_FR.ts +++ b/translations/fr_FR.ts @@ -709,23 +709,48 @@ Déplacer vers la gauche - + + Edit bookmark + + + + Remove bookmark Supprimer le marque-page - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Plus visités - + Sites you visited the most Sites les plus visités - - + + Empty Vide @@ -4040,7 +4065,12 @@ Après avoir ajouté ou retiré un certificat, il est nécessaire de redémarrer SpeedDial - + + Select image... + + + + Unable to load Impossible d'actualiser diff --git a/translations/it_IT.ts b/translations/it_IT.ts index 02e168650..3786e0a03 100644 --- a/translations/it_IT.ts +++ b/translations/it_IT.ts @@ -706,23 +706,48 @@ Sposta a sinistra - + + Edit bookmark + + + + Remove bookmark Rimuovi segnalibro - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Più visitati - + Sites you visited the most Siti che visiti più spesso - - + + Empty Vuoto @@ -4039,7 +4064,12 @@ Dopo l'aggiunta o la rimozione dei percorsi di certificazione, è necessari SpeedDial - + + Select image... + + + + Unable to load Caricamento impossibile diff --git a/translations/nl_NL.ts b/translations/nl_NL.ts index 340d082b2..e5014ea9d 100644 --- a/translations/nl_NL.ts +++ b/translations/nl_NL.ts @@ -706,23 +706,48 @@ Verplaats naar links - + + Edit bookmark + + + + Remove bookmark Verwijder bladwijzer - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Meest bezocht - + Sites you visited the most Websites die u het meest bezocht heeft - - + + Empty Leeg @@ -4039,7 +4064,12 @@ Na het toevoegen of verwijderen van paden, is het noodzakelijk om de browser te SpeedDial - + + Select image... + + + + Unable to load Niet in staat om te laden diff --git a/translations/pl_PL.ts b/translations/pl_PL.ts index f7b638160..4e25d6355 100644 --- a/translations/pl_PL.ts +++ b/translations/pl_PL.ts @@ -707,23 +707,48 @@ Przesuń w lewo - + + Edit bookmark + + + + Remove bookmark Usuń zakładkę - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Najczęściej odwiedzane - + Sites you visited the most Strony które często odwiedzasz - - + + Empty Pusto @@ -4040,7 +4065,12 @@ Po dodaniu lub usunięciu ścieżki certyfikatu, konieczne jest ponowne uruchomi SpeedDial - + + Select image... + + + + Unable to load Nie można wczytać diff --git a/translations/pt_PT.ts b/translations/pt_PT.ts index 07ed578ea..f22ef72dd 100755 --- a/translations/pt_PT.ts +++ b/translations/pt_PT.ts @@ -706,23 +706,48 @@ Mover para a esquerda - + + Edit bookmark + + + + Remove bookmark Remover marcador - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Mais visitados - + Sites you visited the most As páginas mais visitadas - - + + Empty Vazio @@ -4036,7 +4061,12 @@ Após adicionar ou remover os caminhos dos certificados, tem que reiniciar o Qup SpeedDial - + + Select image... + + + + Unable to load Incapaz de carregar diff --git a/translations/ru_RU.ts b/translations/ru_RU.ts index c0ea0d813..2101c459f 100644 --- a/translations/ru_RU.ts +++ b/translations/ru_RU.ts @@ -709,23 +709,48 @@ Назад - + + Edit bookmark + + + + Remove bookmark Удалить закладку - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Самые посещаемые - + Sites you visited the most Самые посещаемые вами сайты - - + + Empty Пусто @@ -4049,7 +4074,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla SpeedDial - + + Select image... + + + + Unable to load Невозможно загрузить diff --git a/translations/sk_SK.ts b/translations/sk_SK.ts index eda7f0646..64281d39f 100644 --- a/translations/sk_SK.ts +++ b/translations/sk_SK.ts @@ -574,6 +574,26 @@ Bookmark &All Tabs Pridať všetky k&arty do záložiek + + Edit bookmark + + + + Edit bookmark: + + + + Title: + + + + Edit Bookmark + + + + Url: + + BookmarksWidget @@ -3217,6 +3237,10 @@ Po pridaní či odobratí ciest k certifikátom je nutné reštartovať prehliad Unable to load Nepodarilo sa načítať + + Select image... + + TabBar diff --git a/translations/sr_BA.ts b/translations/sr_BA.ts index 60f0777bd..5717abf95 100644 --- a/translations/sr_BA.ts +++ b/translations/sr_BA.ts @@ -698,23 +698,48 @@ Помјери лијево - + + Edit bookmark + + + + Remove bookmark Уклони обиљеживач - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Најпосјећеније - + Sites you visited the most Сајтови које сте највише посјећивали - - + + Empty Празно @@ -4016,7 +4041,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla SpeedDial - + + Select image... + + + + Unable to load Не могу да учитам diff --git a/translations/sr_RS.ts b/translations/sr_RS.ts index b53d675c6..955077cbe 100644 --- a/translations/sr_RS.ts +++ b/translations/sr_RS.ts @@ -698,23 +698,48 @@ Помери лево - + + Edit bookmark + + + + Remove bookmark Уклони обележивач - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited Најпосећеније - + Sites you visited the most Сајтови које сте највише посећивали - - + + Empty Празно @@ -4016,7 +4041,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla SpeedDial - + + Select image... + + + + Unable to load Не могу да учитам diff --git a/translations/zh_CN.ts b/translations/zh_CN.ts index 21a3cc01c..8db3595d5 100644 --- a/translations/zh_CN.ts +++ b/translations/zh_CN.ts @@ -702,23 +702,48 @@ 向左移动 - + + Edit bookmark + + + + Remove bookmark 删除书签 - + + Edit bookmark: + + + + + Title: + + + + + Url: + + + + + Edit Bookmark + + + + Most visited - + Sites you visited the most 您最常访问的网站 - - + + Empty 空页面 @@ -4028,7 +4053,12 @@ After adding or removing certificate paths, it is neccessary to restart QupZilla SpeedDial - + + Select image... + + + + Unable to load 无法加载