Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Plasma 5 port #21

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

PVince81
Copy link
Contributor

@PVince81 PVince81 commented Aug 22, 2017

  • TODO: Theme
  • TODO: writeConfig is obsolete. Switch to DB ?
  • plasmoid config + config change event API is different, config dialog might need a rewrite
  • top bar alignment trouble, QML says file:///home/vincent/workspace/Tomatoid/contents/ui/TopBar.qml:60:2: QML Row: Cannot specify left, right, horizontalCenter, fill or centerIn anchors for items inside Row. Row will not function.
  • icon does not appear (neither widget selection and when widget is in task bar it's a generic icon)

@PVince81 PVince81 mentioned this pull request Aug 22, 2017
@PVince81
Copy link
Contributor Author

To test: plasmoidviewer --applet Tomatoid.

@PVince81
Copy link
Contributor Author

  • test DB stuff properly, still buggy

@arthurtaborda
Copy link
Owner

@PVince81 thank you very much for this contribution. It looks great and it is already almost ready for merging. I will take a closer look when I get home.

Just a suggestion about the storage system. Take a look at the sticky notes widget and see how they store the notes. They use a NotesManager for it, it is included in the package org.kde.plasma.private.notes

It could be simpler than using sqlite

@PVince81
Copy link
Contributor Author

PVince81 commented Aug 23, 2017

  • BUG: alarm doesn't ring, possibly JS errors, needs debugging

repeated error in console:

file:///home/vincent/workspace/Tomatoid/contents/ui/main.qml:270: TypeError: Property 'showPopup' of object AppletInterface(0x561d423245f0) is not a function

@PVince81
Copy link
Contributor Author

@arthurtaborda before merging you need to decide whether you want to replace the old KDE 4 plasmoid code with this new one. If yes then merging would be ok as soon as it works decently. (it doesn't, see previous comment)

If not, then a new repo might be an idea.

I'll have a look later at NotesManager to learn about alternative ways. So far the sqlite way seems to work fine. :-)

@PVince81
Copy link
Contributor Author

@arthurtaborda did you have time to have a look ?

After some days have passed I think this is not ready for merging yet as many things are still broken like the end of the timer and also the config dialog. I'll see if I can bring this into a better shape.

@PVince81
Copy link
Contributor Author

Some infos I found about porting the config: https://community.kde.org/Plasma/PortingQMLPlasmoids#Porting_QML_Plasmoids_to_Plasma_2

Now struggling hard to find how to do a "showPopup()" to popup a Plasma 5 notification...

@PVince81
Copy link
Contributor Author

Ok, so now I understand: showPopup is likely to just show a real popup dialog. We'll need to replace this with a MessageDialog or Qt's alert. I commented it out now.

I found myself grepping around the source code of other plasmoids to find how to do the desktop notification thing until I found out that Tomatoid already had a "notify" method. Turns out one needs to use the data engine.

At least now the pomodoro can finish!

Now the config is read from plasmoid.configuration but still need to rewrite config.ui in QML and plug it into the config dialog.

@arthurtaborda
Copy link
Owner

@PVince81 I am sorry for not being so helpful in the porting to plasma 5. I have a very limited amount of free time right now. I am looking to it right now and fixing the action bugs (remove, set done...)

This is still not ready to be merged but looks pretty close.

@PVince81
Copy link
Contributor Author

@arthurtaborda no worries and no pressure. I was mostly hoping to revive the flame of motivation by helping you with the port. 😄

@PVince81
Copy link
Contributor Author

how many Pomorodos left to finish this ? :-D

OT: got back into Pomodoros and was thinking it would be nice to also be able to execute scripts before and after a Pomodoro. For example if one has two Plasma activities, one for planning, chat, email, etc and one for focussing on work. The script could be used to automatically stop the other activities, or simply start/stop potentially distracting apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants