P. F. Chimento [Sat, 7 May 2011 22:18:58 +0000 (00:18 +0200)]
Fix (most) UniCaseTest failures (fix #27)
Upper- or lowercasing Unicode strings is not possible by mapping one
character to one character in each case, in contradiction of what the
GLib functions g_unichar_tolower() and g_unichar_toupper() would seem
to suggest. The casing operations now operate on the whole string.
Unfortunately, this introduces a new bug, #28, since there is no
title-casing function in GLib that allows for the title-case of a
character to be longer than one character.
P. F. Chimento [Sun, 1 May 2011 14:30:21 +0000 (16:30 +0200)]
Fixed grid line input bug introduced in [9f52ac]
The window buffer of a text grid must be flushed before line input
begins; line input replaces part of the text with a widget (GtkEntry)
so if the buffer is flushed during, then it overwrites the widget,
deleting it, and causing a crash.
P. F. Chimento [Wed, 20 Apr 2011 11:12:15 +0000 (13:12 +0200)]
Implemented date/time Glk functions
Mostly copied from Andrew Plotkin's CheapGlk implementation; should
be converted to use GDateTime (more portable) when it is feasible to
use GLib 2.26 on many platforms.
P. F. Chimento [Tue, 19 Apr 2011 16:05:37 +0000 (18:05 +0200)]
Simplify include comments
Put include comments in chimara-sections.txt so they apply to a whole
group of sections instead of typing out the include files in each
section individually.
P. F. Chimento [Sun, 17 Apr 2011 10:19:33 +0000 (12:19 +0200)]
Updated Gargoyle extensions and documentation
Brought garglk.h to the latest revision of the Gargoyle extensions to
Glk - removed garglk_set_line_terminators(), added
garglk_set_story_title(), and updated the documentation.
P. F. Chimento [Thu, 14 Apr 2011 21:32:27 +0000 (23:32 +0200)]
Updated documentation to match API 0.7.2
The Glk API documentation in Chimara now matches the official
documentation, although not everything considered necessary by
Gtk-Doc is documented. Stubs added for new functions.
Philip Chimento [Sun, 6 Mar 2011 21:43:51 +0000 (22:43 +0100)]
Add preference for graphics file directory
You can now set a preference for the default directory in which to look
for graphics resource files for older Infocom games. Unfortnately, these
resource files still mysteriously don't work, but it's a start.
Philip Chimento [Mon, 28 Feb 2011 00:51:53 +0000 (01:51 +0100)]
Add a View/Toolbar setting
A good setting to demonstrate one-way binding is the View/Toolbar
setting. When the menu item is switched on or off, we want to update the
setting, but not the other way around. This is so that when you have
multiple windows, turning the toolbar off in one doesn't turn the
toolbar off in the others, but when you open a new window, the toolbar
is shown or hidden depending on the last choice you made.
Philip Chimento [Sun, 27 Feb 2011 12:09:56 +0000 (13:09 +0100)]
Create configuration directory
On startup, the player application now creates a configuration
directory, ~/.chimara. The preferences file is ~/.chimara/config, unless
there is a file chimara-config in the current directory, in which case
it will be overridden.
Philip Chimento [Sun, 27 Feb 2011 11:49:48 +0000 (12:49 +0100)]
Add 'state' settings; add last opened path setting
The settings file now discriminates between 'preferences' settings,
which the user sets from the preferences dialog, and 'state' settings,
which are things remembered by the program.
As an example state setting, the program now remembers the last path a
game was opened from, and automatically starts the file chooser in that
path when opening a game.
Philip Chimento [Sat, 26 Feb 2011 16:15:35 +0000 (17:15 +0100)]
Introduce preferences file
We now use a GSettings object with a custom backend that writes to a
configuration file, ~/.chimara. Right now there is only one example
setting, "flep". It's easy to bind the setting to a property of another
GObject, like the "active" property of a checkbox.
Still need to check how other GLib applications install the settings
file properly in their Makefile.am, and how to work with a default
configuration file such as /etc/chimara if the one in the home directory
is not present.
Philip Chimento [Wed, 16 Feb 2011 23:55:01 +0000 (00:55 +0100)]
Proper state of new hyperlinks' event handlers
Fixes #17. New hyperlinks' event handler callbacks were blocked by
default at creation, but they should be unblocked if there is currently
a hyperlink event request pending in the window.
Philip Chimento [Sat, 5 Feb 2011 00:48:11 +0000 (01:48 +0100)]
Clean up external Blorb file finding code
Moved the code that looks for an external Blorb file to the player, so
the default path can become a setting in the preferences window. Also,
passing an extra file name on the command line when starting the player
also indicates an external resource file.
Philip Chimento [Wed, 2 Feb 2011 23:16:27 +0000 (00:16 +0100)]
Fix program for GStreamer < 0.10.31
It seems that gst_is_initialized() wasn't added until version 0.10.31.
And it just so happens that Ubuntu 10.10 has 0.10.30, so compilation
was failing.
Philip Chimento [Mon, 31 Jan 2011 00:52:51 +0000 (01:52 +0100)]
Check for GStreamer plugins individually
In configure.ac, check for individual GStreamer plugins, instead of
requiring gstreamer-plugins-bad-0.10.pc. This is because Ubuntu doesn't
have a devel package for gstreamer-plugins-bad, and we don't actually
link against that library - we just dynamically open it.
P. F. Chimento [Sun, 30 Jan 2011 17:49:53 +0000 (18:49 +0100)]
Provide blorb file to interpreter on command line
Apparently both interpreters have the undocumented command line option
of providing an extra file name on the command line, which is the Blorb
resource file. We now take advantage of this.
P. F. Chimento [Sat, 29 Jan 2011 21:59:47 +0000 (22:59 +0100)]
Change less-like behavior of pager
The behavior of the pager was based on the paging program 'less': the
enter key scrolls down one line (in GTK terms a 'step increment') and
the space bar scrolls down one page. People probably don't want to page
through interactive fiction one line at a time, and so expect the enter
key to scroll down a page. The enter key now does the same as a space
bar. To scroll line by line, use the mouse wheel or the scroll bar
arrows.