pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.68k stars 415 forks source link

[BUG] Does not start hidden/minimized. #2778

Closed akwala closed 1 year ago

akwala commented 1 year ago

Expected behaviour

With "Show system tray icon" and "Start application hidden" enabled, QOwnNotes should start minimized with its icon in the system tray.

Actual behaviour

QOwnNotes window appears when it's launched, it's not minimized.

Steps to reproduce

  1. Launch QOwnNotes: QOwnNotes --session test
  2. Settings > Interface: Under System Tray, enable "Show system tray icon" and "Start application hidden".
  3. Quit and relaunch QOwnNotes with the command above.

    Output from the debug section in the settings dialog

    QOwnNotes Debug Information

General Info

Current Date: Tue Apr 25 19:20:26 2023 Version: 23.4.6 Build date: Apr 19 2023 Build number: 1031 Platform: linux Operating System: Ubuntu 22.04.2 LTS Build architecture: x86_64 Current architecture: x86_64 Release: Launchpad PPA Qt Version (build): 5.15.3 Qt Version (runtime): 5.15.3 Portable mode: no Settings path / key: ~/.config/PBE/QOwnNotes-test.conf Application database path: ~/.local/share/PBE/QOwnNotes-test/QOwnNotes.sqlite Application arguments: QOwnNotes, --session, test Qt Debug: 0 Locale (system): en_US Locale (interface): empty Primary screen resolution: 1920x1080 Icon theme: Papirus Notes in current note folder: 2 Calendar items: 0 Enabled scripts: 0

Server Info

serverUrl: empty appIsValid: no notesPathExists: empty connectionErrorMessage: empty

Spellchecking

Enabled: true Selected language: en_US Language codes: en_US Language names: American English (United States) Application dictionaries path: ~/.local/share/PBE/QOwnNotes-test/dicts

Note folders

currentNoteFolderId: 1

Note folder default

id: 1 isCurrent: yes activeTagId: 0 localPath: ~/path/to/Notes remotePath: Notes cloudConnectionId: 1 isShowSubfolders: no isUseGit: no allowDifferentNoteFileName: no activeNoteSubFolder name: empty database file: ~/path/to/Notes/notes.sqlite

Cloud connections

Cloud connection Default

id: 1 isCurrent: yes serverUrl: empty username: empty accountId: empty

Enabled scripts

Settings

