[pygtk] styles not styling quite how I want ....

2001-10-31 Thread mallum

Hi all;

I have the following piece of code the 'recolor' the label in a
notebook tab.



style = self._tab_label.get_style()
new_style = style.copy()
new_style.fg[0] = self.cols['blue']
self._tab_label.set_style(new_style)



It works fine, the tab does indeed become blue ... except the font now
also changes to a much bigger one ( I have a .gtkrc set for a smaller
font, it seems to revert to the default font size ).

Anybody know how to stop this and keep the font the same ?

 many thanks - mallum.

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] getting the Ctree selection

2001-10-26 Thread mallum

on Fri, Oct 26, 2001 at 11:40:41AM -0200, Christian Robottom Reis wrote:
> 
> AFAICT you need to either query the row for the object, or use the
> "selection" member of the CTree in the same manner.
> 
What do you mean by selection member - could you give an example ?

Many thanks;

  -- mallum
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] getting the Ctree selection

2001-10-26 Thread mallum

Hi all;

Ok I build my CTree , add some nodes ( using insert_node ) and attach
some data to them ( using node_set_row_data ). My problem is, how can
I get at that data when its nodes selected ? 

Connecting a "select_row" row event to the tree, just passes the tree
object and a row integer rather than an actual node object - can I get
the node object passed to my callback ?

Many thanks;

  -- Matthew Allum  
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] Improving Start up time

2001-07-05 Thread mallum

Hi All;

Any ideas on decreasing the time it takes for a 
pygtk app to start up - even a simple one. I
run pygtk on a low end machine ( an ipaq ) and
start up times are very slow indeed ( 30 secs )
for very simple apps.

Many thanks

mallum
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] setting a windows normal hints from pygtk

2001-06-03 Thread mallum

Hi all;

Is it possible to set a windows normal hints ( like XSetWMNormalHints in
xlib ) from gtk ? and if so, how ?

mallum
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] ItemFactories and radio items.

2001-05-18 Thread mallum

Hi All;

Im having a few problems using Radiobuttons within an itemfactory menu. 
How do I set / group the buttons ? Using a callback ( attached tothe radio
buttons ) like this;

def viewCB(self,action,widget):
widget.set_active(gtk.FALSE)

give me a segmentation fault ? setting it to gtk.TRUE dosn't - but all the
buttons are activated anyway. 

Also how do I 'grey out' a menu item via an itemfactory - is this possible ?
I cant seem to find any examples of using itemfactorys in a more 'advanced'
way.

Many thanks

mallum
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] GtkTree?

2001-05-03 Thread mallum

wierd this is what I was doing. But with 8 bit vals ;

eg - my_col=window.get_colormap().alloc(0,255,255)

with you 16 bit vals it seem to work !

mallum


on Thu, May 03, 2001 at 01:37:18PM +0200, Alexandre Fayolle wrote:
> On Thu, 3 May 2001, mallum wrote:
> 
> > I've been having this problem as well with a clist. Unfortunatly the solution 
>given here
> > wont work for me as I only want to change individual row colors rather than
> > all of them. Would it be possiblke to reverse individual row foreground and
> > background colors - this would do for me ?
> 
> 
> I'm sorry I missed the beginning of the thread, so this message might be
> completely unrelated. If so please excuse me.
> I don't know how to specifically reverse the colors of a row, but this is
> how I change the background color a an individual row in a GtkCList
> 
> After the widget is realized, I allocate a new color: 
> 
> my_col=window.get_colormap().alloc(65535,51400,51400)
> 
> and then I use list.ser_background(row,my_col), with row being the row
> number of the list. Since a GtkCTree is a GtkCList, this should work too?
> 
> Alexandre Fayolle
> -- 
> http://www.logilab.com 
> Narval is the first software agent available as free software (GPL).
> LOGILAB, Paris (France).
> 
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] GtkTree?

2001-05-03 Thread mallum

I've been having this problem as well with a clist. Unfortunatly the solution given 
here
wont work for me as I only want to change individual row colors rather than
all of them. Would it be possiblke to reverse individual row foreground and
background colors - this would do for me ?

many thanks;

mallum

on Fri, Apr 13, 2001 at 08:41:45PM +0800, James Henstridge wrote:
> On 13 Apr 2001, Rob Brown-Bayliss wrote:
> > Also, I would like to set the background of a GtkCtree to white, but
> > cant seem to make it work.
> 
> Modify your gtkrc file so that the bg[PRELIGHT] for the style applied to
> CTrees widget.
> 
> Programatically, this would be something like:
>   style = ctree.get_style().copy()
>   style.bg[STATE_PRELIGHT] = ctree.get_colormap().alloc('white')
>   ctree.set_style(style)
> 
> But this will make things look weird in some themes, so it is usually
> better to modify the theme colours.
> 

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] How to get window to capture a keyboard event

2001-04-09 Thread mallum

Hi All;

Whats the easiest way to capture a backspace key press in a window ?

Also does any one have any examples of using the cschtml python bindings (
apart from the include test.py file )

Many thanks

mallum
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] Changing a Buttons text

2001-03-29 Thread mallum

Hi all;

Is there an easy way to alter the text contained within an already rendered
button ?

mallum
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



Re: [pygtk] Unmapping a window ?

2001-03-19 Thread mallum

Cool, It worked !

many thanks

mallum

on Mon, Mar 19, 2001 at 06:43:19PM +0800, James Henstridge wrote:
> On Mon, 19 Mar 2001, mallum wrote:
> 
> > Aloha all;
> >
> > Im writing a little pygtk program to provide a launcher frontend to the
> > Stella Atari emulator.
> >
> > I want the app to 'hide', launch the stella application ( currently using
> > system() ) , then reappear when stella is closed down.
> >
> > Im using win.hide() but the window dosn't seem to want to unmapp. However it
> > does when I remove the system() command. Any ideas on how to accomplish this
> > correctly ?
> 
> Maybe try putting the following in your app before calling system:
>   while events_pending()
> mainiteration()
> 
> James.
> 

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk



[pygtk] Unmapping a window ?

2001-03-19 Thread mallum

Aloha all;

Im writing a little pygtk program to provide a launcher frontend to the
Stella Atari emulator. 

I want the app to 'hide', launch the stella application ( currently using
system() ) , then reappear when stella is closed down. 

Im using win.hide() but the window dosn't seem to want to unmapp. However it
does when I remove the system() command. Any ideas on how to accomplish this
correctly ?

Many thanks

mallum
http://10.am

___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk