Thursday, July 29, 2010


This module has received little attention over the past few years so today I added a few more options.


Its still early days but the above allows two or more notebook widgets sharing the dame groupId to share pages. These can be just dragged and dropped. The default setting is now changed to enable tab re-arranging.

There are a few more signals to implement as well as a number of page options.

Tuesday, July 27, 2010

Colour Conversion Command

The whole situation around defining colours in Gtk+ is confusing. There are so many different ways including names, hex, int and decimal depending on what package is being worked with! I need to come up with a utility command to do these conversions....

gnocl::colour <in> -outFormat opt

The command needs to smart enough to know what the input format is...

Perhaps a cluster of commands or sub commands?

Monday, July 26, 2010

gnocl::text added drag and drop...

Some new, much needed functionality.  Need to evaluate its impact on the undo/redo module.


I've created a documentation page for the gnocl::sound command and added it to both the local and repositories. The -onFinished command that I've added is still puzzling me. If the sample comes is played fully then the signal is not fired, if it is cancelled then it does! There's probably something simple about this that I haven't seen yet.

just added the test script to the demos and run them. Oddly, the -onFinished works perfectly here but not when run standalone! Now, I'm even more confused.

Wednesday, July 21, 2010


Spent a few hours too many working on this one over the two days. I basically re-wrote about 20% of the code to make it run more smoothly. I originally thought of it being like an ordinary widget but allowing the various text items to be configured and positioned on screen make it behave more like a cut-down version of a canvas. Probably an overkill, but, there you go! There's just a little more work to do on managing a 'blank screen' and rendering off-screen and then its pretty well finished.

gnocl::text new tag sub-command

Work on my gnome/gnocl implementation of my thesaurus is going well. I've now created an entry editor. Here's the screen shot.

I'm using MetaKit to manage the data so the field names are obtained directed from the database view. The blue band with the term 'number category' is a new gnocl megawigdet which I've built specifically to act as a heading (its basically a label in an enventBox).

The idea is to allow entries to be edited as needed. So, to call the editor is a simple matter of clicking on the category heading that appears after a search has been produced. This smoke and mirror stuff is all handled through text tags. This is where the new tag subcommand comes in useful. Each category has a unique tag derived from the database row number. As I don't want to use globals or namespaces to track the search results we can do the job easily through significating tag names. After a new search the tags used will change so we want to purge the tagtable. Hitherto it was possible to do this explictly using tag delete but, of course there are simpler ways to do this (this is TCL after all). Hence the tag subCommand 'clear' will zap all tags.

New Icon Management Package - gnocl::iconTheme

gnocl::iconTheme default
gnocl::iconTheme screen screen-id

iconTheme-id set screen screen-id
iconTheme-id set custom string

iconTheme-id searchpath append path
iconTheme-id searchpath prepend path
iconTheme-id searchpath set path
iconTheme-id icon exists string
iconTheme-id icon info string
iconTheme-id icon choose string
iconTheme-id icon load string
iconTheme-id icon list
iconTheme-id icon sizes string
iconTheme-id icon example
iconTheme-id icon add int pixbuf-id
iconTheme-id icon free string
iconTheme-id icon new pixbuf-id
iconTheme-id icon basesize icon-id
iconTheme-id icon filename string
iconTheme-id icon rectangle string
iconTheme-id icon displayname string

iconTheme-id contexts
iconTheme-id rescan

Tuesday, July 20, 2010

gnocl::text and gnocl::signalEmit

I've just added a new "clear" command to the gnocl::text widget. It make life easier than using the erase command. I've also took a look at getting some way of causing widget events to occur under script control. Haven't quite succeeded yet though....


My main interest lies in text text processing. Creating texts, editing texts, translating them and all sorts of other interesting things (to me at least). A project I worked on in the past was a simple thesaurus to be used with Jiumoluo. I'm a great lover of Roget's thesaurus and so I wanted the familiar lists of words rather than a pile of synonyms. Working on this project has helped develop some new pure gnocl widgets and add one or two entry items of functionality to the Gnocl core code. Well, my working version is now ready and in active use on my desktop. What it needs now is a way of editing thesaurus entries.

gnocl::sound cancel

Last week I added the command gnocl::sound to play a sound. But, what if we have had enough? The sound needs to be cancelled. Hence the subcommand cancel. Now the gnocl::sounds have only one global context, so, the playing of multiple sounds shouldn't be a problem anymore.

Saturday, July 17, 2010


Although the Gtk+ libraries form the basis of the Gnome desktop there are no core library functions handling sound playback. Ok, there's beep but that's it. In order to play sounds of any form other libraries need to be called to work around the inbuilt complexities of playing sounds on any sort of ~nix platform. The canberra libraries provide that bridge. This library isn't intended to provide any sort of API to an audio playback system but to simply play short sounds in response to UI events. The gnocl::sound command will simply cause a sound file to be played. Nothing more, nothing less.

It would be interesting to add sound events to various widget actions, the API exists within the canberra-gtk library but that's for another day.

Saturday, July 10, 2010

gnocl::text new tag options

The range of tag options for the GtkTextTag object is truly staggering and only a fraction are supported in Gnocl. Today I added four extra options  -pixelsAboveLines, -pixelsBelowLines, -size and -sizePoints.
Also this evening I took another look at adopting my custom thesaurus to run under gnocl. Should have something to show for it soon.

Nightly Build Update

In spite of its name, I don't update the Sourceforge repository on a nightly basis. Guess I ought to really if its called that. Anyway, today I've update the Nightly Builds with the current development versions of the gnocl and gnoclGnome packages.

Saturday, July 03, 2010

Reworked some old Jiumoluo packages

Its been a long, long time since I've done anything with the code for my translator's editor, Jiumoluo. It's all wrapped up in a starkit and it has various elements dating back to 1998 contained within it! Indeed, the GUI itself was originally built with VisualTcl. Originally I liked this program as it mean that I could get Tcl/Tk up and running quickly, the only downside is that the Tcl scripts generated are almost impossible to read. What I wanted to do was to recyle some of the custom dictionaries that I built. A generic reader has been scripted and load modules now built. Somehow, I think that the eventual Gnocl version of Jiumoluo will be a substantially slimmer piece of code that my Tk original.

Thursday, July 01, 2010

changes to gnocl::menuItem

Some version upgrades are useful, and some are not. I've recently upgrade my workstation from OpenSuse11.1 to 11.2. Everything works fine but lo! My menu icons vanished. There was nothing wrong with my code, they just weren't appearing. Checked my gtk+ version and found that I was now compiling against Gtk+ 2.18.6 rather than 2.14 which came with OpenSuse 11.1. A new property for the gtkmenuitem is a toggle to switch the menu icons on/off. Of course, the default would be off! So, changed the code...and all is now running well....