
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
A plugin for the Aero AIO superkaramba theme.
REQUIRES: >= Aero AIO 0.8e and >= KDE 3.5.0
OPTIONAL: kttsd, latest PyKDE
FEATURES:
- Uses KMail to check for mail, hence supports all the account types that KMail does (POP, IMAP, Local, etc.) and there's no need to supply it with a password!
- Shows unread messages in each of a user-specified set of folders in KMail. This is very useful if your mail is sorted automatically into folders or you've associated different accounts with different folders
- Uses KDEs Text-to-speech engine (kttsd) to tell you when you have new messages. This behavior can be turned off
- Has a configurable Silent Zone, i.e. a period of time when the speech is automatically turned off. I dislike being woken up for email.
- Clicking the folder names opens KMail at that folder
- Can also display unread mails from your IMAP folders. This feature is new in 2.0.0 and FRAGILE (see Caveats)
USAGE:
- Install the .aiz plugin using the Aero AIO config dialog. Note due to a bug in Aero AIO, you may need to run the command mkdir -p ~/.aero_aio/sounds/kmail in a terminal before trying to install the plugin.
- The plugin can be added via the Configuration menu, it is named KMail
- The first time you run the theme, you may get a kded notification asking whether you want to allow access to the kdewallet for superkaramba (or anonymous is you don't have PyKDE). If you click Deny Always, the message list feature wont work, if you click Allow Always, it might work, but you should be aware that you have granted access to all your passwords to any superkaramba theme running on your computer. Clicking Allow Always for anonymous is not a good idea if your kdewallet stores sensitive passwords/data.
- The parrot icon in the bottom left corner toggles the speech on/off. To permanently turn off speech, use the config dialog. You can also automatically have the speech turned off for a fixed period of time everyday (the Silent Zone) via the config dialog. The icon is hidden in the Silent Zone or if you disable speech
- Clicking the envelope icon causes kmail to check for new mail and then updates the theme
- Click the message list button to see a list of unread mails in each of your monitored IMAP folders.
CAVEATS:
- It needs KMail running in the background
- The speech engine needs kttsd properly configured and running in the background. If you don't have kttsd it will just say that you have new mail, not how many messages. You need to setup KDE Notifications to be able to play ogg files. arts works, if you're using an external player play from the sox package works well
- If KMail is running in kontact the code to open it on the clicked folder only works if the default accelerator for KMail is unchanged. The code is
dcop kontact kontact-mainwindow#1 activateAction CTRL+2. If anyone knows of a better way to do this, please let me know
- The Message list feature:
This only works for folders in an IMAP account. Unfortunately the KDE devs weren't able to implement the getMessages dcop calls for kmail, so I had to write a tiny IMAP client within the theme to fetch message headers from the server itself. The IMAP client only opens folders in read mode, so it wont mess with your email, but it is a highly non-trivial feature, so I don't expect it to work out of the box for everyone. If you have trouble, set DEBUG=True in ~/.aero_aio/kmail_aio.py, run SK in a terminal and post the output. Your account details are read in from kmailrc, which is another point of fragility, since I'm no expert on KDE rc files. Not having a working PyKDE installation makes this feature less likely to work.
The rest of the plugin should still work, independent of the message list. If you want to disable it completely, just click 'Deny Always' when it asks for access to the kde wallet. I've also added a link to the last stable version, if 2.0.0+ breaks for you.
TODO:
- Support for unlimited folders (only display those with > 0 msgs and make the view scrollable, like the masseage pane). This means I have to write a viewport class, a list class and a scroll bar class if I want it done right
- Switch message list backend to using KMail messageRefs dcop call when (probably for KDE 4.0) the KDE devs add it to FolderIface
14 years ago
ver 2.2.1
- Fixed handling of non-ascii characters in kmailrc
ver 2.2.0
- Coded a workaround so that the message view function works without PyKDE.
ver 2.1.4
- Fixed a bug in the detection of PyKDE.
ver 2.1.3
- Moved resources into kmail sub-folders to keep ~/.aero-aio neater
ver 2.1.2
- Moved to the .aiz Aero AIO plugin format and removed stable version since I haven't got any bug reports on the 2.x series
ver 2.1.1
- Fixed typo in config dialog that would prevent it from saving changes
ver 2.1.0
- Added a configurable emphasis color (see screenshots)
- Fixed a bug with th scrollbar being rendered in the folder view as well as the message view
ver 2.0.1
- Fixed a typo that was preventing the message list from displaying
- Handled a rare error condition, caused by removing a kmail account that contains monitored folders
version 2.0.0
- Added a message view function, where the theme shows you a list of your unread messages. This feature is FRAGILE (see caveats)
- Cleaned up the folder handling code (gotta love oop)
version 1.3.3
- Moved the mail count onto the envelop icon as in the original mail theme by adrienV
- Removed deprecated calls to rstrip and replace by re.sub
version 1.3.2
- Changed the position of the mail icon
- Code cleanups...gotta love iterators
version 1.3.1
- changed to use unreadRecursiveMessages, so it should show the number of unread msgs in all subfolders as well
version 1.3.0
- Added a configurable Silent Zone (a period of time when the speech is automatically turned off). I hate being woken up for email
version 1.2.1
- Made the folder loading asynchronous so it doesn't hold up the generation of the config dialog
version 1.2.0
- Fixed the config dialog to display the proper path for IMAP folders. Unfortunately, this means a lot of dcop calls, that slow down the generation of the config dialog. Hopefully, this can be minimized with pydcop
- Changed the speak code to work without kttsd. If you dont have kttsd, it just says that you have new mail, not how many new messages
- There were a lot of code changes, so I expect bugs
version 1.1.4
- Cleaned up layout code, list of folders is now vertically centered
- Fixed config dialog to allow a maximum of 7 monitored folders
version 1.1.3
- Added a button to toggle the speech on/off
- Added tooltips to all buttons
version 1.1.2
- Fixed speech to say message not messages if number of new messages is 1
version 1.1.1
- Added option to disable speech in config dialog
version 1.1.0
- The theme will speak out how many new messages you have on an update if the number is larger than before (requires kttsd setup properly and running)
- Clicking the envelope icon forces an update
- Clicking the folder names opens the kmail window with that folder selected (This only works if you are running kmail within kontact and the accelerator for chooisng kmail is the default CTRL+2)
version 1.0.1
- fix the icons to be consistent across themes
14 years ago
ver 2.2.1
- Fixed handling of non-ascii characters in kmailrc
ver 2.2.0
- Coded a workaround so that the message view function works without PyKDE.
ver 2.1.4
- Fixed a bug in the detection of PyKDE.
ver 2.1.3
- Moved resources into kmail sub-folders to keep ~/.aero-aio neater
ver 2.1.2
- Moved to the .aiz Aero AIO plugin format and removed stable version since I haven't got any bug reports on the 2.x series
ver 2.1.1
- Fixed typo in config dialog that would prevent it from saving changes
ver 2.1.0
- Added a configurable emphasis color (see screenshots)
- Fixed a bug with th scrollbar being rendered in the folder view as well as the message view
ver 2.0.1
- Fixed a typo that was preventing the message list from displaying
- Handled a rare error condition, caused by removing a kmail account that contains monitored folders
version 2.0.0
- Added a message view function, where the theme shows you a list of your unread messages. This feature is FRAGILE (see caveats)
- Cleaned up the folder handling code (gotta love oop)
version 1.3.3
- Moved the mail count onto the envelop icon as in the original mail theme by adrienV
- Removed deprecated calls to rstrip and replace by re.sub
version 1.3.2
- Changed the position of the mail icon
- Code cleanups...gotta love iterators
version 1.3.1
- changed to use unreadRecursiveMessages, so it should show the number of unread msgs in all subfolders as well
version 1.3.0
- Added a configurable Silent Zone (a period of time when the speech is automatically turned off). I hate being woken up for email
version 1.2.1
- Made the folder loading asynchronous so it doesn't hold up the generation of the config dialog
version 1.2.0
- Fixed the config dialog to display the proper path for IMAP folders. Unfortunately, this means a lot of dcop calls, that slow down the generation of the config dialog. Hopefully, this can be minimized with pydcop
- Changed the speak code to work without kttsd. If you dont have kttsd, it just says that you have new mail, not how many new messages
- There were a lot of code changes, so I expect bugs
version 1.1.4
- Cleaned up layout code, list of folders is now vertically centered
- Fixed config dialog to allow a maximum of 7 monitored folders
version 1.1.3
- Added a button to toggle the speech on/off
- Added tooltips to all buttons
version 1.1.2
- Fixed speech to say message not messages if number of new messages is 1
version 1.1.1
- Added option to disable speech in config dialog
version 1.1.0
- The theme will speak out how many new messages you have on an update if the number is larger than before (requires kttsd setup properly and running)
- Clicking the envelope icon forces an update
- Clicking the folder names opens the kmail window with that folder selected (This only works if you are running kmail within kontact and the accelerator for chooisng kmail is the default CTRL+2)
version 1.0.1
- fix the icons to be consistent across themes
nakedmind
14 years ago
It is not working with aero aio 0.9.1. When I hit the "install" button of aero the plugin does not appear.
Any hint? Should I wait for a newer version of the plugin?
Cheers!
Report
kovidgoyal
14 years ago
Hopefully this patch will make it into KDE4 (rewritten for DBUS)
The version I now use relies on this patch, so I'm not likely to work on fixing the old plugin for aero 0.9.1. If you feel like applying the patch and compiling kmail for yourself, I'll send you the new plugin.
Sorry,
Kovid.
Report
janet
14 years ago
Report
janet
14 years ago
Report
kovidgoyal
14 years ago
Report
kovidgoyal
14 years ago
Report
LinuxRocks
15 years ago
Any idea how to get this to work?
Thanks!!!
Joe
Report
kovidgoyal
15 years ago
http://www.mail-archive.com/pykde%40mats.imk.fraunhofer.de/msg05768.html
Anyway, since a lot of people seem to have trouble getting PyKDE working, I've coded a non-pykde workaround in the latest version (2.2.0). It's not really tested, so I don't know if it works.
Report
LinuxRocks
15 years ago
Joe
Report
LinuxRocks
15 years ago
The plug in does show how much mail I have though.
Looks like it didn't require that pykde program, however.
Thanks again!!!
Joe
Report
kovidgoyal
15 years ago
Report
kovidgoyal
15 years ago
Report
migsy
15 years ago
Traceback (most recent call last):
File "/home/mrugesh/.superkaramba/aero_aio/config_dialog.py", line 801, in buttonAddClicked
os.mkdir(newdir)
OSError: [Errno 2] No such file or directory: '/home/mrugesh/.aero_aio/sounds/kmail/'
Report
kovidgoyal
15 years ago
Report
tbd
15 years ago
I'm wishing to use your plugin, but I've got some problems. First, I put the files in a directory under /usr/local which normal users could not modify and that made to appear an error saying something concerning a "displayPath" function, as has been reported by someone else in this forum. This is solved just by installing the plugin (and of course the Aero AIO theme as well) under $HOME/.superkaramba.
But now, after I have managed to load the plugin and configure it inside Aero AIO, when I click on the kmail icon nothing at all is displayed and although I click on the other icons this situation remains. Moreover, the following error is produced:
Call to widgetUpdated failed
Traceback (most recent call last):
File "/home/blablabla/.superkaramba/themes/Aero-AIO-0.8e/aero_aio.py", line 577, in widgetUpdated
page.update(widget)
AttributeError: 'NoneType' object has no attribute 'update'
BTW, I have a Debian sid machine, with PyQT and PyKDE and so on.
Any hints would be greatfully welcome.
Greetings,
Tomás.
Report
kovidgoyal
15 years ago
superkaramba aero_aio.skz 2> log
The errors will be recorded in the file log. Post the topmost 2 errors.
Report
tbd
15 years ago
It seems that the problem is that the "subprocess" Python module is unknown on my system:
-------------------------
File "/home/user/.aero_aio/kmail_aio.py", line 1, in ?
import karamba, os, re, time, math, traceback, subprocess, sets, imaplib
ImportError: No module named subprocess
------------------------------------------------------
What does ImportError mean?
It means that I couldn't load a python add-on aero_aio.py
If this is a regular theme and doesn't use python
extensions, then nothing is wrong.
---------------
I will try to look in a search machine how to have this module in my Debian Python configuration, but if anyone could know something...
BTW, another (very sublte) thing is that when trying to install your plugin from inside the Aero AIO configuration window in a fresh superkaramba user directory, it does not allow to load it because:
File "/home/user/.superkaramba/Aero-AIO-0.8e/scripts/config_dialog.py", line 801, in buttonAddClicked
os.mkdir(newdir)
OSError: [Errno 2] File or directory does not exist '/home/user/.aero_aio/sounds/kmail/'
Just by creating it by hand has solved the problem.
Greetings,
Tomás.
Report
tbd
15 years ago
Report
kovidgoyal
15 years ago
Report
tbd
15 years ago
Call to meterClicked failed
Traceback (most recent call last):
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 724, in meterClicked
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 292, in loadPage
File "", line 0, in ?
File "/home/bautista/.aero_aio/kmail_aio.py", line 417, in __init__
self.dc = KApplication.kApplication().dcopClient()
AttributeError: dcopClient
Call to widgetUpdated failed
Traceback (most recent call last):
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 577, in widgetUpdated
AttributeError: 'NoneType' object has no attribute 'update'
Call to widgetUpdated failed
...
And that is repeated forever. Aero AIO is loaded fine, but this happens when clicking on the kmail icon. And nonthing appears on the Aero AIO canvas from then on.
Greetings,
Tomás.
Report
istaon
15 years ago
Call to widgetUpdated failed
Traceback (most recent call last):
File "/home/dominik/.superkaramba/Themes/aero_aio.skz/aero_aio.py", line 577, in widgetUpdated
AttributeError: 'NoneType' object has no attribute 'update'
I use python 2.4.2 and I#ve removed the pykde package....
Have you an idea what's wrong?
Br
Dominik
Report
kovidgoyal
15 years ago
Report
tbd
15 years ago
Call to meterClicked failed
Traceback (most recent call last):
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 724, in meterClicked
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 292, in loadPage
File "", line 0, in ?
File "/home/bautista/.aero_aio/kmail_aio.py", line 417, in __init__
self.dc = KApplication.kApplication().dcopClient()
AttributeError: dcopClient
Call to widgetUpdated failed
Traceback (most recent call last):
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 577, in widgetUpdated
AttributeError: 'NoneType' object has no attribute 'update'
Call to widgetUpdated failed
...
And that is repeated forever. Aero AIO is loaded fine, but this happens when clicking on the kmail icon. And nonthing appears on the Aero AIO canvas from then on.
Greetings,
Tomás.
Report
tbd
15 years ago
Call to meterClicked failed
Traceback (most recent call last):
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 724, in meterClicked
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 292, in loadPage
File "", line 0, in ?
File "/home/bautista/.aero_aio/kmail_aio.py", line 417, in __init__
self.dc = KApplication.kApplication().dcopClient()
AttributeError: dcopClient
Call to widgetUpdated failed
Traceback (most recent call last):
File "/home/bautista/tmp/x/aero_aio.skz/aero_aio.py", line 577, in widgetUpdated
AttributeError: 'NoneType' object has no attribute 'update'
Call to widgetUpdated failed
...
And that is repeated forever. Aero AIO is loaded fine, but this happens when clicking on the kmail icon. And nonthing appears on the Aero AIO canvas from then on.
Greetings,
Tomás.
Report
kovidgoyal
15 years ago
Report