Skip to content

Commit 0739a85

Browse files
authored
Merge branch 'develop' into code-tidying
2 parents 067807f + d7db9f0 commit 0739a85

39 files changed

+620
-333
lines changed

.github/stale.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 180
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 10
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
- enhancement
10+
# Label to use when marking an issue as stale
11+
staleLabel: stale
12+
# Comment to post when marking an issue as stale. Set to `false` to disable
13+
markComment: |
14+
Thank you so much for submitting an issue to help improve OpenShot Video Editor. We are sorry about this, but this particular issue has gone unnoticed for quite some time. To help keep the OpenShot GitHub Issue Tracker organized and focused, we must ensure that every issue is correctly labelled and triaged, to get the proper attention.
15+
16+
This issue will be closed, as it meets the following criteria:
17+
- No activity in the past 180 days
18+
- No one is assigned to this issue
19+
20+
We'd like to ask you to help us out and determine whether this issue should be reopened.
21+
- If this issue is reporting a bug, please can you attempt to reproduce on the [latest daily build](https://www.openshot.org/download/#daily) to help us to understand whether the bug still needs our attention.
22+
- If this issue is proposing a new feature, please can you verify whether the feature proposal is still relevant.
23+
24+
Thanks again for your help!
25+
# Comment to post when closing a stale issue. Set to `false` to disable
26+
closeComment: false
27+
# Only close issues
28+
only: issues
29+
# Don't close issues which are assigned to somebody
30+
exemptAssignees: true

installer/build-server.py

+31-10
Original file line numberDiff line numberDiff line change
@@ -327,46 +327,67 @@ def parse_version_info(version_path):
327327
# Recursively create AppDir /usr folder
328328
os.makedirs(os.path.join(app_dir_path, "usr"), exist_ok=True)
329329

330+
# XDG Freedesktop icon paths
331+
icons = [ ("scalable", os.path.join(PATH, "xdg", "openshot-qt.svg")),
332+
("64x64", os.path.join(PATH, "xdg", "icon", "64", "openshot-qt.png")),
333+
("128x128", os.path.join(PATH, "xdg", "icon", "128", "openshot-qt.png")),
334+
("256x256", os.path.join(PATH, "xdg", "icon", "256", "openshot-qt.png")),
335+
("512x512", os.path.join(PATH, "xdg", "icon", "512", "openshot-qt.png")),
336+
]
337+
338+
# Copy desktop icons
339+
icon_theme_path = os.path.join(app_dir_path, "usr", "share", "icons", "hicolor")
340+
341+
# Copy each icon
342+
for icon_size, icon_path in icons:
343+
dest_icon_path = os.path.join(icon_theme_path, icon_size, "apps", os.path.split(icon_path)[-1])
344+
os.makedirs(os.path.split(dest_icon_path)[0], exist_ok=True)
345+
shutil.copyfile(icon_path, dest_icon_path)
346+
347+
# Install .DirIcon AppImage icon (256x256)
348+
# See: https://docs.appimage.org/reference/appdir.html
349+
shutil.copyfile(icons[3][1], os.path.join(app_dir_path, ".DirIcon"))
350+
330351
# Install program icon
331-
shutil.copyfile(os.path.join(PATH, "xdg", "openshot-qt.svg"),
332-
os.path.join(app_dir_path, "openshot-qt.svg"))
352+
shutil.copyfile(icons[0][1], os.path.join(app_dir_path, "openshot-qt.svg"))
333353

334354
dest = os.path.join(app_dir_path, "usr", "share", "pixmaps")
335355
os.makedirs(dest, exist_ok=True)
336356

337-
shutil.copyfile(os.path.join(PATH, "xdg", "openshot-qt.svg"),
338-
os.path.join(dest, "openshot-qt.svg"))
357+
# Copy pixmaps (as a 64x64 PNG & SVG)
358+
shutil.copyfile(icons[0][1], os.path.join(dest, "openshot-qt.svg"))
359+
shutil.copyfile(icons[1][1], os.path.join(dest, "openshot-qt.png"))
339360

340361
# Install MIME handler
341362
dest = os.path.join(app_dir_path, "usr", "share", "mime", "packages")
342363
os.makedirs(dest, exist_ok=True)
343364

344365
shutil.copyfile(os.path.join(PATH, "xdg", "org.openshot.OpenShot.xml"),
345-
os.path.join(dest, "org.openshot.OpenShot.xml"))
366+
os.path.join(dest, "openshot-qt.xml"))
346367

