Skip to content

Commit e0ade91

Browse files
committed
Adding a few missing shortcuts in settings. Updating shortcuts for Preview, Split File, Edit Title. Added double click functions to project files. Made preview/split file dialog close with ESC key. Renamed a few menus (Split Clips -> Split File, Export Clips -> Export Files). Updated documentation with updated keyboard names and shortcuts.
1 parent a8bf042 commit e0ade91

File tree

8 files changed

+118
-41
lines changed

8 files changed

+118
-41
lines changed

‎doc/main_window.rst‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,16 @@ configure these shortcuts in the Preferences window, which is opened by selectin
116116
(On macOS, choose :guilabel:`OpenShot Video Editor→Preferences`.)
117117
Learning a few of these shortcuts can save you a bunch of time!
118118

119-
=================================== ======================= ==================== ====================
120-
Action Shortcut 1 Shortcut 2 Shortcut 3
121-
=================================== ======================= ==================== ====================
119+
=================================== ======================= ========================== ====================
120+
Action Shortcut 1 Shortcut 2 Shortcut 3
121+
=================================== ======================= ========================== ====================
122122
About OpenShot :kbd:`Ctrl+H`
123123
Add Marker :kbd:`M`
124124
Add Track :kbd:`Ctrl+Y`
125125
Add to Timeline :kbd:`Ctrl+Alt+A`
126126
Advanced View :kbd:`Alt+Shift+1`
127127
Animated Title :kbd:`Ctrl+Shift+T`
128+
Ask a Question... :kbd:`F4`
128129
Center on Playhead :kbd:`Shift+C` :kbd:`Alt+Up`
129130
Choose Profile :kbd:`Ctrl+Alt+P`
130131
Clear All Cache :kbd:`Ctrl+Shift+ESC`
@@ -135,14 +136,18 @@ Cut :kbd:`Ctrl+X`
135136
Delete Item :kbd:`Delete` :kbd:`Backspace`
136137
Delete Item (Ripple) :kbd:`Shift+Delete`
137138
Details View :kbd:`Ctrl+Page Up`
139+
Donate :kbd:`F7`
138140
Duplicate :kbd:`Ctrl+Shift+/`
139-
Edit Title :kbd:``
140-
Export Video :kbd:`Ctrl+E` :kbd:`Ctrl+M`
141+
Edit Title :kbd:`Alt+T`
142+
Export Selected Files :kbd:`Ctrl+Shift+E`
143+
Export Video / Media :kbd:`Ctrl+E` :kbd:`Ctrl+M`
141144
Fast Forward :kbd:`L`
145+
File Properties :kbd:`Alt+I` :kbd:`Alt+Double Click`
142146
Freeze View :kbd:`Ctrl+F`
143147
Fullscreen :kbd:`F11`
144148
Import Files... :kbd:`Ctrl+I`
145149
Insert Keyframe :kbd:`Alt+Shift+K`
150+
Join our Community... :kbd:`F5`
146151
Jump To End :kbd:`End`
147152
Jump To Start :kbd:`Home`
148153
Launch Tutorial :kbd:`F2`
@@ -156,14 +161,16 @@ Nudge right (5 Frames) :kbd:`Shift+Ctrl+Right`
156161
Open Help Contents :kbd:`F1`
157162
Open Project... :kbd:`Ctrl+O`
158163
Paste :kbd:`Ctrl+V`
159-
Play/Pause Toggle :kbd:`Space` :kbd:`Up` :kbd:`Down`
164+
Play/Pause Toggle :kbd:`Space` :kbd:`Up` :kbd:`Down`
160165
Preferences :kbd:`Ctrl+P`
166+
Preview File :kbd:`Alt+P` :kbd:`Double Click`
161167
Previous Frame :kbd:`Left` :kbd:`,`
162168
Previous Marker :kbd:`Ctrl+Shift+M` :kbd:`Alt+Left`
163169
Properties :kbd:`U`
164170
Quit :kbd:`Ctrl+Q`
165-
Razor Toggle :kbd:`C` :kbd:`B` :kbd:`R`
171+
Razor Toggle :kbd:`C` :kbd:`B` :kbd:`R`
166172
Redo :kbd:`Ctrl+Shift+Z`
173+
Report a Bug... :kbd:`F3`
167174
Rewind :kbd:`J`
168175
Save Current Frame :kbd:`Ctrl+Shift+Y`
169176
Save Current Frame :kbd:`Ctrl+Shift+Y`
@@ -183,16 +190,17 @@ Slice Selected: Keep Right Side :kbd:`Ctrl+L`
183190
Slice Selected: Keep Left (Ripple) :kbd:`W`
184191
Slice Selected: Keep Right (Ripple) :kbd:`Q`
185192
Snapping Toggle :kbd:`S`
186-
Split Clip... :kbd:`Shift+1`
193+
Split File :kbd:`Alt+S` :kbd:`Shift+Double Click`
187194
Thumbnail View :kbd:`Ctrl+Page Down`
188195
Title :kbd:`Ctrl+T`
189196
Transform :kbd:`Ctrl+Alt+T`
197+
Translate this Application... :kbd:`F6`
190198
Un-Freeze View :kbd:`Ctrl+Shift+F`
191199
Undo :kbd:`Ctrl+Z`
192200
View Toolbar :kbd:`Ctrl+Shift+B`
193201
Zoom In :kbd:`=` :kbd:`Ctrl+=`
194202
Zoom Out :kbd:`-` :kbd:`Ctrl+-`
195-
=================================== ======================= ==================== ====================
203+
=================================== ======================= ========================== ====================
196204

