예제 #1
0
def show_command_bar(textview, sender, args):
    """Show the command bar"""
    from editxt import app
    editor = app.find_editor_with_document_view(textview.doc_view)
    if editor is None:
        ak.NSBeep()
    else:
        editor.command.activate()
예제 #2
0
파일: textview.py 프로젝트: youngrok/editxt
 def readSelectionFromPasteboard_type_(self, pasteboard, type_):
     editor = app.find_editor_with_document_view(self.doc_view)
     if editor is not None:
         items = editor.iter_dropped_paths(pasteboard)
         parent = editor.find_project_with_document_view(self.doc_view)
         index = len(editor.projects) if parent is None else -1
         result = editor.accept_dropped_items(items, parent, index, None)
         if result: return True
     return super(TextView, self).readSelectionFromPasteboard_type_(pasteboard, type_)
예제 #3
0
파일: textview.py 프로젝트: khairy/editxt
 def readSelectionFromPasteboard_type_(self, pasteboard, type_):
     editor = app.find_editor_with_document_view(self.doc_view)
     if editor is not None:
         items = editor.iter_dropped_paths(pasteboard)
         parent = editor.find_project_with_document_view(self.doc_view)
         index = len(editor.projects) if parent is None else -1
         result = editor.accept_dropped_items(items, parent, index, None)
         if result: return True
     return super(TextView, self).readSelectionFromPasteboard_type_(
         pasteboard, type_)