From dfea1a125c92b70941fd5d585d5a44a3efdf2d52 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Fri, 23 Mar 2018 09:26:40 +0100 Subject: [PATCH] Windows: Update registered capabilities All registered file types now have same title "Falkon HTML Document" and all registered protocols "Falkon URL". Also added ftp protocol. --- src/lib/app/mainapplication.cpp | 11 ++++++----- windows/installer.nsi | 33 +++++++++++++++++---------------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/lib/app/mainapplication.cpp b/src/lib/app/mainapplication.cpp index 372f16305..ea8eec1bc 100644 --- a/src/lib/app/mainapplication.cpp +++ b/src/lib/app/mainapplication.cpp @@ -1162,14 +1162,15 @@ void MainApplication::initPulseSupport() RegisterQAppAssociation* MainApplication::associationManager() { if (!m_registerQAppAssociation) { - QString desc = tr("Falkon is a new, fast and secure open-source WWW browser. Falkon is licensed under GPL version 3 or (at your option) any later version. It is based on WebKit core and Qt Framework."); + QString desc = tr("Falkon is a new, fast and secure open-source WWW browser. Falkon is licensed under GPL version 3 or (at your option) any later version. It is based on QtWebEngine and Qt Framework."); QString fileIconPath = QApplication::applicationFilePath() + ",1"; QString appIconPath = QApplication::applicationFilePath() + ",0"; m_registerQAppAssociation = new RegisterQAppAssociation("Falkon", QApplication::applicationFilePath(), appIconPath, desc, this); - m_registerQAppAssociation->addCapability(".html", "Falkon.HTML", "HTML File", fileIconPath, RegisterQAppAssociation::FileAssociation); - m_registerQAppAssociation->addCapability(".htm", "Falkon.HTM", "HTM File", fileIconPath, RegisterQAppAssociation::FileAssociation); - m_registerQAppAssociation->addCapability("http", "Falkon.HTTP", "URL:HyperText Transfer Protocol", appIconPath, RegisterQAppAssociation::UrlAssociation); - m_registerQAppAssociation->addCapability("https", "Falkon.HTTPS", "URL:HyperText Transfer Protocol with Privacy", appIconPath, RegisterQAppAssociation::UrlAssociation); + m_registerQAppAssociation->addCapability(".html", "FalkonHTML", "Falkon HTML Document", fileIconPath, RegisterQAppAssociation::FileAssociation); + m_registerQAppAssociation->addCapability(".htm", "FalkonHTML", "Falkon HTML Document", fileIconPath, RegisterQAppAssociation::FileAssociation); + m_registerQAppAssociation->addCapability("http", "FalkonURL", "Falkon URL", appIconPath, RegisterQAppAssociation::UrlAssociation); + m_registerQAppAssociation->addCapability("https", "FalkonURL", "Falkon URL", appIconPath, RegisterQAppAssociation::UrlAssociation); + m_registerQAppAssociation->addCapability("ftp", "FalkonURL", "Falkon URL", appIconPath, RegisterQAppAssociation::UrlAssociation); } return m_registerQAppAssociation; } diff --git a/windows/installer.nsi b/windows/installer.nsi index 8bba6e47e..a448b4f3d 100644 --- a/windows/installer.nsi +++ b/windows/installer.nsi @@ -260,14 +260,15 @@ SectionEnd SectionGroup $(TITLE_SecSetASDefault) SecSetASDefault Section $(TITLE_SecExtensions) SecExtensions SetOutPath "$INSTDIR" - ${RegisterAssociation} ".htm" "$INSTDIR\falkon.exe" "Falkon.HTM" $(FILE_Htm) "$INSTDIR\falkon.exe,1" "file" - ${RegisterAssociation} ".html" "$INSTDIR\falkon.exe" "Falkon.HTML" $(FILE_Html) "$INSTDIR\falkon.exe,1" "file" + ${RegisterAssociation} ".htm" "$INSTDIR\falkon.exe" "FalkonHTML" "Falkon HTML Document" "$INSTDIR\falkon.exe,1" "file" + ${RegisterAssociation} ".html" "$INSTDIR\falkon.exe" "FalkonHTML" "Falkon HTML Document" "$INSTDIR\falkon.exe,1" "file" ${UpdateSystemIcons} SectionEnd Section $(TITLE_SecProtocols) SecProtocols - ${RegisterAssociation} "http" "$INSTDIR\falkon.exe" "Falkon.HTTP" "URL:HyperText Transfer Protocol" "$INSTDIR\falkon.exe,0" "protocol" - ${RegisterAssociation} "https" "$INSTDIR\falkon.exe" "Falkon.HTTPS" "URL:HyperText Transfer Protocol with Privacy" "$INSTDIR\falkon.exe,0" "protocol" + ${RegisterAssociation} "http" "$INSTDIR\falkon.exe" "FalkonURL" "Falkon URL" "$INSTDIR\falkon.exe,0" "protocol" + ${RegisterAssociation} "https" "$INSTDIR\falkon.exe" "FalkonURL" "Falkon URL" "$INSTDIR\falkon.exe,0" "protocol" + ${RegisterAssociation} "ftp" "$INSTDIR\falkon.exe" "FalkonURL" "Falkon URL" "$INSTDIR\falkon.exe,0" "protocol" ${UpdateSystemIcons} SectionEnd SectionGroupEnd @@ -323,10 +324,11 @@ SectionEnd DeleteRegKey HKLM "Software\${PRODUCT_NAME}" DeleteRegValue HKLM "SOFTWARE\RegisteredApplications" "${PRODUCT_NAME}" - ${UnRegisterAssociation} ".htm" "Falkon.HTM" "$INSTDIR\falkon.exe" "file" - ${UnRegisterAssociation} ".html" "Falkon.HTML" "$INSTDIR\falkon.exe" "file" - ${UnRegisterAssociation} "http" "Falkon.HTTP" "$INSTDIR\falkon.exe" "protocol" - ${UnRegisterAssociation} "https" "Falkon.HTTPS" "$INSTDIR\falkon.exe" "protocol" + ${UnRegisterAssociation} ".htm" "FalkonHTML" "$INSTDIR\falkon.exe" "file" + ${UnRegisterAssociation} ".html" "FalkonHTML" "$INSTDIR\falkon.exe" "file" + ${UnRegisterAssociation} "http" "FalkonURL" "$INSTDIR\falkon.exe" "protocol" + ${UnRegisterAssociation} "https" "FalkonURL" "$INSTDIR\falkon.exe" "protocol" + ${UnRegisterAssociation} "ftp" "FalkonURL" "$INSTDIR\falkon.exe" "protocol" ${UpdateSystemIcons} SectionEnd !endif @@ -433,19 +435,18 @@ Function RegisterCapabilities ; even if we don't associate Falkon as default for ".htm" and ".html" ; we need to write these ProgIds for future use! ;(e.g.: user uses "Default Programs" on Win7 or Vista to set Falkon as default.) - ${CreateProgId} "Falkon.HTM" "$INSTDIR\falkon.exe" $(FILE_Htm) "$INSTDIR\falkon.exe,1" - ${CreateProgId} "Falkon.HTML" "$INSTDIR\falkon.exe" $(FILE_Html) "$INSTDIR\falkon.exe,1" - ${CreateProgId} "Falkon.HTTP" "$INSTDIR\falkon.exe" "URL:HyperText Transfer Protocol" "$INSTDIR\falkon.exe,0" - ${CreateProgId} "Falkon.HTTPS" "$INSTDIR\falkon.exe" "URL:HyperText Transfer Protocol with Privacy" "$INSTDIR\falkon.exe,0" + ${CreateProgId} "FalkonHTML" "$INSTDIR\falkon.exe" "Falkon HTML Document" "$INSTDIR\falkon.exe,1" + ${CreateProgId} "FalkonURL" "$INSTDIR\falkon.exe" "Falkon URL" "$INSTDIR\falkon.exe,0" ; note: these lines just introduce capabilities of Falkon to OS and don't change defaults! WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}" "ApplicationDescription" "$(PRODUCT_DESC)" WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}" "ApplicationIcon" "$INSTDIR\falkon.exe,0" WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}" "ApplicationName" "${PRODUCT_NAME}" - WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\FileAssociations" ".htm" "Falkon.HTM" - WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\FileAssociations" ".html" "Falkon.HTML" - WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "http" "Falkon.HTTP" - WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "https" "Falkon.HTTPS" + WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\FileAssociations" ".htm" "FalkonHTML" + WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\FileAssociations" ".html" "FalkonHTML" + WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "http" "FalkonURL" + WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "https" "FalkonURL" + WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\URLAssociations" "ftp" "FalkonURL" WriteRegStr HKLM "${PRODUCT_CAPABILITIES_KEY}\Startmenu" "StartMenuInternet" "$INSTDIR\falkon.exe" WriteRegStr HKLM "SOFTWARE\RegisteredApplications" "${PRODUCT_NAME}" "${PRODUCT_CAPABILITIES_KEY}" ${EndIf}