Bug 436462 - Kpat plays sound when you push "New game" button even if "Play sounds" option is unchecked
Summary: Kpat plays sound when you push "New game" button even if "Play sounds" option...
Status: CONFIRMED
Alias: None
Product: kpat
Classification: Applications
Component: general (show other bugs)
Version: 20.08
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-01 16:46 UTC by twaikyont
Modified: 2023-02-28 19:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
attachment-1831-0.html (1.50 KB, text/html)
2021-10-05 19:07 UTC, twaikyont
Details
attachment-10664-0.html (1.86 KB, text/html)
2021-10-05 22:01 UTC, twaikyont
Details

Note You need to log in before you can comment on or make changes to this bug.
Description twaikyont 2021-05-01 16:46:13 UTC
SUMMARY
Kpat plays sound when you push "New game" button even if "Play sounds" option is unchecked

STEPS TO REPRODUCE
1. Uncheck "Play sounds" option in Settings.
2. Press "New game" button.
3. Profit.

OBSERVED RESULT
It plays sound.

EXPECTED RESULT
It should not play any sound.

SOFTWARE/OS VERSIONS
Windows: 
Linux/KDE Plasma: Ubuntu 20.10 (GNU/Linux 5.8.0-50-generic x86_64)
(available in About System)
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.12.2

ADDITIONAL INFORMATION
_________
Comment 1 Daniel Fichtner 2021-10-05 08:34:14 UTC
I can't reproduce it.
For me it doesn't play a sound when pressing "New Game" at all, the "Play sounds" toggle enabled or disabled.

Or do you mean the notification sound, when pressing "New Game" while a game is already running and has been started.

KPatience: 21.8.1
Comment 2 twaikyont 2021-10-05 19:07:25 UTC
Created attachment 142178 [details]
attachment-1831-0.html

You are right, I meant notification sound.

вт, 5 окт. 2021 г. в 11:34, Daniel Fichtner <bugzilla_noreply@kde.org>:

> https://bugs.kde.org/show_bug.cgi?id=436462
>
> Daniel Fichtner <danje1@outlook.de> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |danje1@outlook.de
>
> --- Comment #1 from Daniel Fichtner <danje1@outlook.de> ---
> I can't reproduce it.
> For me it doesn't play a sound when pressing "New Game" at all, the "Play
> sounds" toggle enabled or disabled.
>
> Or do you mean the notification sound, when pressing "New Game" while a
> game is
> already running and has been started.
>
> KPatience: 21.8.1
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 3 Daniel Fichtner 2021-10-05 20:15:12 UTC
Okay. I'll have a look at it, but I think it's a system sound (notification prompt) and therefore not affected by the "Play sounds" setting.
Comment 4 Albert Astals Cid 2021-10-05 21:03:52 UTC
> I think it's a system sound (notification prompt) and therefore not affected by the "Play sounds" setting.

That's defenitely the case, the question is if the user has a reasonable expectation that "Play sounds" also disables those kind of sounds or not.

Maybe the easy solution is just rename "Play Sounds" to something more obvious that is only about the game sounds?
Comment 5 twaikyont 2021-10-05 22:01:34 UTC
Created attachment 142196 [details]
attachment-10664-0.html

I think it would be better to modify messagebox creating process.
https://stackoverflow.com/a/16076209 . This way you can choose if you need
sound or not.

On Wed, Oct 6, 2021, 00:03 Albert Astals Cid <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=436462
>
> Albert Astals Cid <aacid@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |aacid@kde.org
>
> --- Comment #4 from Albert Astals Cid <aacid@kde.org> ---
> > I think it's a system sound (notification prompt) and therefore not
> affected by the "Play sounds" setting.
>
> That's defenitely the case, the question is if the user has a reasonable
> expectation that "Play sounds" also disables those kind of sounds or not.
>
> Maybe the easy solution is just rename "Play Sounds" to something more
> obvious
> that is only about the game sounds?
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 6 Daniel Fichtner 2021-10-05 22:09:05 UTC
It's really easy to disable the Notification. It's just one added line in the KMessageBox that is opened. If you overwrite the Option = Notify with a nullptr the notification is no more :D It should also be possible to ask for the toggle status to create a case depending messagebox.

So to remove the sound all together is really easy. I'll have closer look tomorrow if I can find a solution to toggle it as well.

Btw. I'm new here. So please don't be mad at me if I do something wrong :)
Comment 7 Daniel Fichtner 2021-10-06 14:02:25 UTC
Merge request created:

https://invent.kde.org/games/kpat/-/merge_requests/19