Commit graph

526 commits

Author SHA1 Message Date
Ivailo Monev
5e4e0c83e2 kutils: minor KArchive documentation correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-24 13:03:20 +02:00
Ivailo Monev
c29fc4dca1 kutils: test KCompressor and KDecompressor with empty data
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-24 12:59:19 +02:00
Ivailo Monev
4c16e7c0d5 kutils: recursively remove/extract when paths contain directory
this also makes it match the behaviour of KArchive::add() which recurses
into directories and adds the files that the specified directory holds

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-24 01:56:21 +02:00
Ivailo Monev
02c945a3ca kutils: plug file descriptor leak in case the output filepath is not a regular file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 19:42:47 +02:00
Ivailo Monev
d5e9d695df kutils: do not stop the player from KMediaWidget destructor
the state is saved before terminating MPV and that may require the player
to be playing (not paused or stopped)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 17:46:55 +02:00
Ivailo Monev
d19d80431b kutils: stop the volume effect from KMediaWidget::setVolume()
the effect duration is 3sec but the user may change the volume meanwhile
via the volume widget

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-23 17:21:44 +02:00
Ivailo Monev
81ac307c68 kutils: move some KArchive MIME types from the writable to the readable list
side note: `bsdtar` creates archives with the MIME type extension as
application/x-tar even if the extension is not recognized by libarchive
(i.e. autodetection fails but it proccedes anyway)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-22 01:57:19 +02:00
Ivailo Monev
ece9331d4b kutils: KArchive documentation correction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-21 00:49:54 +02:00
Ivailo Monev
45110ac273 kutils: remove the temporary archive if error occurs in KArchive::add() and KArchive::remove()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-20 10:56:10 +02:00
Ivailo Monev
3298200d40 kutils: new getter and setter for the temporary KArchive prefix
to be used by ark

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-19 18:01:51 +02:00
Ivailo Monev
60c0b58b3a kutils: add reference for the CPU governors
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 21:29:52 +02:00
Ivailo Monev
feae165d4f kutils: warn when power management is not supported
if it is not supported then one (or more) CPU governors required by
KPowerManager are not enabled or the host is not Linux

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 20:07:52 +02:00
Ivailo Monev
b778766af2 kutils: map some CPU governors for the KPowerManager PowerSave profile
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 16:19:25 +00:00
Ivailo Monev
4dbb501d25 generic: drop text-to-speech support
Katana (or any interface designed around key and mouse events) is not
for blind people, trying to slap text-to-speech on top of it was the
wrong thing to do to begin with

