John, I tried the modify_bg call as follows:
    self.pbar.modify_bg(gtk.STATE_PRELIGHT, 
self.pbar.get_colormap().alloc_color("yellow"))

It accepted the command, but did not actually change the color.  (I saw a 
comment in q_use_statusicon.py file you sent me that says "This does not work 
for certain gtk/gnome themes".  That sure is disappointing.  Is there a setting 
change I can make to the theme to make it work?

I have not heard of cairo.  Can you give me an example of cairo code?  Perhaps 
some code fragment that I can modify into a progress bar with text?

Thanks again for your help,
Robert

-----Original Message-----
From: John Stowers [mailto:[email protected]]
Sent: Monday, July 02, 2012 9:42 AM
To: Robert Pinsky
Cc: pygtk
Subject: Re: [pygtk] gtk.ProgressBar color

Please remember to reply to the list.

OK, 10.10 is old. Don't bother with a port.

One of the many things that changed in gtk3 was how themes and stuff
like this was handled.

IIRC modifying the gtk2 progressbar background color never really
worked that well search for modify_bg here

http://www.damtp.cam.ac.uk/internal/computing/docs/public/quota-status/OLD/q-use-statusicon.py

If I was you I would write my own simple progressbar using cairo, and
color it directly.

If you upgrade your distribution and are interested in porting, see
the following

The updated docs for pygobject+gtk3 live here
http://readthedocs.org/projects/python-gtk-3-tutorial/

and a porting guide is here

https://live.gnome.org/PyGObject/IntrospectionPorting

John

On Mon, Jul 2, 2012 at 6:29 PM, Robert Pinsky <[email protected]> wrote:
> This is the version of gtk that was previously setup by previous developers.  
> I am open to upgrading, but I am concerned about how long it would take to 
> verify that all of our legacy code still works.  I could try it.  If I 
> upgrade to version 3, do you think my legacy could would continue to work?  
> My system is running ubuntu 10.10.
>
> I assume you are asking me this question because there is support to do this 
> in version 3, but not in version 2?
>
> Thanks,
> Robert
>
>
>
> -----Original Message-----
> From: John Stowers [mailto:[email protected]]
> Sent: Monday, July 02, 2012 9:11 AM
> To: Robert Pinsky
> Cc: [email protected]
> Subject: Re: [pygtk] gtk.ProgressBar color
>
> Firstly, is there any reason you are not using gtk+-3 and the new
> PyGObject bindings?
>
> Pygtk is not receiving any new features now.
>
> John
>
> On Mon, Jul 2, 2012 at 6:00 PM, Robert Pinsky <[email protected]> wrote:
>> Hi, I am new to working in gtk.  I have an application that displays several
>> progress bars.  My manager has asked me to change the progress bar's color
>> based upon if that specific step passed or failed.  It defaults to orange
>> and he wants it to be changed to green or red once it reaches 100% to
>> indicate success or failure.  These progress bars have text on them.
>>
>>
>>
>> Is there a way to change the color of the progress bar once it reaches 100%.
>>
>>
>>
>> My application is too large to attached, so I have attached a sample
>> progress bar test application to this email.  If you could talk to this
>> example, I am sure I can make it work in my application.
>>
>>
>>
>> Thanks for your help,
>>
>> Robert Pinsky
>>
>> The IMS Company
>>
>> 2929 Imperial Hwy
>>
>> Brea, CA  92821
>>
>> (714) 264-5201
>>
>>
>>
>>
>> ________________________________
>>
>>
>> This email and any files transmitted with it are confidential & proprietary
>> to Systems and Software Enterprises, Inc. (dba IMS). This information is
>> intended solely for the use of the individual or entity to which it is
>> addressed. Access or transmittal of the information contained in this
>> e-mail, in full or in part, to any other organization or persons is not
>> authorized.
>>
>> _______________________________________________
>> pygtk mailing list   [email protected]
>> http://www.daa.com.au/mailman/listinfo/pygtk
>> Read the PyGTK FAQ: http://faq.pygtk.org/
>
> ________________________________
>
>
> This email and any files transmitted with it are confidential & proprietary 
> to Systems and Software Enterprises, Inc. (dba IMS). This information is 
> intended solely for the use of the individual or entity to which it is 
> addressed. Access or transmittal of the information contained in this e-mail, 
> in full or in part, to any other organization or persons is not authorized.

________________________________


This email and any files transmitted with it are confidential & proprietary to 
Systems and Software Enterprises, Inc. (dba IMS). This information is intended 
solely for the use of the individual or entity to which it is addressed. Access 
or transmittal of the information contained in this e-mail, in full or in part, 
to any other organization or persons is not authorized.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to