pygtk statusicon (tray icon)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xrado
    New Member
    • Dec 2006
    • 8

    #1

    pygtk statusicon (tray icon)

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

    I cant find any example on the net.
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by http://www.pygtk.org/pygtk2reference/class-gtkstatusicon.h tml
    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
    Code:
        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_pixbu f() function for details.

    gtk.StatusIcon. set_from_file
    Code:
        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
    Code:
        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_n ame
    Code:
        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
    Code:
    myStatusIcon = gtk.StatusIcon()
    myStatusIcon.set_from_icon_name(icon_name)
    or set the icon any of the other ways available.

    Comment

    • xrado
      New Member
      • Dec 2006
      • 8

      #3
      i found good example. check this link

      Comment

      • bartonc
        Recognized Expert Expert
        • Sep 2006
        • 6478

        #4
        Originally posted by xrado
        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.

        Comment

        Working...