Re: How to keep UTF-8 characters, but escape non-UTF-8 byte sequence to hex codes in ASCII

2006-12-05 Thread Peter Lund
On Mon, 2006-12-04 at 18:22 -0800, Daniel Yek wrote: > At 07:29 AM 12/1/2006, Peter Lund wrote: > >On Thu, 2006-11-30 at 15:46 -0800, Daniel Yek wrote: > > > > > Well, with g_utf8_validate(), it is trivial to implement a function that > > > escape non-UTF-8 bytes

Re: How to keep UTF-8 characters, but escape non-UTF-8 byte sequence to hex codes in ASCII

2006-12-01 Thread Peter Lund
On Thu, 2006-11-30 at 15:46 -0800, Daniel Yek wrote: > Well, with g_utf8_validate(), it is trivial to implement a function that > escape non-UTF-8 bytes to Hex. However, I then found out that TreeView, or > more likely Pango, would unescape the %xx sequence (undo my attempt to help > it) and ch

Re: How to keep UTF-8 characters, but escape non-UTF-8 byte sequence to hex codes in ASCII

2006-12-01 Thread Peter Lund
On Wed, 2006-11-29 at 17:25 -0800, Daniel Yek wrote: > To be clear, I want UTF-8 characters remain UTF-8 and only escape non-UTF-8 > byte sequence. Is there a function that does that? I don't think so. I didn't actually have a look but I don't recall seing one. Luckily, it is easy to write o

Re: Mutex or atomic operations for multithread app?

2006-11-12 Thread Peter Lund
On Sat, 2006-11-11 at 14:29 +0100, Tomasz Jankowski wrote: > I looking for someone, who will say if my idea is bad or good ;) > I have an object based on GObject, which have quite many int variables. This > object is used by many threads and i'm wondering if I really need to use > mutex when I wan

Re: GtkStatusIcon and popup menu

2006-11-09 Thread Peter Lund
On Tue, 2006-11-07 at 02:27 +0100, Chris tophe wrote: > Because GtkStatusIcon is not a widget. Ah. I use the EggTrayIcon code because I used (and still use) GTK+ 2.8. -Peter ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail

Re: GtkStatusIcon and popup menu

2006-11-06 Thread Peter Lund
On Sun, 2006-11-05 at 18:31 +0100, Chris tophe wrote: > click somewhere out of it. I tried around, this problem doesn't happen when > calling gtk_menu_popup in response to a widget's "button-press-event"/button > == 3 for example, only in "popup-menu" callback. Any idea to make this menu > go awa

Re: socket question

2006-11-06 Thread Peter Lund
On Sun, 2006-11-05 at 19:08 -0500, Chris Cole wrote: > Is there anything like this for python? Did you set the socket to non-blocking mode? (man fcntl, look for O_NONBLOCK) -Peter ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http:

Re: canvas, cairo and/or pixbufs? (was Re: Application Approach)

2006-11-05 Thread Peter Lund
On Sun, 2006-11-05 at 18:36 +0200, Johan Kohler wrote: > 1. Access the items on a canvas after they've been created? > 2. Delete items on a canvas after they've been created? option 1: keep track of them yourself. option 2: exploit that GnomeCanvas is (indirectly) derived from GtkContainer, which

Re: canvas, cairo and/or pixbufs? (was Re: Application Approach)

2006-11-05 Thread Peter Lund
On Sun, 2006-11-05 at 09:35 -0700, Jim George wrote: > I suppose one problem with the Pixbuf approach is that a Pixbuf is not > a drawable (unlike a Pixmap), so you either need to come up with your > own drawing routines for lines and such, or draw onto a Pixmap and use > gdk_pixbuf_get_from_drawab

canvas, cairo and/or pixbufs? (was Re: Application Approach)

2006-11-05 Thread Peter Lund
On Sun, 2006-11-05 at 02:07 -0600, Chris Horlick wrote: > That is the overview the question that i have is about the overall > approach to this project. I am thinking of using a GtkImage to display a > GdkPixbuf which actually holds the contents of the > workspace(icons,lines,nodes...). The Gtk

Re: Checking if cell is the currently selected in a treeview list

2006-11-04 Thread Peter Lund
On Sun, 2006-11-05 at 03:36 +, Dena Ezra wrote: > Hi, > > I have written a custom cell renderer for a list and would like to only draw > text in the cell (inside the 'render' function) when it is the focused cell > in the list. Ok, so you have a render() function in your GtkCellRenderer-der

Re: GtkLayout and Pango

2006-11-03 Thread Peter Lund
On Thu, 2006-11-02 at 20:58 +0100, Sham Gardner wrote: > I'm writing an application that uses a GtkLayout as a large horizontally > scrollable area and uses Pango to plot short pieces of text at regular > intervals within that area. Other drawing primitives are also used at > similar intervals