472,783 Members | 956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

pygtk statusicon (tray icon)

8
does some one know how to use new statusicon included in pygtk since version 2.10.

I cant find any example on the net.
Dec 22 '06 #1
3 9783
bartonc
6,596 Expert 4TB
gtk.StatusIcon
gtk.StatusIcon()
Returns : a new gtk.StatusIcon

Note
This constructor is available in PyGTK 2.10 and above.

Creates an empty status icon object.

Methods
gtk.StatusIcon.set_from_pixbuf
Expand|Select|Wrap|Line Numbers
  1.     def set_from_pixbuf(pixbuf)
pixbuf : a gtk.gdk.Pixbuf or None

Note
This method is available in PyGTK 2.10 and above.

Makes status_icon display pixbuf. See the gtk.status_icon_new_from_pixbuf() function for details.

gtk.StatusIcon.set_from_file
Expand|Select|Wrap|Line Numbers
  1.     def set_from_file(filename)
filename : a filename

Note
This method is available in PyGTK 2.10 and above.

Makes status_icon display the file filename. See the gtk.status_icon_new_from_file() function for details.

gtk.StatusIcon.set_from_stock
Expand|Select|Wrap|Line Numbers
  1.     def set_from_stock(stock_id)
stock_id : a stock icon id

Note
This method is available in PyGTK 2.10 and above.

Makes status_icon display the stock icon with the id stock_id. See the gtk.status_icon_new_from_stock() function for details.

gtk.StatusIcon.set_from_icon_name
Expand|Select|Wrap|Line Numbers
  1.     def set_from_icon_name(icon_name)
icon_name : an icon name

Note
This method is available in PyGTK 2.10 and above.

Makes status_icon display the icon named icon_name from the current icon theme. See the gtk.status_icon_new_from_icon_name() function for details.
So it's
Expand|Select|Wrap|Line Numbers
  1. myStatusIcon = gtk.StatusIcon()
  2. myStatusIcon.set_from_icon_name(icon_name)
or set the icon any of the other ways available.
Dec 22 '06 #2
xrado
8
i found good example. check this link
Jan 2 '07 #3
bartonc
6,596 Expert 4TB
i found good example. check this link
I will recommend that all GTK users sign up for this list as there are no GTK experts on this forum, yet. A forum makes much more sense than a mial list because you don't get unrelated email in your box, but (for now) this seems like a good solution.
Jan 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Zeljko | last post by:
Hi, I have a form with a tray icon. However, when I minimize the form, it stays visible - not in the task bar (I have showintaskbar property set to false), but in a form of a rectangle sitting...
3
by: Mats-Lennart Hansson | last post by:
Hi, I'm having a hard time getting my service to show a sys tray icon. I've tried to create a separate Windows application where I simply add a notification icon to the form. In the OnStart method...
7
by: Danielb | last post by:
I want my application to run most of the time as just an notify icon visible in the system tray, with some dialogs windows that open if the user selects an option from the context menu on the tray...
2
by: quilkin | last post by:
Hi I have an control app which starts up with a small info message then sits down as a tray icon while it does its work. When started manually (e.g.from a shortcut) this always works fine. However...
4
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other...
5
by: Bry | last post by:
Sorry for the repost, but this has been driving me mad for the past few days. There must be a simple solution. There are many other posts about this problem upon an application exit, but my...
8
by: george d lake | last post by:
Hi, I have an app that runs in the system tray. When I exit the app (from a button on a form) the app ends but the icon stays in the tray. Any ideas? here is the code I use to end the app ...
3
by: Patrick Dugan | last post by:
I am using VS2005 (vb) and I have a program that starts when Windows boots up. Occasionally the icon that should appear in the system tray does not show up. The program is still running in memory...
1
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, how can i remove/disable the tray icon for the started Express Edition from the system tray. Te icon directs me to the express editons website after clicking on it. I dont want these tray...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.