Skip to content

Commit

Permalink
feat: add "All files" option for browsing certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
thegamecracks committed Mar 24, 2024
1 parent 1dfeca3 commit c2262a9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/dumdum/client/connect_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from tkinter.ttk import Button, Checkbutton, Entry, Frame, Label

from .app import TkApp
from .file_entry import SSL_CERTIFICATE_FILETYPES, FileEntry
from .file_entry import ALL_FILETYPE, SSL_CERTIFICATE_FILETYPE, FileEntry

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -47,7 +47,7 @@ def __init__(self, app: TkApp):
text="Certificate (Optional):",
browse_kwargs={
"title": "Use Certificate File",
"filetypes": SSL_CERTIFICATE_FILETYPES,
"filetypes": [SSL_CERTIFICATE_FILETYPE, ALL_FILETYPE],
},
)
self.ssl_cert.grid(row=2, column=1, padx=(15, 0), sticky="ew")
Expand Down
11 changes: 5 additions & 6 deletions src/dumdum/client/file_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
from tkinter.ttk import Button, Entry, Frame, Label
from typing import Any

SSL_CERTIFICATE_FILETYPES = [
(
"SSL Certificate",
("*.pem", "*.crt", "*.ca-bundle", "*.cer"),
),
]
ALL_FILETYPE = ("All files", ("*",))
SSL_CERTIFICATE_FILETYPE = (
"SSL Certificate",
("*.pem", "*.crt", "*.ca-bundle", "*.cer"),
)


class FileEntry(Frame):
Expand Down

0 comments on commit c2262a9

Please sign in to comment.