コード例 #1
0
ファイル: g15macroeditor.py プロジェクト: tanktarta/gnome15
 def _load_key_presses(self):
     self.__key_press_model.clear()
     if self.__emit_uinput.get_active():
         for n, v in g15uinput.get_buttons(g15uinput.KEYBOARD):
             self.__key_press_model.append([n])
     else:
         for n in g15keyio.get_keysyms():
             self.__key_press_model.append([n])
コード例 #2
0
ファイル: g15macroeditor.py プロジェクト: FPar/gnome15
 def _load_key_presses(self):
     self.__key_press_model.clear()
     if self.__emit_uinput.get_active():
         for n, v in g15uinput.get_buttons(g15uinput.KEYBOARD):
             self.__key_press_model.append([n])
     else:
         for n in g15keyio.get_keysyms():
             self.__key_press_model.append([n])
コード例 #3
0
ファイル: g15macroeditor.py プロジェクト: tanktarta/gnome15
 def __load_keys(self):
     """
     Load the available keys for the selected macro type
     """
     sel_type = self.__get_selected_type()
     filter_text = self.__filter.get_text().strip().lower()
     if g15profile.is_uinput_type(sel_type):
         (model, path) = self.__uinput_tree.get_selection().get_selected()
         sel = None
         if path:
             sel = model[path][0]
         model.clear()
         found = False
         for n, v in g15uinput.get_buttons(sel_type):
             if len(filter_text) == 0 or filter_text in n.lower():
                 model.append([n, v])
                 if n == sel:
                     self.__select_tree_row(self.__uinput_tree, len(model))
                     found = True
         (model, path) = self.__uinput_tree.get_selection().get_selected()
         if not found and len(model) > 0:
             self.__select_tree_row(self.__uinput_tree, 0)
コード例 #4
0
ファイル: g15macroeditor.py プロジェクト: FPar/gnome15
 def __load_keys(self):
     """
     Load the available keys for the selected macro type
     """
     sel_type = self.__get_selected_type()
     filter_text = self.__filter.get_text().strip().lower()
     if g15profile.is_uinput_type(sel_type):
         (model, path) = self.__uinput_tree.get_selection().get_selected()
         sel = None
         if path:
             sel = model[path][0]
         model.clear()
         found = False
         for n, v in g15uinput.get_buttons(sel_type):
             if len(filter_text) == 0 or filter_text in n.lower(): 
                 model.append([n, v])
                 if n == sel:
                     self.__select_tree_row(self.__uinput_tree, len(model))
                     found  = True
         (model, path) = self.__uinput_tree.get_selection().get_selected()
         if not found and len(model) > 0:
             self.__select_tree_row(self.__uinput_tree, 0)