Adrian E. Feiguin | 1 May 01:30 2004
Picon

Re: gtkextra-2: Problem adding children to inserted rows in a GtkSheet

Hi Al! Tell me, what widget are you adding to the sheet? It's not the 
same for all widgets, and things have changed in gtk-2, so I need to 
know if it's  button, an entry, or what. Thanks!
<ADRIAN>

Al Hooton wrote:

>	Hey folks:
>
>	Anybody still on this list?  Adrian?  Just wondering if gtkextra has
>been abandoned since I looked at it last (which would be a real shame),
>or if it's just spring break...  
>
>	I'm still trying to figure out a workaround/solution for the following
>problem, if anybody has any thoughts.
>
>
>On Sun, 2004-04-11 at 08:25, Al Hooton wrote:
>  
>
>>I am using gtkextra-2 built from CVS about a couple of months ago.  I'm
>>running on linux (Mandrake 9.1, recent 2.4.x kernel/libs).  The GTK is
>>gtk+-2.2.4.
>>
>>I'm having a problem with adding children to inserted rows in a
>>GtkSheet.  If I add children to rows that existed when I *created* the
>>sheet, they work fine.  However, if I add children to rows I *inserted*
>>later, I can not get them to show:
>>
>>This works:
(Continue reading)

Adrian E. Feiguin | 1 May 01:48 2004
Picon

Re: gtkextra-2: Problem adding children to inserted rows in a GtkSheet

Al, can you send a minimalistic modification to testgtksheet.c, say in 
show_child (it s called when you click on the "show me a plot" button), 
to illustrate the problem? Thanks!
<ADRIAN>

Adrian E. Feiguin wrote:

> Hi Al! Tell me, what widget are you adding to the sheet? It's not the 
> same for all widgets, and things have changed in gtk-2, so I need to 
> know if it's  button, an entry, or what. Thanks!
> <ADRIAN>
>
> Al Hooton wrote:
>
>>     Hey folks:
>>
>>     Anybody still on this list?  Adrian?  Just wondering if gtkextra has
>> been abandoned since I looked at it last (which would be a real shame),
>> or if it's just spring break... 
>>     I'm still trying to figure out a workaround/solution for the 
>> following
>> problem, if anybody has any thoughts.
>>
>>
>> On Sun, 2004-04-11 at 08:25, Al Hooton wrote:
>>  
>>
>>> I am using gtkextra-2 built from CVS about a couple of months ago.  I'm
>>> running on linux (Mandrake 9.1, recent 2.4.x kernel/libs).  The GTK is
>>> gtk+-2.2.4.
(Continue reading)

Al Hooton | 2 May 15:43 2004

Re: gtkextra-2: Problem adding children to inserted rows in a GtkSheet

	Adrian,

	Thanks again for taking a look at this.  Here are answers to your
questions:

> Hi Al! Tell me, what widget are you adding to the sheet? It's not the 
> same for all widgets, and things have changed in gtk-2, so I need to 
> know if it's  button, an entry, or what. Thanks!

	I'm having the problem with both optionMenus and buttons (I have not
tried others).  I'm using gtk_sheet_attach for both kinds of child
widgets that I'm adding to a sheet, see below.

> Al, can you send a minimalistic modification to testgtksheet.c, say in 
> show_child (it s called when you click on the "show me a plot" button), 
> to illustrate the problem? Thanks!

	Yes, see the modified testgtksheet.c below (Adrian, I'll also send a different note to you with the file
attached, since the listserv won't support attachements).  Here is a summary of the few changes to
demonstrate the problem:

- A routine is added, buildSheetRowEmpty, that attachs an optionMenu and two buttons to a row in the sheet. 
This is called once from buildExample1 so you can see the child widgets in row that existed when the sheet
was initially created.  These child widgets appear correctly.

- I've disconnected the "Show Plot" button from your signal handler, and connected it to mine
(sigAddClicked) that inserts a row in the spreadsheet by calling buildSheetRowEmpty and adds the text
"added row" in one of the columns so you can see which row was added.  I also renamed the button "Add Row Below"

- sigAddClicked calls gtk_sheet_insert_rows to add a row, and then calls buildSheetRowEmpty to attach
(Continue reading)

Adrian E. Feiguin | 7 May 04:06 2004
Picon

Re: gtkextra-2: Problem adding children to inserted rows in a GtkSheet

Hi Al, I commited a new version of gtksheet.[ch] to cvs. It's not the 
final version though, but, it fixes all your problems. Let me know.
(It's not the final version because I still have to add the GtkSheet 
object properties)
Saludos,
<ADRIAN>

Al Hooton wrote:

>	Adrian,
>
>	Thanks again for taking a look at this.  Here are answers to your
>questions:
>
>  
>
>>Hi Al! Tell me, what widget are you adding to the sheet? It's not the 
>>same for all widgets, and things have changed in gtk-2, so I need to 
>>know if it's  button, an entry, or what. Thanks!
>>    
>>
>
>	I'm having the problem with both optionMenus and buttons (I have not
>tried others).  I'm using gtk_sheet_attach for both kinds of child
>widgets that I'm adding to a sheet, see below.
>
>  
>
>>Al, can you send a minimalistic modification to testgtksheet.c, say in 
>>show_child (it s called when you click on the "show me a plot" button), 
(Continue reading)

Al Hooton | 14 May 16:12 2004

Re: gtkextra-2: Problem adding children to inserted rows in a GtkSheet

	Adrian,

	Thank you again for jumping on this so quickly!  In my initial testing,
