Beispiel #1
0
    def translate_selection_area(self):
        selection_content = commands.getoutput("xsel -p -o")
        delete_selection()

        if len(selection_content) > 1 and not selection_content.isspace():
            (mouse_x, mouse_y) = get_pointer_coordiante()
            self.translate_selection.emit(mouse_x, mouse_y, selection_content)
 def translate_selection_area(self):
     selection_content = commands.getoutput("xsel -p -o")
     delete_selection()
                         
     if len(selection_content) > 1 and not selection_content.isspace():
         (mouse_x, mouse_y) = get_pointer_coordiante()
         self.translate_selection.emit(mouse_x, mouse_y, selection_content)
 def in_translate_area(self):
     (mouse_x, mouse_y) = get_pointer_coordiante()
     return self.x() < mouse_x < self.x() + self.width() and self.y() < mouse_y < self.y() + self.height()
 def translate_cursor_word(self):
     (mouse_x, mouse_y) = get_pointer_coordiante()
     ocrword = ocr_word(mouse_x, mouse_y)
     if ocrword:
         self.show_translate(mouse_x, mouse_y, ocrword)
Beispiel #5
0
 def in_translate_area(self):
     (mouse_x, mouse_y) = get_pointer_coordiante()
     return self.x() < mouse_x < self.x() + self.width() and self.y() < mouse_y < self.y() + self.height()
Beispiel #6
0
 def translate_cursor_word(self):
     (mouse_x, mouse_y) = get_pointer_coordiante()
     ocrword = ocr_word(mouse_x, mouse_y)
     if ocrword:
         self.show_translate(mouse_x, mouse_y, ocrword)