473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Kde Taskbar

Hello

In linux I use kmail as my email client under KDE,
if a message comes in the Kontact button in the
taskbar changes to blue.
How can I have the same behaviour in a python app ?

I have a python script which runs nicely under linux
now every so often I want to be notified by some event,
in this case that a record has been added to a database
and I want to have the application button in the taskbar
to change color

Thanks for any pointers , I am out of my depth here

Db
Oct 7 '06 #1
8 1916
DarkBlue schrieb:
Hello

In linux I use kmail as my email client under KDE,
if a message comes in the Kontact button in the
taskbar changes to blue.
How can I have the same behaviour in a python app ?

I have a python script which runs nicely under linux
now every so often I want to be notified by some event,
in this case that a record has been added to a database
and I want to have the application button in the taskbar
to change color

Thanks for any pointers , I am out of my depth here
pykde afaik supports systray-iconified apps. And you could use the
dcop-mechanisms that are available as command line tools as well I
guess, and invoke knotify.

Hope this gives you some pointers - I'm currently on my mac so I can't
provide an actual example.

Diez
Oct 7 '06 #2
On Saturday 07 October 2006 14:59, DarkBlue wrote:
In linux I use kmail as my email client under KDE,
if a message comes in the Kontact button in the
taskbar changes to blue.
How can I have the same behaviour in a python app ?
You need to activate the window associated with the application.
I have a python script which runs nicely under linux
now every so often I want to be notified by some event,
in this case that a record has been added to a database
and I want to have the application button in the taskbar
to change color
If the script is running in a console, you'll need to activate
the window containing the console. I tried doing this by accessing
konsole's DCOP interface, but couldn't find a suitable method to
call. If you know which konsole your script is running in, you might
find that you can raise the window with

dcop konsole-<pidkonsole-mainwindow#1 raise

where <pidis the process ID of the konsole. This might have the
effect of causing its taskbar button to change color. You can find
information about the konsole from the KONSOLE_* environment
variables.

It would be good if konsole had a DCOP method that enabled you to
activate its window, or if kicker exported an interface for the
taskbar, or even if kwin had some way of letting you activate a
window given its ID. Unfortunately, I couldn't find methods for
any of these, so you would have to think about using PyKDE to get
at this functionality.

It would be good if someone could prove me wrong on any of this. ;-)

David
Oct 7 '06 #3
Diez B. Roggisch wrote:
>
pykde afaik supports systray-iconified apps. And you could use the
dcop-mechanisms that are available as command line tools as well I
guess, and invoke knotify.

Hope this gives you some pointers - I'm currently on my mac so I can't
provide an actual example.

Diez
Thank you ,
a quick look at pykde tells me that
this will need some research

Db
Oct 7 '06 #4
David Boddie wrote:
On Saturday 07 October 2006 14:59, DarkBlue wrote:
>In linux I use kmail as my email client under KDE,
if a message comes in the Kontact button in the
taskbar changes to blue.
How can I have the same behaviour in a python app ?

You need to activate the window associated with the application.
>I have a python script which runs nicely under linux
now every so often I want to be notified by some event,
in this case that a record has been added to a database
and I want to have the application button in the taskbar
to change color

If the script is running in a console, you'll need to activate
the window containing the console. I tried doing this by accessing
konsole's DCOP interface, but couldn't find a suitable method to
call. If you know which konsole your script is running in, you might
find that you can raise the window with

dcop konsole-<pidkonsole-mainwindow#1 raise

where <pidis the process ID of the konsole. This might have the
effect of causing its taskbar button to change color. You can find
information about the konsole from the KONSOLE_* environment
variables.

It would be good if konsole had a DCOP method that enabled you to
activate its window, or if kicker exported an interface for the
taskbar, or even if kwin had some way of letting you activate a
window given its ID. Unfortunately, I couldn't find methods for
any of these, so you would have to think about using PyKDE to get
at this functionality.

It would be good if someone could prove me wrong on any of this. ;-)

David
My python app actually is a pythoncard app
which I hope will make things easier.

Db
Oct 7 '06 #5
On Saturday 07 October 2006 15:41, Diez B. Roggisch wrote:
pykde afaik supports systray-iconified apps. And you could use the
dcop-mechanisms that are available as command line tools as well I
guess, and invoke knotify.
I think DarkBlue wanted to affect the behaviour of the taskbar, though
a system tray icon might be a reasonable alternative.
Hope this gives you some pointers - I'm currently on my mac so I can't
provide an actual example.
I'd be interested in an example of how to use knotify via DCOP. A few
minutes at the command line looking at the DCOP interface didn't prove
particularly fruitful for me.

David
Oct 8 '06 #6
On Saturday 07 October 2006 16:29, DarkBlue wrote:
David Boddie wrote:
>You need to activate the window associated with the application.
[...]
My python app actually is a pythoncard app
which I hope will make things easier.
If PythonCard or its underlying API has a function for activating
windows, this _should_ do what you want.

David
Oct 8 '06 #7
In message <b9**************************@news.chello.no>, David Boddie
wrote:
I'd be interested in an example of how to use knotify via DCOP.
Found a tutorial here <http://lukeplant.me.uk/articles.php?id=3>.
Oct 8 '06 #8
On Sunday 08 October 2006 14:16, Lawrence D'Oliveiro wrote:
In message <b9**************************@news.chello.no>, David Boddie
wrote:
>I'd be interested in an example of how to use knotify via DCOP.

Found a tutorial here <http://lukeplant.me.uk/articles.php?id=3>.
Thanks for the link. Maybe the original poster can use something
from the tutorial if the window activation trick doesn't work.

David
Oct 8 '06 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shayne H | last post by:
I want to be able to add a clock to the title of a VB.NET form. Simply updating the FormClass.Text property does not quite make it, the titile only changes once the form is minimised/maximised....
0
by: D Witherspoon | last post by:
An application I've just finished developing is not showing up in the taskbar on startup until the application is clicked on. This makes it difficult as it is being launched as a No Touch...
1
by: vijay | last post by:
To add a taskbar to a C# application Am currently developing a windows console application in C# (.NET 2003) and have a requirement to build a taskbar. The windows application is designed to...
3
by: Maka Sili | last post by:
Hi, My VC++ application does not have a titlebar (and therefore no System menu, no minimize, no maximize and no close button). We have a custom button for minimize and close. When the app...
2
by: JohnProgrammer | last post by:
I know I can fill the screen in VB.NET by starting my window maximized and without a border. My question is; in VB.NET is there a way to enable/disable the taskbar much like doing the "always on...
2
by: Geoff Jones | last post by:
Hiya Can anybody help me with the following question? I have an application which has a maximised main form. At startup, the form is maximised but the taskbar is still visible at the bottom of...
2
by: Rain | last post by:
Does anyone know the code in C# or snippet or API so i can hide and show the windows taskbar? Many people have suggested using ShowWindow and FindWindow or the ABM_SETSTATE but i am having problem...
6
lotus18
by: lotus18 | last post by:
Hello World I have an API here that shows and hides the windows taskbar. My question is ... how can I completely hide the taskbar without a space below? Like setting it to Auto-hide the taskbar on...
5
by: Lee | last post by:
Hi, I'm looking for a way to determine the location of the taskbar, whether it's located at the top, bottom, left or right of the screen. Is there any way this can be done and if so, would...
10
by: Mark Rae [MVP] | last post by:
Hi, This is really just a theoretical question for my own interest, and not for any nefarious purpose... :-) Say we have three applications running - Notepad, Wordpad and Excel - and each...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.