RE: [gtk-list] private entry widget



I have a working password entry field, in a severely hacked gtkentry
widget (called gtkinput).

It is fairly straightforward to implement, but the trick is to get the
cursor positioning right, as the cursor location is worked out by
calculating the length of the _real_ string, not the display string.
Doing a gtk_input_get_text (widget) returns the string typed in.

You can see a screenshot of a working password field on the gtk_pizza
page, or you can grab the source archive and pull out the gtkinput.[c,h]
files.  Alternately, you can get the gnuera archive, which is much
smaller, but also contains a copy of gtkinput.[c,h]. Now that I think
about it, you should grab the gnuera archive because this one contains
some additional hacks to define NUMERIC only fields as well.

gtkinput allows you to set the style of the entry field to :
NORMAL   (std gtkentry behaviour)
UPPERCASE
LOWERCASE
PASSWORD
NUMBER

It is somewhat lame, but it does everything I need it to do anyway.

URL's:
Newer, Small archive http://www.iweb.net.au/~steveoc/gnuera.html
(snapshot is up the top somewhere)
Large archive http://www.iweb.net.au/~steveoc/gtk_pizza.html
(archive is down the bottom somewhere)

> -----Original Message-----
> From:	br0ke@shells.clipboard.com [SMTP:br0ke@shells.clipboard.com]
> Sent:	Monday, August 31, 1998 10:19 AM
> To:	gtk-list@redhat.com
> Subject:	[gtk-list] private entry widget
> 
> Hi, a while ago there was some discussion about making a private entry
> widget
> for stuff like passwords. I was wondering if anyone was working on
> this. If
> no one is, I'd be happy to give it a try :) I poked through gtkentry.c
> and I
> don't think it'd be too tricky to put in.
> 	-Erik
> 
> -- 
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]