Philipp Hörist pushed to branch master at gajim / gajim
Commits:
65bc9659 by Marc Schink at 2017-12-19T22:23:27+01:00
dialogs: Use get_widget_for_response() to access buttons
The get_action_area() API is deprecated and under some circumstances
the wrong button gets accessed.
- - - - -
ed0e2dd8 by Philipp Hörist at 2017-12-20T20:45:48+01:00
Merge branch 'plain_connection_dialog_fix' into 'master'
Dialogs: Use get_widget_for_response() to access buttons
See merge request gajim/gajim!178
- - - - -
1 changed file:
- gajim/dialogs.py
Changes:
=====================================
gajim/dialogs.py
=====================================
--- a/gajim/dialogs.py
+++ b/gajim/dialogs.py
@@ -1722,7 +1722,7 @@ class ConfirmationDialogCheck(ConfirmationDialog):
self.set_default_response(Gtk.ResponseType.OK)
- ok_button = self.get_action_area().get_children()[0] # right to left
+ ok_button = self.get_widget_for_response(Gtk.ResponseType.OK)
ok_button.grab_focus()
self.checkbutton = Gtk.CheckButton.new_with_mnemonic(checktext)
@@ -1777,7 +1777,7 @@ class ConfirmationDialogDoubleCheck(ConfirmationDialog):
self.set_default_response(Gtk.ResponseType.OK)
- ok_button = self.get_action_area().get_children()[0] # right to left
+ ok_button = self.get_widget_for_response(Gtk.ResponseType.OK)
ok_button.grab_focus()
vbox = self.get_content_area()
@@ -1847,7 +1847,7 @@ class
PlainConnectionDialog(ConfirmationDialogDoubleCheck):
ConfirmationDialogDoubleCheck.__init__(self, pritext, sectext,
checktext1, checktext2, tooltip1=tooltip1, on_response_ok=on_ok,
on_response_cancel=on_cancel, is_modal=False)
- self.ok_button = self.get_action_area().get_children()[0] # right to
left
+ self.ok_button = self.get_widget_for_response(Gtk.ResponseType.OK)
self.ok_button.set_sensitive(False)
self.checkbutton1.connect('clicked', self.on_checkbutton_clicked)
self.set_title(_('Insecure connection'))
@@ -1875,7 +1875,7 @@ class ConfirmationDialogDoubleRadio(ConfirmationDialog):
self.set_default_response(Gtk.ResponseType.OK)
- ok_button = self.get_action_area().get_children()[0] # right to left
+ ok_button = self.get_widget_for_response(Gtk.ResponseType.OK)
ok_button.grab_focus()
vbox = self.get_content_area()
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/e7df2d93b6bb10cab7ec1558f0782c6709b81fac...ed0e2dd82be55f10efeafa8374562ef8407a2b12
---
View it on GitLab:
https://dev.gajim.org/gajim/gajim/compare/e7df2d93b6bb10cab7ec1558f0782c6709b81fac...ed0e2dd82be55f10efeafa8374562ef8407a2b12
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits