]> git.sven.stormbind.net Git - sven/vym.git/commitdiff
New upstream version 2.9.577 upstream/2.9.577
authorSven Hoexter <sven@stormbind.net>
Wed, 25 Jun 2025 17:58:35 +0000 (19:58 +0200)
committerSven Hoexter <sven@stormbind.net>
Wed, 25 Jun 2025 17:58:35 +0000 (19:58 +0200)
19 files changed:
icons/classic/document-export.png [new file with mode: 0644]
icons/classic/document-export.svg [deleted file]
src/debuginfo.cpp
src/headingeditor.cpp
src/headingeditor.h
src/image-container.cpp
src/jira-agent.cpp
src/main.cpp
src/mainwindow.cpp
src/noteeditor.cpp
src/noteeditor.h
src/scripteditor.cpp
src/shortcuts.cpp
src/showtextdialog.cpp
src/texteditor.cpp
src/texteditor.h
src/version.h
src/vymmodel.cpp
vym.qrc

diff --git a/icons/classic/document-export.png b/icons/classic/document-export.png
new file mode 100644 (file)
index 0000000..ffb81f8
Binary files /dev/null and b/icons/classic/document-export.png differ
diff --git a/icons/classic/document-export.svg b/icons/classic/document-export.svg
deleted file mode 100644 (file)
index ffb81f8..0000000
Binary files a/icons/classic/document-export.svg and /dev/null differ
index 2e67523bec81b53a27dce64d1b5a16def4bfaaf0..59eb2d580535ff16826f8db97764bc4285c11b4a 100644 (file)
@@ -2,6 +2,7 @@
 
 #include <QCoreApplication>
 #include <QDir>
+#include <QFont>
 #include <QProcessEnvironment>
 #include <QSslSocket>
 #include <QString>
@@ -21,6 +22,8 @@ extern QString vymCodeName;
 extern QString vymBuildDate;
 
 extern Settings settings;
+extern QFont fixedFont;
+extern QFont varFont;
 
 extern QString localeName;
 
@@ -56,6 +59,8 @@ QString debugInfo()
     s += QString("     Settings: %1\n\n").arg(settings.fileName());
     s += QString("   Dark theme: %1   System seems dark: %2\n").arg(usingDarkTheme).arg(systemSeemsDark);
     s += QString("Avail. styles: %1\n\n").arg(QStyleFactory::keys().join(","));
+    s += QString(" Fixed font: %1\n").arg(fixedFont.toString());
+    s += QString("   Var font: %1\n").arg(varFont.toString());
     s += " SSL status: ";
     QSslSocket::supportsSsl() ? s += "supported\n" : s += "not supported\n";
     s += "     SSL Qt: " + QSslSocket::sslLibraryBuildVersionString() + "\n";
@@ -71,7 +76,7 @@ QString debugInfo()
     s += QString("            localeName: %1\n").arg(localeName);
     s += QString("                system: %1\n").arg(QLocale::system().name());
     s += QString("              language: %1\n").arg(QLocale::languageToString(QLocale::system().language()));
-    s += QString("               country: %1\n").arg(QLocale::countryToString(QLocale::system().country()));
+    s += QString("               country: %1\n").arg(QLocale::territoryToString(QLocale::system().territory()));
     s += QString("           uiLanguages: %1\n").arg(QLocale::system().uiLanguages().join(","));
     s += QString("                  LANG: %1\n")
         .arg(QProcessEnvironment::systemEnvironment().value("LANG", "not set."));
index 2e093a703761fe754e58f708afc93e2c3116a9d1..1455a5fd8f28af138c0464ec0b2c25243409b895 100644 (file)
@@ -4,15 +4,12 @@
 extern Settings settings;
 extern QString vymName;
 
-HeadingEditor::HeadingEditor(QString scope) : TextEditor()
+HeadingEditor::HeadingEditor(const QString &eName) : TextEditor(eName)
 {
-    editorName = tr("Heading Editor", "Name of editor shown as window title");
+    editorName = eName;
     setWindowTitle("");
 
     setUseMapBackgroundColor(true);
-
-    // Load Settings
-    init(scope);
 }
 
 HeadingEditor::~HeadingEditor() {}
