Add docx and pptx

This commit is contained in:
Milan Nikolic
2024-11-02 20:16:23 +01:00
parent c0a077fcd1
commit 63013998c7
3 changed files with 4 additions and 3 deletions

View File

@@ -102,7 +102,7 @@ func isArchive(f string) bool {
// isDocument checks if file is document. // isDocument checks if file is document.
func isDocument(f string) bool { func isDocument(f string) bool {
var types = []string{".pdf", ".xps", ".epub", ".mobi"} var types = []string{".pdf", ".xps", ".epub", ".mobi", ".docx", ".pptx"}
for _, t := range types { for _, t := range types {
if strings.ToLower(filepath.Ext(f)) == t { if strings.ToLower(filepath.Ext(f)) == t {
return true return true

View File

@@ -24,7 +24,7 @@ func fileDlg(title string, multiple, directory bool) ([]string, error) {
dlg.SetAttributes(map[string]string{ dlg.SetAttributes(map[string]string{
"DIALOGTYPE": "OPEN", "DIALOGTYPE": "OPEN",
"MULTIPLEFILES": mf, "MULTIPLEFILES": mf,
"EXTFILTER": "Comic Files|*.rar;*.zip;*.7z;*.tar;*.cbr;*.cbz;*.cb7;*.cbt;*.pdf;*.epub;*.mobi;*.xps|", "EXTFILTER": "Comic Files|*.rar;*.zip;*.7z;*.tar;*.cbr;*.cbz;*.cb7;*.cbt;*.pdf;*.epub;*.mobi;*.docx;*.pptx|",
"FILTER": "*.cb*", // for Motif "FILTER": "*.cb*", // for Motif
"TITLE": title, "TITLE": title,
}) })

View File

@@ -57,7 +57,8 @@ func fileDlg(title string, multiple, directory bool) ([]string, error) {
Item{0, "*.pdf"}, Item{0, "*.pdf"},
Item{0, "*.epub"}, Item{0, "*.epub"},
Item{0, "*.mobi"}, Item{0, "*.mobi"},
Item{0, "*.xps"}, Item{0, "*.docx"},
Item{0, "*.pptx"},
}, },
}, },
} }