Don't hardcode gtk.main_quit() in inscript.py.
This commit is contained in:
		@ -87,6 +87,7 @@ class Keyboard(gobject.GObject):
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    def __init__(self, client_name, map_path, kbd_path):
 | 
			
		||||
        super(Keyboard, self).__init__()
 | 
			
		||||
        self.__keyboard = self.__create_keyboard(map_path, kbd_path)
 | 
			
		||||
        self.__eekboard = eekboard.Eekboard()
 | 
			
		||||
        self.__context = self.__eekboard.create_context(client_name)
 | 
			
		||||
@ -149,13 +150,11 @@ class Keyboard(gobject.GObject):
 | 
			
		||||
        return keyboard
 | 
			
		||||
 | 
			
		||||
    def __destroyed_cb(self, *args):
 | 
			
		||||
        # self.emit('quit')
 | 
			
		||||
        gtk.main_quit()
 | 
			
		||||
        self.emit('quit')
 | 
			
		||||
 | 
			
		||||
    def __notify_keyboard_visible_cb(self, obj, pspec):
 | 
			
		||||
        if not obj.get_property(pspec.name):
 | 
			
		||||
            # self.emit('quit')
 | 
			
		||||
            gtk.main_quit()
 | 
			
		||||
            self.emit('quit')
 | 
			
		||||
 | 
			
		||||
    def enable(self):
 | 
			
		||||
        self.__eekboard.push_context(self.__context)
 | 
			
		||||
 | 
			
		||||
@ -42,6 +42,7 @@ if not os.path.exists(kbd_path):
 | 
			
		||||
    exit(1)
 | 
			
		||||
 | 
			
		||||
keyboard = inscript.Keyboard("eekboard-inscript", map_path, kbd_path)
 | 
			
		||||
keyboard.connect('quit', lambda *args: gtk.main_quit())
 | 
			
		||||
keyboard.set_group(1)
 | 
			
		||||
keyboard.enable()
 | 
			
		||||
keyboard.show()
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user