PROP_SYMBOL,
PROP_SETUP,
PROP_VERSION,
+ PROP_TEXTDOMAIN,
};
gchar *symbol;
gchar *setup;
gchar *version;
+ gchar *textdomain;
};
#define IBUS_ENGINE_DESC_GET_PRIVATE(o) \
"The version number of engine description",
"",
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * IBusEngineDesc:textdomain:
+ *
+ * The textdomain of engine description
+ */
+ g_object_class_install_property (gobject_class,
+ PROP_TEXTDOMAIN,
+ g_param_spec_string ("textdomain",
+ "textdomain",
+ "The textdomain of engine description",
+ "",
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
}
static void
desc->priv->symbol = NULL;
desc->priv->setup = NULL;
desc->priv->version = NULL;
+ desc->priv->textdomain = NULL;
}
static void
g_free (desc->priv->symbol);
g_free (desc->priv->setup);
g_free (desc->priv->version);
+ g_free (desc->priv->textdomain);
IBUS_OBJECT_CLASS (ibus_engine_desc_parent_class)->destroy (IBUS_OBJECT (desc));
}
g_assert (desc->priv->version == NULL);
desc->priv->version = g_value_dup_string (value);
break;
+ case PROP_TEXTDOMAIN:
+ g_assert (desc->priv->textdomain == NULL);
+ desc->priv->textdomain = g_value_dup_string (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
}
case PROP_VERSION:
g_value_set_string (value, ibus_engine_desc_get_version (desc));
break;
+ case PROP_TEXTDOMAIN:
+ g_value_set_string (value, ibus_engine_desc_get_textdomain (desc));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (desc, prop_id, pspec);
}
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->layout_variant));
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->layout_option));
g_variant_builder_add (builder, "s", NOTNULL (desc->priv->version));
+ g_variant_builder_add (builder, "s", NOTNULL (desc->priv->textdomain));
#undef NOTNULL
return TRUE;
if (g_variant_n_children (variant) < retval + 1)
return retval;
g_variant_get_child (variant, retval++, "s", &desc->priv->version);
+ if (g_variant_n_children (variant) < retval + 1)
+ return retval;
+ g_variant_get_child (variant, retval++, "s", &desc->priv->textdomain);
return retval;
}
dest->priv->symbol = g_strdup (src->priv->symbol);
dest->priv->setup = g_strdup (src->priv->setup);
dest->priv->version = g_strdup (src->priv->version);
+ dest->priv->textdomain = g_strdup (src->priv->textdomain);
return TRUE;
}
OUTPUT_ENTRY_1(symbol);
OUTPUT_ENTRY_1(setup);
OUTPUT_ENTRY_1(version);
+ OUTPUT_ENTRY_1(textdomain);
g_string_append_indent (output, indent + 1);
g_string_append_printf (output, "<rank>%u</rank>\n", desc->priv->rank);
#undef OUTPUT_ENTRY
PARSE_ENTRY_1(symbol);
PARSE_ENTRY_1(setup);
PARSE_ENTRY_1(version);
+ PARSE_ENTRY_1(textdomain);
#undef PARSE_ENTRY
#undef PARSE_ENTRY_1
if (g_strcmp0 (sub_node->name , "rank") == 0) {
IBUS_ENGINE_DESC_GET_PROPERTY (symbol, const gchar *)
IBUS_ENGINE_DESC_GET_PROPERTY (setup, const gchar *)
IBUS_ENGINE_DESC_GET_PROPERTY (version, const gchar *)
+IBUS_ENGINE_DESC_GET_PROPERTY (textdomain, const gchar *)
#undef IBUS_ENGINE_DESC_GET_PROPERTY
IBusEngineDesc *
g_assert (desc->priv->symbol);
g_assert (desc->priv->setup);
g_assert (desc->priv->version);
+ g_assert (desc->priv->textdomain);
return desc;
}