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.
P. F. Chimento [Sat, 29 Jan 2011 16:33:17 +0000 (17:33 +0100)]
Improved default styles
Defined the default styles so as to be as accommodating as possible to
the largest possible number of games. In particular, games that abuse
the "Header" style to print bold text.
P. F. Chimento [Sat, 29 Jan 2011 14:31:35 +0000 (15:31 +0100)]
Updated interpreters
All bundled interpreters are now current with revision 496 of Gargoyle's
interpreters. Added new Gargoyle extension functions to garglk.c and
garglk.h.
Marijn van Vliet [Sat, 29 Jan 2011 13:43:55 +0000 (14:43 +0100)]
* Fixed garglk_set_reversevideo to use the new way styles are handled.
* GtkTextTags are no longer shared between GtkTextBuffers, as this
is not allowed.
Philip Chimento [Wed, 19 Jan 2011 18:32:33 +0000 (19:32 +0100)]
Implemented sound playing with test sound
Implemented glk_schannel_play() and glk_schannel_stop() with a 440 Hz
sine wave as a test sound. This sound is played no matter what resource
number you pass to glk_schannel_play() and keeps going until you call
glk_schannel_stop().
Philip Chimento [Wed, 5 Jan 2011 19:19:50 +0000 (14:19 -0500)]
Fix stylehint size bug
The "size" stylehint should use the GtkTextTag "scale" property, not
the "size" property - this way, the relative size is independent of the
default font size. The bug was that the "size" property should be given
in Pango units, not points, but now the "size" property isn't used at
all.
P. F. Chimento [Tue, 23 Nov 2010 00:01:29 +0000 (01:01 +0100)]
Wrote chimara_glk_set_resource_load_callback()
Added a function for providing an alternate mechanism for loading
resources, as described in the Blorb specification, section 14. This
function allows the host program to specify a callback which the Glk
program will call when a resource is requested and no Blorb resource map
is loaded.
P. F. Chimento [Mon, 22 Nov 2010 23:50:26 +0000 (00:50 +0100)]
Fixed threading bug in graphics
flush_window_buffer() requests the GDK lock, but it was called with the
GDK lock already acquired in draw_image_common(). How this managed not
to freeze before, I don't know.
P. F. Chimento [Mon, 22 Nov 2010 20:54:41 +0000 (21:54 +0100)]
Fix crash when loading resource without a map
The Glk program now fails gracefully when trying to load an image
resource without having loaded a resource map first: it prints a warning
and doesn't load the image, instead of crashing.
P. F. Chimento [Sun, 21 Nov 2010 00:45:21 +0000 (01:45 +0100)]
Implemented interactive mode
The ChimaraGlk:interactive-mode property didn't do anything yet, but it
now disables paging when TRUE. When input scrolls off the screen, the
screen now scrolls down with it.
P. F. Chimento [Fri, 19 Nov 2010 21:55:32 +0000 (22:55 +0100)]
Added test case for crash in ChimaraIF::command
There is a gdk_threads_enter/leave missing somewhere, because using GTK
calls from the signal handler of the ChimaraIF::command signal causes an
X error.
P. F. Chimento [Wed, 17 Nov 2010 21:14:06 +0000 (22:14 +0100)]
Fixed buffers and grids sharing the same styles
Two separate text tags should be created, one for text buffers, the
other for grids. Otherwise they share each other's styles (i.e. reverse
video on text grids.)
P. F. Chimento [Wed, 17 Nov 2010 21:11:26 +0000 (22:11 +0100)]
Fewer unnecessary recompiles of git
Making the automatically-generated version.h depend on Makefile.am
instead of Makefile prevents git from being fully recompiled every time
configure is run.
P. F. Chimento [Sat, 13 Nov 2010 00:20:21 +0000 (01:20 +0100)]
Fixed memory management in styles
Added a free for the StyleSets that were leaked, and fixed a double
unref of text tags that was causing lots of warnings when closing the
widget. Also added a test case.