AboutDialog/geometry (QByteArray): <binary data> ActiveNoteHistoryItem (NoteHistoryItem): <binary data> Debug/fakeOldVersionNumber (QString): false Debug/fileLogging (QString): false Editor/CurrentSchemaKey (QString): EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb Editor/autoBracketClosing (QString): true Editor/autoBracketRemoval (QString): true Editor/disableCursorBlinking (QString): false Editor/editorWidthInDFMOnly (QString): true Editor/highlightCurrentLine (QString): true Editor/indentSize (QString): 4 Editor/removeTrailingSpaces (QString): false Editor/showLineNumbers (QString): false Editor/useTabIndent (QString): false Editor/vimMode (QString): false IssueAssistantDialog/geometry (QByteArray): <binary data> LastUpdateCheck (QDateTime): 2023-04-25T19:01:56.962 LogWidget/criticalLog (bool): true LogWidget/debugLog (bool): true LogWidget/fatalLog (bool): true LogWidget/infoLog (bool): true LogWidget/scriptingLog (bool): true LogWidget/statusLog (bool): true LogWidget/warningLog (bool): true MainWindow/geometry (QByteArray): <binary data> MainWindow/mainToolBar.iconSize (QString): 22 MainWindow/menuBarGeometry (QByteArray): <binary data> MainWindow/noteTextEdit.code.font (QString): Hack,10,-1,7,50,0,0,0,0,0 MainWindow/noteTextEdit.font (QString): Noto Sans,10,-1,0,50,0,0,0,0,0 MainWindow/noteTextView.code.font (QString): Hack,10,-1,7,50,0,0,0,0,0 MainWindow/noteTextView.font (QString): Noto Sans,10,-1,0,50,0,0,0,0,0 MainWindow/noteTextView.ignoreCodeFontSize (QString): true MainWindow/noteTextView.refreshDebounceTime (QString): 600 MainWindow/noteTextView.rtl (QString): false MainWindow/noteTextView.underline (QString): true MainWindow/noteTextView.useEditorStyles (QString): true MainWindow/noteTextView.useInternalExportStyling (QString): true MessageBoxOverride/linux-dark-mode (int): 65536 NoteFolder-1/NoteTabNameList (QString): Bookmarks NoteFolder-1/NoteTabStickinessList: empty NoteFolder-1/NoteTabSubFolderPathDataList (QString): empty NoteHistory-1 (QVariantList): <variant list with 1 item(s)> NoteHistoryCurrentIndex-1 (QString): 0 PiwikClientId (QString): <hidden> ScriptRepositoryDialog/mainSplitterState (QByteArray): <binary data> SearchEngineId (QString): 2 SettingsDialog/geometry (QByteArray): <binary data> SettingsDialog/mainSplitterState (QByteArray): <binary data> ShowSystemTray (QString): true StartHidden (QString): true WelcomeDialog/geometry (QByteArray): <binary data> acceptAllExternalModifications (QString): false allowNoteEditing (bool): true allowOnlyOneAppInstance (QString): true appMetrics/disableAppHeartbeat (QString): false appMetrics/disableTracking (QString): false appMetrics/notificationShown (QString): true automaticNoteFolderDatabaseClosing (QString): false checkSpelling (bool): true closeTodoListAfterSave (QString): false cryptoKey (QString): <hidden> currentNoteFolderId (QString): 1 currentWorkspace (QString): initial cursorWidth (QString): 1 darkMode (QString): false darkModeColors (QString): false darkModeIconTheme (QString): false darkModeTrayIcon (QString): false defaultNoteFileExtension (QString): md disableAutomaticUpdateDialog (QString): true disableSavedSearchesAutoCompletion (QString): false dockWasInitializedOnce (QString): true enableNoteTree (QString): false enableSocketServer (QString): true enableWebAppSupport (QString): false externalEditorPath (QString): empty fullyHighlightedBlockquotes (QString): false gitCommitInterval (QString): 30 gitExecutablePath (QString): empty gitLogCommand (QString): empty guiFirstRunInit (bool): true ignoreAllExternalModifications (QString): false ignoreAllExternalNoteFolderChanges (QString): false ignoreNoteSubFolders (QString): ^\. ignoredNoteFiles (QString): empty imageScaleDown (QString): false imageScaleDownMaximumHeight (QString): 1024 imageScaleDownMaximumWidth (QString): 1024 initialLayoutIdentifier (QString): minimal insertTimeFormat (QString): empty interfaceFontSize (QString): 11 interfaceLanguage (QString): empty internalIconTheme (QString): false itemHeight (QString): 24 legacyLinking (QString): false localTrash/autoCleanupDays (QString): 30 localTrash/autoCleanupEnabled (QString): true localTrash/supportEnabled (QString): true markdownHighlightingEnabled (QString): true navigationPanelAutoSelect (QString): true navigationPanelHideSearch (QString): false networking/ignoreSSLErrors (QString): true networking/proxyType (QString): 2 newNoteAskHeadline (QString): false noteEditIsCentralWidget (QString): true noteFileExtensionList (QStringList): md, txt noteListPreview (QString): false noteSaveIntervalTime (QString): 10 noteSubfoldersPanelDisplayAsFullTree (QString): true noteSubfoldersPanelHideSearch (QString): false noteSubfoldersPanelOrder (QString): 0 noteSubfoldersPanelShowFullPath (QString): false noteSubfoldersPanelShowNotesRecursively (QString): false noteSubfoldersPanelShowRootFolderName (QString): true noteSubfoldersPanelSort (QString): 0 notesPanelOrder (QString): 0 notesPanelSort (QString): 1 notesPath (QString): ~/path/to/Notes notifyAllExternalModifications (QString): false overrideInterfaceFontSize (QString): false ownCloud/supportEnabled (QString): false ownCloud/todoCalendarBackend (QString): 3 ownCloud/todoCalendarCalDAVPassword (QString): <hidden> ownCloud/todoCalendarCalDAVServerUrl (QString): empty ownCloud/todoCalendarCalDAVUsername (QString): empty ownCloud/todoCalendarCloudConnectionId (QString): 1 ownCloud/todoCalendarDisplayNameList: empty ownCloud/todoCalendarEnabledList: empty ownCloud/todoCalendarEnabledUrlList: empty ownCloud/todoCalendarUrlList: empty ownCloudInfo/appIsValid (bool): false ownCloudInfo/connectionErrorMessage (QString): empty ownCloudInfo/notesPathExistsText (QString): empty ownCloudInfo/serverVersion (QString): empty restoreCursorPosition (QString): true restoreLastNoteAtStartup (QString): true restoreNoteTabs (QString): true showMatches (QString): true showMenuBar (bool): true showStatusBar (bool): true spellCheckLanguage (QString): en_US startInReadOnlyMode (QString): false systemIconTheme (QString): false taggingShowNotesRecursively (QString): false tagsPanelHideNoteCount (QString): false tagsPanelHideSearch (QString): false tagsPanelOrder (QString): 0 tagsPanelSort (QString): 0 todoCalendarSupport (QString): true toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionShow_Todo_List toolbar/1/name (QString): mainToolBar toolbar/1/title (QString): main toolbar toolbar/2/items (QStringList): actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote toolbar/2/name (QString): formattingToolbar toolbar/2/title (QString): formatting toolbar toolbar/3/items (QStringList): actionInsert_text_link, actionInsert_image, actionInsert_current_time toolbar/3/name (QString): insertingToolbar toolbar/3/title (QString): inserting toolbar toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note toolbar/4/name (QString): encryptionToolbar toolbar/4/title (QString): encryption toolbar toolbar/5/items (QStringList): actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size toolbar/5/name (QString): windowToolbar toolbar/5/title (QString): window toolbar toolbar/6/items (QString): action_Quit toolbar/6/name (QString): quitToolbar toolbar/6/title (QString): quit toolbar toolbar/size (QString): 6 useNoteFolderButtons (QString): false useUNIXNewline (QString): false webAppClientService/serverUrl (QString): wss://app.qownnotes.org webAppClientService/token (QString): <hidden> webSocketServerService/bookmarksNoteName (QString): Bookmarks webSocketServerService/bookmarksTag (QString): bookmarks webSocketServerService/commandSnippetsNoteName (QString): Commands webSocketServerService/commandSnippetsTag (QString): commands webSocketServerService/port (QString): 22222 workspace-initial/name (QString): Minimal workspace-initial/noteSubFolderDockWidgetVisible (QString): true workspace-initial/windowState (QByteArray): <binary data> workspaces (QString): initial