197205
Menu
198206
----

‎src/settings/_default.settings‎

Lines changed: 68 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -574,6 +574,46 @@
574574
"value": "Ctrl+H",
575575
"type": "text"
576576
},
577+
{
578+
"category": "Keyboard",
579+
"title": "Report a Bug...",
580+
"restart": false,
581+
"setting": "actionReportBug",
582+
"value": "F3",
583+
"type": "text"
584+
},
585+
{
586+
"category": "Keyboard",
587+
"title": "Ask a Question...",
588+
"restart": false,
589+
"setting": "actionAskQuestion",
590+
"value": "F4",
591+
"type": "text"
592+
},
593+
{
594+
"category": "Keyboard",
595+
"title": "Join our Community...",
596+
"restart": false,
597+
"setting": "actionDiscord",
598+
"value": "F5",
599+
"type": "text"
600+
},
601+
{
602+
"category": "Keyboard",
603+
"title": "Translate this Application...",
604+
"restart": false,
605+
"setting": "actionTranslate",
606+
"value": "F6",
607+
"type": "text"
608+
},
609+
{
610+
"category": "Keyboard",
611+
"title": "Donate",
612+
"restart": false,
613+
"setting": "actionDonate",
614+
"value": "F7",
615+
"type": "text"
616+
},
577617
{
578618
"category": "Keyboard",
579619
"title": "Add Marker",
@@ -654,6 +694,22 @@
654694
"value": "Ctrl+E | Ctrl+M",
655695
"type": "text"
656696
},
697+
{
698+
"category": "Keyboard",
699+
"title": "Export Files",
700+
"restart": false,
701+
"setting": "actionExportFiles",
702+
"value": "Ctrl+Shift+E",
703+
"type": "text"
704+
},
705+
{
706+
"category": "Keyboard",
707+
"title": "File Properties",
708+
"restart": false,
709+
"setting": "actionFile_Properties",
710+
"value": "Alt+I",
711+
"type": "text"
712+
},
657713
{
658714
"category": "Keyboard",
659715
"title": "Fullscreen",
@@ -712,10 +768,10 @@
712768
},
713769
{
714770
"category": "Keyboard",
715-
"title": "Split Clip...",
771+
"title": "Split File",
716772
"restart": false,
717-
"setting": "actionSplitClip",
718-
"value": "Shift+1",
773+
"setting": "actionSplitFile",
774+
"value": "Alt+S",
719775
"type": "text"
720776
},
721777
{
@@ -1027,7 +1083,15 @@
10271083
"title": "Edit Title",
10281084
"restart": false,
10291085
"setting": "actionEditTitle",
1030-
"value": "",
1086+
"value": "Alt+T",
1087+
"type": "text"
1088+
},
1089+
{
1090+
"category": "Keyboard",
1091+
"title": "Preview File",
1092+
"restart": false,
1093+
"setting": "actionPreview_File",
1094+
"value": "Alt+P",
10311095
"type": "text"
10321096
},
10331097
{

‎src/windows/cutting.py‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,15 +389,6 @@ def btnAddClip_clicked(self):
389389
# Reset form
390390
self.clearForm()
391391

392-
# TODO: Remove these 4 methods
393-
def accept(self):
394-
""" Ok button clicked """
395-
log.info('accept')
396-
397-
def close(self):
398-
""" Actually close window and accept dialog """
399-
log.info('close')
400-
401392
def closeEvent(self, event):
402393
log.debug('closeEvent')
403394

@@ -413,5 +404,3 @@ def closeEvent(self, event):
413404
self.clip.Close()
414405
self.r.ClearAllCache()
415406

416-
def reject(self):
417-
log.info('reject')

‎src/windows/main_window.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,9 +1821,8 @@ def actionProfile_trigger(self):
18211821
# Enable video caching
18221822
openshot.Settings.Instance().ENABLE_PLAYBACK_CACHING = True
18231823

1824-
1825-
def actionSplitClip_trigger(self):
1826-
log.debug("actionSplitClip_trigger")
1824+
def actionSplitFile_trigger(self):
1825+
log.debug("actionSplitFile_trigger")
18271826

18281827
# Loop through selected files (set 1 selected file if more than 1)
18291828
f = self.files_model.current_file()
@@ -2185,7 +2184,7 @@ def actionFile_Properties_trigger(self):
21852184
else:
21862185
log.info('File Properties Cancelled')
21872186

2188-
def actionExportClips_trigger(self):
2187+
def actionExportFiles_trigger(self):
21892188
from windows.export_clips import clipExportWindow
21902189
f = self.selected_files()
21912190
exp = clipExportWindow(export_clips_arg=f)

‎src/windows/preferences.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,9 +779,6 @@ def update_shortcut_visual_feedback(self, shortcut_map):
779779
if info['is_duplicate']:
780780
# Mark the field with red text and border for duplicates
781781
widget.setStyleSheet("color: red;")
782-
else:
783-
# Reset the widget style if the shortcut is valid
784-
widget.setStyleSheet("")
785782

786783
def closeEvent(self, event):
787784
"""Signal for closing Preferences window"""

‎src/windows/ui/main-window.ui‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -573,17 +573,17 @@
573573
<string>Save Project As...</string>
574574
</property>
575575
</action>
576-
<action name="actionExportClips">
576+
<action name="actionExportFiles">
577577
<property name="icon">
578578
<iconset theme="media-record" resource="../../../images/openshot.qrc">
579579
<!--PLACEHOLDER ICON-->
580580
<normaloff>:/icons/Humanity/actions/16/media-record.svg</normaloff>:/icons/Humanity/actions/16/media-record.svg</iconset>
581581
</property>
582582
<property name="text">
583-
<string>Export Clips</string>
583+
<string>Export Files</string>
584584
</property>
585585
<property name="toolTip">
586-
<string>Export clips to video files</string>
586+
<string>Export files</string>
587587
</property>
588588
</action>
589589
<action name="actionImportFiles">
@@ -1404,16 +1404,16 @@
14041404
<string>Remove Effect</string>
14051405
</property>
14061406
</action>
1407-
<action name="actionSplitClip">
1407+
<action name="actionSplitFile">
14081408
<property name="icon">
14091409
<iconset theme="edit-cut" resource="../../../images/openshot.qrc">
14101410
<normaloff>:/icons/Humanity/actions/16/edit-cut.svg</normaloff>:/icons/Humanity/actions/16/edit-cut.svg</iconset>
14111411
</property>
14121412
<property name="text">
1413-
<string>Split Clip...</string>
1413+
<string>Split File</string>
14141414
</property>
14151415
<property name="toolTip">
1416-
<string>Split Clip</string>
1416+
<string>Split File</string>
14171417
</property>
14181418
</action>
14191419
<action name="actionProperties">

‎src/windows/views/files_listview.py‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def contextMenuEvent(self, event):
7777

7878
menu.addAction(self.win.actionPreview_File)
7979
menu.addSeparator()
80-
menu.addAction(self.win.actionSplitClip)
81-
menu.addAction(self.win.actionExportClips)
80+
menu.addAction(self.win.actionSplitFile)
81+
menu.addAction(self.win.actionExportFiles)
8282
menu.addSeparator()
8383
menu.addAction(self.win.actionAdd_to_Timeline)
8484
menu.addAction(self.win.actionFile_Properties)
@@ -89,6 +89,16 @@ def contextMenuEvent(self, event):
8989
# Show menu
9090
menu.popup(event.globalPos())
9191

92+
def mouseDoubleClickEvent(self, event):
93+
super(FilesListView, self).mouseDoubleClickEvent(event)
94+
# Preview File, File Properties, or Split Clip (depending on Shift/Ctrl)
95+
if int(get_app().keyboardModifiers() & Qt.ShiftModifier) > 0:
96+
get_app().window.actionSplitFile.trigger()
97+
elif int(get_app().keyboardModifiers() & Qt.ControlModifier) > 0:
98+
get_app().window.actionFile_Properties.trigger()
99+
else:
100+
get_app().window.actionPreview_File.trigger()
101+
92102
def dragEnterEvent(self, event):
93103
# If dragging urls onto widget, accept
94104
if not event.mimeData().hasUrls():

‎src/windows/views/files_treeview.py‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def contextMenuEvent(self, event):
8080

8181
menu.addAction(self.win.actionPreview_File)
8282
menu.addSeparator()
83-
menu.addAction(self.win.actionSplitClip)
84-
menu.addAction(self.win.actionExportClips)
83+
menu.addAction(self.win.actionSplitFile)
84+
menu.addAction(self.win.actionExportFiles)
8585
menu.addSeparator()
8686
menu.addAction(self.win.actionAdd_to_Timeline)
8787
menu.addAction(self.win.actionFile_Properties)
@@ -92,6 +92,16 @@ def contextMenuEvent(self, event):
9292
# Show menu
9393
menu.popup(event.globalPos())
9494

95+
def mouseDoubleClickEvent(self, event):
96+
super(FilesTreeView, self).mouseDoubleClickEvent(event)
97+
# Preview File, File Properties, or Split Clip (depending on Shift/Ctrl)
98+
if int(get_app().keyboardModifiers() & Qt.ShiftModifier) > 0:
99+
get_app().window.actionSplitFile.trigger()
100+
elif int(get_app().keyboardModifiers() & Qt.ControlModifier) > 0:
101+
get_app().window.actionFile_Properties.trigger()
102+
else:
103+
get_app().window.actionPreview_File.trigger()
104+
95105
def dragEnterEvent(self, event):
96106
# If dragging urls onto widget, accept
97107
if event.mimeData().hasUrls():

0 commit comments

Comments
 (0)