#ifdef SOLIPA_FOUND
Solipa *solipa;
#endif
+
+ gchar *app_textdomain;
};
G_DEFINE_TYPE (GdaExGrid, gdaex_grid, G_TYPE_OBJECT)
priv->title = NULL;
priv->view = NULL;
priv->menu = NULL;
+
+ priv->app_textdomain = NULL;
}
GdaExGrid
return gdaex_grid;
}
+void
+gdaex_grid_set_app_textdomain (GdaExGrid *grid, const gchar *textdomain)
+{
+ GdaExGridPrivate *priv;
+
+ g_return_if_fail (GDAEX_IS_GRID (grid));
+
+ priv = GDAEX_GRID_GET_PRIVATE (grid);
+
+ if (priv->app_textdomain != NULL)
+ {
+ g_free (priv->app_textdomain);
+ }
+ priv->app_textdomain = g_strdup (textdomain);
+}
+
void
gdaex_grid_set_title (GdaExGrid *grid, const gchar *title)
{
call_missing_func = FALSE;
+ if (priv->app_textdomain != NULL)
+ {
+ textdomain (priv->app_textdomain);
+ }
+
while (gda_data_model_iter_move_next (dm_iter))
{
gtk_tree_store_append (GTK_TREE_STORE (priv->model), &iter, NULL);
switch (gda_col_gtype)
{
case G_TYPE_STRING:
- g_value_set_string (&gval, gdaex_data_model_iter_get_field_value_stringify_at (dm_iter, field_name));
+ g_value_set_string (&gval, gettext (gdaex_data_model_iter_get_field_value_stringify_at (dm_iter, field_name)));
break;
case G_TYPE_BOOLEAN:
}
else
{
- g_value_set_string (&gval, gdaex_data_model_iter_get_field_value_stringify_at (dm_iter, field_name));
+ g_value_set_string (&gval, gettext (gdaex_data_model_iter_get_field_value_stringify_at (dm_iter, field_name)));
}
break;
}
break;
default:
- gval = *gda_value_new_from_string (gdaex_data_model_iter_get_field_value_stringify_at (dm_iter, field_name), col_gtype);
+ gval = *gda_value_new_from_string (gettext (gdaex_data_model_iter_get_field_value_stringify_at (dm_iter, field_name)), col_gtype);
break;
}
}
}
}
+ if (priv->app_textdomain != NULL)
+ {
+ textdomain (GETTEXT_PACKAGE);
+ }
+
return TRUE;
}