Re: Programming style

2005-10-24 Thread Gus Koppel
César Leonardo Blum Silveira wrote: > Thanks for your answer! > > So, as my app is a Glade app, I can use that lookup_widget() function > you mentioned? Otherwise I would use your function :-) That's correct. For fully Glade-built UIs both functions are usable. Mine is just a more generic versio

GtkTreeStore and GtkTreeIter

2005-10-24 Thread Dennis Morgan
hey eveyone, This may sound really stupid. but what is the easiest way to obtain the GtkTreeIter of a newly created row? I have a function which adds 2 or more rows but the second and subsequent rows must be a child of the one before.. all the nodes are based on the path to a file.. ie /home /

Re: GtkTreeStore and GtkTreeIter

2005-10-24 Thread Iago Rubio
On Mon, 2005-10-24 at 22:53 +1300, Dennis Morgan wrote: > hey eveyone, > > This may sound really stupid. > but what is the easiest way to obtain the GtkTreeIter of a newly created > row? When you add a row with gtk_tree_store_append or cousins, the GtkTreeIter is stored in the variable you pass

Re: GtkTreeStore and GtkTreeIter

2005-10-24 Thread Dennis Morgan
> > hey eveyone, > > > > This may sound really stupid. > > but what is the easiest way to obtain the GtkTreeIter of a newly created > > row? > > When you add a row with gtk_tree_store_append or cousins, the > GtkTreeIter is stored in the variable you pass to it as second > parameter. It's a retu

Re: GtkTreeStore and GtkTreeIter

2005-10-24 Thread Iago Rubio
On Tue, 2005-10-25 at 00:06 +1300, Dennis Morgan wrote: [snip] > > > I have a function which adds 2 or more rows but the second and subsequent > > > rows must be a child of the one before.. > > > all the nodes are based on the path to a file.. > > > > > > ie /home / someuser/ whateva > > >

re-filter GtkFileChooser widget after changing custom GtkFileFilter

2005-10-24 Thread Olivier Sessink
Hi all, I have a custom GtkFileFilter, some check buttons in the GtkFileChooserDialog affect the filtering. However, after one of the checkboxes have been changed, the GtkFileChooser widget has to refilter (my custom filter func will return a different value). How do I do that?? I've tried to si

Binary writing to an input pipe and ASCII reading from an output one

2005-10-24 Thread Colossus
Hi, I'm trying without success to implement cat /tmp/file.cpio | cpio -tv with g_spawn family and giochannels. My code is to use "g_spawn_async_with_pipes" with both input and output pipes the "cpio -tv" command and then I open in read mode the binary cpio archive (I don't spawn cat just use

Re: Binary writing to an input pipe and ASCII reading from an output one

2005-10-24 Thread Olivier Sessink
Colossus wrote: > Hi, > > I'm trying without success to implement cat /tmp/file.cpio | cpio -tv > with g_spawn family and giochannels. My code is to use > "g_spawn_async_with_pipes" with both input and output pipes the "cpio > -tv" command and then I open in read mode the binary cpio archive (I >

Re: Fwd: Programming style

2005-10-24 Thread Tristan Van Berkom
César Leonardo Blum Silveira wrote: Hello all, I have a few doubts about the way I code my GTK applications. One of them is: Is it ok to use many global variables for the widgets? For example, in a glade app where callbacks are of the form void callback(GtkWidget *widget) Note that you dont h

Win32 Compilers

2005-10-24 Thread Mike.Friedrichs
List, I realize gtk+ binaries are available for win32. Does this imply that binaries are compatible with only MSVC? Are binaries available, which are compatible with MinGW, or even Open Watcom? Thanks, MikeF This e-mail and any attachment are confidential and may be privileged or otherwise pr

Re: Programming style

