Skip to main content

Posts

Showing posts from 2015

Recent Changes

The past couple of months have seen some inprovements to the core code, including an number of notable fixes. The most signfiicant, to my mind, is the a reliable implementation of text widget pango markup. 2015-11:     gnocl::dialog         o fixed problems with closing and deleting the dialog.     gnocl::text         o fixed problems with inserting pango markup strings containing non ASCII characters.         o new options             -balanceQuotes, handles matching double and single quotes along with apostrophe-s             -swap, swap keyboard string sequences for items in a matched list (e.g --> swapped for right arrow graphic U+2192)         o enhanced 'get' command to respond to the setting of the -useMarkup option, command getMarkup depr...

Summary of Changes for the Past Couple of Months

Haven't posted much to the Blog for the past couple of months but there has been a steady stream of enhancements put into the sources. Here's a brief summary of the changes over the past few weeks. Download the latest nightly build from Sourceforge. 2015-09:     gnocl::box, gnocl::hBox, gnocl::vBox         o added commands: show, hide     gnocl::notebook         o added commands hidePage, showPage         o added options -tabAlign, -tabWidthChars, -tabUseMarkup 2015-08:     new command, gnocl::keyName 2015-07:     gnocl::accelarator module completely re-written. A further area of development that I've been working on recently is providing a realiable framework for creating gnocl driven widgets and megawidgets. By widgets, the idea is the use of the drawing area object to create unique items, using internal scripting in order to drive...

Reworked the gnocl::dialog soucecode

With a few notable changes, the dialog.c module was legacy code which tried to do too much. In attempting to add stock icons and embedded buttons so many irreversible bugs had crept into the code which made it almost impossible to prevent an application crashing. A quick glance at the gtk style guide makes no mention to of the use of Stock icons in dialog buttons so,  the best way forward was to retire the inclusion of icons and predefined buttons in favour of something much simpler and far less prone to crashing. The following extract from the development documentation highlights the changes made. -buttons type: list (default: Ok) List of buttons to be displayed consisting of a list of display strings with optional values. Method 1) Simple Strings. In this case the text string will be used as the basis of the returned value stripped of any percent string underscore markup. -buttons "%__Yes %__No" Clicking the ...

Summary of Recent Progress

The current nightly build sees a range of enacements to Gnocl as a whole. A number of issues have been addressed as itemized in the extract from the NEWS document below. This nightly update sees the -name option taking on a greater role in the control of widgets. Ordinarily used for specifying ojects in a Gtk CSS file, or in a builder/glade XML file, using the name option will cause the interpretor to create a command for the widget using the string specified by the -name option. Ordinarily a widget instance would be created as follows: set myButton [gnocl::button -text "Hello World"] And modified with: $myButton configure -onClicked { puts %w } But now,  the following will produce similar results. gnocl::button -text "Hell World" -name myButton Modification can also be handled too, myButton configure -onClicked {puts %w} This approach provides a neat and efficient way of creating widgets as objects within namespaces. Using the same example the follo...

Recent Modifications

Over the past few weeks a number of enhancements have be made to the gnocl package. Here's a brief overview of the changes: 2015-05:     gnocl::menu, gnocl::menuRecentChooser, gnocl::statusBar         o added -name, -data; implemented cget         o added -name, -data; implemented cget     gnocl::window         o added -name     added gnocl::application, a convience application megawidget 2015-04:     added parent command to gnocl::volumeButton, gnocl::scale and gnocl::spinner     gnocl::spinner         o resolved problems with start and stop commands (same as using the -active options).     gnocl::text         o using the get widget command alone will return all text contents, i.e. same as "$wid get start end"     gnocl::entry  ...

Recent Enhacements

Here's a brief overiew of enhancements to the development distribution over the past month or so.The mix is consists of the inclusion of a number of convenience options and enhanced feedback.     gnocl::notebook         o added command nthPage, retrieve name of child widget on specified page.      gnocl::stringUtil         o new command, provides additional convenience string functionality; particularly useful for            string comparisons.     gnocl::text         o added -lineSpace convenience option. Valid options are "single", "1.5", double" or exact            spacing in pixels.     gnocl::label         o added command getSelection (text only, markup not included)     gnocl::wind...

Cancellation of a 'Recent Items' Pull-Down Menu

Its been some time since support for 'recent file' operations was first added to the Gnocl sources. At the time I was quite pleased with its inclusion but there was always a annoying snag to it, something which is an inhereted feature from the API: if no selection if made, then the last file URI added to the list is always returned. This is not really a sign of anything lacking in the GTK sources, but the documentation does not suggest how to handle any need to CANCEL the menu by pressing the 'ESC' key.  A quick gloss over the docs shows that there is a 'cancel' signal for the MENU-SHELL containing the recent items, but this automatically generates a 'selection-done' signal, the very signal that we want to avoid. The obvious solution for this is to set a boolean cancel flag and test for its TRUE or FALSE state during the execution of any 'selection-done' event handler. For a TCL side solution it was first was necessary to implement a gnocl -on...