Commit 76d893eb authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko

reset-controller-mapping-dialog: Set modal programmatically

Don't set modal in xml, instead allow users to do it.

This will be required to work around a bug with GamesMessageDialog in
GTK4.
parent 79b52b9e
......@@ -2,7 +2,6 @@
<interface>
<requires lib="gtk+" version="3.24"/>
<template class="GamesResetControllerMappingDialog" parent="GtkMessageDialog">
<property name="modal">True</property>
<property name="destroy-with-parent">True</property>
<property name="type-hint">dialog</property>
<property name="message-type">question</property>
......
......@@ -180,6 +180,7 @@ private class Games.PreferencesSubpageGamepad : Gtk.Box, PreferencesSubpage {
private void reset_mapping () {
var message_dialog = new ResetControllerMappingDialog ();
message_dialog.transient_for = get_toplevel () as Gtk.Window;
message_dialog.modal = true;
message_dialog.response.connect ((response) => {
switch (response) {
case Gtk.ResponseType.ACCEPT:
......
......@@ -164,6 +164,7 @@ private class Games.PreferencesSubpageKeyboard : Gtk.Box, PreferencesSubpage {
private void reset_mapping () {
var message_dialog = new ResetControllerMappingDialog ();
message_dialog.transient_for = get_toplevel () as Gtk.Window;
message_dialog.modal = true;
message_dialog.response.connect ((response) => {
switch (response) {
case Gtk.ResponseType.ACCEPT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment