Thursday, July 31, 2014

Gnomesoy - digging deep with Gtk3

The complete overhaul of the gnomesoy GUI is progressing pretty well. I think I will be able to implement the GUI like (almost) designed in the mock-up. The credit mainly goes to Gtk3. It has many widgets like - spinner, expander, stack, which are quite common in modern day UIs. The Gtk documentation is quite good, but many times you may keep wondering what this class will do, specially for the layout classes ? In situations like this Gtk UI designers like glade comes in handy. Though I am hand coding the UI, but glade helps in doing quick checks.

Thinking a little about the GUI revealed that there are mainly 3 different windows are there
  1. Login window
  2. Gnome soy main window
  3. Window where the launched game will run.
Now, I have to think only about 1 and 2 as 3 is dependent on the game and the window should only show them properly.


The login window is designed as shown above with fields required to create a pysoy client. It still needs a little bit of fixing though.

This is the current state of the main window. I am trying to get the grid like view only in the games tab as of now. As this just needs to be replicated for the other tabs.
The window looks fine but there are still things to be done. Icons needs buttons and actions. One spinner to show activity. But that's all for now.

Wednesday, July 09, 2014

Getting started with Gnomesoy

So, I have cleared mid-evaluation of GSoC and I now I have to start working on 2nd phase of my work, that is modify gnomesoy(an existing pysoy client) to add support for accessing bookmarks.
I started with cloning the repository, as it is not available in AUR(I could make one though). Started off by building gnomesoy. But it was failing to build. I was getting one error
error: The type name `Gee.Traversable' could not be found
Arc told me it has something to do with libgee. But in the configure phase it was not checking whether libgee is available or not (have to fix this one). One crucial information that Arc provided is that gee-0.8 is actually newer version than gee-1.0 (what the heck!). Then I found in the file "src/wscript_build" in the list of packages it has gee-1.0. Changing that to gee-0.8 fixed the build error. First hurdle clear.

So, now I tried running it. But what I got is a small window with title "GnomeSoy" instead of some proper GUI.
Time to look at the code. There is only 4 source files. What I found is that the window is made using GTK. The previous developer had tried to create some menu with licensing information and some basic stuff. It was not added to the window so I was getting a blank window.

He(she?) also tried to display the pysoy client within the window using OpenGL but the code is fully commented out. May be it was not building properly, have to check that also.

So, what I found I have to do is
  1. Read a little bit about using GTK and GTK in Genie.
  2. I have to redesign the GUI.
  3. code for pysoy support.
 That's all from me for now.