[pim/kmail] doc/kmail2: doc: more generic description of the RTL script case

2023-06-25 Thread Luigi Toscano
Git commit c0d961769bcda4bc1ce4242fc2ed46336eafb649 by Luigi Toscano.
Committed on 25/06/2023 at 18:33.
Pushed by ltoscano into branch 'master'.

doc: more generic description of the RTL script case

M  +1-1doc/kmail2/menus.docbook

https://invent.kde.org/pim/kmail/-/commit/c0d961769bcda4bc1ce4242fc2ed46336eafb649

diff --git a/doc/kmail2/menus.docbook b/doc/kmail2/menus.docbook
index 172017399..42d1af45b 100644
--- a/doc/kmail2/menus.docbook
+++ b/doc/kmail2/menus.docbook
@@ -2019,7 +2019,7 @@ items will be marked (check box colored in) in the 
menu.
   Lets you control which toolbars are displayed. You may 
choose any combination of three options:
   Main Toolbar (Send, Queue, 
Rich Text, ),
   HTML Toolbar (Style, Font / Size, 
), and
-  Text Direction (in case you write in Hebrew, I guess). Note that the HTML 
Toolbar is easily
+  Text Direction (in case you use a right-to-left script). Note that the HTML 
Toolbar is easily
   toggled on and off via the Rich Text button on the 
Main Toolbar.
 
 


[office/tellico] /: Remove HotNewStuff for scripts and port templates to new class

2023-06-25 Thread Robby Stephenson
Git commit 00d4f9179e914868c71525c5e5a20a8bbaaf9f01 by Robby Stephenson.
Committed on 25/06/2023 at 19:04.
Pushed by bcooksley into branch 'master'.

Remove HotNewStuff for scripts and port templates to new class

Downloading Tellico scripts through KNewStuff has been disabled for a
while due to the security risk. Remove the old code altogether.

M  +8-8doc/configuration.docbook
M  +5-1src/CMakeLists.txt
M  +24   -34   src/configdialog.cpp
M  +17   -3src/configdialog.h
M  +2-2src/newstuff/CMakeLists.txt
D  +0-7src/newstuff/tellico-script.knsrc

https://invent.kde.org/office/tellico/-/commit/00d4f9179e914868c71525c5e5a20a8bbaaf9f01

diff --git a/doc/configuration.docbook b/doc/configuration.docbook
index fa8bd3551..f1d6dbba9 100644
--- a/doc/configuration.docbook
+++ b/doc/configuration.docbook
@@ -212,13 +212,6 @@ existing ones may be modified or deleted, using the 
Modify...
 
-
-
-Never install and run a script from an untrusted source. They are executed 
with the same permissions as the user,
-and as a result, could modify or delete files or otherwise mess up your system.
-
-
-
 
 Many of the data sources offer more information than the default fields in 
. Those other fields are
 shown on the right of the configuration box. If any of those fields are 
checked, they will be added
@@ -535,9 +528,16 @@ The collection type returned by the script must be set, 
along with the data form
 use the default   format, but 
it can also import other formats as well, such as bibtex.
 
 
-The full path to the application should be entered in the source 
options. Be aware that the application is executed on the system with the same 
permissions as the current user, so do not use scripts from untrusted sources. 
Check the boxes next to the search keys supported by the application, and enter 
the required command line options in the edit box. The search value will be 
inserted where %1 appears.
+The full path to the application should be entered in the source 
options. Check the boxes next to the search keys supported by the application, 
and enter the required command line options in the edit box. The search value 
will be inserted where %1 appears.
 
 
+
+
+Never install and run a script from an untrusted source. They are executed 
with the same permissions as the user,
+and as a result, could modify or delete files or otherwise mess up your system.
+
+
+
 
 For updating entries already in the collection, the final check box and edit 
box are used to determine the command-line options. The entry fields used to 
find an update must be entered, in the same format as used for derived value fields.
 
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 514c42230..c2ab8add0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -128,7 +128,11 @@ ELSE()
 ENDIF()
 
 IF( KF5NewStuff_FOUND )
-  TARGET_LINK_LIBRARIES(tellico KF5::NewStuff)
+  IF(KF5_VERSION VERSION_GREATER_EQUAL "5.91.0")
+TARGET_LINK_LIBRARIES(tellico KF5::NewStuffWidgets)
+  ELSE()
+TARGET_LINK_LIBRARIES(tellico KF5::NewStuff)
+  ENDIF()
 ENDIF( KF5NewStuff_FOUND )
 
 IF( KDEPIMLIBS_FOUND )
diff --git a/src/configdialog.cpp b/src/configdialog.cpp
index 0ba231fa1..682fc8f39 100644
--- a/src/configdialog.cpp
+++ b/src/configdialog.cpp
@@ -22,8 +22,6 @@
  * *
  ***/
 
-#include 
-
 #include "configdialog.h"
 #include "field.h"
 #include "collection.h"
@@ -54,7 +52,11 @@
 #include 
 
 #ifdef ENABLE_KNEWSTUFF3
-#include 
+#if KNEWSTUFF_VERSION < QT_VERSION_CHECK(5, 91, 0)
+#include 
+#else
+#include 
+#endif
 #endif
 
 #include 
@@ -564,10 +566,20 @@ void ConfigDialog::initTemplatePage(QFrame* frame) {
   whats = i18n("Click to install a new template directly.");
   b1->setWhatsThis(whats);
 
+#ifdef ENABLE_KNEWSTUFF3
+#if KNEWSTUFF_VERSION < QT_VERSION_CHECK(5, 91, 0)
+  auto b2 = new KNS3::Button(i18n("Download..."), 
QStringLiteral("tellico-template.knsrc"), box1);
+  connect(b2, ::Button::dialogFinished, this, 
::slotUpdateTemplates);
+#else
+  auto b2 = new KNSWidgets::Button(i18n("Download..."), 
QStringLiteral("tellico-template.knsrc"), box1);
+  connect(b2, ::Button::dialogFinished, this, 
::slotUpdateTemplates);
+#endif
+#else
   QPushButton* b2 = new QPushButton(i18n("Download..."), box1);
-  box1HBoxLayout->addWidget(b2);
   b2->setIcon(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")));
-  connect(b2, ::clicked, this, 
::slotDownloadTemplate);
+  b2->setEnabled(false);
+#endif
+  box1HBoxLayout->addWidget(b2);
   whats = i18n("Click to download additional templates.");
   b2->setWhatsThis(whats);
 
@@ -670,18 +682,10 @@ void ConfigDialog::initFetchPage(QFrame* frame) {
   m_removeSourceBtn = new QPushButton(i18n(""), frame);
   m_removeSourceBtn->setIcon(QIcon::fromTheme(QStringLiteral("list-remove")));
   m_removeSourceBtn->setWhatsThis(i18n("Click to