Problems changing Loan Druid- Amendment to Glade or glade-fixup?
Geert Janssens
janssens-geert at telenet.be
Fri Apr 8 08:48:22 EDT 2011
On vrijdag 8 april 2011, Nick wrote:
> Hi,
> I'm trying to make some small amendments to the loan druid, when I save
> the file I find that the xml for commit_pg has it's property
> "GNOME_EDGE_FINISH" changed to "Edge Finish" every time I save it, which
> then causes the druid code to collapse at ld_com_new when I get to the
> final page (That is: the final page of the druid has a Forward, rather
> than Apply button - the forward is currently pointing at a g-assert
> (FALSE) in loan-druid.c)
>
> I am using Glade 3.6.7. on Ubuntu 10.10.
>
> Aside from manually editing this everytime I save the Glade file, does
> anybody know if I can setup my Glade differently to stop it doing this?
> Could (should) glade-fixup be changed to incorporate this?
>
> Working:
> <widget class="GnomeDruidPageEdge" id="commit_pg">
> <property name="visible">True</property>
> <property name="position">GNOME_EDGE_FINISH</property>
> <property name="text" translatable="yes">Press apply to commit these
> changes.</property>
> </widget>
>
> Not working:
>
> <widget class="GnomeDruidPageEdge" id="commit_pg">
> <property name="visible">True</property>
> <property name="position">Edge Finish</property>
> <property name="text" translatable="yes">Press apply to commit these
> changes.</property>
> </widget>
>
> Thanks
> Nick
>
>
Hi,
I run into the same issue with Glade on Fedora 14, and haven't seen a solution
yet. I always end up manually fixing that page. And as the GnomeDruid widget
is a deprecated widget, I doubt the Glade developers will ever fix this.
On that vein, as you are willing to improve the Druid, wouldn't you want to
convert it to a GtkAssistant at the same time ? You can take a look at my
recent commits in trunk [1] as an example of the work it takes. In my
experience there are a few changes, but not too many.
[1] These commits convert the New Account Hierarchy Druid into an Assistant:
http://svn.gnucash.org/trac/changeset/20529
http://svn.gnucash.org/trac/changeset/20530
http://svn.gnucash.org/trac/changeset/20531
http://svn.gnucash.org/trac/changeset/20532
http://svn.gnucash.org/trac/changeset/20533
http://svn.gnucash.org/trac/changeset/20534
Of these, r20531 is relevant, in that GtkAssistant widgets can only be loaded
with gtkbuilder, so I have created a separate directory for gtkbuilder
compatible glade files and saved all the glade files in there in gtkbuilder
format. You can copy most of the widgets from the druid's pages in the
gtkassistant main vbox and work from there.
r20533 shows the bulk of the change in code, which is 75% replacing the
libglade/druid specific function calls and header includes with
gtibuilder/gtkassistant equivalents. The remaining 25% is writing a function
that is called when the user clicks forward (on_prepare), to set the prepare
the widgets on the page to be shown.
Let me note on the other hand that the gtkassistant widget doesn't work fully
well in the Glade interface designer here. The designer has a tendency to add
empty pages in front of the assistant. So I also have to manually correct the
glade file after each change (bye removing a number of <placeholder>
statements).
It would really be great if you would do this conversion while you are working
in that area. Otherwise it has to happen some time later, because the Druid
widgets have to go anyway in this development cycle and some effort may have
to be spent twice.
Geert
More information about the gnucash-devel
mailing list