472,328 Members | 1,156 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 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 1869
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: tammygombez | last post by:
Hey everyone! I've been researching gaming laptops lately, and I must say, they can get pretty expensive. However, I've come across some great...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.