System environment

[scrubbed] Let me know specifically if further info is needed.

**_**: `/usr/bin/QOwnNotes`
Expand NA

Relevant log output in the Log panel

NA

Expand NA
pbek commented 1 year ago

Hm, I couldn't reproduce that under KDE Neon. When I use the option it starts minimized for me. When I click the tray icon the application appears...

gzuaps commented 1 year ago

I'm seeing the same behaviour, qownnotes doesn't start hidden. Started recently, current version qownnotes-23.4.6. qt5 5.15.3, CentOS9 stream.

Edit: just tried qownnotes-23.4.3, works as expected, starts hidden.

pbek commented 1 year ago

Maybe it's a timing issue, because the hiding must be done with QTimer::singleShot. I'll play around with the execution order...

pbek commented 1 year ago

Edit: just tried qownnotes-23.4.3, works as expected, starts hidden.

The only difference was that the script repository (and automatic script update) got broken, because of GitHub. And were reimplemented in 23.4.4 and 23.4.6. The process is much faster now...

pbek commented 1 year ago

23.4.7

There now is a new release, could you please test it and report if it works for you?

gzuaps commented 1 year ago

Thanks @pbek, fix works for me in CentOS9 stream.

akwala commented 1 year ago

23.4.7

* the timing of the **Start hidden** feature got improved (for [#2778](https://github.com/pbek/QOwnNotes/issues/2778))

There now is a new release, could you please test it and report if it works for you?

Yep, fixed in 23.4.7. Closing issue.

pbek commented 1 year ago

Great, thank you for testing!