Bug 378918

Summary: Sending QDBus suspend and resume commands don't affect RSIBreak menu - as minor as just possible
Product: [Applications] rsibreak Reporter: promike1987
Component: generalAssignee: Albert Astals Cid <aacid>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 0.12.6   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description promike1987 2017-04-18 10:48:46 UTC
I've studied the RSIBreak Handbook and I saw RSIBreak can be controlled via QDbus messages.
I'm not an expert on QDbus commands, this might be the second time that I've tried to use it, and since there is no specific examples I had to improvise.
Having run the 'qdbus org.kde.rsibreak /rsibreak' command, which can be read in the handbook, I got some outputs like:

method void org.rsibreak.rsiwidget.resume()
method void org.rsibreak.rsiwidget.suspend()

After running qdbus org.kde.rsibreak /rsibreak org.rsibreak.rsiwidget.suspend, it suspends rsibreak, no problem with that. However if I examine the menu of RSIbreak I will still see " || Suspend RSIbreak " instead of " |> Resume RSIbreak "
Of course if I click on that it will change to Resume RSIbreak then I can resume it or by simply running the command qdbus org.kde.rsibreak /rsibreak org.rsibreak.rsiwidget.resume revokes the suspension.

I'm not sure if I use the commands correctly. In case I don't, the handbook should be expanded by some examples. However it is a very minor bug, it doesn't really affect RSIbreak's functionality.

I don't wish to file an other bug report since it's connected to this but if I suspend RSIbreak when it says "Please relax for x seconds/minutes", the notification just hangs there. I don't know if it's a bug or a feature but I think it shouldn't be there then.

Keep up the good work!
Comment 1 Albert Astals Cid 2017-04-19 14:38:32 UTC
> I don't wish to file an other bug report

Then it won't get considered.
Comment 2 Albert Astals Cid 2017-04-19 14:50:08 UTC
Git commit 4d29d5d55dce00f4311dc760af699216fd77a6f2 by Albert Astals Cid.
Committed on 19/04/2017 at 14:49.
Pushed by aacid into branch 'master'.

Fix popup menu text when resuming/suspending via dbus

Route the dbus suspend/resume calls through the rsidock so that the text
gets updated

M  +14   -2    src/rsidock.cpp
M  +4    -1    src/rsidock.h
M  +8    -0    src/rsiwidget.cpp
M  +6    -10   src/rsiwidget.h

https://commits.kde.org/rsibreak/4d29d5d55dce00f4311dc760af699216fd77a6f2