GtkBuilder bugs

2011-09-03 Thread Bernhard Schuster
I am using a gtk-builder file for my application, which uses a Grid
widget for layouting. When I run the application, I read this:

Gtk-WARNING **: Unknown property: GtkGrid.n-rows

and the grid is not shown (nor its contents)


Thanks for any tips


Regards


Bernhard Schuster
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkBuilder bugs

2011-09-04 Thread Tristan Van Berkom
Its a bug that needs to be fixed in Glade.

You can remove the line that says n-rows safely fwiw

Cheers,
-Tristan

On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster
 wrote:
> I am using a gtk-builder file for my application, which uses a Grid
> widget for layouting. When I run the application, I read this:
>
> Gtk-WARNING **: Unknown property: GtkGrid.n-rows
>
> and the grid is not shown (nor its contents)
>
>
> Thanks for any tips
>
>
> Regards
>
>
> Bernhard Schuster
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
>
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkBuilder bugs

2011-09-05 Thread Michal Suchanek
On 4 September 2011 12:32, Tristan Van Berkom  wrote:
> Its a bug that needs to be fixed in Glade.
>
> You can remove the line that says n-rows safely fwiw

I don't think that an extra property would break the widget, the
warning should be harmless.

>
> On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster
>  wrote:
>> I am using a gtk-builder file for my application, which uses a Grid
>> widget for layouting. When I run the application, I read this:
>>
>> Gtk-WARNING **: Unknown property: GtkGrid.n-rows
>>
>> and the grid is not shown (nor its contents)

Are you by any chance using glade 3.10?

That won't work.

HTH

Michal
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkBuilder bugs

2011-09-05 Thread Tristan Van Berkom
On Mon, Sep 5, 2011 at 10:49 AM, Michal Suchanek  wrote:
> On 4 September 2011 12:32, Tristan Van Berkom  wrote:
>> Its a bug that needs to be fixed in Glade.
>>
>> You can remove the line that says n-rows safely fwiw
>
> I don't think that an extra property would break the widget, the
> warning should be harmless.
>

Anything that GtkBuilder encounters that is unrecognized (unrecognized
xml tags, properties and even unknown/inexistant GObject properties) cause
GtkBuilder to either abort or fail to parse.

>>
>> On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster
>>  wrote:
>>> I am using a gtk-builder file for my application, which uses a Grid
>>> widget for layouting. When I run the application, I read this:
>>>
>>> Gtk-WARNING **: Unknown property: GtkGrid.n-rows
>>>
>>> and the grid is not shown (nor its contents)
>
> Are you by any chance using glade 3.10?
>
> That won't work.
>

No Glade earlier than 3.10 allows you to edit a GtkGrid, however
the Grid implementation is based on the old GtkTable implementation.

To remove the erronously serialized n-rows/n-columns properties from
GtkGrid in Glade we first need to add some code to the GtkGrid deserialization
routine to "guess" the span in row/columns based on the span of all children
and number/position of added placeholders.

Cheers,
-Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkBuilder bugs

2011-09-05 Thread Michal Suchanek
On 5 September 2011 11:29, Tristan Van Berkom  wrote:
> On Mon, Sep 5, 2011 at 10:49 AM, Michal Suchanek  wrote:
>> On 4 September 2011 12:32, Tristan Van Berkom  wrote:
>>> Its a bug that needs to be fixed in Glade.
>>>
>>> You can remove the line that says n-rows safely fwiw
>>
>> I don't think that an extra property would break the widget, the
>> warning should be harmless.
>>
>
> Anything that GtkBuilder encounters that is unrecognized (unrecognized
> xml tags, properties and even unknown/inexistant GObject properties) cause
> GtkBuilder to either abort or fail to parse.

For me unknown properties are just ignored, at least in gtk 2.

>
>>>
>>> On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster
>>>  wrote:
 I am using a gtk-builder file for my application, which uses a Grid
 widget for layouting. When I run the application, I read this:

 Gtk-WARNING **: Unknown property: GtkGrid.n-rows

 and the grid is not shown (nor its contents)
>>
>> Are you by any chance using glade 3.10?
>>
>> That won't work.
>>

With Gtk 2 which does not know about Grid.

>
> No Glade earlier than 3.10 allows you to edit a GtkGrid, however
> the Grid implementation is based on the old GtkTable implementation.
>
> To remove the erronously serialized n-rows/n-columns properties from
> GtkGrid in Glade we first need to add some code to the GtkGrid deserialization
> routine to "guess" the span in row/columns based on the span of all children
> and number/position of added placeholders.

