Compare commits

...

14 commits

Author SHA1 Message Date
7a46412623 the names have to match 😉 2024-05-20 12:45:37 -04:00
Russell Keith-Magee
b023120785
Merge branch 'main' into issue-2446 2024-05-20 11:00:57 -04:00
Russell Keith-Magee
a457d89ca7
Merge pull request #2579 from beeware/dependabot/github_actions/actions/checkout-4.1.6
Bump actions/checkout from 4.1.5 to 4.1.6
2024-05-20 10:27:37 -04:00
Russell Keith-Magee
87ee7240a7
Merge pull request #2580 from beeware/autoupdates/config-files
Bump dependencies in pyproject.toml and tox.ini
2024-05-20 10:27:17 -04:00
Russell Keith-Magee
5555bc1c6e
Merge pull request #2577 from beeware/dependabot/pip/core/setuptools-scm-8.1.0
Bump setuptools-scm from 8.0.4 to 8.1.0 in /core
2024-05-20 10:26:29 -04:00
d785e859a9 add a change note 2024-05-20 10:03:39 -04:00
4b56dd8a01 gtk: set dialogs as modal
Closes: #2446
2024-05-20 09:20:39 -04:00
1a7401c98b tests: Add a test that a dialog is modal
On Gtk, actually query the toolkit's idea of modality.

On other back-ends, simply return True so that the test passes.

At this commit the test fails, because Gtk is not properly making the dialog modal.
2024-05-20 09:19:18 -04:00
dependabot[bot]
fe46897603 Add changenote. [dependabot skip] 2024-05-19 20:31:25 +00:00
Brutus (robot)
bf464c9a18 Add changenote. 2024-05-19 20:31:05 +00:00
Brutus (robot)
70b1e5a826 Bump dependencies in pyproject.toml and tox.ini 2024-05-19 20:31:01 +00:00
dependabot[bot]
88ac730bba
Bump actions/checkout from 4.1.5 to 4.1.6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.1.5...v4.1.6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-19 20:24:49 +00:00
dependabot[bot]
8317e09612 Add changenote. [dependabot skip] 2024-05-19 20:04:52 +00:00
dependabot[bot]
1a568bcc38
Bump setuptools-scm from 8.0.4 to 8.1.0 in /core
Bumps [setuptools-scm](https://github.com/pypa/setuptools_scm) from 8.0.4 to 8.1.0.
- [Release notes](https://github.com/pypa/setuptools_scm/releases)
- [Changelog](https://github.com/pypa/setuptools_scm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pypa/setuptools_scm/compare/v8.0.4...v8.1.0)

---
updated-dependencies:
- dependency-name: setuptools-scm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-19 20:04:28 +00:00
14 changed files with 26 additions and 5 deletions

View file

@ -93,7 +93,7 @@ jobs:
python-version: "3.13-dev"
steps:
- name: Checkout
uses: actions/checkout@v4.1.5
uses: actions/checkout@v4.1.6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5.1.0
@ -134,7 +134,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.5
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
@ -260,7 +260,7 @@ jobs:
sudo udevadm trigger --name-match=kvm
steps:
- name: Checkout
uses: actions/checkout@v4.1.5
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0

View file

@ -87,3 +87,6 @@ class WindowProbe(BaseProbe):
def press_toolbar_button(self, index):
self.native.onOptionsItemSelected(self._toolbar_items()[index])
def is_modal_dialog(self, dialog):
return True

1
changes/2446.bugfix.rst Normal file
View file

@ -0,0 +1 @@
Dialog windows are now properly modal when using the Gtk+ backend.

1
changes/2577.misc.rst Normal file
View file

@ -0,0 +1 @@
Updated setuptools-scm from 8.0.4 to 8.1.0 in /core.

1
changes/2579.misc.rst Normal file
View file

@ -0,0 +1 @@
Updated actions/checkout from 4.1.5 to 4.1.6.

1
changes/2580.misc.rst Normal file
View file

@ -0,0 +1 @@
The pinned dependencies in pyproject.toml and tox.ini were updated to their latest versions.

View file

@ -261,3 +261,6 @@ class WindowProbe(BaseProbe):
restype=None,
argtypes=[objc_id],
)
def is_modal_dialog(self, dialog):
return True

View file

@ -74,7 +74,7 @@ dev = [
"pytest == 8.2.0",
"pytest-asyncio == 0.23.6",
"pytest-freezer == 0.4.8",
"setuptools-scm == 8.0.4",
"setuptools-scm == 8.1.0",
"tox == 4.15.0",
# typing-extensions needed for TypeAlias added in Py 3.10
"typing-extensions == 4.9.0 ; python_version < '3.10'",

View file

@ -30,6 +30,7 @@ class MessageDialog(BaseDialog):
buttons=buttons,
text=title,
)
self.native.set_modal(True)
self.build_dialog(**kwargs)
self.native.connect("response", self.gtk_response)

View file

@ -251,3 +251,6 @@ class WindowProbe(BaseProbe):
def press_toolbar_button(self, index):
item = self.impl.native_toolbar.get_nth_item(index)
item.emit("clicked")
def is_modal_dialog(self, dialog):
return dialog.native.get_modal()

View file

@ -77,3 +77,6 @@ class WindowProbe(BaseProbe):
def has_toolbar(self):
pytest.skip("Toolbars not implemented on iOS")
def is_modal_dialog(self, dialog):
return True

View file

@ -560,6 +560,7 @@ async def test_info_dialog(main_window, main_window_probe):
"Info", "Some info", on_result=on_result_handler
)
await main_window_probe.redraw("Info dialog displayed")
assert main_window_probe.is_modal_dialog(dialog_result._impl)
await main_window_probe.close_info_dialog(dialog_result._impl)
await assert_dialog_result(main_window, dialog_result, on_result_handler, None)

View file

@ -112,7 +112,7 @@ skip_install = True
passenv = FORCE_COLOR
deps =
build==1.2.1
twine==5.0.0
twine==5.1.0
commands =
python -m build {posargs}
python -m twine check {posargs}{/}dist{/}*

View file

@ -148,3 +148,6 @@ class WindowProbe(BaseProbe):
def press_toolbar_button(self, index):
self._native_toolbar_item(index).OnClick(EventArgs.Empty)
def is_modal_dialog(self, dialog):
return True