347368
# Copy the entire frozen app
348369
shutil.copytree(os.path.join(PATH, "build", exe_dir),
349370
os.path.join(app_dir_path, "usr", "bin"))
350371

351372
# Copy .desktop file, replacing Exec= commandline
352373
desk_in = os.path.join(PATH, "xdg", "org.openshot.OpenShot.desktop")
353-
desk_out = os.path.join(app_dir_path, "org.openshot.OpenShot.desktop")
374+
desk_out = os.path.join(app_dir_path, "openshot-qt.desktop")
354375
with open(desk_in, "r") as inf, open(desk_out, "w") as outf:
355376
for line in inf:
356377
if line.startswith("Exec="):
357-
outf.write("Exec=openshot-qt.wrapper %F\n")
378+
outf.write("Exec=openshot-qt-launch.wrapper %F\n")
358379
else:
359380
outf.write(line)
360381

361382
# Copy desktop integration wrapper (prompts users to install shortcut)
362383
launcher_path = os.path.join(app_dir_path, "usr", "bin", "openshot-qt-launch")
363384
os.rename(os.path.join(app_dir_path, "usr", "bin", "launch-linux.sh"), launcher_path)
364-
desktop_wrapper = os.path.join(app_dir_path, "usr", "bin", "openshot-qt.wrapper")
385+
desktop_wrapper = os.path.join(app_dir_path, "usr", "bin", "openshot-qt-launch.wrapper")
365386
shutil.copyfile("/home/ubuntu/apps/AppImageKit/desktopintegration", desktop_wrapper)
366387

367-
# Create symlink for AppRun
388+
# Create AppRun.64 file (the real one)
368389
app_run_path = os.path.join(app_dir_path, "AppRun")
369-
os.symlink(os.path.relpath(launcher_path, app_dir_path), app_run_path)
390+
shutil.copyfile("/home/ubuntu/apps/AppImageKit/AppRun", app_run_path)
370391

371392
# Add execute bit to file mode for AppRun and scripts
372393
st = os.stat(app_run_path)

src/classes/time_parts.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ def timecodeToSeconds(time_code="00:00:00:00", fps_num=30, fps_den=1):
6767
seconds = (hours * 60 * 60) + (mins * 60) + secs + (frames / fps_float)
6868
return seconds
6969

70-
def secondsToTimecode(time_in_seconds=0.0, fps_num=30, fps_den=1):
70+
def secondsToTimecode(time_in_seconds=0.0, fps_num=30, fps_den=1, use_milliseconds=False):
7171
"""Return a formatted time code HH:MM:SS:FRAME"""
72-
return "%(hour)s:%(min)s:%(sec)s:%(frame)s" % secondsToTime(time_in_seconds, fps_num, fps_den)
72+
if use_milliseconds:
73+
return "%(hour)s:%(min)s:%(sec)s:%(milli)s" % secondsToTime(time_in_seconds, fps_num, fps_den)
74+
return "%(hour)s:%(min)s:%(sec)s:%(frame)s" % secondsToTime(time_in_seconds, fps_num, fps_den)

src/effects/icons/bars.png

382 Bytes
Loading

src/effects/icons/blur.png

3.23 KB
Loading

src/effects/icons/brightness.png

2.14 KB
Loading

src/effects/icons/caption.png

20.6 KB
Loading

