Mark, Felix,
Updating UI files:
-Moving from hydrosanity.glade to hydrosanity.xml
libglade-convert throws all sort of errors, not using
gtk-builder-convert does a much better job. Gives:
This file was output during the conversion of hydrosanity.glade to
hydrosanity.xml
WARNING: duplicate id "menuitem4"
WARNING: duplicate id "new1"
WARNING: duplicate id "open1"
WARNING: duplicate id "save1"
WARNING: duplicate id "save_as1"
WARNING: duplicate id "quit1"
WARNING: duplicate id "view1"
WARNING: duplicate id "update1"
WARNING: duplicate id "menuitem7"
WARNING: duplicate id "about1"
WARNING: duplicate id "vbox18"
WARNING: duplicate id "hbox116"
WARNING: duplicate id "hbox122"
Wrote hydrosanity.XML
As the documentation says, GtkBuilder can't handle duplicate IDs like
libglade. Upon loading the GUI with R console, only the last three
dups prevent building. So I made a vbox18a and vbox18b, etc, for the
last three items, and the GUI loads.
It is also handy to know the rattle.ui file can be opened in the Glade
Interface Designer. I believe there are some significant formal
differences between the rattle and hs interface definitions.
On whether the libraries, R, etc will presently support hydrosanity on
Windows even if all the code is correct, the following is from the
Rattle Source:
# 100820 GtkBuilder update. Use GtkBuilder as default, except if R
# version < 2.12.0 on MS/Windows. Here is a collection of tests performed:
#
# OS R release RGtk2 rattle GUI Gtk+ Date Test Notes
#
# Ubuntu 2.11.1 2.12.18 2.5.40 GtkBuilder 2.20.1 100822 OK
# Ubuntu 2.11.1 2.12.18 2.5.40 GladeXML 2.20.1 100822 OK
#
# Ubuntu 2.12.0 r52791 2.12.18 2.5.40 GtkBuilder 2.20.1 100822 OK
# Ubuntu 2.12.0 r52791 2.12.18 2.5.40 GladeXML 2.20.1 100822 OK
#
# Windows 2.11.1 2.12.18 2.5.40 GladeXML 2.12.9-2 100822 OK
#
# Windows 2.12.0 r52771 2.12.18-5 2.5.40 GtkBuilder 2.12.9-2 100822 FAIL (1)
# Windows 2.12.0 r52771 2.12.18-5 2.5.40 GladeXML 2.12.9-2 100822 FAIL (2)
#
# Windows 2.12.0 r52771 2.12.18-5 2.5.40 GtkBuilder 2.16.6 100822 OK (3)
# Windows 2.12.0 r52771 2.12.18-5 2.5.40 GladeXML 2.16.6 100822 FAIL (4)
That was in late August, it might be better now. Mark, it seems like
if you get the latest version of R, RGtk2, GtkBuilder and Gtk+, a
hydrosanity upgrade should be possible.
===An Attempt at using GtkBuilder 20110412
Upon uncommenting import(RGtk2) and import(gWidgets) in the
"NAMESPACE" file, I'm able to load the GUI with working GtkBuilder
functions.
Errors and Warnings are as follows:
(R:1811): GLib-GObject-CRITICAL **: g_value_type_compatible: assertion
`G_TYPE_IS_VALUE (src_type)' failed
(R:1811): Gtk-WARNING **:
/build/buildd/gtk+2.0-2.20.1/gtk/gtkliststore.c:612: Unable to convert
from (null) to gchararray
(R:1811): GLib-GObject-CRITICAL **: g_value_unset: assertion
`G_IS_VALUE (value)' failed
(R:1811): GLib-GObject-CRITICAL **: g_value_type_compatible: assertion
`G_TYPE_IS_VALUE (src_type)' failed
(R:1811): Gtk-WARNING **:
/build/buildd/gtk+2.0-2.20.1/gtk/gtkliststore.c:612: Unable to convert
from (null) to gchararray
(R:1811): GLib-GObject-CRITICAL **: g_value_unset: assertion
`G_IS_VALUE (value)' failed
(R:1811): Gtk-WARNING **: gtk_scrolled_window_add(): cannot add non
scrollable widget use gtk_scrolled_window_add_with_viewport() instead
hsp <- list(data = list(), modified = F)
playwith.options(eval.args = list("^hsp$", invert.match = TRUE))
Error in TIMESERIES.FORMATS[[kfIndex]] :
attempt to select less than one element
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
(R:1811): Gtk-CRITICAL **: gtk_entry_set_text: assertion `text != NULL' failed
Most of these pertain to updating GUI text.
In the Rattle source, they use a function called Rtxt extensively to
reformat text slightly all over the place, it does
Rtxt <- function(...)
{
# 100130 Currently, on Windows we are waiting for 2.12.17 of RGtk2 with
# rgtk2_bindtextdomain().
# if (.Platform$OS.type == "windows")
# paste(...)
# else
gettext(paste(...), domain="R-rattle")
}
They used this function everywhere, often nested with sprintf. Not
sure if this is necessary, it doesn't look like something fun to do.
Will continue trying to migrate to GtkBuilder on Ubuntu. Mark I know
you're a Windows guy. Rattle uses an automated web service to test
builds on windows, I will try it eventually. It seems like you're
willing to do some programming. I have zero capability to develop on
Windows or Mac in my present situation, but the info above should get
you on your way.
--
James Freeman Africell +232.088.73.50.59
Wilkinson Road Comium +232.033.96.65.77
Freetown Skype freemanjames2222
Sierra Leone
I think we don't need to worry about maintaining backward
compatibility with the older GTK/libglade. The current packaged
version has that support anyway. Any changes to the source code now I
think can focus on GtkBuilder.
The Rtxt() (gettext()) function allows translations (of the interface,
error messages etc) to be made into other human languages.
Regards
Felix
> --
> You received this message because you are subscribed to the Google Groups "hydrosanity-users" group.
> To post to this group, send email to hydrosan...@googlegroups.com.
> To unsubscribe from this group, send email to hydrosanity-us...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/hydrosanity-users?hl=en.
>
>
--
Felix Andrews / 安福立
http://www.neurofractal.org/felix/
Does this mean the GUI for hydrosanity has changed. This is good, because I could not get gWidets working on my W& 64bit machine.
Mark
Do you have any debugging pointers? I think I get 20 errors from the
20 combo boxes, and the other two text errors are caused by the Quick
Start and Documentation text.
I we can fix these then it's down to a scrolled window warning, and
something small with TIMESERIES.FORMATS.
I tried traceback but I'm not familiar with debugging a program of this size.
I also put in Gtk file opener for obvious reasons, which is broken at
the moment.
James