Philip Chimento [Sat, 15 Sep 2012 21:28:40 +0000 (23:28 +0200)]
Fix window resizing bug; no size requests!
Size allocation is strictly top-down in Glk, so we actually don't
need to do size requests. All size requests are 1, so that the
window keeps its current size.
Philip Chimento [Sat, 15 Sep 2012 15:38:07 +0000 (17:38 +0200)]
Remove Babel library from codebase
Since we are going to release the library with a minimal player, and
work together with Grotesque to produce a cool player, we are removing
the Babel library for now.
Philip Chimento [Sat, 25 Aug 2012 20:46:36 +0000 (22:46 +0200)]
Use cairo for drawing
GDK drawing does not exist in GTK 3 anymore. We now use cairo for
drawing. This means that the graphics window now corresponds to a
GtkDrawingArea, and we use a cairo surface as a backing store.
Philip Chimento [Sat, 25 Aug 2012 19:04:04 +0000 (21:04 +0200)]
Replace deprecated signals
The 'size-request' and 'expose-event' signals now don't exist anymore.
'expose-event' is simply replaced by 'draw'. We used 'size-request' in a
slightly different way than it was supposed to be: connecting a handler
after the default 'size-request' handler run, ensured that the handler
was run after the GtkTextView finished validating text positions, so we
could scroll the text view to the end after printing text to it. Luckily,
'size-allocate' works the same way in GTK 3.
Philip Chimento [Sat, 25 Aug 2012 19:00:42 +0000 (21:00 +0200)]
Replace size-request by minimal height-for-width
The size-request method is now gone, in favor of height-for-width
allocation. The height-for-width implementation is currently minimal,
as described at
http://developer.gnome.org/gtk3/stable/ch24s02.html#id1328275
This could be made much nicer.
Philip Chimento [Sat, 25 Aug 2012 18:58:50 +0000 (20:58 +0200)]
Remove deprecated member access
GObject classes aren't supposed to have their members accessed directly
anymore. Instead use accessor functions. In the case of our
gtk_text_tag_copy() function this requires some clever copying of
properties ;-)
Philip Chimento [Sun, 12 Feb 2012 12:40:05 +0000 (13:40 +0100)]
Implement new name mangling
The Glk 0.7.4 spec has new recommendations on what characters should
be legal in filenames and how to make sure that files created by
different Glk implementations are interoperable.
Philip Chimento [Sun, 12 Feb 2012 12:11:23 +0000 (13:11 +0100)]
Implement recommended file suffixes in dialog
When creating a file with glk_fileref_create_by_prompt(), there will
be a file filter active for the recommended file extension. For
fileusage_InputRecord and fileusage_Transcript, there will also be a
filter for text/plain files selectable. In any case there is also an
"All files" filter selectable.
Philip Chimento [Sun, 5 Feb 2012 16:14:50 +0000 (17:14 +0100)]
Prevent unnecessary regeneration of VAPI
Vapigen doesn't update the timestamp of the VAPI file when the
contents don't change; so when the GIR changes but the VAPI doesn't,
the dependency tracking got confused. This updates the timestamp
properly.
Philip Chimento [Wed, 1 Feb 2012 22:13:36 +0000 (23:13 +0100)]
Added a Python player!
It crashes half the time because GObject Introspection isn't actually
officially supported with GTK 2. However, it's a simple player that
shows how to use Chimara in Python. We don't even have to write any
language bindings, thanks to the power of GObject Introspection! But
if we want to do anything serious with Python, we will need to port to
GTK 3 first.
It's a straight port of the C player, but it's 300 lines instead
of 1200 ;-)
Philip Chimento [Wed, 1 Feb 2012 21:06:05 +0000 (22:06 +0100)]
Identified two more entry points
This fixes an obscure bug! If you create your ChimaraGlk object
not with chimara_glk_new() but with g_object_new(), then the library
init function was not called. That caused a crash when trying to
access the thread-private data.
Philip Chimento [Sun, 1 Jan 2012 17:32:28 +0000 (18:32 +0100)]
Add API to start plugins using GFile
To complete the API, we should have functions that start a plugin using
GIO's GFile API. It's easier for navigating the filesystem in language
bindings such as Python.
Philip Chimento [Fri, 2 Sep 2011 23:59:17 +0000 (01:59 +0200)]
Add API to unload plugin module
This is a workaround for a very complicated bug. When you have more than
one ChimaraGlk widget opening the same plugin, then g_module_open()
doesn't dlopen() the plugin again; instead, it just adds a reference to
the open module.
This means that all static variables in the module are not reinitialized
when the Glk program starts running in the second ChimaraGlk widget.
This problem needs to be solved either by eliminating the static
variables from the plugins, or making sure that different ChimaraGlk
widgets open their plugins separately.
This commit does the latter, by adding API to unload the plugin module
(chimara_glk_unload_plugin()) so that ChimaraGlk widgets that run the
same program but not at the same time have the option to unload the
plugin in one widget before loading it in the other. Specifically, this
is the use case of Inform 7.
This does not fix the use case where two separate ChimaraGlk widgets
want to run the same program at the same time.
Finished babeltest, it now does all of the following:
1) Extact metadata from file using babel
2) If no metadata was found lookup IFID on IFDB
3) Parse ifiction record
4) Store in database
Marijn van Vliet [Sun, 19 Jun 2011 13:33:09 +0000 (15:33 +0200)]
Completed babeltest. It now opens the library.bdf in the current directory (or creates it) and adds the metadata (if any) of the given story to it. Then it dumps the contents of the library.