side note: speech-dispatcher tends to hang if the output device is not
configured properly (i.e. editing /etc/speech-dispatcher/speechd.conf
manually)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-18 15:56:59 +02:00
Ivailo Monev
b8d4eacdfd kutils: enable the KMediaWidget position slider and play button on loaded() signal
the seekable property of MPV is not be valid until load, also a path may be
loaded via KMediaWidget::player()->load()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-16 21:17:47 +02:00
Ivailo Monev
589c3ca009 kutils: change the slider position before load() in KMediaWidget::open()
fixes rare runtime warning about seek command failure. the proper thing
to do is close, wait for close to happen, set slider position, load and
continue the event cycle but that's too complicated when buffering is not
expected to happen on seek (i.e. when a file from the hard-disk is
currently loaded)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-14 22:09:23 +02:00
Ivailo Monev
b38a3f8b41 kutils: fake seek to start when re-opening path from KMediaWidget::open()
the event for the position update may be in queue and received after
load()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-14 21:46:41 +02:00
Ivailo Monev
6ab1b28de5 Merge branch 'master' of https://scm.osdn.net/gitroot/kde/kdelibs 2022-12-14 19:42:34 +02:00
Ivailo Monev
06c1b9dda8 kutils: correct disconnection in KAudioPlayerModule::_removeFinished()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-14 19:42:18 +02:00
Ivailo Monev
de4c9f1d6a kioslave: add disabled curl_easy_setopt() to http KIO slave
for debugging connection issues

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-14 14:26:50 +02:00
Ivailo Monev
6adc4fcaea kutils: increase the KDecompressor buffer size increment to 1MB
speeds up loading of large gzip-compressed files for example

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-14 09:54:10 +02:00
Ivailo Monev
a9c334844d kutils: reserve space for the metadata items from KExiv2::metadata()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-14 01:11:33 +02:00
Ivailo Monev
90c57ada83 kdecore: unregister the helper service and object from KAuthorization destructor
I should (ab)use the object name for more things

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-12 08:19:15 +02:00
Ivailo Monev
7ba06852a7 kutils: add TODO for KMediaWidget
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 13:20:56 +02:00
Ivailo Monev
00d47751c1 kutils: set the position to zero when the player finishes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-08 13:02:01 +02:00
Ivailo Monev
a0254bdc68 kutils: set KMediaWidget position independant of the value
now it works as expected when the arrow keys are pressed or when its
position is changed by clicking while having the mouse cursor on either
side of the current position

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 11:35:07 +02:00
Ivailo Monev
df1263c847 kutils: UIC warning fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-06 00:13:40 +02:00
Ivailo Monev
bd2231fdd6 kutils: use only the width as condition for showing the play button text
the height does not affect the position slider size

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-02 07:11:10 +02:00
Ivailo Monev
0cdb519ddc kutils: poll for state changes even if org.freedesktop.login1 interface is used
the state is tracked anyway and now the code path for both is the same

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-02 06:14:30 +02:00
Ivailo Monev
84f426d37f kutils: include kpasswdstore library directories
fixes bootstrap build

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-02 02:50:59 +02:00
Ivailo Monev
eb94c30c11 kutils: const-ify variable in KMediaWidget::dropEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-01 02:53:06 +02:00
Ivailo Monev
d6d17d194c kutils: use KMessageBox for the drop event error
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-12-01 02:51:54 +02:00
Ivailo Monev
d359858513 kutils: correct default value for widgetStyle
is keramik v3.x style?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 08:39:37 +02:00
Ivailo Monev
806b06db55 kutils: update org.freedesktop.ScreenSaver interface file used by kidletime
those methods were not implemented and were removed

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 04:58:11 +02:00
Ivailo Monev
bdccbb1709 generic: implement hybrid suspend/sleep method
marking as extension because it was not implemented before and the FDO
spec is dead (i.e. not a spec anymore), may or may not work with other
power managers implementing the interface (org.freedesktop.PowerManagement)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-30 02:14:44 +02:00
Ivailo Monev
f744763fcd kutils: update the play button from KMediaWidget::setPlay()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 07:27:07 +02:00
Ivailo Monev
a735d4ee3b kutils: remove TODO related to KMediaWidget
don't have to restore the position from KMediaWidget itself

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 07:26:42 +02:00
Ivailo Monev
22755ffef1 kutils: drop the fullscreen option of the media widget
that nasty hack was working like a charm tho. oh, well..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 07:08:27 +02:00
Ivailo Monev
8c1a5d300a kutils: invert the meaning of the KMediaWidget::setPlay() argument
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 06:54:53 +02:00
Ivailo Monev
238f9c37bc kutils: drop the hidden controls option
it is very tricky to do it correctly, especially with KMainWindow and the
like doing their thing with menu/status bars

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 06:20:37 +02:00
Ivailo Monev
7408c3b692 kutils: de-duplicate KAbstractPlayer code
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 06:03:56 +02:00
Ivailo Monev
12a58a3ee0 kutils: media classes debug and warning messages review
some of them were wrapped in i18n() macro with the idea to use some of them
in errorString() getter to report MPV initialization failure for example
but I do not think I will implement that (not that there is error(QString)
signal for reporting MPV failure after its initialization)

the debug messages are also quite spammy (because of time-pos property
changing constantly while playing for example), i.e. don't enable them
unless you have good reason for that because multiple media classes
instances can quickly fill your ~/.xsession-errors with lots of messages

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 02:22:04 +02:00
Ivailo Monev
7f4e028fb6 kutils: do not observe loadfile property
altought it is a command an event it send for it but the property is not
used by the media classes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 02:09:40 +02:00
Ivailo Monev
883db83628 kutils: KMediaPlayer initialization optimization
there used to be "vo" option doing the same I believe, anyway it should
speed up initializations by not checks for other contexts (it is to be
rendered into X11 window after all)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-29 01:15:44 +02:00
Ivailo Monev
254431d75a kutils: udate comment in KMediaWidget::_updateError()
there used to be option to disable the controls (play/pause button,
position slider, etc.)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-28 23:07:13 +02:00
Ivailo Monev
b0e419b650 kutils: set the horizontal size type of the main KMediaWidgetUI widget to expanding
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 06:13:59 +02:00
Ivailo Monev
797ecf1dfc kutils: show KMediaWidget play button text conditionally
this feature is mostly for Dolphin which fits it into a small area and
there really is not enough space for the position slider

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 05:59:37 +02:00
Ivailo Monev
e5dbeb8cb4 kutils: correct slot name in KMediaWidget constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 04:52:16 +02:00
Ivailo Monev
5d0377b9e6 kutils: rename the internal KMediaWidget UI class
so that the uic tool does not generate code that uses variables with
the name of the private KMediaWidget class (KMediaWidgetPrivate)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 00:45:28 +02:00
Ivailo Monev
667c23d743 kutils: delete the player before the UI from KMediaWidget destructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-11-27 00:36:02 +02:00