Update method names called by key-press on binary widget
Since 87806105f07d the corresponding methods have been renamed in BinaryMixin. Closes #13844 (grafted from 6bb90cfd5794153f8194254fd866fffe0a57489a) --HG-- branch : 6.0
This commit is contained in:
1 parent
c2f0f9b849
commit
3d57cbe400
2 files changed
+9
-5
No files matched your search
@@ -4080,11 +4080,15 @@ function eval_pyson(value){
|
||||
key_press: function(evt) {
|
||||
var editable = !this.text.prop('readonly');
|
||||
if (evt.which == Sao.common.F3_KEYCODE && editable) {
|
||||
this.new_();
|
||||
evt.preventDefault();
|
||||
this.select();
|
||||
} else if (evt.which == Sao.common.F2_KEYCODE) {
|
||||
this.open();
|
||||
evt.preventDefault();
|
||||
if (this.filename) {
|
||||
this.open();
|
||||
} else {
|
||||
this.save_as();
|
||||
}
|
||||
}
|
||||
},
|
||||
set_value: function() {
|
||||
|
||||
@@ -182,13 +182,13 @@ class Binary(BinaryMixin, Widget):
|
||||
def sig_key_press(self, widget, event, *args):
|
||||
editable = self.wid_text and self.wid_text.get_editable()
|
||||
if event.keyval == Gdk.KEY_F3 and editable:
|
||||
self.sig_new(widget)
|
||||
self.select(widget)
|
||||
return True
|
||||
elif event.keyval == Gdk.KEY_F2:
|
||||
if self.filename:
|
||||
self.sig_open(widget)
|
||||
self.open_()
|
||||
else:
|
||||
self.sig_save_as(widget)
|
||||
self.save_as()
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in new issue
Block a user