If gtk3 cannot display the glade files made for it with glade 3.10
that's quite odd.

I can see them in glade-previewer just fine but that's the only gtk3
app which I use with these.

Thanks

Michal
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkBuilder bugs

2011-09-05 Thread Tristan Van Berkom
On Mon, Sep 5, 2011 at 12:43 PM, Michal Suchanek  wrote:
> On 5 September 2011 11:29, Tristan Van Berkom  wrote:
>> On Mon, Sep 5, 2011 at 10:49 AM, Michal Suchanek  wrote:
>>> On 4 September 2011 12:32, Tristan Van Berkom  wrote:
 Its a bug that needs to be fixed in Glade.

 You can remove the line that says n-rows safely fwiw
>>>
>>> I don't think that an extra property would break the widget, the
>>> warning should be harmless.
>>>
>>
>> Anything that GtkBuilder encounters that is unrecognized (unrecognized
>> xml tags, properties and even unknown/inexistant GObject properties) cause
>> GtkBuilder to either abort or fail to parse.
>
> For me unknown properties are just ignored, at least in gtk 2.

Ah my bad, indeed only a warning is issued for a misplaced
property (the warnings which the Bernhard originally mentioned).

>
>>

 On Sun, Sep 4, 2011 at 1:41 AM, Bernhard Schuster
  wrote:
> I am using a gtk-builder file for my application, which uses a Grid
> widget for layouting. When I run the application, I read this:
>
> Gtk-WARNING **: Unknown property: GtkGrid.n-rows
>
> and the grid is not shown (nor its contents)
>>>
>>> Are you by any chance using glade 3.10?
>>>
>>> That won't work.
>>>
>
> With Gtk 2 which does not know about Grid.
>
>>
>> No Glade earlier than 3.10 allows you to edit a GtkGrid, however
>> the Grid implementation is based on the old GtkTable implementation.
>>
>> To remove the erronously serialized n-rows/n-columns properties from
>> GtkGrid in Glade we first need to add some code to the GtkGrid 
>> deserialization
>> routine to "guess" the span in row/columns based on the span of all children
>> and number/position of added placeholders.
>
> If gtk3 cannot display the glade files made for it with glade 3.10
> that's quite odd.

Agreed, however while Glade is usually behind GTK+ in terms of features
so often times Glade chokes out on hand crafted GtkBuilder xml which might
contain tags that Glade does not yet recognize.

But the opposite should usually never be a problem, unless we introduce
features with some severe bugs then files created by Glade should always
be readable by GtkBuilder (in this case we introduced GtkGrid with a bug
that at least only causes a warning... unless there is more to this
GtkGrid story...).

>
> I can see them in glade-previewer just fine but that's the only gtk3
> app which I use with these.

Indeed, I'm not sure what is the story with GtkGrid not showing the content
when loaded in a preview or an application (and the preview quite litteraly
does what an application would do).

Bernhard, can you perhaps attach the Glade file in question which does
not show the contents of the GtkGrid ?

Regards,
   -Tristan
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: GtkBuilder bugs

2011-09-05 Thread Bernhard Schuster
2011/9/5 Tristan Van Berkom :
> On Mon, Sep 5, 2011 at 12:43 PM, Michal Suchanek  wrote:
>> On 5 September 2011 11:29, Tristan Van Berkom  wrote:
>>> On Mon, Sep 5, 2011 at 10:49 AM, Michal Suchanek  
>>> wrote:
 On 4 September 2011 12:32, Tristan Van Berkom  wrote:
> Its a bug that needs to be fixed in Glade.
>
> You can remove the line that says n-rows safely fwiw

 I don't think that an extra property would break the widget, the
 warning should be harmless.

>>>
>>> Anything that GtkBuilder encounters that is unrecognized (unrecognized
>>> xml tags, properties and even unknown/inexistant GObject properties) cause
>>> GtkBuilder to either abort or fail to parse.
>>
>> For me unknown properties are just ignored, at least in gtk 2.
>
> Ah my bad, indeed only a warning is issued for a misplaced
> property (the warnings which the Bernhard originally mentioned).

Only a warning, not an error. Just curious because my widgets did not
show up, but that was caused by GtkBin not drawing _anything_. In gtk2
it did, and the gtk3 docs do not mention it that there is no drawing
method implemented.

Removing the mentioned lines indeed fixed the warning.

The glade version I spawned my .ui xml file from is the following:

$ glade --version
glade 3.10.0

Thanks for the quick response

Regards

Bernhard
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list