src/effects/icons/chromakey.png

688 Bytes
Loading

src/effects/icons/colorshift.png

1.86 KB
Loading

src/effects/icons/crop.png

6.05 KB
Loading

src/effects/icons/deinterlace.png

14.8 KB
Loading

src/effects/icons/hue.png

2.08 KB
Loading

src/effects/icons/mask.png

1.98 KB
Loading

src/effects/icons/negate.png

2.34 KB
Loading

src/effects/icons/objectdetector.png

17 KB
Loading

src/effects/icons/pixelate.png

4.58 KB
Loading

src/effects/icons/saturation.png

2.73 KB
Loading

src/effects/icons/shift.png

1.9 KB
Loading

src/effects/icons/stabilizer.png

21 KB
Loading

src/effects/icons/tracker.png

19.8 KB
Loading

src/effects/icons/wave.png

308 Bytes
Loading

src/settings/_default.settings

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@
7878
"setting": "title_editor"
7979
},
8080
{
81-
"value": "AAAA/wAAAAD9AAAAAwAAAAAAAAEnAAAC3/wCAAAAAvwAAAJeAAAApwAAAAAA////+gAAAAACAAAAAfsAAAAYAGQAbwBjAGsASwBlAHkAZgByAGEAbQBlAAAAAAD/////AAAAAAAAAAD7AAAAHABkAG8AYwBrAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAJwAAAt8AAACnAP///wAAAAEAAAEcAAABQPwCAAAAAfsAAAAYAGQAbwBjAGsASwBlAHkAZgByAGEAbQBlAQAAAVgAAAAVAAAAAAAAAAAAAAACAAAERgAAAtj8AQAAAAH8AAAAAAAABEYAAAD6AP////wCAAAAAvwAAAAnAAABwAAAALQA/////AEAAAAC/AAAAAAAAAFcAAAAewD////6AAAAAAIAAAAD+wAAABIAZABvAGMAawBGAGkAbABlAHMBAAAAAP////8AAACYAP////sAAAAeAGQAbwBjAGsAVAByAGEAbgBzAGkAdABpAG8AbgBzAQAAAAD/////AAAAmAD////7AAAAFgBkAG8AYwBrAEUAZgBmAGUAYwB0AHMBAAAAAP////8AAACYAP////sAAAASAGQAbwBjAGsAVgBpAGQAZQBvAQAAAWIAAALkAAAARwD////7AAAAGABkAG8AYwBrAFQAaQBtAGUAbABpAG4AZQEAAAHtAAABEgAAAJYA////AAAERgAAAAEAAAABAAAAAgAAAAEAAAAC/AAAAAEAAAACAAAAAQAAAA4AdABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA",
81+
"value": "AAAA/wAAAAD9AAAAAwAAAAAAAAEnAAAC3/wCAAAAA/wAAAJeAAAApwAAAAAA////+gAAAAACAAAAAfsAAAAYAGQAbwBjAGsASwBlAHkAZgByAGEAbQBlAAAAAAD/////AAAAAAAAAAD7AAAAHABkAG8AYwBrAFAAcgBvAHAAZQByAHQAaQBlAHMAAAAAJwAAAt8AAAChAP////sAAAAYAGQAbwBjAGsAVAB1AHQAbwByAGkAYQBsAgAAAAAAAAAAAAAAyAAAAGQAAAABAAABHAAAAUD8AgAAAAH7AAAAGABkAG8AYwBrAEsAZQB5AGYAcgBhAG0AZQEAAAFYAAAAFQAAAAAAAAAAAAAAAgAABEYAAALY/AEAAAAC/AAAAAAAAANnAAAA+gD////8AgAAAAL8AAAAJwAAAcAAAACvAP////wBAAAAAvwAAAAAAAABFQAAAHsA////+gAAAAACAAAAA/sAAAASAGQAbwBjAGsARgBpAGwAZQBzAQAAAAD/////AAAAkgD////7AAAAHgBkAG8AYwBrAFQAcgBhAG4AcwBpAHQAaQBvAG4AcwEAAAAA/////wAAAJIA////+wAAABYAZABvAGMAawBFAGYAZgBlAGMAdABzAQAAAAD/////AAAAkgD////7AAAAEgBkAG8AYwBrAFYAaQBkAGUAbwEAAAEbAAACTAAAAEcA////+wAAABgAZABvAGMAawBUAGkAbQBlAGwAaQBuAGUBAAAB7QAAARIAAACWAP////wAAANtAAAA2QAAAIIA////+gAAAAECAAAAAvsAAAAiAGQAbwBjAGsAQwBhAHAAdABpAG8AbgBFAGQAaQB0AG8AcgAAAAAA/////wAAAJgA////+wAAABQAZABvAGMAawBFAG0AbwBqAGkAcwEAAADFAAACOgAAAJIA////AAAERgAAAAEAAAABAAAAAgAAAAEAAAAC/AAAAAEAAAACAAAAAQAAAA4AdABvAG8AbABCAGEAcgEAAAAA/////wAAAAAAAAAA",
8282
"title": "",
8383
"type": "hidden",
8484
"category": "Qt",
8585
"setting": "window_state_v2"
8686
},
8787
{
88-
"value": "AdnQywACAAAAAABWAAAAMwAABJsAAANqAAAAVgAAAE8AAASbAAADagAAAAAAAAAAB4A=",
88+
"value": "AdnQywACAAAAAAGbAAAAcQAABeAAAAOoAAABmwAAAI0AAAXgAAADqAAAAAAAAAAAB4A=",
8989
"title": "",
9090
"type": "hidden",
9191
"category": "Qt",
@@ -939,7 +939,7 @@
939939
"type": "text"
940940
},
941941
{
942-
"value": false,
942+
"value": true,
943943
"title": "Auto-Transform Selection",
944944
"type": "bool",
945945
"category": "General",

src/windows/add_to_timeline.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class AddToTimeline(QDialog):
5050

5151
ui_path = os.path.join(info.PATH, 'windows', 'ui', 'add-to-timeline.ui')
5252

53-
def btnMoveUpClicked(self, event):
53+
def btnMoveUpClicked(self, checked):
5454
"""Callback for move up button click"""
5555
log.info("btnMoveUpClicked")
5656

@@ -79,7 +79,7 @@ def btnMoveUpClicked(self, event):
7979
idx = self.treeFiles.timeline_model.model.index(new_index, 0)
8080
self.treeFiles.setCurrentIndex(idx)
8181

82-
def btnMoveDownClicked(self, event):
82+
def btnMoveDownClicked(self, checked):
8383
"""Callback for move up button click"""
8484
log.info("btnMoveDownClicked")
8585

@@ -108,7 +108,7 @@ def btnMoveDownClicked(self, event):
108108
idx = self.treeFiles.timeline_model.model.index(new_index, 0)
109109
self.treeFiles.setCurrentIndex(idx)
110110

111-
def btnShuffleClicked(self, event):
111+
def btnShuffleClicked(self, checked):
112112
"""Callback for move up button click"""
113113
log.info("btnShuffleClicked")
114114

@@ -118,7 +118,7 @@ def btnShuffleClicked(self, event):
118118
# Refresh tree
119119
self.treeFiles.refresh_view()
120120

121-
def btnRemoveClicked(self, event):
121+
def btnRemoveClicked(self, checked):
122122
"""Callback for move up button click"""
123123
log.info("btnRemoveClicked")
124124

src/windows/cutting.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,8 @@ def close(self):
360360
log.info('close')
361361

362362
def closeEvent(self, event):
363-
log.info('closeEvent')
363+
log.debug('closeEvent')
364+
event.accept()
364365

365366
# Stop playback
366367
self.preview_parent.worker.Stop()

0 commit comments

Comments
 (0)