psiutils 0.2.9__py3-none-any.whl → 0.2.11__py3-none-any.whl

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.
psiutils/__init__.py CHANGED
@@ -1,15 +0,0 @@
1
- # Dialog Status
2
- YES = True
3
- NO = False
4
- CANCEL = None
5
- NULL = 0
6
- EXIT = 1
7
- OK = 2
8
- UPDATED = 3
9
- ERROR = 4
10
-
11
- # Modes
12
- VIEW = 0
13
- NEW = 1
14
- EDIT = 2
15
- DELETE = 3
psiutils/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.2.9'
1
+ __version__ = '0.2.11'
psiutils/buttons.py CHANGED
@@ -16,8 +16,8 @@ class IconButton(ttk.Frame):
16
16
  master,
17
17
  button_text,
18
18
  icon,
19
- dimmable: bool = False,
20
19
  command=None,
20
+ dimmable: bool = False,
21
21
  sticky: str = '',
22
22
  icon_path: str = '',
23
23
  **kwargs):
@@ -48,7 +48,7 @@ class IconButton(ttk.Frame):
48
48
  def __repr__(self) -> str:
49
49
  return f'IconButton: {self.text} {self.icon}'
50
50
 
51
- def state(self) -> dict:
51
+ def state(self, *args, **kwargs) -> dict:
52
52
  return self._state
53
53
 
54
54
  def enable(self, enable: bool = True) -> None:
@@ -124,8 +124,8 @@ class ButtonFrame(ttk.Frame):
124
124
  def icon_button(
125
125
  self,
126
126
  id_: str,
127
- dimmable: bool = False,
128
- command: object = None) -> IconButton:
127
+ command: object = None,
128
+ dimmable: bool = False,) -> IconButton:
129
129
  button = self.icon_buttons[id_]
130
130
  button.dimmable = dimmable
131
131
  button.command = command
psiutils/constants.py CHANGED
@@ -1,4 +1,6 @@
1
1
  """Constants for the tkinter psiutils."""
2
+ from enum import Enum, auto
3
+
2
4
  from .utilities import invert
3
5
  from .known_paths import get_documents_dir, get_downloads_dir
4
6
 
@@ -61,5 +63,23 @@ class Pad():
61
63
  N = (PAD, 0)
62
64
  S = (0, PAD)
63
65
 
66
+
64
67
  DOCUMENTS_DIR = get_documents_dir()
65
68
  DOWNLOADS_DIR = get_downloads_dir()
69
+
70
+
71
+ class Mode(Enum):
72
+ VIEW = auto()
73
+ NEW = auto()
74
+ EDIT = auto()
75
+ DELETE = auto()
76
+
77
+ class Status(Enum):
78
+ YES = True
79
+ NO = False
80
+ CANCEL = None
81
+ NULL = 0
82
+ EXIT = 1
83
+ OK = 2
84
+ UPDATED = 3
85
+ ERROR = 4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: psiutils
3
- Version: 0.2.9
3
+ Version: 0.2.11
4
4
  Summary: Various TKinter utilities.
5
5
  Author: Jeff
6
6
  Author-email: Jeff <<jeffwatkins2000@gmail.com>>
@@ -1,10 +1,10 @@
1
- psiutils/__init__.py,sha256=B8mLHCYCnD0LcwsGAtS3HM9kYdwVnhf6dNXL6i1H4kY,145
1
+ psiutils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  psiutils/_about_frame.py,sha256=xZQivwvZc-k8C-SkwQne-dBr4gavDAL_32fv8E-7Wt0,7644
3
3
  psiutils/_logger.py,sha256=9nXxKWUyu4xqIILjTSUKRAMOG4cFy_EGJTTo0FtUAGU,2859
4
4
  psiutils/_notify.py,sha256=rGVPir7zVxDd52yt63xFFw7r_vZvusGue2BupJwECYU,266
5
- psiutils/_version.py,sha256=e5Klz6yLU-4Ub9zxGUBo9wADAYsST38ZylTv9ze4i60,21
6
- psiutils/buttons.py,sha256=38vQc6A0ub1p4GHukNQB3ICx7vi-9M4RAt-eeuDCeBg,8567
7
- psiutils/constants.py,sha256=T8AjYBkmuziAWjXgON-Sj0AM62NAGluj_Y6glrOFbHc,1107
5
+ psiutils/_version.py,sha256=MDWVRBs0IWHig-yP3jl_AM0VvBpaMmDN0nBK4Hl8Idk,22
6
+ psiutils/buttons.py,sha256=gnrEn8qk42SGf7dpdFqWlnxQFivBULlCAdeUIBeQZgE,8585
7
+ psiutils/constants.py,sha256=HUXNOy-V9zGkvWRfOFNttQlq9exFLPoRvPSAfSCeuIg,1366
8
8
  psiutils/drag_manager.py,sha256=L04GzKIinWXzGCawvTnn18F1AEt8PUPS1U-HqCVrh48,3470
9
9
  psiutils/errors.py,sha256=tAypFkpzpbeOppO9zKQimlnRVyr3sMPoiwh0yK3Yc88,562
10
10
  psiutils/icecream_init.py,sha256=ArKnRHGCyMfEwSykiHGdhBmX4JPhrgcpShii_GAPWLI,739
@@ -52,6 +52,6 @@ psiutils/text.py,sha256=HVJME2oUqeLZXCp2KaHg21vlp3CuhoP2T4T7ArqIxLs,3378
52
52
  psiutils/treeview.py,sha256=jtSzLWrnFIBDWV5YhWNRoZwgW-Kj8_7XVqZyusr-riQ,2826
53
53
  psiutils/utilities.py,sha256=bAoaYMumo0U8kz4pcPThYOY5Z3tPFe-a76Nhbwsd4lk,3005
54
54
  psiutils/widgets.py,sha256=ooGAy0IU3ct9aeqnBqMUr2AVyqg_zKHG8Fm9Gm-Wn5Y,11114
55
- psiutils-0.2.9.dist-info/WHEEL,sha256=Pi5uDq5Fdo_Rr-HD5h9BiPn9Et29Y9Sh8NhcJNnFU1c,79
56
- psiutils-0.2.9.dist-info/METADATA,sha256=IUM38p3klNNSxv4EMRMAetarPdMOnIRE2tyK2BR5M34,1976
57
- psiutils-0.2.9.dist-info/RECORD,,
55
+ psiutils-0.2.11.dist-info/WHEEL,sha256=pFCy50wRV2h7SjJ35YOsQUupaV45rMdgpNIvnXbG5bE,79
56
+ psiutils-0.2.11.dist-info/METADATA,sha256=aJ6T6L5T5Tyj__6kkoLkvivtXce8lYR0OHp2OCxmXjo,1977
57
+ psiutils-0.2.11.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.8.17
2
+ Generator: uv 0.8.19
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any