Tuesday, May 23, 2017

Gnocl Gtk3+ implantation begun!

Yesterday I made the spot decision to make the move from building Gnocl against the Gtk2+ libraries to Gtk3+. At the end of the day I got the bulk of the gnocl::window module running. This doesn't mean that the conversion process will be an easy journey, it won't. The current build of Gnocl has evolved over the years and contains many legacy calls to widgets, functions, structures and macros not longer supported in Gtk3+. The immediate effect is that much of the 'glitzy' stuff working on pixmaps no longer work. Its all a question of time!

This doesn't mean that the Gtk2+ distribution will be forgotten, it still forms the backbone of the project and will be supported till most the the conversion work has been done.

One of the greatest challenges is the lack of suitable documentation. For Gtk2+ there was always Krause's excellent book, but now the emphasis would appear to be upon creating chunks of builder xml code and embedding these as strings into C-sourcecode.

It would appear though, that there's always more than one way to skin a cat, and, getting the initial 'application' running was not, shall we say, according to the manual. Actually, by working around the rules, it became simpler!

It'll be some time before a first workable, package is released, so until then, wish me luck and straightforward coding!

Tuesday, May 16, 2017

Creating previews with the File Chooser Dialog

I'm currently doing something of a spring-clean of the source code and noticed that the image and filechoose dialog options really didn't work too well together in order to create previews. So, the modifications to the current nightly build will allow scaling and constraints on image dimensions without the need for lengthy, and potentially cycle consuming Tcl scripting.

Here's a code snippet...

set pv(1) [gnocl::image ]

set fname [gnocl::fileChooserDialog \
    -previewWidget $pv(1) \

    -onFileSelectionChanged { $pv(1) configure -image %/%f -constrainWidth 200 }]

Tuesday, May 09, 2017

April Update

Its a  little later than anticipated,  but here's news of changes to the gnocl package options implented during April. As always, get the latest sources from SourceForge.

        o progress now works more efficiently, i.e.
            wid progress 0.75    ;# set progress bar fraction to 0.75
            wid progress        ;# increment an barlength as an ongoing progress
            In the second example, the options -range and -progressSteps must be set.
                gnocl::entry -name ent -value ABCDEF -progressSteps $d -range $max
                gnocl::vBox -name container
                container add [ent]
                gnocl::window -child [container]
                for {set i 0} {$i<=$max} {incr i} {
                    # do something...
                    ent progress
        o search command can now accurately set multiple tags. Unknown tags with result in a Gtk Warning.
    Reducing number of internal Gtk warnings written to stdout. Largely arising from invalid cast in setting widget pointers in shared command functions.

Sunday, April 02, 2017

Update News

At the moment Gnocl is producing the occasional Gtk Warning, largely due to incorrect typecasting in shared widget commands. For small application this may not prove an issue but in larger, more complex application, the number of warnings (typically repeats of the same warnings) can be distracting. So, the effort over April will be to reduce these as much as possible. Although a lot of work has been done internally, the most apparent changes are relatively few. 

As always, check the nightly build page for latest update.

    Gnocl generated internal debug warnings to stdout are now colour formatted to distinguish them from Gtk+ warnings and Tcl error codes.
        o Clock details, i.e, fingers and digits, now automatically resize.
        -tabs option now allows full tablist for both the widget and individual tags.

Tuesday, February 28, 2017

February Code Developments

The following contains a summary of the modifications to the main module code.  All updates available from the SourceForge in the nightly build.

        o added options -value, -variable, -digits
        o added commands get, set, cget
    -foreground and -background option can now take 2 values, namely state and color,
        where state is one of "normal", "active", "prelight", "selected" or "insensitive".
        If only the colour is specified, then the default state of "normal" is assumed.
        e.g. -background [list insensitive black]
        o fixed memory allocation problem with lorem sub-command.
        o added -insensitiveColor option, allow objects to blend into background.