projects
/
projects
/
chimara
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check for proper plugins in configure
[projects/chimara/chimara.git]
/
libchimara
/
chimara-if.c
diff --git
a/libchimara/chimara-if.c
b/libchimara/chimara-if.c
index ee91bf9e57e275b61ac1632d83bdadde310911bd..efbd5297c41dcd008fc874da3c4e2e1f59db7c85 100644
(file)
--- a/
libchimara/chimara-if.c
+++ b/
libchimara/chimara-if.c
@@
-104,7
+104,9
@@
chimara_if_waiting(ChimaraGlk *glk)
gchar *response = g_string_free(priv->response, FALSE);
priv->response = g_string_new("");
gchar *response = g_string_free(priv->response, FALSE);
priv->response = g_string_new("");
+ gdk_threads_enter();
g_signal_emit_by_name(glk, "command", priv->input, response);
g_signal_emit_by_name(glk, "command", priv->input, response);
+ gdk_threads_leave();
g_free(priv->input);
g_free(response);
g_free(priv->input);
g_free(response);
@@
-281,12
+283,16
@@
chimara_if_class_init(ChimaraIFClass *klass)
/**
* ChimaraIF::command:
* @self: The widget that received the signal
/**
* ChimaraIF::command:
* @self: The widget that received the signal
- * @input: The command typed into the game
+ * @input: The command typed into the game
, or %NULL
* @response: The game's response to the command
*
* Emitted once for each input-response cycle of an interactive fiction
* game. Note that games with nontraditional input systems (i.e. not all
* taking place in the same text buffer window) may confuse this signal.
* @response: The game's response to the command
*
* Emitted once for each input-response cycle of an interactive fiction
* game. Note that games with nontraditional input systems (i.e. not all
* taking place in the same text buffer window) may confuse this signal.
+ *
+ * It may happen that @input is %NULL, in which case @response is not due to
+ * a user command, but contains the text printed at the beginning of the
+ * game, up until the first prompt.
*/
chimara_if_signals[COMMAND] = g_signal_new("command",
G_OBJECT_CLASS_TYPE(klass), 0,
*/
chimara_if_signals[COMMAND] = g_signal_new("command",
G_OBJECT_CLASS_TYPE(klass), 0,