CTKFileDialog-plus 1.0.0__tar.gz → 2.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTKFileDialog_plus.egg-info/PKG-INFO +72 -38
  2. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTKFileDialog_plus.egg-info/SOURCES.txt +17 -1
  3. ctkfiledialog_plus-2.0.1/CTkFileDialog/Dialog.py +25 -0
  4. ctkfiledialog_plus-2.0.1/CTkFileDialog/_functions.py +521 -0
  5. ctkfiledialog_plus-2.0.1/CTkFileDialog/_system.py +5 -0
  6. ctkfiledialog_plus-2.0.1/CTkFileDialog/core/__init__.py +13 -0
  7. ctkfiledialog_plus-2.0.1/CTkFileDialog/core/filesystem.py +97 -0
  8. ctkfiledialog_plus-2.0.1/CTkFileDialog/core/search.py +13 -0
  9. ctkfiledialog_plus-2.0.1/CTkFileDialog/core/sorting.py +41 -0
  10. ctkfiledialog_plus-2.0.1/CTkFileDialog/preview/__init__.py +4 -0
  11. ctkfiledialog_plus-2.0.1/CTkFileDialog/preview/media.py +126 -0
  12. ctkfiledialog_plus-2.0.1/CTkFileDialog/resources/__init__.py +14 -0
  13. ctkfiledialog_plus-2.0.1/CTkFileDialog/resources/icons.py +89 -0
  14. ctkfiledialog_plus-2.0.1/CTkFileDialog/system/__init__.py +4 -0
  15. ctkfiledialog_plus-1.0.0/CTkFileDialog/_system.py → ctkfiledialog_plus-2.0.1/CTkFileDialog/system/platform.py +26 -8
  16. ctkfiledialog_plus-2.0.1/CTkFileDialog/ui/__init__.py +5 -0
  17. ctkfiledialog_plus-2.0.1/CTkFileDialog/ui/default_dialog.py +1013 -0
  18. ctkfiledialog_plus-2.0.1/CTkFileDialog/ui/mini_dialog.py +454 -0
  19. ctkfiledialog_plus-2.0.1/CTkFileDialog/ui/tooltip.py +25 -0
  20. ctkfiledialog_plus-2.0.1/CTkFileDialog/utils/__init__.py +9 -0
  21. ctkfiledialog_plus-2.0.1/CTkFileDialog/utils/helpers.py +61 -0
  22. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/PKG-INFO +72 -38
  23. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/README.md +71 -37
  24. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/pyproject.toml +1 -1
  25. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/setup.py +1 -1
  26. ctkfiledialog_plus-1.0.0/CTkFileDialog/Dialog.py +0 -1535
  27. ctkfiledialog_plus-1.0.0/CTkFileDialog/_functions.py +0 -634
  28. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTKFileDialog_plus.egg-info/dependency_links.txt +0 -0
  29. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTKFileDialog_plus.egg-info/requires.txt +0 -0
  30. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTKFileDialog_plus.egg-info/top_level.txt +0 -0
  31. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/Constants/__init__.py +0 -0
  32. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/Constants/constants.py +0 -0
  33. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/__init__.py +0 -0
  34. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/_IconsMini/file.png +0 -0
  35. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/_IconsMini/folder.png +0 -0
  36. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/bash.png +0 -0
  37. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/conf.png +0 -0
  38. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/css.png +0 -0
  39. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/exe.png +0 -0
  40. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/folder.png +0 -0
  41. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/gz.png +0 -0
  42. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/html.png +0 -0
  43. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/image.png +0 -0
  44. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/ini.png +0 -0
  45. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/javascript.png +0 -0
  46. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/js.png +0 -0
  47. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/json.png +0 -0
  48. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/markdown.png +0 -0
  49. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/odt.png +0 -0
  50. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/pdf.png +0 -0
  51. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/php.png +0 -0
  52. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/python.png +0 -0
  53. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/text.png +0 -0
  54. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/CTkFileDialog/icons/video.png +0 -0
  55. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/LICENSE +0 -0
  56. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/MANIFEST.in +0 -0
  57. {ctkfiledialog_plus-1.0.0 → ctkfiledialog_plus-2.0.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: CTKFileDialog-plus
3
- Version: 1.0.0
3
+ Version: 2.0.1
4
4
  Summary: A modern file dialog for CustomTkinter
5
5
  Home-page: https://github.com/hmidani-abdelilah/CTkFileDialog-plus
6
6
  Author: abdelilah
@@ -49,25 +49,23 @@ Dynamic: requires-python
49
49
  ## 📦 Installation
50
50
 
51
51
  ```bash
52
-
53
- # Using bash
52
+ # Using bash
54
53
  git clone https://github.com/hmidani-abdelilah/CTkFileDialog-plus
55
54
  cd CTkFileDialog-plus
56
55
  python3 -m venv .venv
57
56
  source .venv/bin/activate
58
57
  pip3 install -r requirements.txt
59
58
 
60
- # On Windows
61
- git clone https://github.com/hmidani-abdelilah/CTkFileDialog-plus
59
+ # On Windows
60
+ git clone https://github.com/hmidani-abdelilah/CTkFileDialog-plus
62
61
  cd CTkFileDialog-plus
63
- python3 -m venv .venv
64
- .\.venv\Scripts\activate.ps1 # In Powershell
65
- pip3 install -r requirements.txt
66
-
67
- # Or ussing pip
62
+ python3 -m venv .venv
63
+ .\.venv\Scripts\activate.ps1 # In PowerShell
64
+ pip3 install -r requirements.txt
68
65
 
69
- python3 -m venv .venv
70
- source .venv/bin/activate # In powershell -> .\.venv\Scripts\activate.ps1
66
+ # Or using pip
67
+ python3 -m venv .venv
68
+ source .venv/bin/activate # On PowerShell use .\.venv\Scripts\activate.ps1
71
69
  pip3 install CTkFileDialog-plus
72
70
 
73
71
  ```
@@ -77,6 +75,57 @@ pip3 install CTkFileDialog-plus
77
75
 
78
76
  ---
79
77
 
78
+ ## 📁 Project structure
79
+
80
+ ```text
81
+ CTkFileDialog-plus/
82
+ ├── LICENSE # project license terms
83
+ ├── README.md # user and developer documentation
84
+ ├── requirements.txt # Python dependencies
85
+ ├── test.py # general package usage example
86
+ ├── test_save_as.py # save-as dialog regression/test example
87
+ ├── CTkFileDialog/ # package source code
88
+ │ ├── __init__.py # public package API
89
+ │ ├── _functions.py # dialog helper functions exposed to users
90
+ │ ├── _system.py # cross-platform path handling support
91
+ │ ├── Dialog.py # dialog imports and public component exports
92
+ │ ├── Constants/ # reusable package constants
93
+ │ │ ├── __init__.py
94
+ │ │ └── constants.py
95
+ │ ├── core/ # core filesystem/search/sorting logic
96
+ │ │ ├── __init__.py
97
+ │ │ ├── filesystem.py
98
+ │ │ ├── search.py
99
+ │ │ └── sorting.py
100
+ │ ├── icons/ # icon assets for the dialogs
101
+ │ │ ├── _IconsMini/
102
+ │ │ └── *.png
103
+ │ ├── preview/ # image/video preview helpers
104
+ │ │ ├── __init__.py
105
+ │ │ └── media.py
106
+ │ ├── resources/ # shared resource loading utilities
107
+ │ │ ├── __init__.py
108
+ │ │ └── icons.py
109
+ │ ├── system/ # platform-specific system utilities
110
+ │ │ ├── __init__.py
111
+ │ │ └── platform.py
112
+ │ ├── ui/ # dialog UI implementations and widgets
113
+ │ │ ├── __init__.py
114
+ │ │ ├── default_dialog.py
115
+ │ │ ├── mini_dialog.py
116
+ │ │ └── tooltip.py
117
+ │ └── utils/ # small helper utilities
118
+ │ ├── __init__.py
119
+ │ └── helpers.py
120
+ ├── Images/ # README screenshots showing light and dark themes
121
+ │ ├── MiniDialogDark.png
122
+ │ ├── MiniDialogLight.png
123
+ │ ├── NormalDialogDark.png
124
+ │ └── NormalDialogLight.png
125
+ ```
126
+
127
+ ---
128
+
80
129
  ## 🧪 Demo — All Methods
81
130
 
82
131
  ### 🗂️ Open File
@@ -327,6 +376,11 @@ def save_as_file():
327
376
  file.close()
328
377
  result_label.configure(text=f"File saved:\n{file.name}")
329
378
 
379
+ # Alternatively, asksaveasfile supports the context manager protocol:
380
+ # with asksaveasfile(autocomplete=True) as file:
381
+ # if file:
382
+ # file.write("This file was created using the demo.")
383
+
330
384
  app = ctk.CTk()
331
385
  app.title("asksaveasfile Demo")
332
386
  app.geometry("500x200")
@@ -417,28 +471,12 @@ app.mainloop()
417
471
  | `foldercreation`| Enable a "New Folder" button so the user can create folders from within the dialog (`True` by default). |
418
472
  | `defaultext` | *(`asksaveasfilename`/`asksaveasfile` only)* Extension appended to the filename if the user didn't type one (default is none). |
419
473
  | `style` | Defines the dialog style, by default it will be 'Default' but you can choose a small one ('Mini'). |
420
- | `geometry` | You define the geometry string in a tuple: Example ('NormalGM', 'MiniGeometry'). |
421
- | `title` | Define the title from the app, default will be "CTkFileDialog". |
474
+ | `geometry` | Defines the dialog size. For functions that support both styles, pass a tuple `(default_geometry, mini_geometry)`. |
475
+ | `title` | Define the title for the dialog window. Defaults to `CTkFileDialog`. |
422
476
 
423
477
 
424
478
  </div>
425
479
 
426
- ---
427
-
428
- ## 🌙 Dark Mode Preview
429
-
430
- <p align="center">
431
- <img src="https://raw.githubusercontent.com/hmidani-abdelilah/CTkFileDialog-plus/refs/heads/main/Images/NormalDialogDark.png" width="80%">
432
- </p>
433
-
434
- ## ☀️ Light Mode Preview
435
-
436
- <p align="center">
437
- <img src="https://raw.githubusercontent.com/hmidani-abdelilah/CTkFileDialog-plus/refs/heads/main/Images/NormalDialogLight.png" width="80%">
438
- </p>
439
-
440
- ---
441
-
442
480
  ## 🎯 Using New Features
443
481
 
444
482
  ### 🔎 Search/Filter Files
@@ -509,22 +547,18 @@ root.mainloop()
509
547
 
510
548
  </div>
511
549
 
512
- ---
513
-
514
- ## Mini Dialog
515
-
516
- This is a parameter of the file dialog, but it's more powerful than the default one. As I mentioned earlier, it doesn't support parameters like tooltip, preview_img, or video_preview.
550
+ ---
517
551
 
518
552
  ## 🌙 Dark Mode Preview
519
553
 
520
554
  <p align="center">
521
- <img src="https://raw.githubusercontent.com/hmidani-abdelilah/CTkFileDialog-plus/refs/heads/main/Images/MiniDialogDark.png" width="80%">
555
+ <img src="https://raw.githubusercontent.com/hmidani-abdelilah/CTkFileDialog-plus/refs/heads/main/Images/NormalDialogDark.png" width="80%">
522
556
  </p>
523
557
 
524
558
  ## ☀️ Light Mode Preview
525
559
 
526
560
  <p align="center">
527
- <img src="https://raw.githubusercontent.com/hmidani-abdelilah/CTkFileDialog-plus/refs/heads/main/Images/MiniDialogLight.png" width="80%">
561
+ <img src="https://raw.githubusercontent.com/hmidani-abdelilah/CTkFileDialog-plus/refs/heads/main/Images/NormalDialogLight.png" width="80%">
528
562
  </p>
529
563
 
530
- The mini design created by [user](https://github.com/limafresh), and the default design created by [user](https://github.com/SelfDreamer) and all credit goes to them. I also want to thank them for creating that design in advance.
564
+ ---
@@ -14,6 +14,10 @@ CTkFileDialog/_functions.py
14
14
  CTkFileDialog/_system.py
15
15
  CTkFileDialog/Constants/__init__.py
16
16
  CTkFileDialog/Constants/constants.py
17
+ CTkFileDialog/core/__init__.py
18
+ CTkFileDialog/core/filesystem.py
19
+ CTkFileDialog/core/search.py
20
+ CTkFileDialog/core/sorting.py
17
21
  CTkFileDialog/icons/bash.png
18
22
  CTkFileDialog/icons/conf.png
19
23
  CTkFileDialog/icons/css.png
@@ -34,4 +38,16 @@ CTkFileDialog/icons/python.png
34
38
  CTkFileDialog/icons/text.png
35
39
  CTkFileDialog/icons/video.png
36
40
  CTkFileDialog/icons/_IconsMini/file.png
37
- CTkFileDialog/icons/_IconsMini/folder.png
41
+ CTkFileDialog/icons/_IconsMini/folder.png
42
+ CTkFileDialog/preview/__init__.py
43
+ CTkFileDialog/preview/media.py
44
+ CTkFileDialog/resources/__init__.py
45
+ CTkFileDialog/resources/icons.py
46
+ CTkFileDialog/system/__init__.py
47
+ CTkFileDialog/system/platform.py
48
+ CTkFileDialog/ui/__init__.py
49
+ CTkFileDialog/ui/default_dialog.py
50
+ CTkFileDialog/ui/mini_dialog.py
51
+ CTkFileDialog/ui/tooltip.py
52
+ CTkFileDialog/utils/__init__.py
53
+ CTkFileDialog/utils/helpers.py
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env python
2
+ """Backward-compatibility shim.
3
+
4
+ Historically all dialog classes lived in this module. They have been
5
+ moved to ``CTkFileDialog.ui``. This file re-exports the public names so
6
+ any external ``from CTkFileDialog.Dialog import _DrawApp`` continues to
7
+ work.
8
+ """
9
+ from .ui.default_dialog import DrawApp, _DrawApp
10
+ from .ui.mini_dialog import MiniDialog, _MiniDialog
11
+ from .ui.tooltip import CustomToolTip
12
+ from .system.platform import System as _System
13
+
14
+ # Historical private name
15
+ _CustomToolTip = CustomToolTip
16
+
17
+ __all__ = [
18
+ "DrawApp",
19
+ "_DrawApp",
20
+ "MiniDialog",
21
+ "_MiniDialog",
22
+ "CustomToolTip",
23
+ "_CustomToolTip",
24
+ "_System",
25
+ ]