projects
/
rodin
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Iliad port
[rodin/chimara.git]
/
libchimara
/
chimara-if.c
diff --git
a/libchimara/chimara-if.c
b/libchimara/chimara-if.c
index 3298c795d397ef84754da5ceecfbb79f15b5e5fc..be9fc206f0c519ec8cd06bbce56e894a02ff63cc 100644
(file)
--- a/
libchimara/chimara-if.c
+++ b/
libchimara/chimara-if.c
@@
-166,27
+166,35
@@
chimara_if_set_property(GObject *object, guint prop_id, const GValue *value, GPa
{
case PROP_PIRACY_MODE:
PROCESS_FLAG(priv->flags, CHIMARA_IF_PIRACY_MODE, g_value_get_boolean(value));
{
case PROP_PIRACY_MODE:
PROCESS_FLAG(priv->flags, CHIMARA_IF_PIRACY_MODE, g_value_get_boolean(value));
+ g_object_notify(object, "piracy-mode");
break;
case PROP_TANDY_BIT:
PROCESS_FLAG(priv->flags, CHIMARA_IF_TANDY_BIT, g_value_get_boolean(value));
break;
case PROP_TANDY_BIT:
PROCESS_FLAG(priv->flags, CHIMARA_IF_TANDY_BIT, g_value_get_boolean(value));
+ g_object_notify(object, "tandy-bit");
break;
case PROP_EXPAND_ABBREVIATIONS:
PROCESS_FLAG(priv->flags, CHIMARA_IF_EXPAND_ABBREVIATIONS, g_value_get_boolean(value));
break;
case PROP_EXPAND_ABBREVIATIONS:
PROCESS_FLAG(priv->flags, CHIMARA_IF_EXPAND_ABBREVIATIONS, g_value_get_boolean(value));
+ g_object_notify(object, "expand-abbreviations");
break;
case PROP_IGNORE_ERRORS:
PROCESS_FLAG(priv->flags, CHIMARA_IF_IGNORE_ERRORS, g_value_get_boolean(value));
break;
case PROP_IGNORE_ERRORS:
PROCESS_FLAG(priv->flags, CHIMARA_IF_IGNORE_ERRORS, g_value_get_boolean(value));
+ g_object_notify(object, "ignore-errors");
break;
case PROP_TYPO_CORRECTION:
PROCESS_FLAG(priv->flags, CHIMARA_IF_TYPO_CORRECTION, g_value_get_boolean(value));
break;
case PROP_TYPO_CORRECTION:
PROCESS_FLAG(priv->flags, CHIMARA_IF_TYPO_CORRECTION, g_value_get_boolean(value));
+ g_object_notify(object, "typo-correction");
break;
case PROP_INTERPRETER_NUMBER:
priv->interpreter_number = g_value_get_uint(value);
break;
case PROP_INTERPRETER_NUMBER:
priv->interpreter_number = g_value_get_uint(value);
+ g_object_notify(object, "interpreter-number");
break;
case PROP_RANDOM_SEED:
priv->random_seed = g_value_get_int(value);
break;
case PROP_RANDOM_SEED:
priv->random_seed = g_value_get_int(value);
+ g_object_notify(object, "random-seed");
break;
case PROP_RANDOM_SEED_SET:
priv->random_seed_set = g_value_get_boolean(value);
break;
case PROP_RANDOM_SEED_SET:
priv->random_seed_set = g_value_get_boolean(value);
+ g_object_notify(object, "random-seed-set");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
@@
-240,9
+248,16
@@
chimara_if_command(ChimaraIF *self, gchar *input, gchar *response)
/* Default signal handler */
}
/* Default signal handler */
}
-/* G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
+/*
COMPAT:
G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
#ifndef G_PARAM_STATIC_STRINGS
#ifndef G_PARAM_STATIC_STRINGS
+
+/* COMPAT: G_PARAM_STATIC_NAME and friends only appeared in GTK 2.8 */
+#if GTK_CHECK_VERSION(2,8,0)
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
+#else
+#define G_PARAM_STATIC_STRINGS (0)
+#endif
+
#endif
static void
#endif
static void
@@
-533,11
+548,17
@@
chimara_if_run_game(ChimaraIF *self, gchar *gamefile, GError **error)
ChimaraIFInterpreter interpreter = priv->preferred_interpreter[format];
gchar *pluginfile = g_strconcat(plugin_names[interpreter], "." G_MODULE_SUFFIX, NULL);
ChimaraIFInterpreter interpreter = priv->preferred_interpreter[format];
gchar *pluginfile = g_strconcat(plugin_names[interpreter], "." G_MODULE_SUFFIX, NULL);
+ gchar *pluginpath;
+#ifdef DEBUG
+#ifndef LT_OBJDIR
+#define LT_OBJDIR ".libs" /* Pre-2.2 libtool, so take a wild guess */
+#endif /* LT_OBJDIR */
/* If there is a plugin in the source tree, use that */
/* If there is a plugin in the source tree, use that */
-
gchar *pluginpath = g_build_filename("..", "interpreters"
, plugin_names[interpreter], LT_OBJDIR, pluginfile, NULL);
+
pluginpath = g_build_filename(PLUGINSOURCEDIR
, plugin_names[interpreter], LT_OBJDIR, pluginfile, NULL);
if( !g_file_test(pluginpath, G_FILE_TEST_EXISTS) )
{
g_free(pluginpath);
if( !g_file_test(pluginpath, G_FILE_TEST_EXISTS) )
{
g_free(pluginpath);
+#endif /* DEBUG */
pluginpath = g_build_filename(PLUGINDIR, pluginfile, NULL);
if( !g_file_test(pluginpath, G_FILE_TEST_EXISTS) )
{
pluginpath = g_build_filename(PLUGINDIR, pluginfile, NULL);
if( !g_file_test(pluginpath, G_FILE_TEST_EXISTS) )
{
@@
-546,7
+567,9
@@
chimara_if_run_game(ChimaraIF *self, gchar *gamefile, GError **error)
g_set_error(error, CHIMARA_ERROR, CHIMARA_PLUGIN_NOT_FOUND, _("No appropriate %s interpreter plugin was found"), interpreter_names[interpreter]);
return FALSE;
}
g_set_error(error, CHIMARA_ERROR, CHIMARA_PLUGIN_NOT_FOUND, _("No appropriate %s interpreter plugin was found"), interpreter_names[interpreter]);
return FALSE;
}
+#ifdef DEBUG
}
}
+#endif
g_free(pluginfile);
/* Decide what arguments to pass to the interpreters; currently only the
g_free(pluginfile);
/* Decide what arguments to pass to the interpreters; currently only the