2022-08-10 12:42:34 +03:00
|
|
|
# showdialog
|
|
|
|
Simple module for showing GTK dialog.
|
|
|
|
|
|
|
|
## Install
|
|
|
|
```bash
|
|
|
|
pip install showdialog
|
|
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
### showdialog.show_msg(title, text, sectext, btns, msgtype)
|
|
|
|
Opens GTK MessageDialog
|
|
|
|
|
|
|
|
#### Args
|
2022-11-01 15:25:59 +03:00
|
|
|
|Name|Type|Description|Default value|
|
|
|
|
|:--:|:--:|:----------|:------:|
|
|
|
|
|title|`str`|Dialog caption|*Required*|
|
2022-11-01 15:43:06 +03:00
|
|
|
|text|`Tuple[Optional[str], bool] \| Optional[str]`|Dialog primary text, str or tuple: `(text, use_markup)`|*Required*|
|
|
|
|
|sectext|`Tuple[Optional[str], bool] \| Optional[str]`|Dialog secondary text, str or tuple|`None`|
|
2022-11-01 15:25:59 +03:00
|
|
|
|btns|`Gtk.ButtonsType`|Dialog buttons|`Gtk.ButtonsType.OK`|
|
|
|
|
|msgtype|`Gtk.MessageType`|Dialog message type|`Gtk.MessageType.INFO`|
|
2022-08-10 12:42:34 +03:00
|
|
|
|
|
|
|
#### Example:
|
|
|
|
```python
|
|
|
|
from showdialog import show_msg
|
|
|
|
show_msg(title='', text='Hello world!')
|
|
|
|
```
|