[pygtk] Re: XPN nitpicking

2006-03-14 Thread Nemesis
On Mon, 13 Mar 2006 19:44:30 +0100
Danny Milosavljevic [EMAIL PROTECTED] wrote:

  XPN (X Python Newsreader) i
 Very nice :)

Thanks.

 Let me nitpick for a bit though:
 - This layout is missing:
   [groups]
   [threads]
   [message]
 
   I have a small screen so having every part span the whole line is
 best
 
 - This layout is missing:
   [groups]
   [threads]  [message]
 
   It's arguable if that would be useful or not :)

Lots of layouts are missing, I only coded the most (or at least those
I think are the most used), maybe I'll add more layouts in future
releases.
 
 (and dont do the number labels in the display settings - just use
 h/vboxes with frames and the actual text in - or does that take too
 much space? probably)

To much space ... and to much code ;-)
 
 - There are several things that are out of fashion on Gnome, at least.
 For example Yes/No buttons. Better use (for the first dialog)
 Configure and Quit 

You are right but XPN is not a Gnome newsreader it's a GTK
newsreader, I tried to read the Gnome HIG but they are painful for me.

 (or Cancel? - not sure what No does -
 didn't try because I didnt want to break it - if I said No once,
 who knows if it were to ask me again later...)

You could say No, it doesn't ask you again because when you close
XPN it creates the config file.
 
 - I must get used to have to double-click on something that neither
 opens a new window/app as a reaction nor destroys the current window's
 content (eg in the group treeview) - why not just react on selection
 change? Or will opening a group also cause destructive stuff to run
 - i.e. expiration - ? If so, double clicking is ok...

In the groups treeview (and in the articles treeview too) you have
both choice, you can use double-click or single-click (it's
configurable) to open the group.
 
 - In the preferences, Groups properties, the purge options dont have
 labels that tell the unit (i.e. days (?))

You are right, it's only in the tooltip.

 - What's the funny Status Number in the leftmost column of the threads
 view? 6? What? :) Oh, playing for a few minutes I *think* it's the
 number of unread posts in the thread...  

Yes!

 - There is something called GtkExpander that does what your Hide
 Headers button does, automatically. Not saying that you should use
 it, just making sure you know...

I discovered it just after I already coded my expander, I also tried
to use it ... but I don't like it, my button is nices ;-)
 
 - Reading a message also needs me to double click in the threads
 view... I think that actions that are non-destructive and non-long-
 running can also be done just fine with one click :)

It's configurable (like groups), tab Miscellaneous in Config Window,
One Click Enter Article.

 - The default message font is too small - best default to what
 GtkSettings property gtk-font-name says 

Ah! I didn't know GtkSettings ^__^;;

 Hope that helps :)

Thank you.

-- 
 
 |\ |   |HomePage   : http://nem01.altervista.org
 | \|emesis |XPN (my nr): http://xpn.altervista.org
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Generating Keyboard Events

2006-03-14 Thread Chris Gonnerman
Can anyone give me some guidance on generating keyboard events?  There 
are a couple of widgets that just don't work to suit me, and which 
cannot (so far as I can tell) be directly overridden; the 
gtk.EntryCompletion is my #1 pet peeve, for how it handles Tab.  I'd 
like to catch the keystroke (which I know how to do), nullify it (which 
I think I know how to do), and generate a Return and a Tab and have them 
handled in that order (I'll need to keep a flag to prevent the synthetic 
Tab from making the whole mess loop).


But I'm not having any luck finding guidance for creating synthetic 
keyboard events.


Anybody?

-- Chris.

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Avoiding recursive event loops... or using better toggle buttons

2006-03-14 Thread Steve McClure
On Tue, 2006-03-14 at 15:41 -0300, Ricardo Staudt wrote:
 Hello everyone, this is a tricky question:
 
 I'm trying to make a list of toggle buttons that, when one is pressed, 
 the others are unpressed. I don't see a way to link them to do this 
 automatically (if you guys know, please let me know), so I what I try is 
 something like this:
 
 Whenever one Toggle button is clicked, it raises the click event, there 
 (inside the event function) I unpress all others by hand.
 
 The problem is that when I unpress them it calls for the same click 
 event function, causing a recursion limit error. Any ideas?

It sounds like you want the behavior of RadioButtons instead of just
ToggleButtons.

 ___
 pygtk mailing list   pygtk@daa.com.au
 http://www.daa.com.au/mailman/listinfo/pygtk
 Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
-- 
Steve McClure   Racemi
email: [EMAIL PROTECTED]  380 Interstate North 
Pkwy, SE
voice: 404-892-5850 Suite 250
fax: 404-892-7215   Atlanta, GA 30339
http://www.racemi.com

___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] just for info [a bit OT]

2006-03-14 Thread pier carteri
Hi to all,I've just discover this:http://mail.python.org/pipermail/python-announce-list/2006-March/004773.htmlIt's not directly relate to pygtk but I think it' s a very nice project and someone on 
this list may help with ideas or code.thank you for your attention! Pier
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Avoiding recursive event loops... or using better toggle buttons

2006-03-14 Thread Ricardo Staudt




Steve McClure wrote:

  On Tue, 2006-03-14 at 15:41 -0300, Ricardo Staudt wrote:
  
  
Hello everyone, this is a tricky question:

I'm trying to make a list of toggle buttons that, when one is pressed, 
the others are unpressed. I don't see a way to link them to do this 
automatically (if you guys know, please let me know), so I what I try is 
something like this:

Whenever one Toggle button is clicked, it raises the click event, there 
(inside the event function) I unpress all others by hand.

The problem is that when I unpress them it calls for the same click 
event function, causing a "recursion limit" error. Any ideas?

  
  
It sounds like you want the behavior of RadioButtons instead of just
ToggleButtons.
  

Yes, exactly. Also if anyone can explain how I can also avoid the
recursion problem when calling for events within event function, that
would also be nice.


___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Generating Keyboard Events

2006-03-14 Thread Nikos Kouremenos
On 3/14/06, Chris Gonnerman [EMAIL PROTECTED] wrote:
 Can anyone give me some guidance on generating keyboard events?  There
 are a couple of widgets that just don't work to suit me, and which
 cannot (so far as I can tell) be directly overridden; the
 gtk.EntryCompletion is my #1 pet peeve, for how it handles Tab.  I'd
 like to catch the keystroke (which I know how to do), nullify it (which
 I think I know how to do), and generate a Return and a Tab and have them
 handled in that order (I'll need to keep a flag to prevent the synthetic
 Tab from making the whole mess loop).

 But I'm not having any luck finding guidance for creating synthetic
 keyboard events.

 Anybody?


event = gtk.gdk.Event(gtk.gdk.KEY_PRESS) # it's always a key-press here
event.keyval = gtk.keysyms.Return
event.state = gtk.gdk.CONTROL_MASK
event.time = 0 # assign current time

widget_that_should_accept_signal.emit('key_press_event', event)

I put those in an FAQ
--
Nikos Kouremenos
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Changing a DrawingArea or Pixmap palette ?

2006-03-14 Thread Jerry McMahan Jr.
I'm trying to write utility for drawing tiles, and I'm using  a 
DrawingArea with an off-screen Pixmap similar to the scribble example 
program in the PyGTK tutorial, although I am allowing different colors. 
My question is if there's a simple way to change the palette of what 
you have drawn onto the DrawingArea (or really the Pixmap, as that's 
what is getting drawn to). The tiles in my program are limited to four 
colors and I let the user change which 4 colors are used (as his 
palette, the way I've normally heard it called) from another limited 
set of colors (64 of them). What I would like to do is to update 
whatever they've drawn on the screen with the new colors, when he 
changes, but I'm having a lot of trouble figuring out a good way to do 
this or finding any info / examples that relate to it. Is there an easy, 
built-in way to do this, or if not, does anyone have a suggestion as to 
a good way to do this (especially nice if there's an example somewhere)?


Just to clarify, if the above isn't understandable, say the user has a 
palette of the colors labeled 0, 1, 2, and 3. Say there is a single line 
with those colors and it is represented below, with each number 
representing a pixel:


0 0 0 1 0 3 2 0

Now say the user changes his palette so that the color which was labeled 
0 is now the color labeled 4, 1 is now 5, 2 is now 6, and 3 is now 7. I 
would like to make my program automatically update these changes so the 
line looks like this:


4 4 4 5 4 7 6 4

Is this possible with the DrawingArea / Pixmap? Thanks for any help.


--
J. A. McMahan Jr.
___
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/