2005-10-24 Thread Alan M. Evans
On Sat, 2005-10-22 at 11:49, César Leonardo Blum Silveira wrote: > Hello all, > > I have a few doubts about the way I code my GTK applications. One of > them is: Is it ok to use many global variables for the widgets? For > example, in a glade app where callbacks are of the form > > void callback(

Re: Win32 Compilers

2005-10-24 Thread Michael Torrie
On Mon, 2005-10-24 at 09:56 -0500, [EMAIL PROTECTED] wrote: > List, > > I realize gtk+ binaries are available for win32. Does this imply that > binaries are compatible with only MSVC? > Are binaries available, which are compatible with MinGW, or even Open > Watcom? The binaries are built with an

Re: re-filter GtkFileChooser widget after changing custom GtkFileFilter

2005-10-24 Thread Iago Rubio
On Mon, 2005-10-24 at 15:20 +0200, Olivier Sessink wrote: > Hi all, > > I have a custom GtkFileFilter, some check buttons in the > GtkFileChooserDialog affect the filtering. > > However, after one of the checkboxes have been changed, the > GtkFileChooser widget has to refilter (my custom filter f

memprof problem

2005-10-24 Thread Allin Cottrell
I've successfully used memprof for leak-checking my app in the past, but on trying it recently something odd happens: memprof starts up OK, and it also starts up the target program, but the target program is not visible (doesn't appear on screen) and memprof records no memory usage. I tried t

RE: Programming style

2005-10-24 Thread Jorge Monsalvo
In case it help you a little, instead of global variables I normally create a structure with the main components of my application and pass a pointer to that structure to those rutines that need it. Regars Jorge Monsalvo -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Rows in a treeview

2005-10-24 Thread Jorge Monsalvo
I know it is a silly question, but How can I know the number of rows are in a treeview? Thank you Jorge Monsalvo Argentina ___ 1GB gratis, Antivirus y Antispam Correo Yahoo!, el mejor correo web del

Re: Rows in a treeview

2005-10-24 Thread Eduardo M KALINOWSKI
Jorge Monsalvo wrote: >I know it is a silly question, but How can I know the number of rows are in >a treeview? > > Use gtk_tree_model_iter_n_children() passing NULL as the iter. http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeModel.html#gtk-tree-model-iter-n-children -- I kissed my first gi

Re: memprof problem

2005-10-24 Thread Gus Koppel
Allin Cottrell wrote: > I've successfully used memprof for leak-checking my app in the past, > but on trying it recently something odd happens: memprof starts up > OK, and it also starts up the target program, but the target program > is not visible (doesn't appear on screen) and memprof record

Re: Programming style

2005-10-24 Thread Gus Koppel
Tristan Van Berkom wrote: > Every widget callback comes with a "user_data" argument, > and you can pass the desired data through that argument > (which is just as fast as using a global variable and is > just as clean as using a lookup_widget type of routine). Right. However, if you want your sig

Re: Programming style

2005-10-24 Thread Tristan Van Berkom
Gus Koppel wrote: Tristan Van Berkom wrote: Every widget callback comes with a "user_data" argument, and you can pass the desired data through that argument (which is just as fast as using a global variable and is just as clean as using a lookup_widget type of routine). Right. However, if y

Re: memprof problem

2005-10-24 Thread Allin Cottrell
On Mon, 24 Oct 2005, Gus Koppel wrote: Allin Cottrell wrote: I've successfully used memprof for leak-checking my app in the past, but on trying it recently something odd happens: memprof starts up OK, and it also starts up the target program, but the target program is not visible (doesn't appe

Re: data acqusition, display and control

2005-10-24 Thread Premsagar C
On 10/17/05, Tristan Van Berkom <[EMAIL PROTECTED]> wrote: > > Premsagar C wrote: > > I am using gtk to develop a control interface. Am a bit new to this. > > BAsically I am acquiring data using some library functions and > > dispalying them in 6 text boxes . When i click on the bacq function > > t

Win32 Compilers

2005-10-24 Thread Tor Lillqvist
[EMAIL PROTECTED] writes: > I realize gtk+ binaries are available for win32. Does this imply > that binaries are compatible with only MSVC? No. They are built with mingw (i.e., gcc). They work fine also with code built with MSVC6. (The binaries use msvcrt.dll. They presumably should also be com

Re: Binary writing to an input pipe and ASCII reading from an output one

2005-10-24 Thread Colossus
Olivier Sessink wrote: what does that function do? I guess it calls g_spawn_async_with_pipes(), right? Yes. gulong SpawnAsyncProcess (const gchar *command , gboolean ExitStatusFlag , gboolean input_pipe) { GError *error = NULL; gchar **argv; int argcp; g_she