Skip to content

Commit 8dc0ca4

Browse files
committed
Add screen recording for Linux on Wayland
Uses ScreenCast on GNOME or Spectacle on KDE; otherwise, OBS Studio or user-chosen.
1 parent 2d19e21 commit 8dc0ca4

10 files changed

Lines changed: 608 additions & 208 deletions

File tree

‎src/jobqueue.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012-2024 Meltytech, LLC
2+
* Copyright (c) 2012-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -97,6 +97,8 @@ void JobQueue::onProgressUpdated(QStandardItem *standardItem, int percent)
9797
if (percent > 2)
9898
remaining = time.toString();
9999
remaining = QStringLiteral("%1% (%2)").arg(percent).arg(remaining);
100+
} else if (percent < 0) {
101+
remaining = QTime(0, 0).addSecs(-percent).toString();
100102
}
101103
standardItem->setText(remaining);
102104
standardItem = JOBS.item(standardItem->row(), JobQueue::COLUMN_ICON);

‎src/jobs/abstractjob.cpp‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ void AbstractJob::resume()
195195
emit progressUpdated(m_item, 0);
196196
}
197197

198+
void AbstractJob::resetKilled()
199+
{
200+
m_killed = false;
201+
}
202+
198203
void AbstractJob::onFinished(int exitCode, QProcess::ExitStatus exitStatus)
199204
{
200205
const QTime &time = QTime::fromMSecsSinceStartOfDay(m_totalTime.elapsed());
@@ -254,7 +259,7 @@ void AbstractJob::onStarted()
254259
void AbstractJob::onProgressUpdated(QStandardItem *, int percent)
255260
{
256261
// Start timer on first reported percentage > 0.
257-
if (percent > 0 && (percent == 1 || m_startingPercent < 0)) {
262+
if (percent == 1 || m_startingPercent < 0) {
258263
m_estimateTime.restart();
259264
m_startingPercent = percent;
260265
}

‎src/jobs/abstractjob.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public slots:
6767
void finished(AbstractJob *job, bool isSuccess, QString failureTime = QString());
6868

6969
protected:
70+
void resetKilled();
7071
QList<QAction *> m_standardActions;
7172
QList<QAction *> m_successActions;
7273
QStandardItem *m_item;

0 commit comments

Comments
 (0)