mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-12 02:00:27 +08:00
Compare commits
37 Commits
copilot/fi
...
copilot/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75d442339e | ||
|
|
c1ebbfb543 | ||
|
|
45b17ac07c | ||
|
|
d7edd92204 | ||
|
|
cbf3e566d9 | ||
|
|
f41fb0a68e | ||
|
|
1f96cf5745 | ||
|
|
2e742461f2 | ||
|
|
dc3da38c34 | ||
|
|
f24cbab72a | ||
|
|
17b374b2e9 | ||
|
|
9ebc030f8b | ||
|
|
9bcf9905d5 | ||
|
|
65c832e430 | ||
|
|
5caaf749f7 | ||
|
|
d5655376f6 | ||
|
|
19af34ae51 | ||
|
|
4bff62f4d8 | ||
|
|
e0eb87bcc3 | ||
|
|
7146a2a220 | ||
|
|
491f55b6a8 | ||
|
|
d25b7b32de | ||
|
|
a887ca3014 | ||
|
|
5d3fd85238 | ||
|
|
bbc20e56b6 | ||
|
|
6def05648a | ||
|
|
6a6c411efb | ||
|
|
39ee2f6b00 | ||
|
|
d2c80e1847 | ||
|
|
ab4e9cbd79 | ||
|
|
1095d2be68 | ||
|
|
432b3b033a | ||
|
|
f7c029f127 | ||
|
|
3e4052ae77 | ||
|
|
28f93256e4 | ||
|
|
2af849ed81 | ||
|
|
78843d8098 |
37
CHANGELOG.md
37
CHANGELOG.md
@@ -1,6 +1,41 @@
|
||||
## 4.2.2
|
||||
|
||||
- Fix version display issue [#1776](https://github.com/QL-Win/QuickLook/issues/1776)
|
||||
|
||||
## 4.2.1
|
||||
|
||||
- Fix theme error in MediaInfoViewer plugin [#1775](https://github.com/QL-Win/QuickLook/issues/1775)
|
||||
- Fix theme error in any theme-changable plugin [#1507](https://github.com/QL-Win/QuickLook/issues/1507)
|
||||
|
||||
## 4.2.0
|
||||
|
||||
- Add built-in MediaInfoViewer plugin
|
||||
- Add built-in MediaInfoViewer plugin and support it in more menu
|
||||
- Add 'Copy as path' option to more menu
|
||||
- Add cross-plugin 'Reopen as' menu for SVG and HTML [#1690](https://github.com/QL-Win/QuickLook/issues/1690)
|
||||
- Support Point Cloud Data (.pcd) for 3D spatial (Only PCD files with the PointXYZ format are supported, while Color and Intensity formats are not.)
|
||||
- Support Mermaid diagram rendering in MarkdownViewer [#1730](https://github.com/QL-Win/QuickLook/issues/1730)
|
||||
- Support .pdn in ThumbnailViewer [#1708](https://github.com/QL-Win/QuickLook/issues/1708)
|
||||
- Improve CLI performance [#1706](https://github.com/QL-Win/QuickLook/issues/1706) [#1731](https://github.com/QL-Win/QuickLook/issues/1731)
|
||||
- Set default background to transparent for SVG panel
|
||||
- Improve UI/UX of font loading
|
||||
- Add diff file syntax highlighting
|
||||
- Add Swedish translation [#1755](https://github.com/QL-Win/QuickLook/issues/1755)
|
||||
- Add .slnx extension to XML syntax highlighting
|
||||
- Add support for Telegram Sticker (.tgs) files [#1762](https://github.com/QL-Win/QuickLook/issues/1762)
|
||||
- Add .snupkg and .asar support to archive viewer
|
||||
- Add .krc file support to TextViewer
|
||||
- Add UseNativeProvider option [#1726](https://github.com/QL-Win/QuickLook/issues/1726)
|
||||
- Fix image .jxr error reading from UseColorProfile
|
||||
- Fix issue where font file stays locked [#77](https://github.com/QL-Win/QuickLook/issues/77)
|
||||
- Fix font file unicode name is not supported
|
||||
- Fix extracting cover art will not cause the title to be lost [#1759](https://github.com/QL-Win/QuickLook/issues/1759)
|
||||
- Fix HelixViewer default height being too large
|
||||
- Fix long path handling issue in HtmlViewer [#1643](https://github.com/QL-Win/QuickLook/issues/1643)
|
||||
- Update Batch syntax highlighting colors
|
||||
- Refactor tray icon to use TrayIconHost
|
||||
- Refactor to make exe-installer no forked relaunching
|
||||
- Remove unimportant UnobservedTaskException [#1691](https://github.com/QL-Win/QuickLook/issues/1691)
|
||||
- Remove configuration `ModernMessageBox`
|
||||
|
||||
## 4.1.1
|
||||
|
||||
|
||||
Submodule QuickLook.Common updated: 2dc2616aeb...709f26fa38
@@ -30,7 +30,7 @@
|
||||
HWND hMsgWnd;
|
||||
HANDLE hGetResultEvent;
|
||||
|
||||
PCHAR pXmlBuffer;
|
||||
PCHAR pXmlBuffer = nullptr;
|
||||
|
||||
void DOpus::GetSelected(PWCHAR buffer)
|
||||
{
|
||||
@@ -72,9 +72,12 @@ void DOpus::GetSelected(PWCHAR buffer)
|
||||
|
||||
WaitForSingleObject(hGetResultEvent, 2000);
|
||||
|
||||
ParseXmlBuffer(buffer);
|
||||
|
||||
delete[] pXmlBuffer;
|
||||
if (pXmlBuffer != nullptr)
|
||||
{
|
||||
ParseXmlBuffer(buffer);
|
||||
delete[] pXmlBuffer;
|
||||
pXmlBuffer = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void DOpus::ParseXmlBuffer(PWCHAR buffer)
|
||||
@@ -88,6 +91,9 @@ void DOpus::ParseXmlBuffer(PWCHAR buffer)
|
||||
* ...
|
||||
*/
|
||||
|
||||
if (pXmlBuffer == nullptr)
|
||||
return;
|
||||
|
||||
using namespace rapidxml;
|
||||
|
||||
xml_document<> doc;
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
// Copyright © 2017-2025 QL-Win Contributors
|
||||
//
|
||||
// This file is part of QuickLook program.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef RAPIDXML_HPP_INCLUDED
|
||||
#define RAPIDXML_HPP_INCLUDED
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="6.0.2" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
<PackageReference Include="PureSharpCompress" Version="0.40.0" />
|
||||
<PackageReference Include="QuickLook.ApkReader" Version="2.1.0" />
|
||||
<PackageReference Include="QuickLook.DiscUtils" Version="1.0.0" />
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FreeTypeSharp" Version="3.0.1" />
|
||||
<PackageReference Include="QuickLook.Typography.OpenFont" Version="1.0.1" />
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3405.78">
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -200,22 +200,4 @@ public class WebfontPanel : WebpagePanel
|
||||
using var reader = new StreamReader(ReadStream(key), Encoding.UTF8);
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
|
||||
public static class MimeTypes
|
||||
{
|
||||
public const string Html = "text/html";
|
||||
public const string JavaScript = "application/javascript";
|
||||
public const string Css = "text/css";
|
||||
public const string Binary = "application/octet-stream";
|
||||
|
||||
public static string GetContentType(string extension = null) => $"Content-Type: {GetMimeType(extension)}";
|
||||
|
||||
public static string GetMimeType(string extension = null) => extension?.ToLowerInvariant() switch
|
||||
{
|
||||
".js" => JavaScript, // Only handle known extensions from resources
|
||||
".css" => Css,
|
||||
".html" => Html,
|
||||
_ => Binary,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,39 +16,27 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Commands;
|
||||
using QuickLook.Common.Controls;
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace QuickLook.Plugin.HtmlViewer;
|
||||
|
||||
public partial class Plugin
|
||||
{
|
||||
public ICommand ViewSourceCodeCommand { get; }
|
||||
|
||||
public Plugin()
|
||||
{
|
||||
ViewSourceCodeCommand = new RelayCommand(ViewSourceCode);
|
||||
}
|
||||
|
||||
public IEnumerable<IMenuItem> GetMenuItems()
|
||||
{
|
||||
string translationFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Translations.config");
|
||||
|
||||
// HTML <=> HTML TEXT
|
||||
yield return new MoreMenuItem()
|
||||
{
|
||||
Icon = "\uE943",
|
||||
Header = TranslationHelper.Get("MW_ViewSourceCode", translationFile),
|
||||
MenuItems = null,
|
||||
Command = ViewSourceCodeCommand,
|
||||
Icon = FontSymbols.Code,
|
||||
Header = TranslationHelper.Get("MW_ReopenAsSourceCode", translationFile),
|
||||
Command = new RelayCommand(() => PluginHelper.InvokePluginPreview("QuickLook.Plugin.TextViewer", _currentPath)),
|
||||
};
|
||||
}
|
||||
|
||||
public void ViewSourceCode()
|
||||
{
|
||||
PluginHelper.InvokePluginPreview("QuickLook.Plugin.TextViewer", _currentPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace QuickLook.Plugin.HtmlViewer;
|
||||
|
||||
public partial class Plugin : IViewer, IMoreMenu
|
||||
{
|
||||
private static readonly string[] _extensions = [".mht", ".mhtml", ".htm", ".html", ".svg"];
|
||||
private static readonly string[] _extensions = [".mht", ".mhtml", ".htm", ".html"];
|
||||
private static readonly string[] _supportedProtocols = ["http", "https"];
|
||||
|
||||
private WebpagePanel _panel;
|
||||
@@ -64,6 +64,7 @@ public partial class Plugin : IViewer, IMoreMenu
|
||||
|
||||
if (path.ToLower().EndsWith(".url"))
|
||||
path = Helper.GetUrlPath(path);
|
||||
_panel.FallbackPath = Path.GetDirectoryName(path); // Reserve opportunities for requesting exceeds MAX_PATH (260) limitation
|
||||
_panel.NavigateToFile(path);
|
||||
_panel.Dispatcher.Invoke(() => { context.IsBusy = false; }, DispatcherPriority.Loaded);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3405.78">
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -3,114 +3,114 @@
|
||||
<Translations>
|
||||
<ca>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Cal instal·lar Microsoft Edge WebView2 per veure aquest fitxer. Feu clic aquí per descarregar-lo.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Veure codi font</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Torna a obrir com a codi font</MW_ReopenAsSourceCode>
|
||||
</ca>
|
||||
<he>
|
||||
<WEBVIEW2_NOT_AVAILABLE>צפייה בקובץ זה דורשת התקנת Microsoft Edge WebView2. לחץ כאן להורדה.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>הצג קוד מקור</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>פתח מחדש כקוד מקור</MW_ReopenAsSourceCode>
|
||||
</he>
|
||||
<hi>
|
||||
<WEBVIEW2_NOT_AVAILABLE>इस फ़ाइल को देखने के लिए Microsoft Edge WebView2 इंस्टॉल होना आवश्यक है। डाउनलोड करने के लिए यहां क्लिक करें.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>स्रोत कोड देखें</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>सोर्स कोड के रूप में पुनः खोलें</MW_ReopenAsSourceCode>
|
||||
</hi>
|
||||
<hu-HU>
|
||||
<WEBVIEW2_NOT_AVAILABLE>A fájl megtekintéséhez telepíteni kell a Microsoft Edge WebView2-t. Kattintson ide a letöltéshez.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Forráskód megtekintése</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Újranyitás forráskódként</MW_ReopenAsSourceCode>
|
||||
</hu-HU>
|
||||
<id-ID>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Melihat file ini memerlukan Microsoft Edge WebView2 terinstal. Klik di sini untuk mengunduhnya.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Lihat Kode Sumber</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Buka ulang sebagai kode sumber</MW_ReopenAsSourceCode>
|
||||
</id-ID>
|
||||
<mr>
|
||||
<WEBVIEW2_NOT_AVAILABLE>या फाइलचे दृश्य Microsoft Edge WebView2 स्थापित असणे आवश्यक आहे. डाउनलोडसाठी येथे क्लिक करा.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>स्रोत कोड पहा</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>स्रोत कोड म्हणून पुन्हा उघडा</MW_ReopenAsSourceCode>
|
||||
</mr>
|
||||
<nb-NO>
|
||||
<WEBVIEW2_NOT_AVAILABLE>For å vise denne filen må Microsoft Edge WebView2 være installert. Klikk her for å laste ned.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Vis kildekode</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Åpne på nytt som kildekode</MW_ReopenAsSourceCode>
|
||||
</nb-NO>
|
||||
<nl-NL>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Voor het bekijken van dit bestand moet Microsoft Edge WebView2 geïnstalleerd zijn. Klik hier om te downloaden.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Broncode weergeven</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Opnieuw openen als broncode</MW_ReopenAsSourceCode>
|
||||
</nl-NL>
|
||||
<pt-BR>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Para visualizar este arquivo, é necessário instalar o Microsoft Edge WebView2. Clique aqui para baixar.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Ver Código Fonte</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Reabrir como código-fonte</MW_ReopenAsSourceCode>
|
||||
</pt-BR>
|
||||
<pt-PT>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Para visualizar este ficheiro, é necessário instalar o Microsoft Edge WebView2. Clique aqui para descarregar.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Ver Código Fonte</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Reabrir como código-fonte</MW_ReopenAsSourceCode>
|
||||
</pt-PT>
|
||||
<ru-RU>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Для просмотра этого файла требуется установка Microsoft Edge WebView2. Нажмите здесь, чтобы скачать.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Посмотреть исходный код</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Открыть заново как исходный код</MW_ReopenAsSourceCode>
|
||||
</ru-RU>
|
||||
<sk>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Na zobrazenie tohto súboru je potrebné nainštalovať Microsoft Edge WebView2. Kliknite sem pre stiahnutie.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Zobraziť zdrojový kód</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Znovu otvoriť ako zdrojový kód</MW_ReopenAsSourceCode>
|
||||
</sk>
|
||||
<tr-TR>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Bu dosyayı görüntülemek için Microsoft Edge WebView2'nin yüklü olması gerekir. İndirmek için buraya tıklayın.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Kaynak Kodu Görüntüle</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Kaynak kod olarak yeniden aç</MW_ReopenAsSourceCode>
|
||||
</tr-TR>
|
||||
<vi>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Để xem tệp này, cần cài đặt Microsoft Edge WebView2. Nhấn vào đây để tải về.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Xem Mã Nguồn</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Mở lại dưới dạng mã nguồn</MW_ReopenAsSourceCode>
|
||||
</vi>
|
||||
<en>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Viewing this file requires Microsoft Edge WebView2 to be installed. Click here to download it.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>View Source Code</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Reopen as source code</MW_ReopenAsSourceCode>
|
||||
</en>
|
||||
<ko>
|
||||
<WEBVIEW2_NOT_AVAILABLE>이 파일을 보려면 Microsoft Edge WebView2를 설치해야 합니다. 여기를 클릭하여 다운로드하세요.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>소스 코드 보기</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>소스 코드로 다시 열기</MW_ReopenAsSourceCode>
|
||||
</ko>
|
||||
<de>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Für das Anzeigen dieses Dateityps wird MS Edge WebView2 benötigt. Hier klicken zum Downloaden.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Quellcode anzeigen</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Als Quellcode erneut öffnen</MW_ReopenAsSourceCode>
|
||||
</de>
|
||||
<fr>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Microsoft Edge WebView2 est requis pour afficher ce type de fichier. Cliquez ici pour le télécharger.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Voir le code source</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Rouvrir en tant que code source</MW_ReopenAsSourceCode>
|
||||
</fr>
|
||||
<ja>
|
||||
<WEBVIEW2_NOT_AVAILABLE>このファイルを閲覧するには、Microsoft Edge WebView2 がインストールされている必要があります。 ここをクリックしてダウンロードを開始する。</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>ソースコードを表示</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>ソースコードとして再度開く</MW_ReopenAsSourceCode>
|
||||
</ja>
|
||||
<zh-CN>
|
||||
<WEBVIEW2_NOT_AVAILABLE>查看此文件需要安装 Microsoft Edge WebView2。 点击这里开始下载。</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>查看源代码</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>以源代码方式重新打开</MW_ReopenAsSourceCode>
|
||||
</zh-CN>
|
||||
<zh-TW>
|
||||
<WEBVIEW2_NOT_AVAILABLE>查看此文件需要安裝 Microsoft Edge WebView2。 點擊這裡開始下載。</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>查看原始碼</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>以原始碼方式重新開啟</MW_ReopenAsSourceCode>
|
||||
</zh-TW>
|
||||
<es>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Es necesario tener instalado Microsoft Edge WebView2 para ver este fichero. Haga clic aquí para descargarlo.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Ver código fuente</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Reabrir como código fuente</MW_ReopenAsSourceCode>
|
||||
</es>
|
||||
<it>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Visualizzare questo file richiede che Microsoft Edge WebView2 sia installato. Clicca qui per scaricarlo.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Visualizza codice sorgente</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Riapri come codice sorgente</MW_ReopenAsSourceCode>
|
||||
</it>
|
||||
<ar>
|
||||
<WEBVIEW2_NOT_AVAILABLE>مطلوب لعرض هذا الملف. انقر هنا لتحميله Microsoft Edge WebView2</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>عرض الكود المصدري</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>إعادة الفتح كرمز مصدر</MW_ReopenAsSourceCode>
|
||||
</ar>
|
||||
<pl>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Wyświetlenie tego pliku wymaga zainstalowania Microsoft Edge WebView2. Kliknij tutaj, aby go pobrać.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Wyświetl kod źródłowy</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Otwórz ponownie jako kod źródłowy</MW_ReopenAsSourceCode>
|
||||
</pl>
|
||||
<el>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Για την προβολή αυτού του αρχείου απαιτείται εγκατάσταση του Microsoft Edge WebView2. Κάντε κλικ εδώ για να το κατεβάσετε.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Προβολή πηγαίου κώδικα</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Επαναάνοιγμα ως πηγαίος κώδικας</MW_ReopenAsSourceCode>
|
||||
</el>
|
||||
<uk-UA>
|
||||
<WEBVIEW2_NOT_AVAILABLE>Для перегляду цього файлу потрібно встановити Microsoft Edge WebView2. Натисніть тут, щоб завантажити його.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Переглянути вихідний код</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Відкрити знову як вихідний код</MW_ReopenAsSourceCode>
|
||||
</uk-UA>
|
||||
<sv>
|
||||
<WEBVIEW2_NOT_AVAILABLE>För att visa denna fil krävs att Microsoft Edge WebView2 är installerat. Klicka här för att ladda ner det.</WEBVIEW2_NOT_AVAILABLE>
|
||||
<MW_ViewSourceCode>Visa källkod</MW_ViewSourceCode>
|
||||
<MW_ReopenAsSourceCode>Öppna igen som källkod</MW_ReopenAsSourceCode>
|
||||
</sv>
|
||||
</Translations>
|
||||
|
||||
@@ -191,28 +191,42 @@ public class WebpagePanel : UserControl
|
||||
{
|
||||
var requestedUri = new Uri(args.Request.Uri);
|
||||
|
||||
// Check if the request is for a local file
|
||||
if (requestedUri.Scheme == "file" && !File.Exists(requestedUri.LocalPath))
|
||||
if (requestedUri.Scheme == "file")
|
||||
{
|
||||
// Try loading from fallback directory
|
||||
var fileName = Path.GetFileName(requestedUri.LocalPath);
|
||||
var fileDirectoryName = Path.GetDirectoryName(requestedUri.LocalPath);
|
||||
|
||||
// Convert the primary path to fallback path
|
||||
if (fileDirectoryName.StartsWith(_primaryPath))
|
||||
// Check if the request is for a local file
|
||||
if (!File.Exists(requestedUri.LocalPath))
|
||||
{
|
||||
var fallbackFilePath = Path.Combine(
|
||||
_fallbackPath.Trim('/', '\\'), // Make it combinable
|
||||
fileDirectoryName.Substring(_primaryPath.Length).Trim('/', '\\'), // Make it combinable
|
||||
fileName
|
||||
);
|
||||
// Try loading from fallback directory
|
||||
var fileName = Path.GetFileName(requestedUri.LocalPath);
|
||||
var fileDirectoryName = Path.GetDirectoryName(requestedUri.LocalPath);
|
||||
|
||||
if (File.Exists(fallbackFilePath))
|
||||
// Convert the primary path to fallback path
|
||||
if (fileDirectoryName.StartsWith(_primaryPath))
|
||||
{
|
||||
// Serve the file from the fallback directory
|
||||
var fileStream = new FileStream(fallbackFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
var fallbackFilePath = Path.Combine(
|
||||
_fallbackPath.Trim('/', '\\'), // Make it combinable
|
||||
fileDirectoryName.Substring(_primaryPath.Length).Trim('/', '\\'), // Make it combinable
|
||||
fileName
|
||||
);
|
||||
|
||||
if (File.Exists(fallbackFilePath))
|
||||
{
|
||||
// Serve the file from the fallback directory
|
||||
var fileStream = new FileStream(fallbackFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
var response = _webView.CoreWebView2.Environment.CreateWebResourceResponse(
|
||||
fileStream, 200, "OK", "Content-Type: application/octet-stream");
|
||||
args.Response = response;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Check if the request exceeds MAX_PATH (260) limitation
|
||||
else if (requestedUri.LocalPath.Length >= 260)
|
||||
{
|
||||
if (File.Exists(requestedUri.LocalPath))
|
||||
{
|
||||
var fileStream = new FileStream(requestedUri.LocalPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete);
|
||||
var response = _webView.CoreWebView2.Environment.CreateWebResourceResponse(
|
||||
fileStream, 200, "OK", "Content-Type: application/octet-stream");
|
||||
fileStream, 200, "OK", MimeTypes.GetContentType(Path.GetExtension(requestedUri.LocalPath)));
|
||||
args.Response = response;
|
||||
}
|
||||
}
|
||||
@@ -245,4 +259,78 @@ public class WebpagePanel : UserControl
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
public static class MimeTypes
|
||||
{
|
||||
public const string Html = "text/html";
|
||||
public const string JavaScript = "application/javascript";
|
||||
public const string Css = "text/css";
|
||||
public const string Json = "application/json";
|
||||
public const string Xml = "application/xml";
|
||||
public const string Svg = "image/svg+xml";
|
||||
public const string Png = "image/png";
|
||||
public const string Jpeg = "image/jpeg";
|
||||
public const string Gif = "image/gif";
|
||||
public const string Webp = "image/webp";
|
||||
public const string Ico = "image/x-icon";
|
||||
public const string Avif = "image/avif";
|
||||
public const string Woff = "font/woff";
|
||||
public const string Woff2 = "font/woff2";
|
||||
public const string Ttf = "font/ttf";
|
||||
public const string Otf = "font/otf";
|
||||
public const string Mp3 = "audio/mpeg";
|
||||
public const string Mp4 = "video/mp4";
|
||||
public const string Webm = "video/webm";
|
||||
public const string Pdf = "application/pdf";
|
||||
public const string Binary = "application/octet-stream";
|
||||
public const string Text = "text/plain";
|
||||
|
||||
public static string GetContentType(string extension = null) => $"Content-Type: {GetMimeType(extension)}";
|
||||
|
||||
/// <summary>
|
||||
/// Only handle known extensions from resources
|
||||
/// </summary>
|
||||
public static string GetMimeType(string extension = null) => extension?.ToLowerInvariant() switch
|
||||
{
|
||||
// Core web files
|
||||
".html" or ".htm" => Html,
|
||||
".js" => JavaScript,
|
||||
".css" => Css,
|
||||
".json" => Json,
|
||||
".xml" => Xml,
|
||||
|
||||
// Images
|
||||
".png" => Png,
|
||||
".jpg" or ".jpeg" => Jpeg,
|
||||
".gif" => Gif,
|
||||
".webp" => Webp,
|
||||
".svg" => Svg,
|
||||
".ico" => Ico,
|
||||
".avif" => Avif,
|
||||
|
||||
// Fonts
|
||||
".woff" => Woff,
|
||||
".woff2" => Woff2,
|
||||
".ttf" => Ttf,
|
||||
".otf" => Otf,
|
||||
|
||||
// Media
|
||||
".mp3" => Mp3,
|
||||
".mp4" => Mp4,
|
||||
".webm" => Webm,
|
||||
|
||||
// Documents
|
||||
".pdf" => Pdf,
|
||||
".txt" => Text,
|
||||
|
||||
// Archives
|
||||
".zip" => "application/zip",
|
||||
".gz" => "application/gzip",
|
||||
".rar" => "application/vnd.rar",
|
||||
".7z" => "application/x-7z-compressed",
|
||||
|
||||
// Default
|
||||
_ => Binary,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ internal class ImageMagickProvider : AnimationProvider
|
||||
{
|
||||
if (mi.ColorSpace == ColorSpace.RGB || mi.ColorSpace == ColorSpace.sRGB || mi.ColorSpace == ColorSpace.scRGB)
|
||||
{
|
||||
mi.SetProfile(ColorProfile.SRGB);
|
||||
mi.SetProfile(ColorProfiles.SRGB);
|
||||
if (ContextObject.ColorProfileName != null)
|
||||
mi.SetProfile(new ColorProfile(ContextObject.ColorProfileName)); // map to monitor color
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
// Copyright © 2017-2025 QL-Win Contributors
|
||||
//
|
||||
// This file is part of QuickLook program.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Commands;
|
||||
using QuickLook.Common.Controls;
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace QuickLook.Plugin.ImageViewer;
|
||||
|
||||
public partial class Plugin
|
||||
{
|
||||
public IEnumerable<IMenuItem> GetMenuItems()
|
||||
{
|
||||
string translationFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Translations.config");
|
||||
string extension = Path.GetExtension(_currentPath).ToLower();
|
||||
|
||||
var reopen = extension switch
|
||||
{
|
||||
// SVG IMAGE <=> XML TEXT
|
||||
".svg" => new MoreMenuItem()
|
||||
{
|
||||
Icon = FontSymbols.Code,
|
||||
Header = TranslationHelper.Get("MW_ReopenAsSourceCode", translationFile),
|
||||
Command = new RelayCommand(() => PluginHelper.InvokePluginPreview("QuickLook.Plugin.TextViewer", _currentPath)),
|
||||
},
|
||||
_ => null,
|
||||
};
|
||||
|
||||
if (reopen is not null)
|
||||
yield return reopen;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using QuickLook.Plugin.ImageViewer.AnimatedImage.Providers;
|
||||
using QuickLook.Plugin.ImageViewer.Webview;
|
||||
using System;
|
||||
@@ -28,7 +29,7 @@ using System.Windows.Input;
|
||||
|
||||
namespace QuickLook.Plugin.ImageViewer;
|
||||
|
||||
public class Plugin : IViewer
|
||||
public partial class Plugin : IViewer, IMoreMenu
|
||||
{
|
||||
private static readonly HashSet<string> WellKnownExtensions = new(
|
||||
[
|
||||
@@ -56,6 +57,7 @@ public class Plugin : IViewer
|
||||
]);
|
||||
|
||||
private ImagePanel _ip;
|
||||
private string _currentPath;
|
||||
private MetaProvider _meta;
|
||||
|
||||
private IWebImagePanel _ipWeb;
|
||||
@@ -63,6 +65,8 @@ public class Plugin : IViewer
|
||||
|
||||
public int Priority => 0;
|
||||
|
||||
public IEnumerable<IMenuItem> MenuItems => GetMenuItems();
|
||||
|
||||
public void Init()
|
||||
{
|
||||
// Option of UseColorProfile:
|
||||
@@ -137,6 +141,8 @@ public class Plugin : IViewer
|
||||
|
||||
public void View(string path, ContextObject context)
|
||||
{
|
||||
_currentPath = path;
|
||||
|
||||
if (WebHandler.TryView(path, context, _metaWeb, out _ipWeb))
|
||||
return;
|
||||
|
||||
|
||||
@@ -59,13 +59,13 @@
|
||||
<PackageReference Include="QuickLook.ImageGlass.WebP" Version="1.4.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.8.2">
|
||||
<PackageReference Include="Magick.NET-Q8-AnyCPU" Version="14.9.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3405.78">
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Google.Protobuf" Version="3.32.0">
|
||||
<PackageReference Include="Google.Protobuf" Version="3.33.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Memory" Version="4.6.3">
|
||||
@@ -138,4 +138,10 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Translations.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Translations>
|
||||
<ca>
|
||||
<MW_ReopenAsSourceCode>Torna a obrir com a codi font</MW_ReopenAsSourceCode>
|
||||
</ca>
|
||||
<he>
|
||||
<MW_ReopenAsSourceCode>פתח מחדש כקוד מקור</MW_ReopenAsSourceCode>
|
||||
</he>
|
||||
<hi>
|
||||
<MW_ReopenAsSourceCode>सोर्स कोड के रूप में पुनः खोलें</MW_ReopenAsSourceCode>
|
||||
</hi>
|
||||
<hu-HU>
|
||||
<MW_ReopenAsSourceCode>Újranyitás forráskódként</MW_ReopenAsSourceCode>
|
||||
</hu-HU>
|
||||
<id-ID>
|
||||
<MW_ReopenAsSourceCode>Buka ulang sebagai kode sumber</MW_ReopenAsSourceCode>
|
||||
</id-ID>
|
||||
<mr>
|
||||
<MW_ReopenAsSourceCode>स्रोत कोड म्हणून पुन्हा उघडा</MW_ReopenAsSourceCode>
|
||||
</mr>
|
||||
<nb-NO>
|
||||
<MW_ReopenAsSourceCode>Åpne på nytt som kildekode</MW_ReopenAsSourceCode>
|
||||
</nb-NO>
|
||||
<nl-NL>
|
||||
<MW_ReopenAsSourceCode>Opnieuw openen als broncode</MW_ReopenAsSourceCode>
|
||||
</nl-NL>
|
||||
<pt-BR>
|
||||
<MW_ReopenAsSourceCode>Reabrir como código-fonte</MW_ReopenAsSourceCode>
|
||||
</pt-BR>
|
||||
<pt-PT>
|
||||
<MW_ReopenAsSourceCode>Reabrir como código-fonte</MW_ReopenAsSourceCode>
|
||||
</pt-PT>
|
||||
<ru-RU>
|
||||
<MW_ReopenAsSourceCode>Открыть заново как исходный код</MW_ReopenAsSourceCode>
|
||||
</ru-RU>
|
||||
<sk>
|
||||
<MW_ReopenAsSourceCode>Znovu otvoriť ako zdrojový kód</MW_ReopenAsSourceCode>
|
||||
</sk>
|
||||
<tr-TR>
|
||||
<MW_ReopenAsSourceCode>Kaynak kod olarak yeniden aç</MW_ReopenAsSourceCode>
|
||||
</tr-TR>
|
||||
<vi>
|
||||
<MW_ReopenAsSourceCode>Mở lại dưới dạng mã nguồn</MW_ReopenAsSourceCode>
|
||||
</vi>
|
||||
<en>
|
||||
<MW_ReopenAsSourceCode>Reopen as source code</MW_ReopenAsSourceCode>
|
||||
</en>
|
||||
<ko>
|
||||
<MW_ReopenAsSourceCode>소스 코드로 다시 열기</MW_ReopenAsSourceCode>
|
||||
</ko>
|
||||
<de>
|
||||
<MW_ReopenAsSourceCode>Als Quellcode erneut öffnen</MW_ReopenAsSourceCode>
|
||||
</de>
|
||||
<fr>
|
||||
<MW_ReopenAsSourceCode>Rouvrir en tant que code source</MW_ReopenAsSourceCode>
|
||||
</fr>
|
||||
<ja>
|
||||
<MW_ReopenAsSourceCode>ソースコードとして再度開く</MW_ReopenAsSourceCode>
|
||||
</ja>
|
||||
<zh-CN>
|
||||
<MW_ReopenAsSourceCode>以源代码方式重新打开</MW_ReopenAsSourceCode>
|
||||
</zh-CN>
|
||||
<zh-TW>
|
||||
<MW_ReopenAsSourceCode>以原始碼方式重新開啟</MW_ReopenAsSourceCode>
|
||||
</zh-TW>
|
||||
<es>
|
||||
<MW_ReopenAsSourceCode>Reabrir como código fuente</MW_ReopenAsSourceCode>
|
||||
</es>
|
||||
<it>
|
||||
<MW_ReopenAsSourceCode>Riapri come codice sorgente</MW_ReopenAsSourceCode>
|
||||
</it>
|
||||
<ar>
|
||||
<MW_ReopenAsSourceCode>إعادة الفتح كرمز مصدر</MW_ReopenAsSourceCode>
|
||||
</ar>
|
||||
<pl>
|
||||
<MW_ReopenAsSourceCode>Otwórz ponownie jako kod źródłowy</MW_ReopenAsSourceCode>
|
||||
</pl>
|
||||
<el>
|
||||
<MW_ReopenAsSourceCode>Επαναάνοιγμα ως πηγαίος κώδικας</MW_ReopenAsSourceCode>
|
||||
</el>
|
||||
<uk-UA>
|
||||
<MW_ReopenAsSourceCode>Відкрити знову як вихідний код</MW_ReopenAsSourceCode>
|
||||
</uk-UA>
|
||||
<sv>
|
||||
<MW_ReopenAsSourceCode>Öppna igen som källkod</MW_ReopenAsSourceCode>
|
||||
</sv>
|
||||
</Translations>
|
||||
@@ -186,24 +186,13 @@ public class SvgImagePanel : WebpagePanel, IWebImagePanel
|
||||
return reader.ReadToEnd();
|
||||
}
|
||||
|
||||
public static class MimeTypes
|
||||
public new static class MimeTypes
|
||||
{
|
||||
public const string Html = "text/html";
|
||||
public const string JavaScript = "application/javascript";
|
||||
public const string Json = "application/json";
|
||||
public const string Css = "text/css";
|
||||
public const string Binary = "application/octet-stream";
|
||||
public static string GetContentTypeHeader(string extension = null)
|
||||
=> $"Content-Type: {WebpagePanel.MimeTypes.GetMimeType(extension)}";
|
||||
|
||||
public static string GetContentTypeHeader(string extension = null) => $"Content-Type: {GetMimeType(extension)}";
|
||||
|
||||
public static string GetMimeType(string extension = null) => extension?.ToLowerInvariant() switch
|
||||
{
|
||||
".js" => JavaScript, // Only handle known extensions from resources
|
||||
".json" => Json,
|
||||
".css" => Css,
|
||||
".html" => Html,
|
||||
_ => Binary,
|
||||
};
|
||||
public static string GetMimeType(string extension = null)
|
||||
=> WebpagePanel.MimeTypes.GetMimeType(extension);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
63
QuickLook.Plugin/QuickLook.Plugin.InsvBlocker/Plugin.cs
Normal file
63
QuickLook.Plugin/QuickLook.Plugin.InsvBlocker/Plugin.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
// Copyright © 2017-2025 QL-Win Contributors
|
||||
//
|
||||
// This file is part of QuickLook program.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Plugin;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace QuickLook.Plugin.InsvBlocker;
|
||||
|
||||
public class Plugin : IViewer
|
||||
{
|
||||
// Very high priority to ensure this plugin is checked before any other plugins
|
||||
// This prevents QuickLook from handling .insv files, allowing Insta360Studio's QuickLook to handle them instead
|
||||
public int Priority => int.MaxValue;
|
||||
|
||||
public void Init()
|
||||
{
|
||||
}
|
||||
|
||||
public bool CanHandle(string path)
|
||||
{
|
||||
// Match .insv files (Insta360 panoramic video files)
|
||||
if (Directory.Exists(path))
|
||||
return false;
|
||||
|
||||
return path.EndsWith(".insv", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public void Prepare(string path, ContextObject context)
|
||||
{
|
||||
// Set Ignore to true to display "blocked" in the preview window
|
||||
context.IsBlocked = true;
|
||||
context.Title = $"[BLOCKED] {Path.GetFileName(path)}";
|
||||
context.PreferredSize = new Size(400, 200);
|
||||
}
|
||||
|
||||
public void View(string path, ContextObject context)
|
||||
{
|
||||
// This should not be called since Ignore is set to true in Prepare
|
||||
// But if called, do nothing
|
||||
}
|
||||
|
||||
public void Cleanup()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net462</TargetFramework>
|
||||
<RootNamespace>QuickLook.Plugin.InsvBlocker</RootNamespace>
|
||||
<AssemblyName>QuickLook.Plugin.InsvBlocker</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<UseWPF>true</UseWPF>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<ProjectGuid>{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Build\Debug\QuickLook.Plugin\QuickLook.Plugin.InsvBlocker\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Build\Release\QuickLook.Plugin\QuickLook.Plugin.InsvBlocker\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Build\Debug\QuickLook.Plugin\QuickLook.Plugin.InsvBlocker\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\..\Build\Release\QuickLook.Plugin\QuickLook.Plugin.InsvBlocker\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\QuickLook.Common\QuickLook.Common.csproj">
|
||||
<Project>{85FDD6BA-871D-46C8-BD64-F6BB0CB5EA95}</Project>
|
||||
<Name>QuickLook.Common</Name>
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\GitVersion.cs">
|
||||
<Link>Properties\GitVersion.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
26
QuickLook.Plugin/QuickLook.Plugin.InsvBlocker/README.md
Normal file
26
QuickLook.Plugin/QuickLook.Plugin.InsvBlocker/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# QuickLook.Plugin.InsvBlocker
|
||||
|
||||
This plugin prevents QuickLook from handling `.insv` files (Insta360 panoramic video files).
|
||||
|
||||
## Purpose
|
||||
|
||||
Insta360Studio has its own QuickLook application with the same name and activation method (pressing spacebar). When both applications are installed, pressing space on `.insv` files would cause both QuickLook windows to appear, creating a conflict.
|
||||
|
||||
This plugin solves that issue by having QuickLook claim the file (via high priority) but immediately close without displaying anything, allowing Insta360Studio's QuickLook to handle the file instead.
|
||||
|
||||
## Implementation
|
||||
|
||||
- **Priority**: `int.MaxValue` (highest priority, checked before all other plugins)
|
||||
- **Behavior**:
|
||||
- Returns `true` for `CanHandle()` on files with `.insv` extension
|
||||
- Sets minimal window size (1x1 pixels) in `Prepare()`
|
||||
- Closes the window immediately in `View()` using `DispatcherPriority.Send`
|
||||
|
||||
## Technical Details
|
||||
|
||||
The plugin prevents the QuickLook window from becoming visible by:
|
||||
1. Matching `.insv` files with highest priority
|
||||
2. Setting a minimal window size to reduce visual impact if window briefly appears
|
||||
3. Closing the window immediately after content is set, before it becomes visible to the user
|
||||
|
||||
This approach ensures that Insta360Studio's QuickLook can handle the file without interference.
|
||||
@@ -55,7 +55,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MsgReader" Version="6.0.4" />
|
||||
<PackageReference Include="MsgReader" Version="6.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="UTF.Unknown" Version="2.6.0" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3405.78">
|
||||
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3537.50">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Commands;
|
||||
using QuickLook.Common.Controls;
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using System.Collections.Generic;
|
||||
@@ -40,7 +41,7 @@ public partial class Plugin
|
||||
|
||||
yield return new MoreMenuItem()
|
||||
{
|
||||
Icon = "\xea69",
|
||||
Icon = FontSymbols.Media,
|
||||
Header = TranslationHelper.Get("MW_ShowMediaInfo", translationFile),
|
||||
MenuItems = null,
|
||||
Command = ShowWithMediaInfoCommand,
|
||||
|
||||
@@ -24,6 +24,7 @@ using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace QuickLook.Plugin.MediaInfoViewer;
|
||||
@@ -32,7 +33,7 @@ public partial class Plugin : IViewer, IMoreMenuExtended
|
||||
{
|
||||
private TextViewerPanel _tvp;
|
||||
|
||||
public int Priority => 0;
|
||||
public int Priority => int.MinValue;
|
||||
|
||||
public IEnumerable<IMenuItem> MenuItems => GetMenuItems();
|
||||
|
||||
@@ -100,14 +101,15 @@ public partial class Plugin : IViewer, IMoreMenuExtended
|
||||
if (isDark)
|
||||
{
|
||||
context.Theme = Themes.Dark;
|
||||
tvp.Foreground = new BrushConverter().ConvertFromString("#FFEFEFEF") as SolidColorBrush;
|
||||
tvp.Background = Brushes.Transparent;
|
||||
tvp.SetResourceReference(TextBlock.ForegroundProperty, "WindowTextForeground");
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Theme = Themes.Light;
|
||||
tvp.Foreground = new BrushConverter().ConvertFromString("#BBFAFAFA") as SolidColorBrush;
|
||||
tvp.Background = Brushes.Transparent;
|
||||
tvp.Background = OSThemeHelper.AppsUseDarkTheme()
|
||||
? new SolidColorBrush(Color.FromArgb(175, 255, 255, 255))
|
||||
: Brushes.Transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="PdfiumViewer.Updated" Version="2.14.5" />
|
||||
<PackageReference Include="bblanchon.PDFiumV8.Win32" Version="141.0.7388" />
|
||||
<PackageReference Include="bblanchon.PDFiumV8.Win32" Version="143.0.7497" />
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
// Copyright © 2017-2025 QL-Win Contributors
|
||||
//
|
||||
// This file is part of QuickLook program.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Commands;
|
||||
using QuickLook.Common.Controls;
|
||||
using QuickLook.Common.Helpers;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace QuickLook.Plugin.TextViewer;
|
||||
|
||||
public partial class Plugin
|
||||
{
|
||||
public IEnumerable<IMenuItem> GetMenuItems()
|
||||
{
|
||||
string translationFile = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Translations.config");
|
||||
string extension = Path.GetExtension(_currentPath).ToLower();
|
||||
|
||||
var reopen = extension switch
|
||||
{
|
||||
// HTML <=> HTML TEXT
|
||||
// \QuickLook\QuickLook.Plugin\QuickLook.Plugin.TextViewer\Syntax\Light\zzz-After-JavaScript-HTML.xshd
|
||||
// .html;.htm;.xhtml;.shtml;.shtm;.xht;.hta
|
||||
".html" or ".htm" or ".xhtml" or ".shtml" or ".shtm" or ".xht" or ".hta" => new MoreMenuItem()
|
||||
{
|
||||
Icon = FontSymbols.Globe,
|
||||
Header = TranslationHelper.Get("MW_ReopenAsHtmlPreview", translationFile),
|
||||
Command = new RelayCommand(() => PluginHelper.InvokePluginPreview("QuickLook.Plugin.HtmlViewer", _currentPath)),
|
||||
},
|
||||
|
||||
// SVG IMAGE <=> XML TEXT
|
||||
".svg" => new MoreMenuItem()
|
||||
{
|
||||
Icon = FontSymbols.Picture,
|
||||
Header = TranslationHelper.Get("MW_ReopenAsImagePreview", translationFile),
|
||||
Command = new RelayCommand(() => PluginHelper.InvokePluginPreview("QuickLook.Plugin.ImageViewer", _currentPath)),
|
||||
},
|
||||
_ => null,
|
||||
};
|
||||
|
||||
if (reopen is not null)
|
||||
yield return reopen;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Plugin;
|
||||
using QuickLook.Common.Plugin.MoreMenu;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@@ -27,7 +28,7 @@ using System.Windows.Media;
|
||||
|
||||
namespace QuickLook.Plugin.TextViewer;
|
||||
|
||||
public class Plugin : IViewer
|
||||
public partial class Plugin : IViewer, IMoreMenu
|
||||
{
|
||||
private static readonly HashSet<string> WellKnownExtensions = new(
|
||||
[
|
||||
@@ -35,9 +36,12 @@ public class Plugin : IViewer
|
||||
]);
|
||||
|
||||
private TextViewerPanel _tvp;
|
||||
private string _currentPath;
|
||||
|
||||
public int Priority => -5;
|
||||
|
||||
public IEnumerable<IMenuItem> MenuItems => GetMenuItems();
|
||||
|
||||
public void Init()
|
||||
{
|
||||
}
|
||||
@@ -66,6 +70,8 @@ public class Plugin : IViewer
|
||||
|
||||
public void View(string path, ContextObject context)
|
||||
{
|
||||
_currentPath = path;
|
||||
|
||||
if (path.EndsWith(".rtf", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var rtfBox = new RichTextBox();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
<UseWPF>true</UseWPF>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
|
||||
<Environment>
|
||||
<Default color="White" bgcolor="#000000"/>
|
||||
<Selection color="#000080" bgcolor="#C3C3FF"/>
|
||||
<Selection color="#FFFFFF" bgcolor="#264F78"/>
|
||||
<LineNumbers color="#A9A9A9" bgcolor="#000000"/>
|
||||
<CaretMarker color="#A9A9A9"/>
|
||||
<CaretMarker color="#FFFFFF"/>
|
||||
<VRuler color="#808080"/>
|
||||
|
||||
<FoldLine color="#D3D3D3" bgcolor="#000000"/>
|
||||
<FoldMarker color="#D3D3D3" bgcolor="#000000"/>
|
||||
<SelectedFoldLine color="#D3D3D3" bgcolor="#000000"/>
|
||||
<FoldLine color="#3C3C3C" bgcolor="#000000"/>
|
||||
<FoldMarker color="#3C3C3C" bgcolor="#000000"/>
|
||||
<SelectedFoldLine color="#3C3C3C" bgcolor="#000000"/>
|
||||
|
||||
<EOLMarkers color="#A9A9A9"/>
|
||||
<SpaceMarkers color="#A9A9A9"/>
|
||||
<TabMarkers color="#A9A9A9"/>
|
||||
<InvalidLines color="#A9A9A9"/>
|
||||
<EOLMarkers color="#404040"/>
|
||||
<SpaceMarkers color="#404040"/>
|
||||
<TabMarkers color="#404040"/>
|
||||
<InvalidLines color="#404040"/>
|
||||
</Environment>
|
||||
|
||||
<Properties>
|
||||
@@ -30,23 +30,23 @@
|
||||
|
||||
<Delimiters>@+*\/=|'<>?;</Delimiters>
|
||||
|
||||
<Span name="LineComment1" stopateol="true" color="#00FF00" bold="false" italic="false">
|
||||
<Span name="LineComment1" stopateol="true" color="#6A9955" bold="false" italic="false">
|
||||
<Begin singleword="true">REM </Begin>
|
||||
</Span>
|
||||
|
||||
<Span name="LineComment2" stopateol="true" color="#00FF00" bold="false" italic="false">
|
||||
<Span name="LineComment2" stopateol="true" color="#6A9955" bold="false" italic="false">
|
||||
<Begin startofline="true">::</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name="Label" stopateol="true" color="#FF0000" bgcolor="#FFFF80" bold="false" italic="false">
|
||||
<Span name="Label" stopateol="true" color="#FF8800" bold="false" italic="false">
|
||||
<Begin startofline="true">:</Begin>
|
||||
</Span>
|
||||
|
||||
<Span name="Output" stopateol="true" color="White" bold="false" italic="false">
|
||||
<Begin color="Blue">echo</Begin>
|
||||
<Span name="Output" stopateol="true" color="#9CDCFE" bold="false" italic="false">
|
||||
<Begin>echo</Begin>
|
||||
</Span>
|
||||
|
||||
<KeyWords name="Keywords1" color="Blue" bold="false" italic="false">
|
||||
<KeyWords name="Keywords1" color="#569CD6" bold="false" italic="false">
|
||||
<Key word="aux"/>
|
||||
<Key word="baud"/>
|
||||
<Key word="break"/>
|
||||
@@ -147,7 +147,7 @@
|
||||
<Key word="xon"/>
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name="Keywords2" color="#008080" bold="false" italic="false">
|
||||
<KeyWords name="Keywords2" color="#4EC9B0" bold="false" italic="false">
|
||||
<Key word="append"/>
|
||||
<Key word="assoc"/>
|
||||
<Key word="at"/>
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SyntaxDefinition name="Svelte" extensions=".svelte" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
||||
<Color name="Comment" foreground="#6A9955" />
|
||||
<Color name="Tag" foreground="#569CD6" exampleText="div" />
|
||||
<Color name="Attribute" foreground="#9CDCFE" exampleText="on:click" />
|
||||
<Color name="String" foreground="#CE9178" exampleText=""text"" />
|
||||
<Color name="Directive" foreground="#DCDCAA" exampleText="bind:" />
|
||||
<Color name="Keyword" foreground="#C586C0" exampleText="import" />
|
||||
<Color name="Script" foreground="#D4D4D4" />
|
||||
<Color name="Style" foreground="#4EC9B0" />
|
||||
|
||||
<RuleSet name="Html">
|
||||
<Span color="Comment" begin="<!--" end="-->" />
|
||||
<Span color="String" begin=""" end=""" />
|
||||
<Span color="String" begin="'" end="'" />
|
||||
|
||||
<!-- Tags -->
|
||||
<Span color="Tag" begin="<" end=">">
|
||||
<RuleSet>
|
||||
<Keywords color="Tag">
|
||||
<Word>script</Word>
|
||||
<Word>style</Word>
|
||||
<Word>div</Word>
|
||||
<Word>span</Word>
|
||||
<Word>input</Word>
|
||||
<Word>button</Word>
|
||||
<Word>section</Word>
|
||||
<Word>article</Word>
|
||||
<Word>header</Word>
|
||||
<Word>footer</Word>
|
||||
<Word>main</Word>
|
||||
<Word>nav</Word>
|
||||
<Word>aside</Word>
|
||||
<Word>p</Word>
|
||||
<Word>h1</Word>
|
||||
<Word>h2</Word>
|
||||
<Word>h3</Word>
|
||||
<Word>ul</Word>
|
||||
<Word>li</Word>
|
||||
<Word>a</Word>
|
||||
<Word>img</Word>
|
||||
</Keywords>
|
||||
<Keywords color="Directive">
|
||||
<Word>bind:</Word>
|
||||
<Word>on:</Word>
|
||||
<Word>use:</Word>
|
||||
<Word>transition:</Word>
|
||||
<Word>in:</Word>
|
||||
<Word>out:</Word>
|
||||
<Word>animate:</Word>
|
||||
<Word>class:</Word>
|
||||
<Word>style:</Word>
|
||||
</Keywords>
|
||||
<Keywords color="Attribute">
|
||||
<Word>export</Word>
|
||||
<Word>let</Word>
|
||||
<Word>const</Word>
|
||||
</Keywords>
|
||||
</RuleSet>
|
||||
</Span>
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="JavaScript">
|
||||
<Span color="Comment" begin="//" end="\n" />
|
||||
<Span color="Comment" begin="/\*" end="\*/" />
|
||||
<Span color="String" begin=""" end=""" />
|
||||
<Span color="String" begin="'" end="'" />
|
||||
<Keywords color="Keyword">
|
||||
<Word>import</Word>
|
||||
<Word>export</Word>
|
||||
<Word>default</Word>
|
||||
<Word>return</Word>
|
||||
<Word>const</Word>
|
||||
<Word>let</Word>
|
||||
<Word>var</Word>
|
||||
<Word>if</Word>
|
||||
<Word>else</Word>
|
||||
<Word>for</Word>
|
||||
<Word>while</Word>
|
||||
<Word>function</Word>
|
||||
<Word>async</Word>
|
||||
<Word>await</Word>
|
||||
<Word>new</Word>
|
||||
<Word>this</Word>
|
||||
<Word>true</Word>
|
||||
<Word>false</Word>
|
||||
<Word>null</Word>
|
||||
<Word>undefined</Word>
|
||||
<Word>each</Word>
|
||||
<Word>if</Word>
|
||||
<Word>else</Word>
|
||||
<Word>await</Word>
|
||||
<Word>then</Word>
|
||||
<Word>catch</Word>
|
||||
</Keywords>
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="CSS">
|
||||
<Span color="Comment" begin="/\*" end="\*/" />
|
||||
<Span color="String" begin=""" end=""" />
|
||||
<Span color="String" begin="'" end="'" />
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="MainRuleSet">
|
||||
<Import ruleSet="Html" />
|
||||
<Import ruleSet="JavaScript" />
|
||||
<Import ruleSet="CSS" />
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet>
|
||||
<Import ruleSet="MainRuleSet" />
|
||||
</RuleSet>
|
||||
</SyntaxDefinition>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.syn;.lang;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.resx;.user;.ilproj;.booproj;.build;.xfrm;.targets;.axaml;.xaml;.xpt;.xft;.map;.wsdl;.disco;.ascx;.atom;.bpmn;.cpt;.csl;.props;.dotsettings;.slnx">
|
||||
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.syn;.lang;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.resx;.user;.ilproj;.booproj;.build;.xfrm;.targets;.axaml;.xaml;.xpt;.xft;.map;.wsdl;.disco;.ascx;.atom;.bpmn;.cpt;.csl;.props;.dotsettings;.slnx;.svg">
|
||||
|
||||
<Environment>
|
||||
<Default color="#D4D4D4" bgcolor="#1E1E1E"/>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<SyntaxDefinition name="HTML" extensions=".html;.htm;.xhtml;.shtml;.shtm;.xht;.hta">
|
||||
|
||||
<Environment>
|
||||
<Default color="#D4D4D4" bgcolor="#1E1E1E"/>
|
||||
<Selection color="#FFFFFF" bgcolor="#264F78"/>
|
||||
<LineNumbers color="#858585" bgcolor="#1E1E1E"/>
|
||||
<CaretMarker color="#AEAFAD"/>
|
||||
<VRuler color="#3E3E42"/>
|
||||
|
||||
<FoldLine color="#5F5F5F" bgcolor="#1E1E1E"/>
|
||||
<FoldMarker color="#D4D4D4" bgcolor="#1E1E1E"/>
|
||||
<SelectedFoldLine color="#D4D4D4" bgcolor="#1E1E1E"/>
|
||||
|
||||
<EOLMarkers color="#3E3E42"/>
|
||||
<SpaceMarkers color="#3E3E42"/>
|
||||
<TabMarkers color="#3E3E42"/>
|
||||
<InvalidLines color="#3E3E42"/>
|
||||
</Environment>
|
||||
|
||||
<Properties>
|
||||
<Property name="BlockCommentBegin" value="<!--"/>
|
||||
<Property name="BlockCommentEnd" value="-->"/>
|
||||
</Properties>
|
||||
|
||||
<Digits name="Digits" color="#B5CEA8" bold="false" italic="false"/>
|
||||
|
||||
<RuleSets>
|
||||
<RuleSet ignorecase="true">
|
||||
<Delimiters></Delimiters>
|
||||
|
||||
<Span name="BlockComment" stopateol="false" color="#6A9955" bold="false" italic="false">
|
||||
<Begin><!--</Begin>
|
||||
<End>--></End>
|
||||
</Span>
|
||||
|
||||
<Span name="ScriptTag" rule="JavaScriptSet" stopateol="false" color="#D4D4D4" bold="false" italic="false">
|
||||
<Begin color="#569CD6"><script></Begin>
|
||||
<End color="#569CD6"></script></End>
|
||||
</Span>
|
||||
|
||||
<Span name="HtmlTag" rule="HtmlTagSet" stopateol="false" color="#569CD6" bold="false" italic="false">
|
||||
<Begin><</Begin>
|
||||
<End>></End>
|
||||
</Span>
|
||||
|
||||
<Span name="Entity" stopateol="true" color="#D4D4D4" bgcolor="#1E1E1E" bold="false" italic="true">
|
||||
<Begin bgcolor="#1E1E1E">&</Begin>
|
||||
<End bgcolor="#1E1E1E">;</End>
|
||||
</Span>
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="JavaScriptSet" reference="JavaScript"/>
|
||||
|
||||
<RuleSet name="HtmlTagSet" ignorecase="false">
|
||||
<Delimiters>/=</Delimiters>
|
||||
|
||||
<Span name="String" stopateol="true" color="#CE9178" bold="false" italic="false">
|
||||
<Begin>"</Begin>
|
||||
<End>"</End>
|
||||
</Span>
|
||||
|
||||
<Span name="Char" stopateol="true" color="#CE9178" bold="false" italic="false">
|
||||
<Begin>'</Begin>
|
||||
<End>'</End>
|
||||
</Span>
|
||||
|
||||
<MarkPrevious color="#9CDCFE" bold="false" italic="false">=</MarkPrevious>
|
||||
|
||||
<KeyWords name="Slash" color="#569CD6" bold="false" italic="false">
|
||||
<Key word="/"/>
|
||||
</KeyWords>
|
||||
|
||||
<KeyWords name="Assignment" color="#D4D4D4" bold="false" italic="false">
|
||||
<Key word="="/>
|
||||
</KeyWords>
|
||||
</RuleSet>
|
||||
</RuleSets>
|
||||
</SyntaxDefinition>
|
||||
@@ -0,0 +1,113 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SyntaxDefinition name="Svelte" extensions=".svelte" xmlns="http://icsharpcode.net/sharpdevelop/syntaxdefinition/2008">
|
||||
<Color name="Comment" foreground="#008000" />
|
||||
<Color name="Tag" foreground="#800000" exampleText="div" />
|
||||
<Color name="Attribute" foreground="#0000FF" exampleText="on:click" />
|
||||
<Color name="String" foreground="#A31515" exampleText=""text"" />
|
||||
<Color name="Directive" foreground="#B000B0" exampleText="bind:" />
|
||||
<Color name="Keyword" foreground="#000080" exampleText="import" />
|
||||
<Color name="Script" foreground="#333333" />
|
||||
<Color name="Style" foreground="#0055A5" />
|
||||
|
||||
<RuleSet name="Html">
|
||||
<Span color="Comment" begin="<!--" end="-->" />
|
||||
<Span color="String" begin=""" end=""" />
|
||||
<Span color="String" begin="'" end="'" />
|
||||
|
||||
<!-- Tags -->
|
||||
<Span color="Tag" begin="<" end=">">
|
||||
<RuleSet>
|
||||
<Keywords color="Tag">
|
||||
<Word>script</Word>
|
||||
<Word>style</Word>
|
||||
<Word>div</Word>
|
||||
<Word>span</Word>
|
||||
<Word>input</Word>
|
||||
<Word>button</Word>
|
||||
<Word>section</Word>
|
||||
<Word>article</Word>
|
||||
<Word>header</Word>
|
||||
<Word>footer</Word>
|
||||
<Word>main</Word>
|
||||
<Word>nav</Word>
|
||||
<Word>aside</Word>
|
||||
<Word>p</Word>
|
||||
<Word>h1</Word>
|
||||
<Word>h2</Word>
|
||||
<Word>h3</Word>
|
||||
<Word>ul</Word>
|
||||
<Word>li</Word>
|
||||
<Word>a</Word>
|
||||
<Word>img</Word>
|
||||
</Keywords>
|
||||
<Keywords color="Directive">
|
||||
<Word>bind:</Word>
|
||||
<Word>on:</Word>
|
||||
<Word>use:</Word>
|
||||
<Word>transition:</Word>
|
||||
<Word>in:</Word>
|
||||
<Word>out:</Word>
|
||||
<Word>animate:</Word>
|
||||
<Word>class:</Word>
|
||||
<Word>style:</Word>
|
||||
</Keywords>
|
||||
<Keywords color="Attribute">
|
||||
<Word>export</Word>
|
||||
<Word>let</Word>
|
||||
<Word>const</Word>
|
||||
</Keywords>
|
||||
</RuleSet>
|
||||
</Span>
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="JavaScript">
|
||||
<Span color="Comment" begin="//" end="\n" />
|
||||
<Span color="Comment" begin="/\*" end="\*/" />
|
||||
<Span color="String" begin=""" end=""" />
|
||||
<Span color="String" begin="'" end="'" />
|
||||
<Keywords color="Keyword">
|
||||
<Word>import</Word>
|
||||
<Word>export</Word>
|
||||
<Word>default</Word>
|
||||
<Word>return</Word>
|
||||
<Word>const</Word>
|
||||
<Word>let</Word>
|
||||
<Word>var</Word>
|
||||
<Word>if</Word>
|
||||
<Word>else</Word>
|
||||
<Word>for</Word>
|
||||
<Word>while</Word>
|
||||
<Word>function</Word>
|
||||
<Word>async</Word>
|
||||
<Word>await</Word>
|
||||
<Word>new</Word>
|
||||
<Word>this</Word>
|
||||
<Word>true</Word>
|
||||
<Word>false</Word>
|
||||
<Word>null</Word>
|
||||
<Word>undefined</Word>
|
||||
<Word>each</Word>
|
||||
<Word>if</Word>
|
||||
<Word>else</Word>
|
||||
<Word>await</Word>
|
||||
<Word>then</Word>
|
||||
<Word>catch</Word>
|
||||
</Keywords>
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="CSS">
|
||||
<Span color="Comment" begin="/\*" end="\*/" />
|
||||
<Span color="String" begin=""" end=""" />
|
||||
<Span color="String" begin="'" end="'" />
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet name="MainRuleSet">
|
||||
<Import ruleSet="Html" />
|
||||
<Import ruleSet="JavaScript" />
|
||||
<Import ruleSet="CSS" />
|
||||
</RuleSet>
|
||||
|
||||
<RuleSet>
|
||||
<Import ruleSet="MainRuleSet" />
|
||||
</RuleSet>
|
||||
</SyntaxDefinition>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.syn;.lang;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.resx;.user;.ilproj;.booproj;.build;.xfrm;.targets;.axaml;.xaml;.xpt;.xft;.map;.wsdl;.disco;.ascx;.atom;.bpmn;.cpt;.csl;.props;.dotsettings;.slnx">
|
||||
<SyntaxDefinition name="XML" extensions=".xml;.xsl;.xslt;.xsd;.syn;.lang;.manifest;.config;.addin;.xshd;.wxs;.wxi;.wxl;.proj;.csproj;.vbproj;.resx;.user;.ilproj;.booproj;.build;.xfrm;.targets;.axaml;.xaml;.xpt;.xft;.map;.wsdl;.disco;.ascx;.atom;.bpmn;.cpt;.csl;.props;.dotsettings;.slnx;.svg">
|
||||
|
||||
<Environment>
|
||||
<Default color="Black" bgcolor="#FFFFFF"/>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
using ICSharpCode.AvalonEdit;
|
||||
using ICSharpCode.AvalonEdit.Document;
|
||||
using ICSharpCode.AvalonEdit.Editing;
|
||||
using ICSharpCode.AvalonEdit.Rendering;
|
||||
using ICSharpCode.AvalonEdit.Search;
|
||||
using QuickLook.Common.Helpers;
|
||||
@@ -27,6 +28,7 @@ using QuickLook.Plugin.TextViewer.Themes.HighlightingDefinitions;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
@@ -68,16 +70,33 @@ public partial class TextViewerPanel : TextEditor, IDisposable
|
||||
ShowLineNumbers = true;
|
||||
WordWrap = true;
|
||||
IsReadOnly = true;
|
||||
|
||||
// Enable manipulation events (touch gestures like pan/scroll).
|
||||
IsManipulationEnabled = true;
|
||||
|
||||
// Disable automatic hyperlink detection for email addresses.
|
||||
Options.EnableEmailHyperlinks = false;
|
||||
|
||||
// Disable automatic hyperlink detection for general URLs.
|
||||
Options.EnableHyperlinks = false;
|
||||
|
||||
// Search for the separator line inside the left margins of the TextArea.
|
||||
// The default LineNumberMargin in AvalonEdit often contains a thin Line element
|
||||
// used as a visual separator between line numbers and the text.
|
||||
// If found, set its Stroke to Transparent to hide the separator visually.
|
||||
TextArea.LeftMargins
|
||||
.OfType<System.Windows.Shapes.Line>()
|
||||
.FirstOrDefault()
|
||||
?.Stroke = Brushes.Transparent;
|
||||
|
||||
ContextMenu = new ContextMenu();
|
||||
// Add "Copy" menu item.
|
||||
ContextMenu.Items.Add(new MenuItem
|
||||
{
|
||||
Header = TranslationHelper.Get("Editor_Copy", domain: Assembly.GetExecutingAssembly().GetName().Name),
|
||||
Command = ApplicationCommands.Copy
|
||||
});
|
||||
// Add "Select All" menu item.
|
||||
ContextMenu.Items.Add(new MenuItem
|
||||
{
|
||||
Header = TranslationHelper.Get("Editor_SelectAll",
|
||||
@@ -95,8 +114,10 @@ public partial class TextViewerPanel : TextEditor, IDisposable
|
||||
FontFamily = new FontFamily(TranslationHelper.Get("Editor_FontFamily",
|
||||
domain: Assembly.GetExecutingAssembly().GetName().Name));
|
||||
|
||||
// Add a custom element generator (e.g., to truncate extremely long lines).
|
||||
TextArea.TextView.ElementGenerators.Add(new TruncateLongLines());
|
||||
|
||||
// Install the search panel (Ctrl+F style search UI).
|
||||
SearchPanel.Install(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,145 +5,196 @@
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>انسخ</Editor_Copy>
|
||||
<Editor_SelectAll>حدد الكل</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>إعادة فتح كمعاينة HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>إعادة فتح كمعاينة صورة</MW_ReopenAsImagePreview>
|
||||
</ar>
|
||||
<ca>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copia</Editor_Copy>
|
||||
<Editor_SelectAll>Selecciona-ho tot</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Torna a obrir com a previsualització HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Torna a obrir com a previsualització d'imatge</MW_ReopenAsImagePreview>
|
||||
</ca>
|
||||
<de>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopieren</Editor_Copy>
|
||||
<Editor_SelectAll>Alles markieren</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Als HTML-Vorschau erneut öffnen</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Als Bildvorschau erneut öffnen</MW_ReopenAsImagePreview>
|
||||
</de>
|
||||
<en>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copy</Editor_Copy>
|
||||
<Editor_SelectAll>Select All</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Reopen as HTML preview</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Reopen as image preview</MW_ReopenAsImagePreview>
|
||||
</en>
|
||||
<ar>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>انسخ</Editor_Copy>
|
||||
<Editor_SelectAll>حدد الكل</Editor_SelectAll>
|
||||
</ar>
|
||||
<es>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copiar</Editor_Copy>
|
||||
<Editor_SelectAll>Seleccionar Todo</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Reabrir como vista previa HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Reabrir como vista previa de imagen</MW_ReopenAsImagePreview>
|
||||
</es>
|
||||
<fr>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copie</Editor_Copy>
|
||||
<Editor_SelectAll>Tout sélectionner</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Rouvrir en aperçu HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Rouvrir en aperçu d'image</MW_ReopenAsImagePreview>
|
||||
</fr>
|
||||
<it>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copia</Editor_Copy>
|
||||
<Editor_SelectAll>Seleziona tutto</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Riapri come anteprima HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Riapri come anteprima immagine</MW_ReopenAsImagePreview>
|
||||
</it>
|
||||
<ja-JP>
|
||||
<Editor_FontFamily>Consolas,Meiryo UI,MS UI Gothic,MS Gothic</Editor_FontFamily>
|
||||
<Editor_Copy>コピー</Editor_Copy>
|
||||
<Editor_SelectAll>すべて選択</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>HTML プレビューとして再度開く</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>画像プレビューとして再度開く</MW_ReopenAsImagePreview>
|
||||
</ja-JP>
|
||||
<ko>
|
||||
<Editor_FontFamily>Consolas,Malgun Gothic,Gulim</Editor_FontFamily>
|
||||
<Editor_Copy>복사</Editor_Copy>
|
||||
<Editor_SelectAll>모두 선택</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>HTML 미리보기로 다시 열기</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>이미지 미리보기로 다시 열기</MW_ReopenAsImagePreview>
|
||||
</ko>
|
||||
<nb-NO>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopier</Editor_Copy>
|
||||
<Editor_SelectAll>Merk alt</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Åpne på nytt som HTML-forhåndsvisning</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Åpne på nytt som bilde-forhåndsvisning</MW_ReopenAsImagePreview>
|
||||
</nb-NO>
|
||||
<nl-NL>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopiëren</Editor_Copy>
|
||||
<Editor_SelectAll>Alles selecteren</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Opnieuw openen als HTML-voorbeeld</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Opnieuw openen als afbeelding-voorbeeld</MW_ReopenAsImagePreview>
|
||||
</nl-NL>
|
||||
<pl>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopiuj</Editor_Copy>
|
||||
<Editor_SelectAll>Zaznacz wszystko</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Otwórz ponownie jako podgląd HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Otwórz ponownie jako podgląd obrazu</MW_ReopenAsImagePreview>
|
||||
</pl>
|
||||
<pt-BR>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copiar</Editor_Copy>
|
||||
<Editor_SelectAll>Selecionar tudo</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Reabrir como visualização HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Reabrir como visualização de imagem</MW_ReopenAsImagePreview>
|
||||
</pt-BR>
|
||||
<pt-PT>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Copiar</Editor_Copy>
|
||||
<Editor_SelectAll>Selecionar tudo</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Reabrir como pré-visualização HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Reabrir como pré-visualização de imagem</MW_ReopenAsImagePreview>
|
||||
</pt-PT>
|
||||
<ru-RU>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Копировать</Editor_Copy>
|
||||
<Editor_SelectAll>Выделить всё</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Переоткрыть как предварительный просмотр HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Переоткрыть как предварительный просмотр изображения</MW_ReopenAsImagePreview>
|
||||
</ru-RU>
|
||||
<tr-TR>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopyala</Editor_Copy>
|
||||
<Editor_SelectAll>Tümünü seç</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>HTML önizlemesi olarak yeniden aç</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Resim önizlemesi olarak yeniden aç</MW_ReopenAsImagePreview>
|
||||
</tr-TR>
|
||||
<uk-UA>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Копіювати</Editor_Copy>
|
||||
<Editor_SelectAll>Виділити Все</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Перевідкрити як попередній перегляд HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Перевідкрити як попередній перегляд зображення</MW_ReopenAsImagePreview>
|
||||
</uk-UA>
|
||||
<vi>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Sao chép</Editor_Copy>
|
||||
<Editor_SelectAll>Chọn tất cả</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Mở lại dưới dạng xem trước HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Mở lại dưới dạng xem trước hình ảnh</MW_ReopenAsImagePreview>
|
||||
</vi>
|
||||
<zh-CN>
|
||||
<Editor_FontFamily>Consolas,Microsoft Yahei UI,Microsoft Yahei,SimSun</Editor_FontFamily>
|
||||
<Editor_Copy>复制</Editor_Copy>
|
||||
<Editor_SelectAll>全选</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>重新作为 HTML 预览打开</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>重新作为图像预览打开</MW_ReopenAsImagePreview>
|
||||
</zh-CN>
|
||||
<zh-TW>
|
||||
<Editor_FontFamily>Consolas,Microsoft JhengHei UI,Microsoft JhengHei,MingLiU</Editor_FontFamily>
|
||||
<Editor_Copy>複製</Editor_Copy>
|
||||
<Editor_SelectAll>全選</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>重新作為 HTML 預覽開啟</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>重新作為圖像預覽開啟</MW_ReopenAsImagePreview>
|
||||
</zh-TW>
|
||||
<mr>
|
||||
<Editor_FontFamily>Consolas,Mangal,Nirmala UI</Editor_FontFamily>
|
||||
<Editor_Copy>प्रतिलिपी करा</Editor_Copy>
|
||||
<Editor_SelectAll>सर्व निवडा</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>HTML पूर्वावलोकन म्हणून पुन्हा उघडा</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>प्रतिमा पूर्वावलोकन म्हणून पुन्हा उघडा</MW_ReopenAsImagePreview>
|
||||
</mr>
|
||||
<hi>
|
||||
<Editor_FontFamily>Consolas,Mangal,Nirmala UI</Editor_FontFamily>
|
||||
<Editor_Copy>कॉपी करें</Editor_Copy>
|
||||
<Editor_SelectAll>सभी चुनें</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>HTML पूर्वावलोकन के रूप में फिर से खोलें</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>छवि पूर्वावलोकन के रूप में फिर से खोलें</MW_ReopenAsImagePreview>
|
||||
</hi>
|
||||
<he>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>העתק</Editor_Copy>
|
||||
<Editor_SelectAll>בחר הכל</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>פתח מחדש כתצוגה מקדימה של HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>פתח מחדש כתצוגה מקדימה של תמונה</MW_ReopenAsImagePreview>
|
||||
</he>
|
||||
<hu-HU>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Másolás</Editor_Copy>
|
||||
<Editor_SelectAll>Mindet kijelöl</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Újranyitás HTML előnézetként</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Újranyitás kép előnézetként</MW_ReopenAsImagePreview>
|
||||
</hu-HU>
|
||||
<id-ID>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Salin</Editor_Copy>
|
||||
<Editor_SelectAll>Pilih Semua</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Buka ulang sebagai pratinjau HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Buka ulang sebagai pratinjau gambar</MW_ReopenAsImagePreview>
|
||||
</id-ID>
|
||||
<sk>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopírovať</Editor_Copy>
|
||||
<Editor_SelectAll>Označiť všetko</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Znova otvoriť ako HTML náhľad</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Znova otvoriť ako náhľad obrázka</MW_ReopenAsImagePreview>
|
||||
</sk>
|
||||
<el>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Aντιγραφή</Editor_Copy>
|
||||
<Editor_SelectAll>Επιλογή όλων</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Επανανοίξτε ως προεπισκόπηση HTML</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Επανανοίξτε ως προεπισκόπηση εικόνας</MW_ReopenAsImagePreview>
|
||||
</el>
|
||||
<sv>
|
||||
<Editor_FontFamily>Consolas</Editor_FontFamily>
|
||||
<Editor_Copy>Kopiera</Editor_Copy>
|
||||
<Editor_SelectAll>Markera allt</Editor_SelectAll>
|
||||
<MW_ReopenAsHtmlPreview>Öppna på nytt som HTML-förhandsgranskning</MW_ReopenAsHtmlPreview>
|
||||
<MW_ReopenAsImagePreview>Öppna på nytt som bildförhandsgranskning</MW_ReopenAsImagePreview>
|
||||
</sv>
|
||||
</Translations>
|
||||
|
||||
@@ -19,6 +19,7 @@ using Melanchall.DryWetMidi.Core;
|
||||
using Melanchall.DryWetMidi.Interaction;
|
||||
using Melanchall.DryWetMidi.Multimedia;
|
||||
using QuickLook.Common.Annotations;
|
||||
using QuickLook.Common.Controls;
|
||||
using QuickLook.Common.Plugin;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
@@ -208,14 +209,4 @@ internal class MidiPlayer : IDisposable, INotifyPropertyChanged
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Segoe Fluent Icons
|
||||
/// https://learn.microsoft.com/en-us/windows/apps/design/style/segoe-fluent-icons-font
|
||||
/// </summary>
|
||||
private sealed class FontSymbols
|
||||
{
|
||||
public const string Play = "\xe768";
|
||||
public const string Pause = "\xe769";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Controls;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows;
|
||||
@@ -49,7 +50,7 @@ public sealed class TimeTickToShortStringConverter : DependencyObject, IValueCon
|
||||
|
||||
public sealed class VolumeToIconConverter : DependencyObject, IValueConverter
|
||||
{
|
||||
private static readonly string[] Volumes = ["\xE74F", "\xE993", "\xE994", "\xE995"];
|
||||
private static readonly string[] Volumes = [FontSymbols.Mute, FontSymbols.Volume1, FontSymbols.Volume2, FontSymbols.Volume3];
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
@@ -351,7 +351,7 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
|
||||
|
||||
private void ChangeVolume(double delta)
|
||||
{
|
||||
LinearVolume += delta;
|
||||
LinearVolume = Math.Max(0d, Math.Min(1d, LinearVolume + delta));
|
||||
}
|
||||
|
||||
private void TogglePlayPause(object sender, EventArgs e)
|
||||
@@ -385,16 +385,16 @@ public partial class ViewerPanel : UserControl, IDisposable, INotifyPropertyChan
|
||||
UpdateMeta(path, info);
|
||||
|
||||
// detect rotation
|
||||
double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
|
||||
_ = double.TryParse(info?.Get(StreamKind.Video, 0, "Rotation"), out var rotation);
|
||||
// Correct rotation: on some machine the value "90" becomes "90000" by some reason
|
||||
if (rotation > 360)
|
||||
if (rotation > 360d)
|
||||
rotation /= 1e3;
|
||||
if (Math.Abs(rotation) > 0.1)
|
||||
mediaElement.LayoutTransform = new RotateTransform(rotation, 0.5, 0.5);
|
||||
if (Math.Abs(rotation) > 0.1d)
|
||||
mediaElement.LayoutTransform = new RotateTransform(rotation, 0.5d, 0.5d);
|
||||
|
||||
mediaElement.Source = new Uri(path);
|
||||
// old plugin use an int-typed "Volume" config key ranged from 0 to 100. Let's use a new one here.
|
||||
LinearVolume = SettingHelper.Get("VolumeDouble", 1d, "QuickLook.Plugin.VideoViewer");
|
||||
LinearVolume = Math.Max(0d, Math.Min(1d, SettingHelper.Get("VolumeDouble", 1d, "QuickLook.Plugin.VideoViewer")));
|
||||
|
||||
mediaElement.Play();
|
||||
}
|
||||
|
||||
@@ -89,6 +89,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLook.Plugin.HelixViewe
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLook.Plugin.MediaInfoViewer", "QuickLook.Plugin\QuickLook.Plugin.MediaInfoViewer\QuickLook.Plugin.MediaInfoViewer.csproj", "{B0054A16-472E-44AC-BA40-349303E524FF}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickLook.Plugin.InsvBlocker", "QuickLook.Plugin\QuickLook.Plugin.InsvBlocker\QuickLook.Plugin.InsvBlocker.csproj", "{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -289,6 +291,14 @@ Global
|
||||
{B0054A16-472E-44AC-BA40-349303E524FF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B0054A16-472E-44AC-BA40-349303E524FF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{B0054A16-472E-44AC-BA40-349303E524FF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -315,6 +325,7 @@ Global
|
||||
{B4F7C88D-C79D-49E7-A1FB-FB69CF72585F} = {06EFDBE0-6408-4B37-BCF2-0CF9EBEA2E93}
|
||||
{311E6E78-3A5B-4E51-802A-5755BD5F9F97} = {06EFDBE0-6408-4B37-BCF2-0CF9EBEA2E93}
|
||||
{B0054A16-472E-44AC-BA40-349303E524FF} = {06EFDBE0-6408-4B37-BCF2-0CF9EBEA2E93}
|
||||
{A1B2C3D4-E5F6-4A5B-9C8D-7E6F5A4B3C2D} = {06EFDBE0-6408-4B37-BCF2-0CF9EBEA2E93}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D3761C32-8C5F-498A-892B-3B0882994B62}
|
||||
|
||||
71
QuickLook.slnx
Normal file
71
QuickLook.slnx
Normal file
@@ -0,0 +1,71 @@
|
||||
<Solution>
|
||||
<Configurations>
|
||||
<Platform Name="Any CPU" />
|
||||
<Platform Name="x64" />
|
||||
</Configurations>
|
||||
<Folder Name="/QuickLook.Native/">
|
||||
<Project Path="QuickLook.Native/QuickLook.Native32/QuickLook.Native32.vcxproj" Id="d31ee321-c2b0-4984-b749-736f7de509f1">
|
||||
<Platform Project="Win32" />
|
||||
</Project>
|
||||
<Project Path="QuickLook.Native/QuickLook.Native64/QuickLook.Native64.vcxproj" Id="794e4dcf-f715-4836-9d30-abd296586d23" />
|
||||
</Folder>
|
||||
<Folder Name="/QuickLook.Plugin/">
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.AppViewer/QuickLook.Plugin.AppViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.CLSIDViewer/QuickLook.Plugin.CLSIDViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ELFViewer/QuickLook.Plugin.ELFViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.FontViewer/QuickLook.Plugin.FontViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.HelixViewer/QuickLook.Plugin.HelixViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.MailViewer/QuickLook.Plugin.MailViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.MarkdownViewer/QuickLook.Plugin.MarkdownViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.MediaInfoViewer/QuickLook.Plugin.MediaInfoViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.PEViewer/QuickLook.Plugin.PEViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.PluginInstaller/QuickLook.Plugin.PluginInstaller.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.ThumbnailViewer/QuickLook.Plugin.ThumbnailViewer.csproj" />
|
||||
<Project Path="QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj" />
|
||||
</Folder>
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path="GitVersion.cs" />
|
||||
</Folder>
|
||||
<Project Path="QuickLook.Common/QuickLook.Common.csproj">
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
</Project>
|
||||
<Project Path="QuickLook.Installer/QuickLook.Installer.wixproj" Id="f0214fc2-efbe-426c-842d-b42bc37d9525">
|
||||
<BuildDependency Project="QuickLook.Common/QuickLook.Common.csproj" />
|
||||
<BuildDependency Project="QuickLook.Native/QuickLook.Native32/QuickLook.Native32.vcxproj" />
|
||||
<BuildDependency Project="QuickLook.Native/QuickLook.Native64/QuickLook.Native64.vcxproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.AppViewer/QuickLook.Plugin.AppViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ArchiveViewer/QuickLook.Plugin.ArchiveViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.CLSIDViewer/QuickLook.Plugin.CLSIDViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.CsvViewer/QuickLook.Plugin.CsvViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ELFViewer/QuickLook.Plugin.ELFViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.FontViewer/QuickLook.Plugin.FontViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.HelixViewer/QuickLook.Plugin.HelixViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.HtmlViewer/QuickLook.Plugin.HtmlViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ImageViewer/QuickLook.Plugin.ImageViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.MailViewer/QuickLook.Plugin.MailViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.MarkdownViewer/QuickLook.Plugin.MarkdownViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.MediaInfoViewer/QuickLook.Plugin.MediaInfoViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.OfficeViewer/QuickLook.Plugin.OfficeViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.PDFViewer/QuickLook.Plugin.PdfViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.PEViewer/QuickLook.Plugin.PEViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.PluginInstaller/QuickLook.Plugin.PluginInstaller.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.TextViewer/QuickLook.Plugin.TextViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.ThumbnailViewer/QuickLook.Plugin.ThumbnailViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook.Plugin/QuickLook.Plugin.VideoViewer/QuickLook.Plugin.VideoViewer.csproj" />
|
||||
<BuildDependency Project="QuickLook/QuickLook.csproj" />
|
||||
<Platform Project="x86" />
|
||||
<Build />
|
||||
</Project>
|
||||
<Project Path="QuickLook/QuickLook.csproj">
|
||||
<BuildDependency Project="QuickLook.Native/QuickLook.Native32/QuickLook.Native32.vcxproj" />
|
||||
<BuildDependency Project="QuickLook.Native/QuickLook.Native64/QuickLook.Native64.vcxproj" />
|
||||
<Platform Solution="*|x64" Project="x64" />
|
||||
</Project>
|
||||
</Solution>
|
||||
@@ -259,6 +259,9 @@ public partial class App : Application
|
||||
|
||||
private void CheckUpdate()
|
||||
{
|
||||
if (SettingHelper.Get("DisableAutoUpdateCheck", false))
|
||||
return;
|
||||
|
||||
if (DateTime.Now.Ticks - SettingHelper.Get<long>("LastUpdateTicks") < TimeSpan.FromDays(30).Ticks)
|
||||
return;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>compile; runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3">
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Runtime.WindowsRuntime" Version="4.7.0">
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<MW_Open>افتح الملف {0} باستخدام البرنامج الافتراضي</MW_Open>
|
||||
<MW_OpenWith>افتح الملف {0} باستخدام برنامج محدد</MW_OpenWith>
|
||||
<MW_Run>شغل الملف {0} المحدد</MW_Run>
|
||||
<MW_FileBlocked>هذا النوع من الملفات محظور.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>شغل البرنامج أوتوماتيكيًا عند تشغيل النظام</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>النسخة {0} من كويك لووك</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>تأكد من وجود أي تحديث للبرنامج</Icon_CheckUpdate>
|
||||
@@ -40,6 +41,7 @@
|
||||
<MW_Open>Megnyitás {0}</MW_Open>
|
||||
<MW_OpenWith>Megnyitás ezzel {0}</MW_OpenWith>
|
||||
<MW_Run>Futtatás {0}</MW_Run>
|
||||
<MW_FileBlocked>Ez a fájltípus blokkolva van.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Futattás &Indításkor</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Keressen új &Frissítést...</Icon_CheckUpdate>
|
||||
@@ -69,6 +71,7 @@
|
||||
<MW_Open>Otvoriť {0}</MW_Open>
|
||||
<MW_OpenWith>Otvoriť v programe {0}</MW_OpenWith>
|
||||
<MW_Run>Spustiť {0}</MW_Run>
|
||||
<MW_FileBlocked>Tento typ súboru je blokovaný.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Spustiť pri &štarte</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Skontrolovať &aktualizácie...</Icon_CheckUpdate>
|
||||
@@ -97,6 +100,7 @@
|
||||
<MW_Open>Buka {0}</MW_Open>
|
||||
<MW_OpenWith>Buka dengan {0}</MW_OpenWith>
|
||||
<MW_Run>Jalankan {0}</MW_Run>
|
||||
<MW_FileBlocked>Jenis file ini diblokir.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Jalankan saat &Memulai</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v. {0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Memeriksa &Pembaharuan...</Icon_CheckUpdate>
|
||||
@@ -130,6 +134,7 @@
|
||||
<MW_Open>{0} 열기</MW_Open>
|
||||
<MW_OpenWith>{0}(으)로 열기</MW_OpenWith>
|
||||
<MW_Run>{0} 실행</MW_Run>
|
||||
<MW_FileBlocked>이 파일 유형은 차단되었습니다.</MW_FileBlocked>
|
||||
<MW_Share>공유</MW_Share>
|
||||
<Icon_RunAtStartup>시작 시 실행(&S)</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
@@ -160,6 +165,7 @@
|
||||
<MW_Open>Obre {0}</MW_Open>
|
||||
<MW_OpenWith>Obre'l amb {0}</MW_OpenWith>
|
||||
<MW_Run>Executa'l {0}</MW_Run>
|
||||
<MW_FileBlocked>Aquest tipus de fitxer està bloquejat.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Executa'l a l'&inici</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Cerca &actualitzacions...</Icon_CheckUpdate>
|
||||
@@ -192,6 +198,7 @@
|
||||
<MW_OpenWith>Öffnen mit {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Öffnen mit ...</MW_OpenWithMenu>
|
||||
<MW_Run>{0} ausführen</MW_Run>
|
||||
<MW_FileBlocked>Dieser Dateityp ist blockiert.</MW_FileBlocked>
|
||||
<MW_Share>Freigeben</MW_Share>
|
||||
<MW_Reload>Neu laden</MW_Reload>
|
||||
<MW_More>Mehr</MW_More>
|
||||
@@ -229,6 +236,7 @@
|
||||
<MW_OpenWith>Open with {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Open With Menu</MW_OpenWithMenu>
|
||||
<MW_Run>Run {0}</MW_Run>
|
||||
<MW_FileBlocked>This file type is blocked.</MW_FileBlocked>
|
||||
<MW_Share>Share</MW_Share>
|
||||
<MW_Reload>Reload</MW_Reload>
|
||||
<MW_More>More</MW_More>
|
||||
@@ -266,6 +274,7 @@
|
||||
<MW_OpenWith>Abrir con {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Abrir Con Menu</MW_OpenWithMenu>
|
||||
<MW_Run>Iniciar {0}</MW_Run>
|
||||
<MW_FileBlocked>Este tipo de archivo está bloqueado.</MW_FileBlocked>
|
||||
<MW_Share>Compartir</MW_Share>
|
||||
<MW_Reload>Recargar</MW_Reload>
|
||||
<MW_More>Más</MW_More>
|
||||
@@ -299,6 +308,7 @@
|
||||
<MW_Open>Ouvrir {0}</MW_Open>
|
||||
<MW_OpenWith>Ouvrir avec {0}</MW_OpenWith>
|
||||
<MW_Run>Exécuter {0}</MW_Run>
|
||||
<MW_FileBlocked>Ce type de fichier est bloqué.</MW_FileBlocked>
|
||||
<MW_Reload>Recharger</MW_Reload>
|
||||
<MW_More>Plus</MW_More>
|
||||
<Icon_RunAtStartup>Exécuter au &démarrage</Icon_RunAtStartup>
|
||||
@@ -331,6 +341,7 @@
|
||||
<MW_Open>Apri {0}</MW_Open>
|
||||
<MW_OpenWith>Apri con {0}</MW_OpenWith>
|
||||
<MW_Run>Esegui {0}</MW_Run>
|
||||
<MW_FileBlocked>Questo tipo di file è bloccato.</MW_FileBlocked>
|
||||
<MW_Reload>Ricarica</MW_Reload>
|
||||
<MW_More>Altro</MW_More>
|
||||
<Icon_RunAtStartup>Esegui all'&Avvio</Icon_RunAtStartup>
|
||||
@@ -365,6 +376,7 @@
|
||||
<MW_OpenWith>{0} で開く</MW_OpenWith>
|
||||
<MW_OpenWithMenu>メニューから選択して開く</MW_OpenWithMenu>
|
||||
<MW_Run>{0} を起動</MW_Run>
|
||||
<MW_FileBlocked>このファイルタイプはブロックされています.</MW_FileBlocked>
|
||||
<MW_Share>シェア</MW_Share>
|
||||
<MW_Reload>再読み込み</MW_Reload>
|
||||
<MW_More>その他</MW_More>
|
||||
@@ -397,6 +409,7 @@
|
||||
<MW_Open>Åpne {0}</MW_Open>
|
||||
<MW_OpenWith>Åpne med {0}</MW_OpenWith>
|
||||
<MW_Run>Kjør {0}</MW_Run>
|
||||
<MW_FileBlocked>Denne filtypen er blokkert.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Kjør ved &oppstart</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Se etter &oppdateringer...</Icon_CheckUpdate>
|
||||
@@ -424,6 +437,7 @@
|
||||
<MW_Open>Open {0}</MW_Open>
|
||||
<MW_OpenWith>Openen met {0}</MW_OpenWith>
|
||||
<MW_Run>Uitvoeren {0}</MW_Run>
|
||||
<MW_FileBlocked>Dit bestandstype is geblokkeerd.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Uitvoeren bij &Opstarten</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Controleren op &Updates...</Icon_CheckUpdate>
|
||||
@@ -456,6 +470,7 @@
|
||||
<MW_OpenWith>Otwórz w {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Otwórz za pomocą...</MW_OpenWithMenu>
|
||||
<MW_Run>Uruchom {0}</MW_Run>
|
||||
<MW_FileBlocked>Ten typ pliku jest zablokowany.</MW_FileBlocked>
|
||||
<MW_Share>Udostępnij</MW_Share>
|
||||
<MW_Reload>Przeładuj</MW_Reload>
|
||||
<MW_More>Więcej</MW_More>
|
||||
@@ -493,6 +508,7 @@
|
||||
<MW_OpenWith>Abrir com {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Menu abrir com</MW_OpenWithMenu>
|
||||
<MW_Run>Executar {0}</MW_Run>
|
||||
<MW_FileBlocked>Este tipo de arquivo está bloqueado.</MW_FileBlocked>
|
||||
<MW_Share>Compartilhar</MW_Share>
|
||||
<MW_Reload>Recarregar</MW_Reload>
|
||||
<MW_More>Mais</MW_More>
|
||||
@@ -525,6 +541,7 @@
|
||||
<MW_Open>Abrir {0}</MW_Open>
|
||||
<MW_OpenWith>Abrir com {0}</MW_OpenWith>
|
||||
<MW_Run>Executar {0}</MW_Run>
|
||||
<MW_FileBlocked>Este tipo de ficheiro está bloqueado.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Executar no &Arranque</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Procurar por &Atualizações...</Icon_CheckUpdate>
|
||||
@@ -553,6 +570,7 @@
|
||||
<MW_Open>Открыть {0}</MW_Open>
|
||||
<MW_OpenWith>Открыть с помощью {0}</MW_OpenWith>
|
||||
<MW_Run>Запустить {0}</MW_Run>
|
||||
<MW_FileBlocked>Этот тип файла заблокирован.</MW_FileBlocked>
|
||||
<MW_StayTop>Поверх всех окон</MW_StayTop>
|
||||
<MW_PreventClosing>Закрепить</MW_PreventClosing>
|
||||
<MW_Share>Поделиться</MW_Share>
|
||||
@@ -587,6 +605,7 @@
|
||||
<MW_Open>Aç: {0}</MW_Open>
|
||||
<MW_OpenWith>Birlikte aç: {0}</MW_OpenWith>
|
||||
<MW_Run>Çalıştır: {0}</MW_Run>
|
||||
<MW_FileBlocked>Bu dosya türü engellenmiştir.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>B&aşlangıçta çalıştır</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>&Güncellemeleri denetle...</Icon_CheckUpdate>
|
||||
@@ -620,6 +639,7 @@
|
||||
<MW_OpenWith>Відкрити за допомогою {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Відкрити за допомогою меню</MW_OpenWithMenu>
|
||||
<MW_Run>Запустити {0}</MW_Run>
|
||||
<MW_FileBlocked>Цей тип файлу заблоковано.</MW_FileBlocked>
|
||||
<MW_Share>Поширити</MW_Share>
|
||||
<MW_Reload>Перезавантажити</MW_Reload>
|
||||
<MW_More>Більше</MW_More>
|
||||
@@ -652,6 +672,7 @@
|
||||
<MW_Open>Mở {0}</MW_Open>
|
||||
<MW_OpenWith>Mở bằng {0}</MW_OpenWith>
|
||||
<MW_Run>Chạy {0}</MW_Run>
|
||||
<MW_FileBlocked>Loại tệp này bị chặn.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>&Khởi động cùng hệ thống</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>&Kiểm tra cập nhật...</Icon_CheckUpdate>
|
||||
@@ -684,6 +705,7 @@
|
||||
<MW_OpenWith>用 {0} 打开</MW_OpenWith>
|
||||
<MW_OpenWithMenu>从菜单选择打开</MW_OpenWithMenu>
|
||||
<MW_Run>运行 {0}</MW_Run>
|
||||
<MW_FileBlocked>此文件类型已被阻止。</MW_FileBlocked>
|
||||
<MW_Share>分享</MW_Share>
|
||||
<MW_Reload>重新加载</MW_Reload>
|
||||
<MW_More>更多</MW_More>
|
||||
@@ -721,6 +743,7 @@
|
||||
<MW_OpenWith>使用 {0} 開啟</MW_OpenWith>
|
||||
<MW_OpenWithMenu>從選單選擇開啟</MW_OpenWithMenu>
|
||||
<MW_Run>執行 {0}</MW_Run>
|
||||
<MW_FileBlocked>此檔案類型已被阻止。</MW_FileBlocked>
|
||||
<MW_Share>分享</MW_Share>
|
||||
<MW_Reload>重新載入</MW_Reload>
|
||||
<MW_More>更多</MW_More>
|
||||
@@ -754,6 +777,7 @@
|
||||
<MW_Open>{0} उघडा</MW_Open>
|
||||
<MW_OpenWith>{0} च्या सह उघडा</MW_OpenWith>
|
||||
<MW_Run>{0} चालवा</MW_Run>
|
||||
<MW_FileBlocked>हा फाइल प्रकार ब्लॉक केला आहे.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>&सुरूवातीस चालवा</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook आवृत्ती v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>&अद्यतनांसाठी तपासा...</Icon_CheckUpdate>
|
||||
@@ -781,6 +805,7 @@
|
||||
<MW_Open>{0} खोलें</MW_Open>
|
||||
<MW_OpenWith>{0} के साथ खोलें</MW_OpenWith>
|
||||
<MW_Run>{0} चलाएं</MW_Run>
|
||||
<MW_FileBlocked>यह फ़ाइल प्रकार अवरुद्ध है.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>&शुरु होते समय चलाएं</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook आवृत्ती v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>&अद्यतन के लिए जाँच करें...</Icon_CheckUpdate>
|
||||
@@ -808,6 +833,8 @@
|
||||
<MW_BrowseFolder>סייר ב{0}</MW_BrowseFolder>
|
||||
<MW_Open>פתח את {0}</MW_Open>
|
||||
<MW_OpenWith>פתח בעזרת {0}</MW_OpenWith>
|
||||
<MW_Run>הפעל {0}</MW_Run>
|
||||
<MW_FileBlocked>סוג קובץ זה חסום.</MW_FileBlocked>
|
||||
<MW_Run>הרץ {0}</MW_Run>
|
||||
<Icon_RunAtStartup>הרץ ב&אתחול</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>'תצוגה מהירה' v{0}</Icon_ToolTip>
|
||||
@@ -837,6 +864,7 @@
|
||||
<MW_Open>Άνοιγμα {0}</MW_Open>
|
||||
<MW_OpenWith>Άνοιγμα με {0}</MW_OpenWith>
|
||||
<MW_Run>Εκτέλεση {0}</MW_Run>
|
||||
<MW_FileBlocked>Αυτός ο τύπος αρχείου είναι αποκλεισμένος.</MW_FileBlocked>
|
||||
<Icon_RunAtStartup>Εκτέλεση κατά &την εκκίνηση</Icon_RunAtStartup>
|
||||
<Icon_ToolTip>QuickLook v{0}</Icon_ToolTip>
|
||||
<Icon_CheckUpdate>Ελεγχος για &ενημερώσεις...</Icon_CheckUpdate>
|
||||
@@ -868,6 +896,7 @@
|
||||
<MW_OpenWith>Öppna med {0}</MW_OpenWith>
|
||||
<MW_OpenWithMenu>Öppna med…</MW_OpenWithMenu>
|
||||
<MW_Run>Kör {0}</MW_Run>
|
||||
<MW_FileBlocked>Den här filtypen är blockerad.</MW_FileBlocked>
|
||||
<MW_Share>Dela</MW_Share>
|
||||
<MW_Reload>Ladda om</MW_Reload>
|
||||
<Icon_RunAtStartup>Kör vid &start</Icon_RunAtStartup>
|
||||
|
||||
@@ -201,25 +201,17 @@ public partial class ViewerWindow
|
||||
return;
|
||||
}
|
||||
|
||||
// Initial the more menu
|
||||
ClearMoreMenuUnpin();
|
||||
foreach (var plugin in PluginManager.GetInstance().LoadedPlugins)
|
||||
if (ContextObject.IsBlocked)
|
||||
{
|
||||
if (plugin == Plugin)
|
||||
ContextObject.ViewerContent = new System.Windows.Controls.TextBlock
|
||||
{
|
||||
if (Plugin is IMoreMenu moreMenu && moreMenu.MenuItems is not null)
|
||||
{
|
||||
InsertMoreMenu(moreMenu.MenuItems);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plugin is IMoreMenuExtended moreMenu && moreMenu.MenuItems is not null)
|
||||
{
|
||||
InsertMoreMenu(moreMenu.MenuItems);
|
||||
}
|
||||
}
|
||||
Text = TranslationHelper.Get("MW_FileBlocked", failsafe: "This file type is blocked."),
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
FontSize = 14,
|
||||
};
|
||||
ContextObject.IsBusy = false;
|
||||
return;
|
||||
}
|
||||
|
||||
SetOpenWithButtonAndPath();
|
||||
@@ -260,18 +252,41 @@ public partial class ViewerWindow
|
||||
}
|
||||
|
||||
// Load plugin, do not block UI
|
||||
Dispatcher.BeginInvoke(new Action(() =>
|
||||
Dispatcher.BeginInvoke(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
Plugin.View(path, ContextObject);
|
||||
|
||||
// Initial the more menu
|
||||
ClearMoreMenuUnpin();
|
||||
foreach (var plugin in
|
||||
PluginManager.GetInstance().LoadedPlugins
|
||||
.GroupBy(x => x.ToString()).Select(g => g.First()) // DistinctBy plugin name
|
||||
.OrderBy(p => p.Priority)) // OrderBy plugin priority
|
||||
{
|
||||
if (plugin.ToString() == Plugin.ToString())
|
||||
{
|
||||
if (Plugin is IMoreMenu moreMenu && moreMenu.MenuItems is not null)
|
||||
{
|
||||
InsertMoreMenu(moreMenu.MenuItems);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (plugin is IMoreMenuExtended moreMenu && moreMenu.MenuItems is not null)
|
||||
{
|
||||
InsertMoreMenu(moreMenu.MenuItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
exceptionHandler(path, ExceptionDispatchInfo.Capture(e));
|
||||
}
|
||||
}),
|
||||
DispatcherPriority.Input);
|
||||
}, DispatcherPriority.Input);
|
||||
}
|
||||
|
||||
private void ClearMoreMenuUnpin()
|
||||
|
||||
@@ -23,6 +23,8 @@ using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using Wpf.Ui.Appearance;
|
||||
using Wpf.Ui.Violeta.Appearance;
|
||||
|
||||
namespace QuickLook;
|
||||
|
||||
@@ -105,14 +107,24 @@ public partial class ViewerWindow : INotifyPropertyChanged
|
||||
if (isDark)
|
||||
{
|
||||
CurrentTheme = Themes.Dark;
|
||||
|
||||
// Update theme for QuickLook controls
|
||||
if (!Resources.MergedDictionaries.Contains(_darkDict))
|
||||
Resources.MergedDictionaries.Add(_darkDict);
|
||||
|
||||
// Update theme for WPF-UI controls
|
||||
ThemeManager.Apply(ApplicationTheme.Dark);
|
||||
}
|
||||
else
|
||||
{
|
||||
CurrentTheme = Themes.Light;
|
||||
|
||||
// Update theme for QuickLook controls
|
||||
if (Resources.MergedDictionaries.Contains(_darkDict))
|
||||
Resources.MergedDictionaries.Remove(_darkDict);
|
||||
|
||||
// Update theme for WPF-UI controls
|
||||
ThemeManager.Apply(ApplicationTheme.Light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,6 +61,8 @@ Get it from one of the following sources:
|
||||
- <kbd>Mouse Wheel</kbd> Zoom in/out (images)
|
||||
- <kbd>Ctrl</kbd>+<kbd>Mouse Wheel</kbd> Zoom in/out (PDFs)
|
||||
- <kbd>Wheel</kbd> Increase/decrease volume
|
||||
- <kbd>Left Mouse</kbd> Rotate (3D models)
|
||||
- <kbd>Middle Mouse</kbd> Pan (3D models)
|
||||
|
||||
## Plugins
|
||||
|
||||
@@ -75,6 +77,8 @@ Get it from one of the following sources:
|
||||
|
||||
Here is the complete list of plugins from [Available-Plugins](https://github.com/QL-Win/QuickLook/wiki/Available-Plugins).
|
||||
|
||||
See [here](https://github.com/QL-Win/QuickLook/wiki/Available-Plugins#how-to-install-or-upgrade-a-plugin) for instructions on how to install plugins.
|
||||
|
||||
## Supported file formats
|
||||
|
||||
See the [Supported formats](SUPPORTED_FORMATS.md)
|
||||
|
||||
Reference in New Issue
Block a user