Re: socket question

2006-11-05 Thread John Vetterli
On Sun, 5 Nov 2006, Chris Cole wrote: > hello all, i'm developing a client side gui whose main task is to > process data coming from a remote server. no matter how i try to get > around it (threads, queues, etc), gtk always hangs whenever i do a > call socketFoo.recv(). i know there has to be someo

double "changed" signal

2006-11-05 Thread Paul Pogonyshev
Hi, GtkEntry emits "changed" signal twice on ..._set_text(): with the entry cleared (after deleting whatever was in the entry before) and with the new text. Is it the intended behavior? Can I circumvent it? (I actually code using Gtkmm, but since this is invoked in GTK+ code, I thought I'd ask

Re: socket question

2006-11-05 Thread Samuel Cormier-Iijima
I'm using the GNet library [1], which makes this kind of thing easier with asynchronous (non-blocking) sockets. The callbacks will get run in your main loop, so as long as the handler doesn't take too long to run, the GUI shouldn't block. Maybe if you posted an example of what you're trying to do,

Re: how to get icons for certain applications?

2006-11-05 Thread Paul Pogonyshev
Paul Pogonyshev wrote: > Is there an easy way to get icons of certain installed applications? > E.g. icon of Firefox. This is not really critical, but I'd like to > show icons if it is easy enough. (self-answer, since no other answers appeared I had to study this myself): Try gtk_icon_theme_load

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

GtkStatusIcon and popup menu

2006-11-05 Thread Chris tophe
Hi, I'm writing a little app that's using a systray icon and pop menu when you right-click it to interact with user. I'm displaying the menu with gtk_menu_popup() in response to the "popup-menu" signal. Something is bugging me, it does work, but the menu won't go away unless one of its items is cl

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

socket question

2006-11-05 Thread Chris Cole
hello all, i'm developing a client side gui whose main task is to process data coming from a remote server. no matter how i try to get around it (threads, queues, etc), gtk always hangs whenever i do a call socketFoo.recv(). i know there has to be someone out there who can help me with this __

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

2006-11-05 Thread Johan Kohler
I've been learning to use Gnome::Canvas for some time now The gnome canvas demo app is very useful, but documentation or tutorials are scarce. There are some things that puzzle me though, and I apologise for hi-jacking your thread :-) Does anyone have any idea how to: 1. Access the items on a ca

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

2006-11-05 Thread Jim George
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_drawable. If there's a better way, do let me know (it's one area wh

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-05 Thread Clarity ThroughConfusion
>From: Peter Lund <[EMAIL PROTECTED]> >To: Clarity ThroughConfusion <[EMAIL PROTECTED]> >CC: gtk-app-devel-list@gnome.org >Subject: Re: Checking if cell is the currently selected in a treeview list >Date: Sun, 05 Nov 2006 05:33:49 +0100 > >On Sun, 2006-11-05 at 03:36 +, Dean Ezra wrote: > >

Re: questionfor progress bar

2006-11-05 Thread tomas
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Nov 05, 2006 at 02:59:30PM +0900, Kim Jongha wrote: > Greeting, > > progress bar is updated "only" using timeouts ? > > I read some big file and want to show up the progress how much App. > read file. so I use progress bar like below > > >

Re: Autocompletion with GtkComboBoxEntry

2006-11-05 Thread Peter Clifton
On Sun, 2006-11-05 at 00:03 -0500, David Hampton wrote: > On Sun, 2006-11-05 at 02:52 +, Peter Clifton wrote: > > Hi, > > > > I have been browsing the docs (and Google) to see if I can use an > > GtkEntryCompletion with a GtkComboBoxEntry widget. So far, it looks like > > the answer is "perhap

Re: questionfor progress bar

2006-11-05 Thread Samuel Cormier-Iijima
Adding the work inside the idle function would work, but would be hard to implement (state is spread out between function calls, so hard to debug) and not cross-platform, since I think Linux has only recently added support for AIO (asynchronous input/output). If you'd rather use threads, here's a s

Re: questionfor progress bar

2006-11-05 Thread Van H Tran
Hi, --- Kim Jongha <[EMAIL PROTECTED]> wrote: > /* and the for loop */ > double val; > for(i = 0; i< SOME_NUMBER; i++) > { >val = (100.0 /SOME_NUMBER)* i /100.0; >g_idle_add(show_bar_idle_cb, INT_TO_POINT(val)); > **SOMEWORK** > } > > The problem is that timeout events don't occure

Re: questionfor progress bar

2006-11-05 Thread Tony Newman
Kim Jongha wrote: > Greeting, > > progress bar is updated "only" using timeouts ? > > I read some big file and want to show up the progress how much App. > read file. so I use progress bar like below > > > double val; > for(i = 0; i< SOME_NUMBER; i++) > { >val = (100.0 /SOME_NUMBER)* i /100

Re: questionfor progress bar

2006-11-05 Thread Kim Jongha
Ooch, It doesn't work .. 2006/11/5, Van H Tran <[EMAIL PROTECTED]>: > > I would do it like this, but sorry i haven't got time > to confirm it would work. > > > /* pseudo code*/ > > gboolean * show_bar_idle_cb(pointer val) > { >gtk_progress_bar_set_fraction(POINT_TO_INT(val)); >return FALS

Application Approach

2006-11-05 Thread Chris Horlick
Gtk-Developers, I am somewhat new to the GTK environment and have only started using/looking over the API a month ago. I am trying to write an application that amongst other things will allow the user to manipulate a series of icons in a workspace. For instance the application would start with