it appears that add_rows() and delete_rows() are both working
as-advertised in gtkextra-2 from CVS.

	One question:  If I call delete_rows() on a row with children attach, I
assume the GtkSheetChild nodes are correctly deleted in your code. 
However, do you also destroy the actual child widgets I attached (my
buttons, menus, etc.)?  My guess is that you do not, and I need to do it
to avoid memory leaks.  I can go through the code to figure this out,
but I figured you would know this immediately.  Just a one-line answer
is fine.

	Thanks again, Adrian!  If you need beta-testers as you get gtkextra-2
ready to release, I can help out.

Regards,
Al


On Mon, 2004-05-10 at 17:47, Adrian E. Feiguin wrote:
> Fixed! You can get it from cvs. Thanks for the reports. Saludos,
> <ADRIAN>
> 
> Al Hooton wrote:
> 
> >	Adrian,
> >
> >	This is excellent, *thank you* for working on this.  The
(Continue reading)

Adrian E. Feiguin | 14 May 22:44 2004
Picon

Re: gtkextra-2: Problem adding children to inserted rows in a GtkSheet

Hi Al,
 I'm pretty sure that the widgets are freed after you remove them or 
delete a row. If you detect any memory leaks, let me know, but they 
shouldn't be related to the widgets. If you want to keep your widget 
after removing it, the idea is that you use gtk_widget_ref, to prevent 
it from being destroyed.
Saludos,
<ADRIAN>

Al Hooton wrote:

>	Adrian,
>
>	Thank you again for jumping on this so quickly!  In my initial testing,
>it appears that add_rows() and delete_rows() are both working
>as-advertised in gtkextra-2 from CVS.
>
>	One question:  If I call delete_rows() on a row with children attach, I
>assume the GtkSheetChild nodes are correctly deleted in your code. 
>However, do you also destroy the actual child widgets I attached (my
>buttons, menus, etc.)?  My guess is that you do not, and I need to do it
>to avoid memory leaks.  I can go through the code to figure this out,
>but I figured you would know this immediately.  Just a one-line answer
>is fine.
>
>	Thanks again, Adrian!  If you need beta-testers as you get gtkextra-2
>ready to release, I can help out.
>
>Regards,
>Al
(Continue reading)

Al Hooton | 25 May 06:07 2004

gtksheet supporting the "activate" signal?

	This question pertains to gtkextra-2 from CVS as of a week or so back:

	Is anybody using the "activate" signal in gtksheet?  I am hooking a
handler to this signal, and have confirmed that it is fired every time I
select a sell in the gtksheet.  My understanding is that if my handler
returns TRUE, the cell should activate as normal, but if the handler
returns FALSE, then the cell should not be activated (the currently
activated cell is not changed).

	I have confirmed that even when my "activate" handler returns FALSE,
the cell is still activated.  Is anybody seeing this problem besides me?

	Adrian, is the "activate" signal supposed to be supported correctly, or
is this a known problem?

	Thanks!

-Al

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
Adrian E. Feiguin | 26 May 00:11 2004
Picon

Re: gtksheet supporting the "activate" signal?

Hi Al,
 I don't remember why, but there was a good reason why "activate" works 
like it does. The "activate" signal is emitted AFTER the cell has been 
activated, "deactivate" BEFORE the cell is deactivated. If you return 
FALSE for "deactivate", then the active cell will remain the same. The 
signal you want  to use is "traverse", which tells you which cell would 
be deactivated, and which cell would be activated. If you return FALSE, 
then the change is rejected.
Hope this helps. Saludos,
<ADRIAN>

Al Hooton wrote:

>	This question pertains to gtkextra-2 from CVS as of a week or so back:
>
>	Is anybody using the "activate" signal in gtksheet?  I am hooking a
>handler to this signal, and have confirmed that it is fired every time I
>select a sell in the gtksheet.  My understanding is that if my handler
>returns TRUE, the cell should activate as normal, but if the handler
>returns FALSE, then the cell should not be activated (the currently
>activated cell is not changed).
>
>	I have confirmed that even when my "activate" handler returns FALSE,
>the cell is still activated.  Is anybody seeing this problem besides me?
>
>	Adrian, is the "activate" signal supposed to be supported correctly, or
>is this a known problem?
>
>	Thanks!
>
(Continue reading)

Al Hooton | 26 May 16:20 2004

Re: gtksheet supporting the "activate" signal?

On Tue, 2004-05-25 at 15:11, Adrian E. Feiguin wrote:
> Hi Al,
>  I don't remember why, but there was a good reason why "activate" works 
> like it does. The "activate" signal is emitted AFTER the cell has been 
> activated, "deactivate" BEFORE the cell is deactivated. If you return 
> FALSE for "deactivate", then the active cell will remain the same. The 
> signal you want  to use is "traverse", which tells you which cell would 
> be deactivated, and which cell would be activated. If you return FALSE, 
> then the change is rejected.
> Hope this helps. Saludos,
> <ADRIAN>

	Adrian, this is exactly what I needed to know.  I was so wrapped up
with the "activate" signal, I missed the "traverse" signal.  It's doing
exactly what I need.  Thanks!!!  I think have the sheet and children now
working as desired.

	For anybody else that sees this thread in the archives: Be careful to
note that the handler for the "traverse" signal is passed in two
(gint)'s for the row/col of the cell to be deactivated, but is passed in
two (gint *)'s for the row/coll of the cell to be activated.  This is so
the cell to activate can be changed by the signal handler.  I missed
this fact at first and wasted some time trying to figure out a
segfault...    8^0=

-Al

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
(Continue reading)


Gmane