profile-image

mjmccans

Mark McCans

gmail-plasmoid

Plasma 4 Widgets Jan 30 2012
Score 90%
90 Likes
10 Dislikes
gmail-plasmoid

Plasma 4 Widgets 397 comments

Score 90%
90 Likes
10 Dislikes
Jan 30 2012
I am now using qml and javascript because that is the recommended way to develop plasmoids, and a scripted plasmoid provides more flexibility across different versions and distributions (theoretically it should work without any changes and does not need to be compiled). Hopefully it will work better than the python bindings, but only time will tell.

The qml plasmoid definitely is featureless since it is the result of only a few hours of work one evening (which also included learning the basics of javascript and qml). I am hoping to clean it up over the next few weeks, including adding more error checking and fixing the issues that you have identified. It also seems to suffer from some display issues (particularly at small sizes), but overall it should look better than the original when it is completed. For example, the original plasmoid was started before qt supported anchors, so the number indicating the number of unread emails is actually written using a painter on top of the icon and then scaled to fit the plasmoid; there appeared to be no other way to display the number correctly at the time. Now with anchors it is possible to have overlapping elements, so the number is a label that sits on top of the icon and should be nice and crisp.

I will add the auto-hiding back in as an option, but it was actually removed on purpose because a decent number of people asked to have the feature removed (about 15 people specifically requested its removal, and I did not like it much myself). Their use scenario was that they used the plasmoid to access their gmail account regardless of whether they had unread messages or not and, therefore, did not want to have the plamsoid hidden. I had always intended to make it an option, but never got around to it as I have very limited free time to work on this thing and was not particularly motivated since it was not a feature I used.
- Jan 31 2012
I appreciate your comments, and I have written many comments myself about how the implementation of the plasmoid is less than ideal due to issues with plasma and the python bindings. The python bindings for plasma are quite unstable and change without notice across different versions, resulting in a number of workarounds and hacks in order to have the plasmoid work for as many people as possible. For example, you appear to have been bitten recently by the fact that the python fetching method is not threaded, and implementing a threaded method was not possible because it would crash the entire plasma desktop. There are also some underlying issues with the design of the plasma desktop that make it very easy for a plasmoid to cause problems for the entire desktop. The plasmoid was also started during plasma’s infancy, and some workarounds that were implemented due to missing features are still included in the code that are no longer necessary. The fact that the KDE and python binding packages for many distributions are of low quality does not help either.

However, the good news is that I am rewriting the plasmoid in qml and javascript, which so far seems to be much cleaner in implementation. I am also planning on dropping some of the excess features that made their way into the original plasmoid, which should clean up the design. Since this is my first foray into qml and javascript I would appreciate any constructive criticism that you can provide. Perhapse the plasmoid will even earn back your vote (although I don’t really care about the score of the plasmoid). - Jan 31 2012
Unfortunately the python bindings that are used by the plasmoid have proved to be problematic, which has led to all sorts of issues for various people and required all sorts of hacks a workarounds to get it working. For example, KWallet works fine for some (like me) and not for others, and the KDE fetching method proved problematic for many so the python fetching method was implemented (but it blocks the desktop on slow connections since it is not multithreaded, and plasma crashes when you try to do it in a multithreaded manner).

However, the good news is that I am in the process of re-implementing a simplified version of the plasmoid in qml and javascript, which I hope will help alleviate these issues. While I’m sure the plasmoid will still not be perfect, hopefully there will be less issues with the new version. - Jan 31 2012
I realize that I am responding a little late to your message, and sorry about the delay. Your issue is due to faulty packages from your distribution (this has been seen both others as well). Once you or your distribution fixes the issue the plasmoid's configuration screen will display properly (perhaps it is already fixed). Once it works I hope that you will not find it "useless". - Jan 31 2012
I’m glad that it is working for you. The functionality is definitely limited at this point, and very little error checking is done. My plan is to re-implement a number of the features, but try to keep the plasmoid simpler and more lightweight than before. To that end, I am considering not implementing multiple account functionality (I don’t use it anymore myself). However, the qml and javascript used are very simple, so I hope that it will be easier for others to contribute features that they need.

This is my first foray into javascript and qml, so if you or anyone else has any pointers or would like to fix anything boneheaded in the code that would great. My email address is indicated in the plasmoid.

I hope to release new versions over the coming week, as time permits, that will include some more features and robustness. There are also a few visual issues to be worked out as well. - Jan 31 2012
I believe your problem is that you need to run the plasmapkg command as your regular user, not as root. Give that a try and hopefully it will work for you. - Jan 31 2012
I would try switching to the KIO fetch mechanism in the settings. The python fetch method is not threaded, and will therefore cause all of plasma to freeze up if the fetching is not quick through your internet connection. Making the python fetching method threaded or otherwise non-blocking is on my list of things to do, but all my attempts thus far have just resulted in crashing plasma. I hope this helps, and hopefully there will be a better solution in the future. - Sep 19 2011
This may simply be a problem with the KDE fetching mechanism as you appear to be having the exact problem that the python fetching mechanism was meant to address. Can you please enable the python fetching mechanism while running the plasmoid in a terminal and let me know if you get any errors? If you do find a problem it would be best to start a new issue on the Google Code site for the plasmoid, which is linked as the home page above. Thanks. - Jul 28 2011
Hopefully we can solve the password problem that you are having. It would be helpful if you could start a new issue on the Google Code site for the plasmoid (linked as the home page above) and post the output that you get when you run the plasmoid in a terminal.

For the hiding of the icon feature, I will try to add that feature back in a future version of the plasmoid (possibly in the version after the one that I am currently working on). The old version of the feature was primitive and would cause problems in some circumstances, so I need to put together something slightly better if it is to be added back. - Jul 28 2011
Thank you for your help tracking down the kwallet bug. It appears to be a bug in the KDE packages used by some distributions (including Kubuntu), and the new version 0.7.20 of the plasmoid includes a workaround to address the bug. - Jul 11 2011
You are not the only one who is having this issue, but I have been unable to reproduce the issue (I am also running on a fully updated Arch install, along with openSUSE 11.4 and Kubuntu 11.04). I am not sure why kwallet does not seem to work correctly for some people. I'm not sure if it will help, but try to delete the configuration file for the plasmoid completely, or remove and then add back the plasmoid to your panel or system tray. Perhaps with a fresh configuration it will work. I will also try to dig into this further and try to find a solution to the issue. - Jul 10 2011
Thank you for your message. I have not been able to reproduce the issue with kwallet, but there have been multiple issues with retreiving passwords from the wallet in the past. It currently works for me on fully updated Arch Linux, openSUSE 11.4 and Kubuntu 11.04 installations. However, it apparently causes problems for others on identical configurations so there is some underlying issue that needs to be addressed. Please try deleting the plasmoids configuration file completely and resetting your accounts (or try removing the plasmoid and re-adding it to your panel or system tray). I will also try to look further into the issue. If you could open a new issue on the Google Code site for the plasmoid (the homepage link above will take you there) we can try to further debug the issue.

As for the label check, you are right that it did not work with version 0.7.18 since I had introduced a stupid bug (I don't use that feature anymore myself, and did not notice that I had broken it). Please test the new version 0.7.19 and let me know if the issue is resolved. Thanks. - Jul 10 2011
I'm glad it is working for you. For the accounts, you should be able to double-click an account to modify it. If that does not work let me know. - Jul 09 2011
Please try out the new 0.7.18 version of the plasmoid and see if it fixes your issue. If you continue to have an issue please try deleting your accounts and adding them back, or deleting the entire configuration for the plasmoid. Hopefully this new version will work better for you. - Jul 09 2011
I have tested the plasmoid with a fresh installation of openSUSE 11.4 and again after upgrading to KDE 4.6.5 and have been unable to reproduce your problem. However, I am in the middle of making further changes to the plasmoid that may help out with your issue. Please stay tuned for a new version in the next few days. - Jul 05 2011
That sounds like a problem with your KDE installation. You will need to figure out the applicable package for your distribution that contains the python engine for plasmoids. If you do figure it out, please post back here how you solved the issue in case others encounter the same issue. - Jul 03 2011
I have tried to replicate this issue in a virtual machine but I have been unable to do so. However, please take a look at the link below and test the new version of the plasmoid to see if the issue is solved. Thanks.

http://code.google.com/p/gmail-plasmoid/issues/detail?id=62 - Jul 03 2011
To help narrow down the issue, is everyone who is experiencing this issue using Kubuntu? In addition, please let me know the exact version of KDE that you have installed that appears to cause the issue. In fact, if someone wants to start an "issue" on the Google Code page for the plasmoid (the home page link above will take you there) that may be a better forum for solving this issue. Thanks. - Jun 22 2011
That is an interesting issue that I have not seen before. The message must be coming from the underlying KDE classes as I use them to fetch the feed. I am hoping to have some time next week to fix some other bugs that I have wanted to fix for a while, and I will see if I can replicate this issue as well. Sorry for the delay, and hopefully I can figure out what is causing the problem. - Jun 21 2011
Thanks for the patch, and I appreciate the time you took to track down the issue. I hope to review it and post a new version of the plasmoid over the next few days. - Feb 07 2011
I do not believe that your issue is related to the plasmoid. The only thing the font setting is used for is for the number overlay on the plasmoid icon. The font in Firefox, or any other browser for that matter, is not affected by this setting. - Oct 11 2010
Thanks for the comments, and you are right about the tooltip. Please give the latest version a try and see if it fixes your issue. - Sep 25 2010
While I'm not sure if your problem is caused by the same root cause, the post immediately above yours deals with exactly the same symptoms (as do a number of other threads). The issue is being tracked at the following address:

http://code.google.com/p/gmail-plasmoid/issues/detail?id=49

Please see if your issue is related to the one linked, which appears to be caused by certain versions of sip. If you have any insight or additional information you can provide it would be very helpful.
- Jul 20 2010
While I'm not sure if this is the same problem, it sounds a lot like the follwoing issue that is being tracked at the following address:

http://code.google.com/p/gmail-plasmoid/issues/detail?id=49

It seems to be related to certain versions of sip, but we are still in the process of tracking down the root cause. However, any insight or additional information you can provide would be very helpful.
- Jul 19 2010
While I'm not sure if you are having the exact same problem, the issue above is being tracked at the following address:

http://code.google.com/p/gmail-plasmoid/issues/detail?id=49

It seems to be related to certain versions of sip, but we are still in the process of tracking down the root cause. However, any insight or additional information you can provide would be very helpful. - Jul 19 2010
Interesting. I don't use that signal directly, so this looks like an upstream problem with the plasma python bindings. I will investitgate further, and I believe that this is the same problem raised in the following issue on the google-code site:

http://code.google.com/p/gmail-plasmoid/issues/detail?id=49

If you have any further information please post it there. Thanks. - Jul 15 2010
Hopefuly we can figure this out, but I do not have a hosted account to do any testing. If you send me a private message with your email address I can try to help you debug this issue. Thanks. - Jul 14 2010
Can you supply any more information? What does not work? What error message, if any, do you get? Thanks. - Jul 14 2010
I actually used to use plasma tooltips, but the issue was that I could not (or did not figure out how) to control the length of time that the tooltip was displayed (it would show for a short period of time and then fade out). This was difficult if you had a large list of emails as you needed to keep triggering the tooltip, which was a pain. If there is a way to have the tooltip stay visible until the mouse is moved off of the plasmoid then I could use tooltips instead. Please let me know if you know how to do this or, better yet, have a patch to submit. - Jul 11 2010
Sorry for the delay in getting back to you and, as with the other issues that have come up with respect to Kubunto 10.04, I will try to investigate this issue over the next few days. - May 10 2010
Sorry for the delay in getting back to you and I will try to investigate this issue over the next few days. - May 10 2010
Alright, it looks like another problem or inconsistency with the python bindings for KDE. Please start an issue on the Google Code site for the plasmoid as mentioned in my last message and we can debug the issue from there (I don't want to gum up the comments with a debugging thread). Thanks. - Feb 25 2010
I don’t use Kubuntu myself, but people seem to be having no end of problems with the KDE packages that they produce. If possible, please create an issue on the Google Code page for the project (http://code.google.com/p/gmail-plasmoid/) and I will see if I can figure out what is going wrong. Hopefully we can get this fixed for you shortly. As part of the issue description, please run the plasmoid in a console using the command below and let me know if any errors turn up:

plasmoidviewer gmail-plasmoid
- Feb 23 2010
That is a good idea, but this would require quite a bit of work due to how gmail works and the lack of a proper api. Checking for new mail is easy since there is a read-only atom feed that can be used. However, adding these features requires interacting with the gmail web interface and, therefore, having to deal with fixing the features every time Google decides to alter the interface. However, not all is lost because there is someone submitting patches that attempt to use the webkit bindings to add features similar to your request, so there is hope that these features will be added in a later version. - Feb 23 2010
Thanks, I like your idea and I have had the same issue before. The problem is that the correct way to do this is to connect to the network up and down signals, but that does not seem to be supported yet in the python bindings. However, what I have done is altered the poling period to 10 seconds when the network is down, which seems reasonable. Below is a link to a testing version of the plasmoid with this change implemented. If possible, please test it out and let me know if it works for you:

http://gmail-plasmoid.googlecode.com/files/gmail-plasmoid-0.7.13b.plasmoid - Feb 21 2010
That means that one of the packages needed to run python plasmoids is either not installed or not working correctly (I was having the same issue under openSUSE until yesterday). The plasmoid should start working again once the packages are updated correctly. Sorry I cannot be more help. - Jan 25 2010
Thanks for the comments and sorry about taking so long to get back to you. I think you are right about the configuration screen (it is something that I had not thought about). If possible, please take a look at the testing version of the plasmoid linked below and let me know if that configuration screen works better for you. Thanks again:

http://gmail-plasmoid.googlecode.com/files/gmail-plasmoid-0.7.13a.plasmoid - Jan 24 2010
Interesting. Hopefully we can figure out what the problem is. First, please let me know what is written in the pop-up dialog when you hover over the plasmoid. Second, it would be interesting to know if the same problem occurs or if any error messages are returned when you run the plasmoid using the plasmoid viewer (i.e. run “plasmoidviewer gmail-plasmoid” in a console). If any errors are returned in either of these situations then please open an issue on the Google Code page for this plasmoid (see the “Link” above the plasmoid description). Thanks. - Jan 24 2010
There have been some changes to the python bindings and I am working on getting the plasmoid to work again. If possible, can you test the version at the bottom of the following issue and let me know if it fixes your problem? Thanks.

http://code.google.com/p/gmail-plasmoid/issues/detail?id=32#c10 - Jan 16 2010
That sounds like an interesting feature to include, and I am working on something right now that would be required to implement this. I am adding the ability to send a url to the browser that logs into Gmail (instead of only opening an account that is already logged in). However, I am encountering some issues with the Gmail offline feature occasionally causing problems and also some password exposure issues. However, if I can get those issues figured out then I would be in a good position to implement your suggestion. - Sep 22 2009
No problem, and your message is a good reminder that I may want to clean some of that stuff out of the plasmoid now that KDE 4.3 has been released. I’ll put that on my list of things to do. - Sep 22 2009
I think that is a good idea, and I will look into it and look again at Google’s guidelines for how often to poll the Gmail service. My use of the plasmoid is much like yours, although I have my polling time set to 5 minutes and I keep a mental note of when I have read the messages that are displayed. I think the best solution will come when Akonadi is fully integrated into Plasma. That way a universal mail checker could be written easily that would follow more of the Plasma structure (I don’t use a data engine in my plasmoid because it would not allow me to add the features I wanted) and would also provide almost instant updates through the use of IMAP IDLE. I’m keeping an eye on that front, but in the shorter term I will take a look at your suggestion when I have a moment (which does not seem to be very often these days). - Sep 22 2009
You do not need to autostart Kwallet as it will be started automatically the first time that a program tries to access the wallet. If you set a password for your wallet then you will get a password prompt each time you log in, but you can also ways set a blank password, and then there will be no password prompt upon login and the plasmoid will work without asking for any passwords (I have it set up this way on one computer on which I am not overly concerned about password security). Basically, go into your Personal Settings, go to the Advanced tab, click on KDE Wallet and then make sure the KDE wallet subsystem is enabled.

As for a bug report, I am not sure if there is a report and I have not reported one. It would be in KIO, and the issue is the fact that it still prompts the user for a password even when one is supplied in the calling arguments. If you find a matching bug report please let me know. - Sep 13 2009
The “label” field allows you to check only a given label in Gmail for new messages. For example, if you want to display how many messages are in your spam label, you can enter “spam” in the label field and it will return the unread count for that label. It also works for custom labels that you create in Gmail. I realize that the nomenclature is somewhat confusing, but I tried to explain it in the tooltips for each field. Hopefully this makes sense. - Sep 11 2009
While I’m not sure if this is the issue, my guess from your output is that you have “maciekw4” in the “label” field in the account configuration dialog (the third input box on that dialog). If you wish to check your Gmail inbox, the “label” field should be left blank. However, I may be incorrect so if you continue to have problems feel free to send me a PM and I will try and help you debug the issue (and I should not need your account data to debug the problem). - Sep 10 2009
Sorry about the delay in responding and, as you noted in your message, I have been quite busy lately and have not been making as many changes to the plasmoid as I would like. I apologize if I am repeating things that you already know, but some password retention issues have been discussed already and that is where I would start trying to debug your issue.

If you do not have kwallet enabled in your system settings you will be asked for your password each time you start KDE, even if you select the “save password” option. This is simply how the kde libraries function without kwallet enabled, and since I am trying to leverage the DKE infrastructure as much as possible I am not overly excited about working around these libraries. For whatever reason, KIO seems to ask for the password for protected resources even when the password is supplied to it when called. While it is very possible that I am calling KIO incorrectly (please let me know if you see an issue) others have confirmed this behaviour in their applications.

A possible solution to this problem would be to use python functions to fetch the Gmail atom feed, which is actually how I implemented the first version of the plasmoid. However, this seemed to cause a multitude of other more serious problems since the plasmoid would not follow people’s network settings (proxy settings were the particular issues that caused me to switch to KIO). The following issue report discusses this issue: http://code.google.com/p/gmail-plasmoid/issues/detail?id=7

Basically, to make a long story short, the plasmoid should work correctly with kwallet enabled, but if it does not for you then you have probably found a new bug and hopefully I can help you track it down. I hope this helps.
- Sep 08 2009
That is the line that I am interested in, and that means that (as expected) Solid is telling the plasmoid that the network is “unconnected.” Therefore, the issue appears to be within Solid, and for some reason it does not like your network settings. If you find out why please post the cause or your solution here as I think it would be helpful to others who are experiencing the same issue. Thanks. - Aug 27 2009
If this issue is still not resolved please send me a private message with your email address and I will send you a testing version of the plasmoid so we can try to figure out why it is not working. I hope to have some time this weekend to work on this so, with any luck, I will be able to send you a new version on Saturday. - Aug 27 2009
I like your idea for using the default KDE browser and I think it is a really good idea; I simply have not had time to look into how to implement the feature. However, I will try to take a look at the implementation in Konversation (the screenshot was also helpful).

As for the modal nature of the configuration dialog, unless I am doing something very wrong this appears to be an unfortunate side-effect of scripted plasmoids. I have seen this exact behaviour with other python plasmoids, but I have not looked at the issue very deeply. However, if you find a scripted plasmoid that does not exhibit this behaviour please let me know and I will take a look at how they avoided the issue.
- Aug 26 2009
That information is helpful, but unfortunately I am not very familiar with solid or how it is supposed to be configured. It appears that Solid does not see your network setup, and therefore believes that the network is down. I wonder if it sees networkmanager and assumes that it is configured. The following url is for a testing version of the plasmoid that has the network checking disabled and outputs to the console the status that Solid returns. It would be great if you could run it and let me know what the value is.

http://gmail-plasmoid.googlecode.com/issues/attachment?aid=4808440175808155846&name=gmail-plasmoid-0.7.10b.plasmoid
- Aug 25 2009