Entry test: Add Terminal input purpose
This commit is contained in:
@ -6,6 +6,12 @@ gi.require_version('Gtk', '3.0')
|
|||||||
|
|
||||||
from gi.repository import Gtk
|
from gi.repository import Gtk
|
||||||
|
|
||||||
|
try:
|
||||||
|
terminal = [("Terminal", Gtk.InputPurpose.TERMINAL)]
|
||||||
|
except AttributeError:
|
||||||
|
print("Terminal purpose not available on this GTK version", file=sys.stderr)
|
||||||
|
terminal = []
|
||||||
|
|
||||||
class App(Gtk.Application):
|
class App(Gtk.Application):
|
||||||
|
|
||||||
purposes = [
|
purposes = [
|
||||||
@ -18,8 +24,8 @@ class App(Gtk.Application):
|
|||||||
("E-mail", Gtk.InputPurpose.EMAIL),
|
("E-mail", Gtk.InputPurpose.EMAIL),
|
||||||
("Name", Gtk.InputPurpose.NAME),
|
("Name", Gtk.InputPurpose.NAME),
|
||||||
("Password", Gtk.InputPurpose.PASSWORD),
|
("Password", Gtk.InputPurpose.PASSWORD),
|
||||||
("PIN", Gtk.InputPurpose.PIN)
|
("PIN", Gtk.InputPurpose.PIN),
|
||||||
]
|
] + terminal
|
||||||
|
|
||||||
def do_activate(self):
|
def do_activate(self):
|
||||||
w = Gtk.ApplicationWindow(application=self)
|
w = Gtk.ApplicationWindow(application=self)
|
||||||
|
|||||||
Reference in New Issue
Block a user