Changeset View
Changeset View
Standalone View
Standalone View
plugins/python/scripter/ui_scripter/actions/saveaction/saveaction.py
Context not available. | |||||
30 | self.triggered.connect(self.save) | 30 | self.triggered.connect(self.save) | ||
---|---|---|---|---|---|
31 | 31 | | |||
32 | self.setText('Save') | 32 | self.setText('Save') | ||
33 | self.setIcon(Krita.instance().icon("document-save")) | ||||
33 | self.setObjectName('save') | 34 | self.setObjectName('save') | ||
34 | self.setShortcut(QKeySequence(Qt.CTRL + Qt.Key_S)) | 35 | self.setShortcut(QKeySequence(Qt.CTRL + Qt.Key_S)) | ||
35 | 36 | | |||
Context not available. | |||||
37 | def parent(self): | 38 | def parent(self): | ||
38 | return 'File' | 39 | return 'File' | ||
39 | 40 | | |||
41 | def doAfterLoadAction(self): | ||||
42 | # add it to the main toolbar as well | ||||
43 | print("adding the save file button to the action toolbar") | ||||
44 | self.scripter.uicontroller.actionToolbar.addAction(self) | ||||
45 | | ||||
40 | def save(self): | 46 | def save(self): | ||
41 | text = self.editor.toPlainText() | 47 | text = self.editor.toPlainText() | ||
42 | fileName = '' | 48 | fileName = '' | ||
Context not available. |