31-May-2014

There are three glade files in Dr. Geo that are used for designing the interface.

  1. drgenius2.glade
  2. drgeo2.glade
  3. drgeoMDI.glade

I have changed two files: drgeo2.glade and drgeoMDI.glade.

They have been modified to use GtkBuilder format instead of the earlier format, i.e libglade.

GtkBuilder simply re-thinks the internal workings to make it more versatile and adhere to standards and package it along with the rest of the GTK+ library. Read more here.

I need to revamp more stuff because even though it should build fine right now with GTK+ 2.24 using GtkBuilder APIs, it still has to be completely migrated from the older format including the callbacks.

30-May-2014

Finally did a successful ‘make’ in my new system.  Earlier I was getting an “undefined reference” error during make process. And that was because the GUILE_PROGS and GUILE_FLAGS were not being set while running “./configure” command.

The reason behind this was that the guile.m4 file was not being linked by “aclocal” that updates aclocal.m4 file in the main directory.

I tried “aclocal -I /usr/local/share/aclocal/” that should have included guile.m4 file but still it wasn’t giving the correct result.

I did a reinstall of guile by running “sudo make install” in guile-2.0.11/ directory after uninstalling and that solved the linking issue.

Now drgeo is being successfully built.

On the note of Glade files, still working on them. I’ll commit those changes later.

29-May-2014

Had to change the script again to make use of the source of guile-2.0.11 from the official site instead of the unofficial deb package that I was previously working with.

Those packages are workable if we don’t need to use the guile-2.0.11-dev package. If this package is to be used then many of its dependencies are needed to be installed too. And those are also not yet officially supported. This resulted in corruption of my system, maybe some mistake on my part played a little part too.

So now the script has been updated to download guile from the source and then compile and install it.

Still testing of the script is being done to ensure that it doesn’t fail or crashes the system.

On the other hand, glade files are being changed to GtkBuilder format which has changed a lot of code in those files. But I haven’t committed these changes yet ’cause I don’t want to break the software right now.

28-May-2014

Worked on improving the script that I wrote yesterday.

Also had to add the guile-dev package to compile the software and since the guile-2.0.11 is not yet officially available as a package, I had to use the unstable yet workable deb packages.

Also a little setback: I had to re-install my system. Even though I was making use of VirtualBox Environments still I had my real system crashed while testing the script. It was due to my negligence. Need to take care of such issues in the future.

Hoping to finish the next milestone as soon as possible.

26-May-2014

Installed Glade 3.8.5 on my system.

This is done because, Glade 3.8 supports older libglade format and supports all of GTK+2 widgets until the last stable GTK+2.

Working on removing the deprecated widgets from the .glade files.

There are more than 650+ warnings regarding that.

After making sure there are no deprecated widgets in these glade files and that they are in GtkBuilder format that I can move ahead.

25-May-2014

Today was less of a coding day but more of a preparation day.

From tomorrow I am going to work on my next milestone of updating gtk+ library from gtk+2 to gtk+3.

What I found regarding setting up the development environment is that:

For compiling with gtk+2 we use something like “gcc $(pkg-config –cflags –libs gtk+-2.0)”.

And to compile with gtk+3 we just need to change that to gtk+-3.0. There is no need to uninstall gtk+2 from the system. Although we do need to have 3 installed on our system along with its development packages.

Here are some interesting reads that I need to follow:

Migrating from GTK+ 2.x to GTK+ 3

Other wiki pages.

24-May-2014

More than 80+ warnings have been treated of the following form:

warning: deprecated conversion from string constant to ‘gchar* {aka char*}’ [-Wwrite-strings]

Changed 'gchar *' to 'gchar const *'
and 'char *' to 'char const *'
at the appropriate places.

Files:drgeo_drawable.h, drgeo_figure.h, drgeo_flydrawable.cc, drgeo_geometricObject.cc, drgeo_gtkstyle.cc, drgeo_latexdrawable.cc, drgeo_postscriptdrawable.cc

Tomorrow I’ll treat some more warnings.

23-May-2014

Between figuring out the runtime errors and the network problem, it was pretty tiring day.

I got a great help from some people at #guile IRC.

So I solved two annoying runtime errors that I had trouble pin-pointing.

Runtime error:
ice-9/psyntax.scm:1274:12: In procedure dobody:
ice-9/psyntax.scm:1274:12: Syntax error:
unknown location: unexpected syntax in form ()

Solved by changing () to '()
File:drgeo_scm_interface.scm
Another Runtime error due to incorrect syntax usage, the number('195c900') was changing on every run.
ice-9/psyntax.scm:1274:12: In procedure #<procedure 195c900 at
ice-9/psyntax.scm:1082:36 ()>:
ice-9/psyntax.scm:1274:12: Syntax error:
unknown location: unexpected syntax in form define

Solved by changing the syntax for define
File: drgeo_scm_interface_constant_sr.scm

Now drgeo runs like it used to.

22-May-2014

Today I was treating some warnings.

Though not much work has been done today, due to my Final Examination Viva, I managed to change the code little bit.

Removed many warnings of deprecation like:
warning: ‘const gchar* g_basename(const gchar*)’ is deprecated.
warning: ‘scm_unused_struct* scm_make_real(double)’ is deprecated.

Changed 'scm_make_real' to 'scm_from_double'.
Files: drgeo_scm_api.cc, drgeo_scm_helper.cc.

Changed 'g_basename' to 'g_path_get_basename'.
Files: drgeo_figure.cc, drgenius_mdi.cc.

Now stuck at the runtime error. I will work on that tomorrow.