Aero AIO: Kmail based mail notification

Karamba & Superkaramba

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

0
6.3
Description:

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
Last changelog:

13 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

12 years ago

Hello,

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

C

kovidgoyal

12 years ago

Unfortunately, I've sort of ended support for this plugin as its implementation becomes much easier with some patches to kmail. See http://www.kde-look.org/content/show.php?content=35578
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

13 years ago

I'm confused: how do I have to start that widget? And what is aiz? When I rename it to skz superkaramba finds it but does not display anything, when I unpack it superkaramba cannot find it. All the other themes I use have a .theme file but I cannot find anything like that in your archive.

Report

janet

13 years ago

I haven't read carefully. I see it needs something called Aero Ayo to install it. So I cannot use this as a stand alone mail"ticker"? I am looking for something that can be used as a mailticker like the mailtickers that The Bat! and FoxMail provide (Windows). Best would be a simple ticker with black background that shows the mails that are new in kmail. I had hoped I can somehow clone some code from this one because there doesn't seem to exist a simple mail ticker for linux.

Report

C

kovidgoyal

13 years ago

I've created a patch to kmail that gives access to the From/Subject/Date fields for messages in KMail folders via dcop. See http://bugs.kde.org/show_bug.cgi?id=121844

Report

C

kovidgoyal

13 years ago

This is a plugin for the Aero AIO SK theme. Read the USAGE section above. At the moment KMails DCOP interface doesn't expose actual messages, only message counts. I had to write my own IMAP client in Python for this plugin. I would suggest you read the CAVEATS and FEATURES sections before trying to use this plugin.

Report

LinuxRocks

13 years ago

When I click on the see list of unread messages, it says No Messages. You need PyKDE for this functionality. However, when I search for PyKDE, and go to the web site for it, it only supports KDE up to version 3.3 (http://www.riverbankcomputing.co.uk/pykde/index.php)

Any idea how to get this to work?

Thanks!!!

Joe

Report

C

kovidgoyal

13 years ago

The riverbank pykde bindings work with kde 3.5 as well, see this thread for the small changes you have to make to get it to compile.
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

13 years ago

Thanks!!! I will give it a try as well.

Joe

Report

LinuxRocks

13 years ago

Ok, I don't get that original error now, but when I have a mail in my inbox (And have selected my inbox in the configuration), it says No Messages. Try clicking the Force Mail Check button.

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

C

kovidgoyal

13 years ago

Also be aware that message viewing only works if the folder belongs to an IMAP account

Report

C

kovidgoyal

13 years ago

Can you set DEBUG=True in the the file ~/.aero_aio/kmail_aio.py, run SK in a terminal and post the output. Thanks.

Report

migsy

13 years ago

I installed this via Get New Stuff. I opened the file through the config dialogue of Aero AIO, but it just doesn't show up. What's going on? I get an error that says:

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

C

kovidgoyal

13 years ago

Are you using the latest aero aio? Do a mkdir -p ~/.aero_aio/sounds/kmail in a terminal and then try it.

Report

tbd

13 years ago

Hi!

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

C

kovidgoyal

13 years ago

I need the topmost error to debug this. You can get the error by starting superkaramba like so

superkaramba aero_aio.skz 2> log

The errors will be recorded in the file log. Post the topmost 2 errors.

Report

tbd

13 years ago

Hi, Kovid,

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

13 years ago

Fine... it seems my problems are due to be using Python 2.3 instead of 2.4. Let us see if I can solve it, although I have my doubts :(

Report

C

kovidgoyal

13 years ago

Ah...well good luck

Report

tbd

13 years ago

I think I managed to find something that seems to be created for compatibility for with python 2.4 in python 2.3. It's a subprocess modules in python 2.3. With this (what I wouldn't trust too much either) here yoy have what it gives me back:

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

13 years ago

I' ve this Problem too. When I click the kamil Button, this messeage oncured until i reload the theme:

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

C

kovidgoyal

13 years ago

Try uninstalling pykde...its optional. Should work fine without it

Report

tbd

13 years ago

I think I managed to find something that seems to be created for compatibility for with python 2.4 in python 2.3. It's a subprocess modules in python 2.3. With this (what I wouldn't trust too much either) here yoy have what it gives me back:

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

13 years ago

I think I managed to find something that seems to be created for compatibility for with python 2.4 in python 2.3. It's a subprocess modules in python 2.3. With this (what I wouldn't trust too much either) here yoy have what it gives me back:

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

C

kovidgoyal

13 years ago

Ah well that seems to a problem with your pykde bindings. Are you using the latest snapshot? PyKDE is optional for kmail, you could uninstall it and it will still work.

Report

13 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

12345678910
product-maker Count:93 Rating: 6.27
File (click to download) Version Description Downloads Date Filesize DL OCS-Install
Pling
*Needs ocs-url or ocs-store to install things
Details
license
version
2.2.1
updated Jan 20 2006
added Nov 26 2005
downloads today
0
page views today 3
+