[Glade-devel] glade 3.5.2 GtkTreeView



Tristan Van Berkom wrote:

On Thu, Oct 30, 2008 at 1:39 PM, Sven Richter
<sveri-list at gmx.de><sveri-list at gmx.de>wrote:


On Thu, Oct 30, 2008 at 5:10 PM, Tristan Van Berkom
<tristan.van.berkom at gmail.com> <tristan.van.berkom at gmail.com> wrote:


On Thu, Oct 30, 2008 at 11:51 AM, Sven Richter
<sveri-list at gmx.de><sveri-list at gmx.de>wrote:
[...]


I have to set "manually" set them clickable
with: GtkTreeView.set_headers_clickable(True)
in my program code.
I am storing the Glade code in libGlade format.


Hmmm in this case I think this is a gtk+ treeview
constructor bug, if:
 - you are using libglade
 - the clickable property is actually saved in
   the resulting glade file (if thats not the case
   then its a default value mixup we can fix)


I think the problem is that it is not saved
in the glade file.
Here is the part of the gtktreeview:
<child>
  <widget class="GtkTreeView" id="tvPlaylist">
    <property name="visible">True</property>
    <property name="can_focus">True</property>
    <signal name="row_activated" handler="on_tvPlaylist_row_activated"/>
   </widget>
 </child>

At least i dont know enough about glade to be totally
sure about it, i think its up to you.



Then what I suspect, is that treeview installs the property with a
default of TRUE,
and then behaves with a default of FALSE, in which case we mark it
in the gtk+.xml catalog as "save-always" and be done with it, could you try
for me adding the property into the file by hand:

  <property name="headers-clickable">True</property>

(if that indeed is the correct name), if the treeview does indeed
work with the property specified, then I can just adjust our catalog
and fix the issue.]


First i tried <property name="headers-clickable">True</property>
which didn't work. Then i did set the property in glade to false
and in the glade file i got:
<property name="headers_clickable">False</property>
The only difference is the underscore.
However, changing False to True in the tag above doesn't
work anyway. So it must be something else.

Since glade comes with a frontend, a core shared library and plugins, you
really need an installation, just do something like this:

./configure --prefix=/opt && make && make install

then run /opt/bin/glade-3 :)


That worked fine, and now i have a lot of symbols :-)
And i found a bug right away on rev 2013.
I opened my old glade file and saved it, then i
started my program and i got:
(pxmms2.py:19037): libglade-WARNING **: Unexpected element <property> inside
<widget>.

To make a long story short, the error is in the glade
file.
Glade stores the button data wrong:
<child>
                 <widget class="GtkButton" id="btnPrevious">
                   <property name="visible">True</property>
                   <property name="can_focus">True</property>
                   <property name="receives_default">True</property>
                   <signal name="clicked" handler="on_btnPrevious_clicked"/>

                   <property name="label" translatable="yes">Prev</property>

</widget>
The last property should be before the signal tag.


Greetings
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-devel/attachments/20081031/12060d02/attachment.html 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]