index bd6dfd2ac1d511f20ed2d6297ec585eba5d28957..af2670b58b57e6757d1554c61f639e29071dc4db 100644 (file)
@@ -6,7 +6,7 @@
 class HeadingEditor : public TextEditor {
     Q_OBJECT
   public:
-    HeadingEditor(QString scope);
+    HeadingEditor(const QString &eName = "undefined");
     ~HeadingEditor();
 };
 
index bdb5ba657b50051887f192c5308459ed0382a4c7..f8fad772fc84407fe4631ba7b6c885decd0a7c04 100644 (file)
@@ -118,6 +118,7 @@ void ImageContainer::select()
 
 bool ImageContainer::load(const QString &fn, bool createClone)
 {
+    // qDebug() << "IC::load " << fn;
     // createClone == true, if called via copy()
     if (imageType != ImageContainer::Undefined) {
         qWarning() << "ImageContainer::load (" << fn
index a7e5414689189880a04faa330afb6adb314cde05..97ceb1e87ef025d055ad54d8df1f765a7ffc7cab 100644 (file)
@@ -321,7 +321,7 @@ void JiraAgent::finishJob()
 
 void JiraAgent::unknownStepWarning()
 {
-    qWarning() << "JA::contJob  unknow step in jobType = " 
+    qWarning() << "JA::contJob  unknown step in jobType = " 
         << jobTypeInt 
         << "jobStep = " << jobStep;
 }
index 87e5ebdda2bf76ea1315be95676d5490448c6cf8..25139d866663b118dac2e90a7d5101c5f57d0175 100644 (file)
@@ -2,6 +2,7 @@
 #include <iostream>
 
 #include <QApplication>
+#include <QFontDatabase>
 #include <QJSEngine>
 #include <QMessageBox>
 #include <QStyleFactory>
@@ -105,6 +106,8 @@ QStringList lastSessionFiles;   //! Will be overwritten in setting after load, s
 Switchboard switchboard;
 
 Settings settings("InSilmaril", QString(__VYM_NAME).toLower()); // Organization, Application name
+QFont fixedFont;
+QFont varFont;
 
 bool zipToolAvailable = false;
 bool unzipToolAvailable = false;
@@ -181,6 +184,13 @@ int main(int argc, char *argv[])
     vymCodeQuality = __VYM_CODE_QUALITY;
     vymHome = __VYM_HOME;
 
+    // Fonts
+    fixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
+        //    Linux: "Courier,12,-1,5,48,0,0,0,1,0"
+        //    Mac  :  "Menlo"
+    varFont = QFontDatabase::systemFont(QFontDatabase::GeneralFont);
+        //    Linux:  "DejaVu Sans Mono,12,-1,0,50,0,0,0,0,0"
+                                                    //
     // Install our own handler for messages
     qInstallMessageHandler(msgHandler);
 
@@ -454,9 +464,8 @@ int main(int argc, char *argv[])
     userFlagsMaster->setPrefix("user/");
 
     // Initialize editors
-    noteEditor = new NoteEditor("noteeditor");
-    noteEditor->setWindowIcon(QPixmap(":/vym-editor.png"));
-    headingEditor = new HeadingEditor("headingeditor");
+    noteEditor = new NoteEditor(QObject::tr("Note Editor", "Name of editor shown as window title"));
+    headingEditor = new HeadingEditor(QObject::tr("Heading Editor", "Name of editor shown as window title"));
     branchPropertyEditor = new BranchPropertyEditor();
 
     // Initially read filenames of last session, before settings are 
index 56ac3c2db436b476f376b270aa6daaad83ff6e6d..9c6fc30d6dfe176698d7b6939dd7d68d89585cf9 100644 (file)
@@ -3366,7 +3366,7 @@ void Main::setupFlagActions()
     // Original khelpcenter.png
     setupFlag(":/flag-lifebelt.svg", Flag::StandardFlag, "lifebelt",
                      tr("This will help", "Standardflag"));
-
+    // FIXME-2 lifebelt.svg seems to cause warnings about buffer size
     setupFlag(":/flag-phone.svg", Flag::StandardFlag, "phone",
                      tr("Call...", "Standardflag"));
 
index b830571814010591ec046ba392044c3dd7dda71b..b4f070fbf17bd92921642645688efd743e3e51aa 100644 (file)
@@ -8,17 +8,13 @@
 extern Settings settings;
 extern QString vymName;
 
-NoteEditor::NoteEditor(QString scope) : TextEditor()
+NoteEditor::NoteEditor(const QString &eName) : TextEditor(eName)
 {
-    editorName = tr("Note Editor", "Name of editor shown as window title");
     setWindowTitle("");
 
     menuBar()->show();
 
     setUseMapBackgroundColor(false);
-
-    // Load Settings
-    init(scope);
 }
 
 NoteEditor::~NoteEditor() {}
index 63166745226007f8fb129273621128465f95c43a..df4cd9b963e138abdbdafdbcea13111b3a452401 100644 (file)
@@ -8,7 +8,7 @@ class VymNote;
 class NoteEditor : public TextEditor {
     Q_OBJECT
   public:
-    NoteEditor(QString scope);
+    NoteEditor(const QString &eName = "undefined");
     ~NoteEditor();
 
     VymNote getNote();
index d1322fb12d72af8b1a242fd5e95688ede1665526..bebe73582710bea8a90deb359365b6935b91ed18 100644 (file)
@@ -25,6 +25,7 @@ extern Macros macros;
 extern Main *mainWindow;
 extern Options options;
 extern Settings settings;
+extern QFont fixedFont;
 
 ScriptEditor::ScriptEditor(QWidget *parent) : QWidget(parent)
 {
@@ -53,17 +54,12 @@ ScriptEditor::ScriptEditor(QWidget *parent) : QWidget(parent)
     vymModelID = -1;
 
     // Initialize Editor
-    QFont font;
-    font.setFamily("Courier");
-    font.setFixedPitch(true);
-    font.setPointSize(12);
-    slideEditor->setFont(font);
-    macroEditor->setFont(font);
-    codeEditor->setFont(font);
+    slideEditor->setFont(fixedFont);
+    macroEditor->setFont(fixedFont);
+    codeEditor->setFont(fixedFont);
 
     // Define tab width
     const qreal d = 20; // unit is pixels
-    QFontMetrics metrics(font);
     codeEditor->setTabStopDistance(d);
     slideEditor->setTabStopDistance(d);
     macroEditor->setTabStopDistance(d);
index 2e0a1315a07d747a47fcc92e11035651b9777084..63f5d94a5d13dadae5ca032907ab2f2dcc212f34 100644 (file)
@@ -58,9 +58,11 @@ QString Switchboard::getASCII()
         for (int i = 0; i < values.size(); ++i) {
             QString desc = values.at(i).name;
             QString sc = values.at(i).keySequence.toString();
-            desc = desc.remove('&');
-            desc = desc.remove("...");
-            s += QString(" %1: %2\n").arg(sc, 12).arg(desc);
+            if (!sc.isEmpty()) {
+                desc = desc.remove('&');
+                desc = desc.remove("...");
+                s += QString(" %1: %2\n").arg(sc, 12).arg(desc);
+            }
         }
         s += "\n";
     }
index 9051241d2fa741bd29efd939159a448d46cdd278..e18dfe5866e2de8078d4e5bd6ee12c6872030961 100644 (file)
@@ -5,6 +5,7 @@
 #include <QString>
 
 extern Settings settings;
+extern QFont fixedFont;
 
 ShowTextDialog::ShowTextDialog(QWidget *parent) : QDialog(parent)
 {
@@ -23,14 +24,5 @@ void ShowTextDialog::useFixedFont(bool useFixedFont)
 {
     QFont font;
     if (useFixedFont)
-        font.fromString(settings
-                            .value("/satellite/noteeditor/fonts/fixedFont",
-                                   "Courier,10,-1,5,48,0,0,0,1,0")
-                            .toString());
-    else
-        font.fromString(settings
-                            .value("/satellite/noteeditor/fonts/varFont",
-                                   "DejaVu Sans Mono,12,-1,0,50,0,0,0,0,0")
-                            .toString());
-    ui.textBrowser->setFont(font);
+        ui.textBrowser->setFont(fixedFont);
 }
index 38978f2a639a00c6028eb9eaed068cd7f9fa1cde..b3b838f298b56a344e5d8c9af28f52f5a6f2a20e 100644 (file)
@@ -23,6 +23,8 @@
 
 extern Main *mainWindow;
 extern Settings settings;
+extern QFont fixedFont;
+extern QFont varFont;
 extern QString iconTheme;
 
 extern QAction *actionViewToggleNoteEditor;
@@ -37,8 +39,8 @@ extern bool debug;
 ///////////////////////////////////////////////////////////////////////
 ///////////////////////////////////////////////////////////////////////
 
-TextEditor::TextEditor(   // FEATURE #137 insert images with drag & drop
-                           // https://stackoverflow.com/questions/3254652/several-ways-of-placing-an-image-in-a-qtextedit
+TextEditor::TextEditor(const QString eName)   // FEATURE #137 insert images with drag & drop
+                           // https://stackoverflow.com/questions/3254652/several-ways-of-placing-an-image-in-a-qtextedit
 {
     statusBar()->hide(); // Hide sizeGrip on default, which comes with statusBar
 
@@ -56,11 +58,9 @@ TextEditor::TextEditor()    // FEATURE #137 insert images with drag & drop
     // Don't show menubar per default
     menuBar()->hide();
 
-    // Toolbars
-    setupFileActions();
-    setupEditActions();
-    setupFormatActions();
-    setupSettingsActions();
+    // Load settings
+    init (eName);
+    setWindowIcon(QPixmap(":/vym-editor.png"));
 
     // Various states
     blockChangedSignal = false;
@@ -85,8 +85,8 @@ TextEditor::~TextEditor()
     else
         s = "variable";
     settings.setValue(n + "fonts/fonthintDefault", s);
-    settings.setValue(n + "fonts/varFont", varFont.toString());
-    settings.setValue(n + "fonts/fixedFont", fixedFont.toString());
+    settings.setValue(n + "fonts/varFont", varFontInt.toString());
+    settings.setValue(n + "fonts/fixedFont", fixedFontInt.toString());
 
     settings.setValue(n + "colors/richTextEditorBackground", colorRichTextEditorBackground.name());
     settings.setValue(n + "colors/richTextBackground", colorRichTextBackground.name());
@@ -96,25 +96,27 @@ TextEditor::~TextEditor()
 void TextEditor::init(const QString &scope)
 {
     shortcutScope = scope;
+
+    // Toolbars
+    setupFileActions();
+    setupEditActions();
+    setupFormatActions();
+    setupSettingsActions();
+
     QString n = QString("/satellite/%1/").arg(shortcutScope);
     restoreState(settings.value(n + "state", 0).toByteArray());
     filenameHint = "";
-    fixedFont.fromString(
-        settings.value(n + "fonts/fixedFont", "Courier,12,-1,5,48,0,0,0,1,0")// FIXME-2 Replace all occurences of Courier on Mac
-            .toString());
-    varFont.fromString(
-        settings
-            .value(n + "fonts/varFont", "DejaVu Sans Mono,12,-1,0,50,0,0,0,0,0")
-            .toString());
+    fixedFontInt = fixedFont;
+    varFontInt = varFont;
     QString s =
         settings.value(n + "fonts/fonthintDefault", "variable").toString();
     if (s == "fixed") {
         actionSettingsFonthintDefault->setChecked(true);
-        editor->setCurrentFont(fixedFont);
+        editor->setCurrentFont(fixedFontInt);
     }
     else {
         actionSettingsFonthintDefault->setChecked(false);
-        editor->setCurrentFont(varFont);
+        editor->setCurrentFont(varFontInt);
     }
 
     // Default colors for RichText
@@ -174,7 +176,7 @@ void TextEditor::setFont(const QFont &font)
     format.setFont(font);
     tc.setCharFormat(format);
     tc.clearSelection();
-    fontChanged(fixedFont);
+    fontChanged(fixedFontInt);
 
     blockChangedSignal = false;
 }
@@ -183,13 +185,13 @@ void TextEditor::setFontHint(const QString &fh)
 {
     if (fh == "fixed") {
         actionFormatUseFixedFont->setChecked(true);
-        editor->setCurrentFont(fixedFont);
-        setFont(fixedFont);
+        editor->setCurrentFont(fixedFontInt);
+        setFont(fixedFontInt);
     }
     else {
         actionFormatUseFixedFont->setChecked(false);
-        editor->setCurrentFont(varFont);
-        setFont(varFont);
+        editor->setCurrentFont(varFontInt);
+        setFont(varFontInt);
     }
 }
 
@@ -363,7 +365,7 @@ void TextEditor::setupFileActions()
     actionFileDeleteAll = a;
 }
 
-void TextEditor::setupEditActions()
+void TextEditor::setupEditActions() // FIXME-2 Rework (default) toolbars and RT colors
 {
     QString tag = tr("Texteditor", "Shortcuts");
     QToolBar *editToolBar = addToolBar(tr("Edit Actions"));
@@ -481,14 +483,13 @@ void TextEditor::setupFormatActions()
 
     comboFont = new QComboBox;
     fontToolBar->addWidget(comboFont);
-    QFontDatabase fontDB;
-    comboFont->insertItems(0, fontDB.families());
-    connect(comboFont, SIGNAL(currentTextChanged(const QString &)), this,
+    comboFont->insertItems(0, QFontDatabase::families()); connect(comboFont,
+            SIGNAL(currentTextChanged(const QString &)), this,
             SLOT(textFamily(const QString &)));
 
     comboSize = new QComboBox;
     fontToolBar->addWidget(comboSize);
-    QList<int> sizes = fontDB.standardSizes();
+    QList<int> sizes = QFontDatabase::standardSizes();
     QList<int>::iterator it = sizes.begin();
     int i = 0;
     while (it != sizes.end()) {
@@ -769,7 +770,7 @@ void TextEditor::setPlainText(const QString &t)
     // Reset also text format
     QTextCharFormat textformat;
     textformat.setForeground(qApp->palette().color(QPalette::WindowText));
-    textformat.setFont(varFont);
+    textformat.setFont(varFontInt);
     editor->setCurrentCharFormat(textformat);
 
     // Update state including colors
@@ -948,12 +949,12 @@ void TextEditor::textEditUndo() {}
 void TextEditor::toggleFonthint()
 {
     if (!actionFormatUseFixedFont->isChecked()) {
-        editor->setCurrentFont(varFont);
-        setFont(varFont);
+        editor->setCurrentFont(varFontInt);
+        setFont(varFontInt);
     }
     else {
-        editor->setCurrentFont(fixedFont);
-        setFont(fixedFont);
+        editor->setCurrentFont(fixedFontInt);
+        setFont(fixedFontInt);
     }
     emit textHasChanged(getVymText());
 }
@@ -989,17 +990,17 @@ void TextEditor::toggleRichText()
 void TextEditor::setFixedFont()
 {
     bool ok;
-    QFont font = QFontDialog::getFont(&ok, fixedFont, this);
+    QFont font = QFontDialog::getFont(&ok, fixedFontInt, this);
     if (ok)
-        fixedFont = font;
+        fixedFontInt = font;
 }
 
 void TextEditor::setVarFont()
 {
     bool ok;
-    QFont font = QFontDialog::getFont(&ok, varFont, this);
+    QFont font = QFontDialog::getFont(&ok, varFontInt, this);
     if (ok)
-        varFont = font;
+        varFontInt = font;
 }
 
 void TextEditor::textBold()
index 00a4664d774c9859afe0ee9e4b2f2d72c04541ca..fb29cd294787aed827367967614de1caf81e665f 100644 (file)
@@ -2,19 +2,18 @@
 #define TEXTEDITOR_H
 
 #include <QMainWindow>
+#include <QString>
 #include <QtGui>
-
+#include "vymtext.h"
 class QTextEdit;
 class QComboBox;
 
-#include "vymtext.h"
-
 enum EditorState { inactiveEditor, emptyEditor, filledEditor };
 
 class TextEditor : public QMainWindow {
     Q_OBJECT
   public:
-    TextEditor();
+    TextEditor(const QString eName = "undefinedEditorName");
     ~TextEditor();
 
     void init(const QString &ename);
@@ -127,8 +126,8 @@ class TextEditor : public QMainWindow {
     QColor colorMapBackground;
     bool useColorMapBackground;
 
-    QFont varFont;
-    QFont fixedFont;
+    QFont varFontInt;
+    QFont fixedFontInt;
     QComboBox *comboFont, *comboSize;
 
     QToolBar *editToolBar;
index 049860132f16bc899d5eaf41739911fc9f3afcf2..09004fdcefd12b2293f09f6bb20f9ce20401aa4f 100644 (file)
@@ -1,16 +1,15 @@
 #ifndef VERSION_H
 #define VERSION_H
 
-#define __VYM_VERSION "2.9.576"
-#define __VYM_BUILD_DATE "2025-06-02"
+#define __VYM_VERSION "2.9.577"
+#define __VYM_BUILD_DATE "2025-06-24"
 
 #define __VYM_NAME "VYMng"     // FIXME "next generation" in in window title
 #define __VYM_HOME "http://www.insilmaril.de/vym"
 //
 //#define __VYM_CODE_QUALITY "Production"
-#define __VYM_CODE_QUALITY "*Experimental*"
-//#define __VYM_CODE_QUALITY "*Beta*"
-//#define __VYM_CODENAME "Alpha 1 of upcoming 3.0.0"
-#define __VYM_CODENAME "2025 21 year anniversary edition"
+//#define __VYM_CODE_QUALITY "*Experimental*"
+#define __VYM_CODE_QUALITY "*Beta*"
+#define __VYM_CODENAME "Beta release of upcoming 3.0.0"
 
 #endif
index 1bf316b0d097831f01d52540f67b507c791a06a1..9a4756ef11cb658060c70dbde415df5a8a164e23 100644 (file)
@@ -570,7 +570,7 @@ bool VymModel::loadMap(QString fname, const File::LoadMode &lmode,
             // which prevented subsequent loading
             QString warning = QString("Found multiple .xml files in %1: %2").arg(fname, xmlFileList.join(", "));
             logWarning(warning, __func__);
-            QMessageBox::warning (0, "Multiple xml files found", warning + "\n\nWilll try to keep only map.xml");
+            QMessageBox::warning (0, "Multiple xml files found", warning + "\n\nWill try to keep only map.xml");
 
             // mainWindow->fileLoadFromTmp (xmlFileList);
             // returnCode = 1; // Silently forget this attempt to load
diff --git a/vym.qrc b/vym.qrc
index 58c367b67cdf7ccb5c22b19a88393a390447c18f..593d4afeea5bcd2b8dd3fb9ab49a890f02c71991 100644 (file)
--- a/vym.qrc
+++ b/vym.qrc
     <file alias="document-close-classic.svg">icons/classic/document-close.png</file>
     <file alias="document-close-dark.svg">icons/dark/document-close.svg</file>
     <file alias="document-export-bright.svg">icons/bright/document-export.svg</file>
-    <file alias="document-export-classic.svg">icons/classic/document-export.svg</file>
+    <file alias="document-export-classic.svg">icons/classic/document-export.png</file>
     <file alias="document-export-dark.svg">icons/dark/document-export.svg</file>
     <file alias="document-new-bright.svg">icons/bright/document-new.svg</file>
     <file alias="document-new-classic.svg">icons/classic/document-new.svg</file>