Plug-in de Glade:

- SqlBatch es un objeto (VnBatch) en lugar de una propiedad del modelo.
	- Editor de Sql del VnModel con opción de guardar.
	- GvnParam se ha quitado del plug-in, ya que ahora es una interfaz.
This commit is contained in:
Alejandro T. Colombini Gómez 2014-07-15 11:08:57 +02:00
parent b6f58de70d
commit dd589deb9c
26 changed files with 1862 additions and 1415 deletions

View File

@ -9,8 +9,7 @@ template_DATA = \
hedera/anjuta.session.tpl \ hedera/anjuta.session.tpl \
hedera/AUTHORS.tpl \ hedera/AUTHORS.tpl \
hedera/configure.ac.tpl \ hedera/configure.ac.tpl \
hedera/Makefile.am.tpl \ hedera/Makefile.am.tpl
hedera/translation
anjuta_srcdir = $(templatedir)/src anjuta_srcdir = $(templatedir)/src
anjuta_src_DATA = \ anjuta_src_DATA = \

View File

@ -25,7 +25,9 @@ SUBDIRS = \
translationsdir = translationsdir =
translations_DATA = \ translations_DATA = \
po/es.po po/es.po \
po/POTFILES.in \
po/POTFILES.skip
[+ENDIF+] [+ENDIF+]
EXTRA_DIST = \ EXTRA_DIST = \
README \ README \

View File

@ -1,12 +1,12 @@
[+ autogen5 template +] [+ autogen5 template +]
<interface> <interface>
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<menu id='menu'> <menu id="menu">
<item> <item>
<attribute name='label' translatable='yes'>[+FormClassName+]</attribute> <attribute name="label" translatable="yes">[+FormClassName+]</attribute>
<attribute name='action'>win.open-form</attribute> <attribute name="action">win.open-form</attribute>
<attribute name='target'>[+FormName+]</attribute> <attribute name="target">[+FormName+]</attribute>
<attribute name='accel'>F1</attribute> <attribute name="accel">F1</attribute>
</item> </item>
</menu> </menu>
</interface> </interface>

View File

@ -1,49 +0,0 @@
#!/bin/bash
getopt -Q \
-o "hua:" \
-l "help,update,add:" \
-n "./translation" \
-- $@
case "$1" in
-u|--update|'')
cd ./po
intltool-update -r
cd ..
;;
-a|--add)
arg=$2
if [ -z $arg ]; then
exit 1;
elif [ ${#arg} -lt 2 ]; then
echo "./translation: language codes are at least two characters long." > /dev/stderr
exit 1;
fi
msginit -i po/*.pot -o po/$arg.po -l $arg.utf8
echo $arg >> po/LINGUAS
#sort po/LINGUAS -o po/LINGUAS
;;
-h|--help)
echo -e \
"Translation helper script.
Note that only the first option is used. If no option is
passed the '\033[1m-u\033[0m' option is used by default.
Options:
\033[1m-u, --update\033[0m
Update the currently existing translations and
the translations template. Also reports the current
status of the translations.
\033[1m-a, --add\033[0m \033[4mlang\033[0m
Add a new translation for the \033[4mlang\033[0m language
(using the gettext language and country codes), the
charset will automatically be set to UTF-8. You will
be asked to select your e-mail from a list.
\033[1m-h, --help\033[0m
Print this help text and exit."
;;
esac

View File

@ -29,7 +29,7 @@
* db_model_holder_get_model() and db_model_holder_set_model() methods. * db_model_holder_get_model() and db_model_holder_set_model() methods.
**/ **/
G_DEFINE_INTERFACE (DbModelHolder, db_model_holder, G_TYPE_INVALID); G_DEFINE_INTERFACE (DbModelHolder, db_model_holder, G_TYPE_OBJECT);
/** /**
* db_model_holder_get_model: * db_model_holder_get_model:

View File

@ -15,6 +15,7 @@ libgladevn_la_LDFLAGS = -avoid-version
libgladevn_la_SOURCES = \ libgladevn_la_SOURCES = \
glade-vn.h \ glade-vn.h \
glade-vn.c \ glade-vn.c \
glade-sql-batch.c \
glade-vn-set.c \ glade-vn-set.c \
glade-db-model.c \ glade-db-model.c \
glade-db-model-editor.h \ glade-db-model-editor.h \

View File

@ -19,13 +19,22 @@
//+++++++++++++++++++++++++++++++++++++++++++++++++++ GladeModelEditor //+++++++++++++++++++++++++++++++++++++++++++++++++++ GladeModelEditor
static void glade_model_editor_add_list_eprop (GladeModelEditor * obj, GtkWidget * glade_model_editor_new (GladeWidgetAdaptor * adaptor,
GladeWidgetAdaptor * adaptor, const gchar * name, const gchar * tooltip) GladeEditable * editable)
{ {
GtkWidget * frame, * alignment, * vbox; GtkWidget * frame, * alignment, * vbox;
GladeEditorProperty * eprop = GladeEditorProperty * eprop;
glade_widget_adaptor_create_eprop_by_name (adaptor, name, FALSE, TRUE); GladeModelEditor * obj;
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (GLADE_IS_EDITABLE (editable), NULL);
obj = g_object_new (GLADE_TYPE_MODEL_EDITOR,
"orientation", GTK_ORIENTATION_VERTICAL, NULL);
obj->base = GTK_WIDGET (editable);
gtk_box_pack_start (GTK_BOX (obj), GTK_WIDGET (editable), TRUE, TRUE, 0);
eprop = glade_widget_adaptor_create_eprop_by_name (adaptor, "links", FALSE, TRUE);
obj->props = g_list_prepend (obj->props, eprop); obj->props = g_list_prepend (obj->props, eprop);
frame = gtk_frame_new (NULL); frame = gtk_frame_new (NULL);
@ -42,27 +51,7 @@ static void glade_model_editor_add_list_eprop (GladeModelEditor * obj,
gtk_container_add (GTK_CONTAINER (alignment), vbox); gtk_container_add (GTK_CONTAINER (alignment), vbox);
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (eprop), FALSE, FALSE, 4); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (eprop), FALSE, FALSE, 4);
gtk_widget_set_tooltip_text (vbox, tooltip); gtk_widget_set_tooltip_text (vbox, _("List of parameters linked to the model"));
}
GtkWidget * glade_model_editor_new (GladeWidgetAdaptor * adaptor,
GladeEditable * editable)
{
GladeModelEditor * obj;
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (GLADE_IS_EDITABLE (editable), NULL);
obj = g_object_new (GLADE_TYPE_MODEL_EDITOR,
"orientation", GTK_ORIENTATION_VERTICAL, NULL);
obj->base = GTK_WIDGET (editable);
gtk_box_pack_start (GTK_BOX (obj), GTK_WIDGET (editable), TRUE, TRUE, 0);
glade_model_editor_add_list_eprop (obj, adaptor, "links",
_("List of parameters linked to the model"));
glade_model_editor_add_list_eprop (obj, adaptor, "batch",
_("List of SqlHolders and identifiers"));
gtk_widget_show_all (GTK_WIDGET (obj)); gtk_widget_show_all (GTK_WIDGET (obj));
return GTK_WIDGET (obj); return GTK_WIDGET (obj);
@ -112,6 +101,8 @@ static void glade_model_editor_class_init (GladeModelEditorClass * k)
static void glade_model_editor_init (GladeModelEditor * obj) static void glade_model_editor_init (GladeModelEditor * obj)
{ {
obj->props = NULL;
obj->base = NULL;
} }
static void glade_model_editor_editable_init (GladeEditableIface * iface) static void glade_model_editor_editable_init (GladeEditableIface * iface)
@ -122,26 +113,3 @@ static void glade_model_editor_editable_init (GladeEditableIface * iface)
G_DEFINE_TYPE_WITH_CODE (GladeModelEditor, glade_model_editor, GTK_TYPE_BOX, G_DEFINE_TYPE_WITH_CODE (GladeModelEditor, glade_model_editor, GTK_TYPE_BOX,
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_model_editor_editable_init)); G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_model_editor_editable_init));
//+++++++++++++++++++++++++++++++++++++++++++++++++++ GladeDbList
G_DEFINE_BOXED_TYPE (GladeDbList, glade_db_list, glade_db_list_copy, glade_db_list_free);
void glade_db_list_free (GladeDbList * list)
{
if (!list)
return;
if (list->list)
g_object_unref (list->list);
g_free (list);
list = NULL;
}
GladeDbList * glade_db_list_copy (const GladeDbList * list)
{
GladeDbList * l = g_new (GladeDbList, 1);
l->list = list->list ? g_object_ref (list->list) : NULL;
return l;
}

View File

@ -47,17 +47,4 @@ GType glade_model_editor_get_type (void) G_GNUC_CONST;
GtkWidget * glade_model_editor_new (GladeWidgetAdaptor * adaptor, GtkWidget * glade_model_editor_new (GladeWidgetAdaptor * adaptor,
GladeEditable * editable); GladeEditable * editable);
#define GLADE_TYPE_DB_LIST (glade_db_list_get_type())
typedef struct _GladeDbList GladeDbList;
struct _GladeDbList
{
GtkListStore * list;
};
GType glade_db_list_get_type (void) G_GNUC_CONST;
void glade_db_list_free (GladeDbList * list);
GladeDbList * glade_db_list_copy (const GladeDbList * list);
#endif #endif

View File

@ -46,6 +46,8 @@ typedef struct
GtkWidget * entry; GtkWidget * entry;
gint width; gint width;
gint height; gint height;
gint x;
gint y;
} }
GladeEPropSql; GladeEPropSql;
@ -57,18 +59,87 @@ GLADE_MAKE_EPROP (GladeEPropSql, glade_eprop_sql)
#define GLADE_IS_EPROP_SQL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_SQL)) #define GLADE_IS_EPROP_SQL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_SQL))
#define GLADE_EPROP_SQL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_EPROP_SQL, GladeEPropSqlClass)) #define GLADE_EPROP_SQL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_EPROP_SQL, GladeEPropSqlClass))
typedef struct
{
GladeEditorProperty * eprop;
GtkTextBuffer * buffer;
}
SqlEditorData;
void glade_eprop_sql_set_text_from_buffer (GladeEditorProperty * eprop, GtkTextBuffer * buffer)
{
gchar * sql;
GValue val = G_VALUE_INIT;
GladeProperty * p = glade_editor_property_get_property (eprop);
GtkTextIter * start = g_new (GtkTextIter, 1),
* end = g_new (GtkTextIter, 1);
g_value_init (&val, G_TYPE_STRING);
gtk_text_buffer_get_bounds (buffer, start, end);
sql = gtk_text_buffer_get_text (buffer, start, end, TRUE);
g_value_set_string (&val, sql);
glade_command_set_property_value (p, &val);
g_value_unset (&val);
g_free (start);
g_free (end);
}
static gboolean glade_eprop_sql_editor_save (GladeEditorProperty * eprop,
GtkTextBuffer * buffer)
{
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeWidget * widget = glade_property_get_widget (p);
GladeProject * project = glade_widget_get_project (widget);
const gchar * path = glade_project_get_path (project);
glade_eprop_sql_set_text_from_buffer (eprop, buffer);
if (!path)
{
GtkWidget * dialog = glade_util_file_dialog_new (_("Save as...")
,project
,GTK_WINDOW (glade_app_get_window ())
,GLADE_FILE_DIALOG_ACTION_SAVE);
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog));
gtk_widget_destroy (dialog);
}
return path ? glade_project_save (project, path, NULL) : FALSE;
}
static void glade_eprop_sql_on_editor_save_clicked (GtkToolButton * button,
SqlEditorData * data)
{
glade_eprop_sql_editor_save (data->eprop, data->buffer);
}
static gboolean glade_eprop_sql_on_editor_key_pressed (GtkWidget * widget,
GdkEventKey * event, SqlEditorData * data)
{
if (event->state & GDK_CONTROL_MASK
&& (event->keyval == GDK_KEY_S || event->keyval == GDK_KEY_s))
return glade_eprop_sql_editor_save (data->eprop, data->buffer);
return FALSE;
}
static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty * eprop) static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty * eprop)
{ {
gpointer text, buffer; gpointer text, buffer;
const gchar * sql; const gchar * sql;
GladeEPropSql * obj = GLADE_EPROP_SQL (eprop); GladeEPropSql * obj = GLADE_EPROP_SQL (eprop);
PangoFontDescription * font; PangoFontDescription * font;
GtkWidget * scroll; GtkWidget * dialog_area, * scroll, * toolbar, * item;
GtkStyleContext * context;
SqlEditorData * data;
GladeProperty * p = glade_editor_property_get_property (eprop); GladeProperty * p = glade_editor_property_get_property (eprop);
GtkDialog * dialog = GTK_DIALOG (gtk_dialog_new_with_buttons GtkDialog * dialog = GTK_DIALOG (gtk_dialog_new_with_buttons
(_("SQL Editor") (_("SQL Editor")
,GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (eprop))) ,NULL
,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT ,GTK_DIALOG_DESTROY_WITH_PARENT
,_("OK"), GTK_RESPONSE_OK ,_("OK"), GTK_RESPONSE_OK
,_("Clear"), GTK_RESPONSE_REJECT ,_("Clear"), GTK_RESPONSE_REJECT
,_("Cancel"), GTK_RESPONSE_CANCEL ,_("Cancel"), GTK_RESPONSE_CANCEL
@ -78,15 +149,19 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK); gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
gtk_window_set_default_size (GTK_WINDOW (dialog), obj->width, obj->height); gtk_window_set_default_size (GTK_WINDOW (dialog), obj->width, obj->height);
if (obj->x && obj->y)
gtk_window_move (GTK_WINDOW (dialog), obj->x, obj->y);
dialog_area = gtk_dialog_get_content_area (dialog);
gtk_widget_set_margin_top (dialog_area, 6);
gtk_widget_set_margin_bottom (dialog_area, 6);
gtk_widget_set_margin_start (dialog_area, 6);
gtk_widget_set_margin_end (dialog_area, 6);
scroll = gtk_scrolled_window_new (gtk_adjustment_new (0,0,0,0,0,0), scroll = gtk_scrolled_window_new (gtk_adjustment_new (0,0,0,0,0,0),
gtk_adjustment_new (0,0,0,0,0,0)); gtk_adjustment_new (0,0,0,0,0,0));
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_widget_set_margin_top (scroll, 6); gtk_box_pack_start (GTK_BOX (dialog_area), scroll, TRUE, TRUE, 0);
gtk_widget_set_margin_bottom (scroll, 6);
gtk_widget_set_margin_start (scroll, 6);
gtk_widget_set_margin_end (scroll, 6);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)),
scroll, TRUE, TRUE, 6);
#ifdef _HAVE_GTKSOURCEVIEW #ifdef _HAVE_GTKSOURCEVIEW
GtkSourceLanguageManager * lm = gtk_source_language_manager_new (); GtkSourceLanguageManager * lm = gtk_source_language_manager_new ();
@ -111,25 +186,38 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
gtk_text_buffer_set_text (buffer, sql, -1); gtk_text_buffer_set_text (buffer, sql, -1);
gtk_container_add (GTK_CONTAINER (scroll), text); gtk_container_add (GTK_CONTAINER (scroll), text);
gtk_widget_show_all (scroll);
data = g_new (SqlEditorData, 1);
data->eprop = eprop;
data->buffer = buffer;
g_signal_connect (dialog, "key-press-event",
G_CALLBACK (glade_eprop_sql_on_editor_key_pressed), data);
toolbar = gtk_toolbar_new ();
gtk_box_pack_start (GTK_BOX (dialog_area), toolbar, FALSE, TRUE, 0);
item = GTK_WIDGET (g_object_new (GTK_TYPE_TOOL_BUTTON,
"icon-widget", gtk_image_new_from_icon_name
("document-save-symbolic", GTK_ICON_SIZE_SMALL_TOOLBAR), NULL));
gtk_widget_set_tooltip_text (item, _("Save project"));
g_signal_connect (item, "clicked",
G_CALLBACK (glade_eprop_sql_on_editor_save_clicked), data);
gtk_container_add (GTK_CONTAINER (toolbar), item);
context = gtk_widget_get_style_context (scroll);
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_BOTTOM);
context = gtk_widget_get_style_context (toolbar);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_INLINE_TOOLBAR);
gtk_style_context_set_junction_sides (context, GTK_JUNCTION_TOP);
gtk_widget_show_all (dialog_area);
switch (gtk_dialog_run (dialog)) switch (gtk_dialog_run (dialog))
{ {
case GTK_RESPONSE_OK: case GTK_RESPONSE_OK:
{ {
GValue val = G_VALUE_INIT; glade_eprop_sql_set_text_from_buffer (eprop, buffer);
GtkTextIter * start = g_new (GtkTextIter, 1),
* end = g_new (GtkTextIter, 1);
g_value_init (&val, G_TYPE_STRING);
gtk_text_buffer_get_bounds (buffer, start, end);
sql = gtk_text_buffer_get_text (buffer, start, end, TRUE);
g_value_set_string (&val, sql);
glade_command_set_property_value (p, &val);
g_value_unset (&val);
g_free (start);
g_free (end);
break; break;
} }
case GTK_RESPONSE_REJECT: case GTK_RESPONSE_REJECT:
@ -148,7 +236,9 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
obj->width = gtk_widget_get_allocated_width (GTK_WIDGET (dialog)); obj->width = gtk_widget_get_allocated_width (GTK_WIDGET (dialog));
obj->height = gtk_widget_get_allocated_height (GTK_WIDGET (dialog)); obj->height = gtk_widget_get_allocated_height (GTK_WIDGET (dialog));
gtk_window_get_position (GTK_WINDOW (dialog), &obj->x, &obj->y);
gtk_widget_destroy (GTK_WIDGET (dialog)); gtk_widget_destroy (GTK_WIDGET (dialog));
g_free (data);
} }
static void glade_eprop_sql_entry_text_changed (GtkEntry * entry, static void glade_eprop_sql_entry_text_changed (GtkEntry * entry,
@ -186,8 +276,10 @@ static GtkWidget * glade_eprop_sql_create_input (GladeEditorProperty * eprop)
gtk_widget_show_all (box); gtk_widget_show_all (box);
obj->width = 750; obj->width = 930;
obj->height = 550; obj->height = 730;
obj->x = 0;
obj->y = 0;
return box; return box;
} }
@ -215,7 +307,8 @@ static void glade_eprop_sql_finalize (GObject * object)
GObjectClass * parent_class = g_type_class_peek_parent (G_OBJECT_GET_CLASS (object)); GObjectClass * parent_class = g_type_class_peek_parent (G_OBJECT_GET_CLASS (object));
G_OBJECT_CLASS (parent_class)->finalize (object); G_OBJECT_CLASS (parent_class)->finalize (object);
} }
//++++++++++++++++++++++++++++ Structure and prototypes for Links and Batch
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Links Editor Property
typedef struct typedef struct
{ {
@ -224,19 +317,7 @@ typedef struct
GtkTreeView * view; GtkTreeView * view;
gchar * path; gchar * path;
} }
GladeListEProp; GladeEPropLinks;
void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
GtkTreeModel * model, GtkTreeIter * iter, gpointer data);
static void glade_list_eprop_add_param_column (GladeListEProp * obj);
static void glade_list_eporp_on_string_col_edited (GtkCellRendererText * cell,
gchar * path, const gchar * text, GladeEditorProperty * eprop);
static void glade_list_eprop_create_input (GladeListEProp * obj, GtkWidget * box,
gchar * string);
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Links Editor Property
typedef GladeListEProp GladeEPropLinks;
GLADE_MAKE_EPROP (GladeEPropLinks, glade_eprop_links) GLADE_MAKE_EPROP (GladeEPropLinks, glade_eprop_links)
#define GLADE_TYPE_EPROP_LINKS (glade_eprop_links_get_type ()) #define GLADE_TYPE_EPROP_LINKS (glade_eprop_links_get_type ())
@ -248,171 +329,66 @@ GLADE_MAKE_EPROP (GladeEPropLinks, glade_eprop_links)
enum enum
{ {
LINKS_FIELD_COL FIELD_COL
,LINKS_PARAM_COL ,PARAM_COL
,LINKS_LINKED_COL ,LINKED_COL
,LINKS_N_COLS ,N_COLS
}; };
static void linked_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell, static void glade_eprop_links_on_param_col_clicked (GtkEntry * entry,
GtkTreeModel * model, GtkTreeIter * iter, gpointer data) GtkEntryIconPosition icon_pos, GdkEvent * event, GladeEditorProperty * eprop)
{ {
gboolean val;
gtk_tree_model_get (model, iter, LINKS_LINKED_COL, &val, -1);
gtk_cell_renderer_toggle_set_active (GTK_CELL_RENDERER_TOGGLE (cell), val);
}
static void glade_eprop_links_on_linked_col_toggled (GtkCellRendererToggle * cell,
gchar * path, GladeEditorProperty * eprop)
{
gboolean val;
GtkTreeIter iter; GtkTreeIter iter;
GladeProperty * p = glade_editor_property_get_property (eprop); GladeProperty * p = glade_editor_property_get_property (eprop);
GladeDbList * list = g_value_get_boxed (glade_property_inline_value (p)); GladeWidget * widget = glade_property_get_widget (p);
GtkListStore * store = list->list; GladeProject * project = glade_widget_get_project (widget);
GtkListStore * store = ((GladeVnList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
gchar * path = GLADE_EPROP_LINKS (eprop)->path;
if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path)) if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
return; return;
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, LINKS_LINKED_COL, &val, -1); gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, PARAM_COL, &widget, -1);
gtk_list_store_set (store, &iter, LINKS_LINKED_COL, !val, -1);
if (glade_editor_property_show_object_dialog (project,
_("Select a GvnParam"), NULL, GVN_TYPE_PARAM, NULL, &widget))
{
if (widget)
gtk_list_store_set (store, &iter, PARAM_COL, widget, -1);
else
gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
}
} }
static GtkWidget * glade_eprop_links_create_input (GladeEditorProperty * eprop) static gboolean glade_eprop_links_on_param_key_pressed (GtkEntry * entry,
GdkEventKey * event, GladeEditorProperty * eprop)
{ {
GtkCellRenderer * cell; if (event->keyval == GDK_KEY_Return)
GtkTreeViewColumn * column; {
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop); glade_eprop_links_on_param_col_clicked (entry, 0, NULL, eprop);
GtkWidget * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2); return TRUE;
}
else if (event->keyval == GDK_KEY_Delete)
{
GtkTreeIter iter;
gchar * path = GLADE_EPROP_LINKS (eprop)->path;
GladeProperty * p = glade_editor_property_get_property (eprop);
GtkListStore * store = ((GladeVnList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
glade_list_eprop_create_input ((GladeListEProp *) obj, box, if (gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
_("<b>Add or remove links</b>")); {
gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
cell = gtk_cell_renderer_text_new (); return TRUE;
g_object_set (cell, "editable", TRUE, NULL); }
column = gtk_tree_view_column_new_with_attributes (_("Column"), cell, }
"text", LINKS_FIELD_COL, NULL); return FALSE;
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "edited",
G_CALLBACK (glade_list_eporp_on_string_col_edited), obj);
gtk_tree_view_append_column (obj->view, column);
glade_list_eprop_add_param_column (obj);
cell = gtk_cell_renderer_toggle_new ();
column = gtk_tree_view_column_new_with_attributes (C_("Verb", "Link"), cell, NULL);
gtk_tree_view_column_set_cell_data_func (column, cell, linked_col_cell_data, obj, NULL);
g_signal_connect (cell, "toggled",
G_CALLBACK (glade_eprop_links_on_linked_col_toggled), obj);
gtk_tree_view_append_column (obj->view, column);
g_object_set (G_OBJECT (box), "height-request", 200, NULL);
gtk_widget_show_all (box);
return box;
} }
static void glade_eprop_links_finalize (GObject * object) static void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
{
GladeEPropLinks * obj = GLADE_EPROP_LINKS (object);
GObjectClass * parent = g_type_class_peek_parent (GLADE_EPROP_LINKS_GET_CLASS (obj));
parent->finalize (G_OBJECT (obj));
}
static void glade_eprop_links_load (GladeEditorProperty * eprop, GladeProperty * property)
{
GladeDbList * list;
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
GladeEditorPropertyClass * parent_class =
g_type_class_peek_parent (GLADE_EDITOR_PROPERTY_GET_CLASS (eprop));
parent_class->load (eprop, property);
if (!property)
return;
if ((list = g_value_get_boxed (glade_property_inline_value (property))))
gtk_tree_view_set_model (obj->view, GTK_TREE_MODEL (list->list));
else
gtk_tree_view_set_model (obj->view, NULL);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Batch Editor Property
typedef GladeListEProp GladeEPropBatch;
enum
{
BATCH_ID_COL
,BATCH_PARAM_COL
,BATCH_N_COLS
};
GLADE_MAKE_EPROP (GladeEPropBatch, glade_eprop_batch)
#define GLADE_TYPE_EPROP_BATCH (glade_eprop_batch_get_type ())
#define GLADE_EPROP_BATCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EPROP_BATCH, GladeEPropBatch))
#define GLADE_EPROP_BATCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_EPROP_BATCH, GladeEPropBatchClass))
#define GLADE_IS_EPROP_BATCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_BATCH))
#define GLADE_IS_EPROP_BATCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_BATCH))
#define GLADE_EPROP_BATCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_EPROP_BATCH, GladeEPropBatchClass))
static GtkWidget * glade_eprop_batch_create_input (GladeEditorProperty * eprop)
{
GtkCellRenderer * cell;
GtkTreeViewColumn * column;
GladeEPropBatch * obj = GLADE_EPROP_BATCH (eprop);
GtkWidget * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
glade_list_eprop_create_input ((GladeListEProp *) obj, box,
_("<b>Add or remove holders</b>"));
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Identifier"), cell,
"text", BATCH_ID_COL, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "edited",
G_CALLBACK (glade_list_eporp_on_string_col_edited), obj);
gtk_tree_view_append_column (obj->view, column);
glade_list_eprop_add_param_column (obj);
g_object_set (G_OBJECT (box), "height-request", 200, NULL);
gtk_widget_show_all (box);
return box;
}
void glade_eprop_batch_finalize (GObject * object)
{
GladeEPropBatch * obj = GLADE_EPROP_BATCH (object);
GObjectClass * parent = g_type_class_peek_parent (GLADE_EPROP_BATCH_GET_CLASS (obj));
parent->finalize (G_OBJECT (obj));
}
static void glade_eprop_batch_load (GladeEditorProperty * eprop, GladeProperty * property)
{
GladeDbList * list;
GladeEPropBatch * obj = GLADE_EPROP_BATCH (eprop);
GladeEditorPropertyClass * parent_class =
g_type_class_peek_parent (GLADE_EDITOR_PROPERTY_GET_CLASS (eprop));
parent_class->load (eprop, property);
if (!property)
return;
if ((list = g_value_get_boxed (glade_property_inline_value (property))))
gtk_tree_view_set_model (obj->view, GTK_TREE_MODEL (list->list));
else
gtk_tree_view_set_model (obj->view, NULL);
}
//+++++++++++++++++++++++++++++++++++++++ Methods common to Links and Batch
void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
GtkTreeModel * model, GtkTreeIter * iter, gpointer data) GtkTreeModel * model, GtkTreeIter * iter, gpointer data)
{ {
GladeWidget * param; GladeWidget * param;
gint col = GLADE_IS_EPROP_LINKS (data) ? LINKS_PARAM_COL : BATCH_PARAM_COL; gtk_tree_model_get (model, iter, PARAM_COL, &param, -1);
gtk_tree_model_get (model, iter, col, &param, -1);
if (param) if (param)
g_object_set (cell, "text", glade_widget_get_name (param), NULL); g_object_set (cell, "text", glade_widget_get_name (param), NULL);
@ -420,61 +396,10 @@ void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
g_object_set (cell, "text", "", NULL); g_object_set (cell, "text", "", NULL);
} }
static void glade_list_eprop_on_param_col_clicked (GtkEntry * entry, static void glade_eporp_links_on_param_col_editing_started (GtkCellRendererText * cell,
GtkEntryIconPosition icon_pos, GdkEvent * event, GladeEditorProperty * eprop)
{
GtkTreeIter iter;
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeWidget * widget = glade_property_get_widget (p);
GladeProject * project = glade_widget_get_project (widget);
GtkListStore * store = ((GladeDbList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
gchar * path = ((GladeListEProp *) eprop)->path;
gint col = GLADE_IS_EPROP_LINKS (eprop) ? LINKS_PARAM_COL : BATCH_PARAM_COL;
if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
return;
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, col, &widget, -1);
if (glade_editor_property_show_object_dialog (project,
_("Select a GvnParam"), NULL, GVN_TYPE_PARAM, NULL, &widget))
{
if (widget)
gtk_list_store_set (store, &iter, col, widget, -1);
else
gtk_list_store_set (store, &iter, col, NULL, -1);
}
}
static gboolean glade_list_eprop_on_param_key_pressed (GtkEntry * entry,
GdkEventKey * event, GladeEditorProperty * eprop)
{
if (event->keyval == GDK_KEY_Return)
{
glade_list_eprop_on_param_col_clicked (entry, 0, NULL, eprop);
return TRUE;
}
else if (event->keyval == GDK_KEY_Delete)
{
GtkTreeIter iter;
gchar * path = ((GladeListEProp *) eprop)->path;
GladeProperty * p = glade_editor_property_get_property (eprop);
GtkListStore * store = ((GladeDbList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
if (gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
{
gint col = GLADE_IS_EPROP_LINKS (eprop) ? LINKS_PARAM_COL : BATCH_PARAM_COL;
gtk_list_store_set (store, &iter, col, NULL, -1);
return TRUE;
}
}
return FALSE;
}
static void glade_list_eporp_on_param_col_editing_started (GtkCellRendererText * cell,
GtkEntry * entry, gchar * path, GladeEditorProperty * eprop) GtkEntry * entry, gchar * path, GladeEditorProperty * eprop)
{ {
GladeListEProp * obj = (GladeListEProp *) eprop; GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
if (GTK_IS_ENTRY (entry)) if (GTK_IS_ENTRY (entry))
{ {
@ -503,9 +428,9 @@ static void glade_list_eporp_on_param_col_editing_started (GtkCellRendererText *
obj->path = g_strdup (path); obj->path = g_strdup (path);
g_signal_connect (entry, "icon-press", g_signal_connect (entry, "icon-press",
G_CALLBACK (glade_list_eprop_on_param_col_clicked), eprop); G_CALLBACK (glade_eprop_links_on_param_col_clicked), eprop);
g_signal_connect (entry, "key-press-event", g_signal_connect (entry, "key-press-event",
G_CALLBACK (glade_list_eprop_on_param_key_pressed), eprop); G_CALLBACK (glade_eprop_links_on_param_key_pressed), eprop);
} }
else else
{ {
@ -522,32 +447,42 @@ static void glade_list_eporp_on_param_col_editing_started (GtkCellRendererText *
} }
} }
static void glade_list_eprop_add_param_column (GladeListEProp * obj) static void glade_eporp_links_on_field_col_edited (GtkCellRendererText * cell,
{
GtkTreeViewColumn * column;
GtkCellRenderer * cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Param"), cell, NULL);
gtk_tree_view_column_set_cell_data_func (column, cell, param_col_cell_data, obj, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "editing-started",
G_CALLBACK (glade_list_eporp_on_param_col_editing_started), obj);
gtk_tree_view_append_column (obj->view, column);
}
static void glade_list_eporp_on_string_col_edited (GtkCellRendererText * cell,
gchar * path, const gchar * text, GladeEditorProperty * eprop) gchar * path, const gchar * text, GladeEditorProperty * eprop)
{ {
GtkTreeIter iter; GtkTreeIter iter;
gint col = GLADE_IS_EPROP_LINKS (eprop) ? LINKS_FIELD_COL : BATCH_ID_COL;
GladeProperty * p = glade_editor_property_get_property (eprop); GladeProperty * p = glade_editor_property_get_property (eprop);
GladeDbList * list = g_value_get_boxed (glade_property_inline_value (p)); GladeVnList * list = g_value_get_boxed (glade_property_inline_value (p));
GtkListStore * store = list->list; GtkListStore * store = list->list;
if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path)) if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
return; return;
gtk_list_store_set (store, &iter, col, text, -1); gtk_list_store_set (store, &iter, FIELD_COL, text, -1);
}
static void linked_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
GtkTreeModel * model, GtkTreeIter * iter, gpointer data)
{
gboolean val;
gtk_tree_model_get (model, iter, LINKED_COL, &val, -1);
gtk_cell_renderer_toggle_set_active (GTK_CELL_RENDERER_TOGGLE (cell), val);
}
static void glade_eprop_links_on_linked_col_toggled (GtkCellRendererToggle * cell,
gchar * path, GladeEditorProperty * eprop)
{
gboolean val;
GtkTreeIter iter;
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeVnList * list = g_value_get_boxed (glade_property_inline_value (p));
GtkListStore * store = list->list;
if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
return;
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, LINKED_COL, &val, -1);
gtk_list_store_set (store, &iter, LINKED_COL, !val, -1);
} }
static void glade_widget_on_remove_widget (GladeProject * project, static void glade_widget_on_remove_widget (GladeProject * project,
@ -561,36 +496,30 @@ static void glade_widget_on_remove_widget (GladeProject * project,
if (gtk_tree_model_get_iter_first (m, &iter)) if (gtk_tree_model_get_iter_first (m, &iter))
do do
{ {
gint col = 1; // XXX LINKS_PARAM_COL and BATCH_PARAM_COL
GladeWidget * param; GladeWidget * param;
gtk_tree_model_get (m, &iter, col, &param, -1); gtk_tree_model_get (m, &iter, PARAM_COL, &param, -1);
if (param == widget) if (param == widget)
gtk_list_store_set (store, &iter, col, NULL, -1); gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
} }
while (gtk_tree_model_iter_next (m, &iter)); while (gtk_tree_model_iter_next (m, &iter));
} }
} }
static void glade_list_eprop_on_add_clicked (GtkButton * button, GladeListEProp * obj) static void glade_eporp_links_on_add_clicked (GtkButton * button,
GladeEPropLinks * obj)
{ {
GtkTreeIter iter; GtkTreeIter iter;
GtkTreePath * path; GtkTreePath * path;
GladeDbList * list; GladeVnList * list;
GtkListStore * store; GtkListStore * store;
GladeProperty * p = glade_editor_property_get_property (GLADE_EDITOR_PROPERTY (obj)); GladeProperty * p = glade_editor_property_get_property (GLADE_EDITOR_PROPERTY (obj));
if (!(list = g_value_get_boxed (glade_property_inline_value (p)))) if (!(list = g_value_get_boxed (glade_property_inline_value (p))))
{ {
list = g_new (GladeDbList, 1); list = g_new (GladeVnList, 1);
list->list = gtk_list_store_new (N_COLS,
if (GLADE_IS_EPROP_LINKS (obj)) G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
list->list = gtk_list_store_new (LINKS_N_COLS,
G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
else
list->list = gtk_list_store_new (BATCH_N_COLS,
G_TYPE_STRING, GLADE_TYPE_WIDGET);
glade_property_set (p, list); glade_property_set (p, list);
g_signal_connect (glade_widget_get_project (glade_property_get_widget (p)), g_signal_connect (glade_widget_get_project (glade_property_get_widget (p)),
@ -610,8 +539,8 @@ static void glade_list_eprop_on_add_clicked (GtkButton * button, GladeListEProp
gtk_tree_path_free (path); gtk_tree_path_free (path);
} }
static void glade_list_eprop_on_remove_clicked (GtkButton * button, static void glade_eporp_links_on_remove_clicked (GtkButton * button,
GladeListEProp * obj) GladeEPropLinks * obj)
{ {
GtkTreeIter iter; GtkTreeIter iter;
GtkListStore * store; GtkListStore * store;
@ -635,31 +564,34 @@ static void glade_list_eprop_on_remove_clicked (GtkButton * button,
} }
} }
static gboolean glade_list_eprop_on_view_key_press (GtkWidget * treeview, static gboolean glade_eprop_links_on_view_key_press (GtkWidget * treeview,
GdkEventKey * event, GladeListEProp * obj) GdkEventKey * event, GladeEPropLinks * obj)
{ {
if (event->keyval == GDK_KEY_Delete) if (event->keyval == GDK_KEY_Delete)
{ {
glade_list_eprop_on_remove_clicked (NULL, obj); glade_eporp_links_on_remove_clicked (NULL, obj);
return TRUE; return TRUE;
} }
else if ((event->state & GDK_CONTROL_MASK) != 0 else if ((event->state & GDK_CONTROL_MASK) != 0
&& (event->keyval == GDK_KEY_n || event->keyval == GDK_KEY_N)) && (event->keyval == GDK_KEY_n || event->keyval == GDK_KEY_N))
{ {
glade_list_eprop_on_add_clicked (NULL, obj); glade_eporp_links_on_add_clicked (NULL, obj);
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
static void glade_list_eprop_create_input (GladeListEProp * obj, GtkWidget * box, static GtkWidget * glade_eprop_links_create_input (GladeEditorProperty * eprop)
gchar * string)
{ {
GtkCellRenderer * cell;
GtkTreeViewColumn * column;
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
GtkWidget * scroll, * button, * label, GtkWidget * scroll, * button, * label,
* hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4); * hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4),
* box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
label = gtk_label_new (string); label = gtk_label_new (_("<b>Add or remove links</b>"));
gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5); gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_misc_set_padding (GTK_MISC (label), 2, 4); gtk_misc_set_padding (GTK_MISC (label), 2, 4);
@ -668,13 +600,15 @@ static void glade_list_eprop_create_input (GladeListEProp * obj, GtkWidget * box
button = gtk_button_new (); button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (button), gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_BUTTON)); gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_BUTTON));
g_signal_connect (button, "clicked", G_CALLBACK (glade_list_eprop_on_add_clicked), obj); g_signal_connect (button, "clicked",
G_CALLBACK (glade_eporp_links_on_add_clicked), obj);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
button = gtk_button_new (); button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (button), gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_icon_name ("list-remove-symbolic", GTK_ICON_SIZE_BUTTON)); gtk_image_new_from_icon_name ("list-remove-symbolic", GTK_ICON_SIZE_BUTTON));
g_signal_connect (button, "clicked", G_CALLBACK (glade_list_eprop_on_remove_clicked), obj); g_signal_connect (button, "clicked",
G_CALLBACK (glade_eporp_links_on_remove_clicked), obj);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
@ -683,12 +617,66 @@ static void glade_list_eprop_create_input (GladeListEProp * obj, GtkWidget * box
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
g_object_set (G_OBJECT (scroll), "height-request", 50, NULL);
gtk_box_pack_start (GTK_BOX (box), scroll, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (box), scroll, TRUE, TRUE, 0);
obj->view = GTK_TREE_VIEW (gtk_tree_view_new ()); obj->view = GTK_TREE_VIEW (gtk_tree_view_new ());
g_signal_connect (obj->view, "key-press-event", G_CALLBACK (glade_list_eprop_on_view_key_press), obj); g_signal_connect (obj->view, "key-press-event",
G_CALLBACK (glade_eprop_links_on_view_key_press), obj);
gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (obj->view)); gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (obj->view));
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Column"), cell,
"text", FIELD_COL, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "edited",
G_CALLBACK (glade_eporp_links_on_field_col_edited), obj);
gtk_tree_view_append_column (obj->view, column);
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Param"), cell, NULL);
gtk_tree_view_column_set_cell_data_func (column, cell, param_col_cell_data, obj, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "editing-started",
G_CALLBACK (glade_eporp_links_on_param_col_editing_started), obj);
gtk_tree_view_append_column (obj->view, column);
cell = gtk_cell_renderer_toggle_new ();
column = gtk_tree_view_column_new_with_attributes (C_("Verb", "Link"), cell, NULL);
gtk_tree_view_column_set_cell_data_func (column, cell, linked_col_cell_data, obj, NULL);
g_signal_connect (cell, "toggled",
G_CALLBACK (glade_eprop_links_on_linked_col_toggled), obj);
gtk_tree_view_append_column (obj->view, column);
g_object_set (G_OBJECT (box), "height-request", 200, NULL);
gtk_widget_show_all (box);
return box;
}
static void glade_eprop_links_finalize (GObject * object)
{
GladeEPropLinks * obj = GLADE_EPROP_LINKS (object);
GObjectClass * parent =
g_type_class_peek_parent (GLADE_EPROP_LINKS_GET_CLASS (obj));
parent->finalize (G_OBJECT (obj));
}
static void glade_eprop_links_load (GladeEditorProperty * eprop, GladeProperty * property)
{
GladeVnList * list;
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
GladeEditorPropertyClass * parent_class =
g_type_class_peek_parent (GLADE_EDITOR_PROPERTY_GET_CLASS (eprop));
parent_class->load (eprop, property);
if (!property)
return;
if ((list = g_value_get_boxed (glade_property_inline_value (property))))
gtk_tree_view_set_model (obj->view, GTK_TREE_MODEL (list->list));
else
gtk_tree_view_set_model (obj->view, NULL);
} }
//++++++++++++++++++++++++++++++++++++++++++++++++++ DbModel Widget Adaptor //++++++++++++++++++++++++++++++++++++++++++++++++++ DbModel Widget Adaptor
@ -707,10 +695,6 @@ GladeEditorProperty * glade_db_model_create_eprop (GladeWidgetAdaptor * adaptor,
eprop = g_object_new (GLADE_TYPE_EPROP_LINKS, eprop = g_object_new (GLADE_TYPE_EPROP_LINKS,
"property-class", klass, "property-class", klass,
"use-command", use_command, NULL); "use-command", use_command, NULL);
else if (!g_strcmp0 (prop_id, "batch"))
eprop = g_object_new (GLADE_TYPE_EPROP_BATCH,
"property-class", klass,
"use-command", use_command, NULL);
else else
eprop = GWA_GET_CLASS (G_TYPE_OBJECT)->create_eprop (adaptor, eprop = GWA_GET_CLASS (G_TYPE_OBJECT)->create_eprop (adaptor,
klass, use_command); klass, use_command);
@ -735,7 +719,7 @@ void glade_db_model_write_widget (GladeWidgetAdaptor * adaptor,
{ {
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeModel * m; GtkTreeModel * m;
GladeDbList * l; GladeVnList * l;
GladeProperty * prop; GladeProperty * prop;
if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET)) if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET))
@ -770,9 +754,9 @@ void glade_db_model_write_widget (GladeWidgetAdaptor * adaptor,
GladeXmlNode * link_node; GladeXmlNode * link_node;
gtk_tree_model_get (m, &iter gtk_tree_model_get (m, &iter
,LINKS_FIELD_COL, &field ,FIELD_COL, &field
,LINKS_PARAM_COL, &param ,PARAM_COL, &param
,LINKS_LINKED_COL, &linked ,LINKED_COL, &linked
, -1); , -1);
link_node = glade_xml_node_new (context, "link"); link_node = glade_xml_node_new (context, "link");
@ -793,48 +777,6 @@ void glade_db_model_write_widget (GladeWidgetAdaptor * adaptor,
glade_xml_node_append_child (node, links_node); glade_xml_node_append_child (node, links_node);
} }
} }
prop = glade_widget_get_property (widget, "batch");
// Custom tag for the "batch" property, e.g.:
// <batch>
// <holder id="name" param="param1"/>
// </batch>
if ((l = g_value_get_boxed (glade_property_inline_value (prop))))
{
m = GTK_TREE_MODEL (l->list);
if (gtk_tree_model_get_iter_first (m, &iter))
{
GladeXmlNode * batch_node = glade_xml_node_new (context, "batch");
do
{
gchar * id;
GladeWidget * param;
GladeXmlNode * holder_node;
gtk_tree_model_get (m, &iter
,BATCH_ID_COL, &id
,BATCH_PARAM_COL, &param
, -1);
holder_node = glade_xml_node_new (context, "holder");
glade_xml_node_append_child (batch_node, holder_node);
glade_xml_node_set_property_string (holder_node,
"id", id ? id : "");
glade_xml_node_set_property_string (holder_node, "param",
param ? glade_widget_get_name (param) : "");
g_free (id);
}
while (gtk_tree_model_iter_next (m, &iter));
if (!glade_xml_node_get_children (batch_node))
glade_xml_node_delete (batch_node);
else
glade_xml_node_append_child (node, batch_node);
}
}
} }
typedef struct typedef struct
@ -848,10 +790,7 @@ ParseData;
void glade_db_model_on_parse_finished (GladeProject * p, ParseData * pd) void glade_db_model_on_parse_finished (GladeProject * p, ParseData * pd)
{ {
GladeWidget * param = glade_project_get_widget_by_name (p, pd->param_name); GladeWidget * param = glade_project_get_widget_by_name (p, pd->param_name);
gint col = 1;// XXX LINKS_PARAM_COL and BATCH_PARAM_COL gtk_list_store_set (pd->store, pd->iter, PARAM_COL, param, -1);
gtk_list_store_set (pd->store, pd->iter, col, param, -1);
g_object_unref (pd->store); g_object_unref (pd->store);
gtk_tree_iter_free (pd->iter); gtk_tree_iter_free (pd->iter);
g_free (pd->param_name); g_free (pd->param_name);
@ -864,7 +803,7 @@ void glade_db_model_read_widget (GladeWidgetAdaptor * adaptor,
GladeXmlNode * prop_node; GladeXmlNode * prop_node;
GladeProperty * prop; GladeProperty * prop;
GladeProject * proj; GladeProject * proj;
GladeDbList * list; GladeVnList * list;
GtkListStore * store; GtkListStore * store;
if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET)) if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET))
@ -876,15 +815,15 @@ void glade_db_model_read_widget (GladeWidgetAdaptor * adaptor,
{ {
GladeXmlNode * links_node = prop_node; GladeXmlNode * links_node = prop_node;
proj = glade_widget_get_project (widget); proj = glade_widget_get_project (widget);
list = g_new (GladeDbList, 1); list = g_new (GladeVnList, 1);
store = gtk_list_store_new (LINKS_N_COLS, G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN); store = gtk_list_store_new (N_COLS, G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
list->list = store; list->list = store;
for (links_node = glade_xml_node_get_children (links_node); links_node; for (links_node = glade_xml_node_get_children (links_node); links_node;
links_node = glade_xml_node_next (links_node)) links_node = glade_xml_node_next (links_node))
{ {
GtkTreeIter iter; GtkTreeIter iter;
gint col = LINKS_PARAM_COL; gint col = PARAM_COL;
gchar * field = glade_xml_get_property_string (links_node, "field"), gchar * field = glade_xml_get_property_string (links_node, "field"),
* param_name = glade_xml_get_property_string (links_node, "param"); * param_name = glade_xml_get_property_string (links_node, "param");
gboolean linked = glade_xml_get_property_boolean (links_node, "linked", TRUE); gboolean linked = glade_xml_get_property_boolean (links_node, "linked", TRUE);
@ -908,8 +847,8 @@ void glade_db_model_read_widget (GladeWidgetAdaptor * adaptor,
} }
gtk_list_store_set (store, &iter gtk_list_store_set (store, &iter
,LINKS_FIELD_COL, field ,FIELD_COL, field
,LINKS_LINKED_COL, linked ,LINKED_COL, linked
,col, param ,col, param
,-1); ,-1);
@ -920,51 +859,4 @@ void glade_db_model_read_widget (GladeWidgetAdaptor * adaptor,
prop = glade_widget_get_property (widget, "links"); prop = glade_widget_get_property (widget, "links");
glade_property_set (prop, list); glade_property_set (prop, list);
} }
if ((prop_node = glade_xml_search_child (node, "batch")))
{
GladeXmlNode * batch_node = prop_node;
proj = glade_widget_get_project (widget);
list = g_new (GladeDbList, 1);
store = gtk_list_store_new (BATCH_N_COLS, G_TYPE_STRING, GLADE_TYPE_WIDGET);
list->list = store;
for (batch_node = glade_xml_node_get_children (batch_node); batch_node;
batch_node = glade_xml_node_next (batch_node))
{
GtkTreeIter iter;
gint col = BATCH_PARAM_COL;
gchar * id = glade_xml_get_property_string (batch_node, "id"),
* param_name = glade_xml_get_property_string (batch_node, "param");
GladeWidget * param = glade_project_get_widget_by_name (proj, param_name);
gtk_list_store_append (store, &iter);
if (!param)
{
// If the parameter hasn't been read yet, load it after the parse
ParseData * pd;
pd = g_new (ParseData, 1);
pd->store = g_object_ref (store);
pd->iter = gtk_tree_iter_copy (&iter);
pd->param_name = g_strdup (param_name);
g_signal_connect (proj, "parse-finished",
G_CALLBACK (glade_db_model_on_parse_finished), pd);
col = -1;
}
gtk_list_store_set (store, &iter
,BATCH_ID_COL, id
,col, param
,-1);
g_free (id);
g_free (param_name);
}
prop = glade_widget_get_property (widget, "batch");
glade_property_set (prop, list);
}
} }

648
glade/glade-sql-batch.c Normal file
View File

@ -0,0 +1,648 @@
/*
* Copyright (C) 2013 - Juan Ferrer Toribio
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "glade-vn.h"
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ SqlBatchEditor
#define GLADE_TYPE_BATCH_EDITOR (glade_batch_editor_get_type ())
#define GLADE_BATCH_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_BATCH_EDITOR, GladeBatchEditor))
#define GLADE_BATCH_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_BATCH_EDITOR, GladeBatchEditorClass))
#define GLADE_IS_BATCH_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_BATCH_EDITOR))
#define GLADE_IS_BATCH_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_BATCH_EDITOR))
#define GLADE_BATCH_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_TYPE_BATCH_EDITOR, GladeBatchEditorClass))
typedef struct _GladeBatchEditor GladeBatchEditor;
typedef struct _GladeBatchEditorClass GladeBatchEditorClass;
struct _GladeBatchEditor
{
GtkBox parent;
GtkWidget * base;
GList * props;
};
struct _GladeBatchEditorClass
{
GtkVBoxClass parent;
};
GType glade_batch_editor_get_type (void) G_GNUC_CONST;
static GtkWidget * glade_sql_batch_editor_new (GladeWidgetAdaptor * adaptor,
GladeEditable * editable)
{
GtkWidget * frame, * alignment, * vbox;
GladeEditorProperty * eprop;
GladeBatchEditor * obj;
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
g_return_val_if_fail (GLADE_IS_EDITABLE (editable), NULL);
obj = g_object_new (GLADE_TYPE_BATCH_EDITOR,
"orientation", GTK_ORIENTATION_VERTICAL, NULL);
obj->base = GTK_WIDGET (editable);
gtk_box_pack_start (GTK_BOX (obj), GTK_WIDGET (editable), TRUE, TRUE, 0);
eprop = glade_widget_adaptor_create_eprop_by_name (adaptor, "items", FALSE, TRUE);
obj->props = g_list_prepend (obj->props, eprop);
frame = gtk_frame_new (NULL);
gtk_frame_set_label_widget (GTK_FRAME (frame),
glade_editor_property_get_item_label (eprop));
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
gtk_box_pack_start (GTK_BOX (obj), frame, FALSE, FALSE, 12);
alignment = gtk_alignment_new (0.5F, 0.5F, 1.0F, 1.0F);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 6, 0, 12, 0);
gtk_container_add (GTK_CONTAINER (frame), alignment);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (alignment), vbox);
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (eprop), FALSE, FALSE, 4);
gtk_widget_set_tooltip_text (vbox, _("List of items"));
gtk_widget_show_all (GTK_WIDGET (obj));
return GTK_WIDGET (obj);
}
static void glade_batch_editor_load (GladeEditable * editable, GladeWidget * widget)
{
GList *l;
GladeBatchEditor * obj = GLADE_BATCH_EDITOR (editable);
GladeEditableIface * iface = g_type_default_interface_peek (GLADE_TYPE_EDITABLE);
iface->load (editable, widget);
if (obj->base)
glade_editable_load (GLADE_EDITABLE (obj->base), widget);
for (l = obj->props; l; l = l->next)
glade_editor_property_load_by_widget (GLADE_EDITOR_PROPERTY (l->data), widget);
}
static void glade_batch_editor_set_show_name (GladeEditable * editable, gboolean show_name)
{
GladeBatchEditor * obj = GLADE_BATCH_EDITOR (editable);
glade_editable_set_show_name (GLADE_EDITABLE (obj->base), show_name);
}
static void glade_batch_editor_finalize (GObject * object)
{
GladeBatchEditor * obj = GLADE_BATCH_EDITOR (object);
GObjectClass * parent = g_type_class_peek_parent (GLADE_BATCH_EDITOR_GET_CLASS (obj));
if (obj->props)
g_list_free (obj->props);
obj->props = NULL;
obj->base = NULL;
glade_editable_load (GLADE_EDITABLE (obj), NULL);
parent->finalize (G_OBJECT (obj));
}
static void glade_batch_editor_class_init (GladeBatchEditorClass * k)
{
GObjectClass * klass = G_OBJECT_CLASS (k);
klass->finalize = glade_batch_editor_finalize;
}
static void glade_batch_editor_init (GladeBatchEditor * obj)
{
obj->props = NULL;
obj->base = NULL;
}
static void glade_batch_editor_editable_init (GladeEditableIface * iface)
{
iface->load = glade_batch_editor_load;
iface->set_show_name = glade_batch_editor_set_show_name;
}
G_DEFINE_TYPE_WITH_CODE (GladeBatchEditor, glade_batch_editor, GTK_TYPE_BOX,
G_IMPLEMENT_INTERFACE (GLADE_TYPE_EDITABLE, glade_batch_editor_editable_init));
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Items Editor Property
typedef struct
{
GladeEditorProperty parent;
GtkTreeView * view;
gchar * path;
}
GladeEPropItems;
GLADE_MAKE_EPROP (GladeEPropItems, glade_eprop_items)
#define GLADE_TYPE_EPROP_ITEMS (glade_eprop_items_get_type ())
#define GLADE_EPROP_ITEMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_EPROP_ITEMS, GladeEPropItems))
#define GLADE_EPROP_ITEMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_EPROP_ITEMS, GladeEPropItemsClass))
#define GLADE_IS_EPROP_ITEMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_EPROP_ITEMS))
#define GLADE_IS_EPROP_ITEMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_EPROP_ITEMS))
#define GLADE_EPROP_ITEMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GLADE_EPROP_ITEMS, GladeEPropItemsClass))
enum
{
ID_COL
,PARAM_COL
,N_COLS
};
static void glade_eprop_items_on_param_col_clicked (GtkEntry * entry,
GtkEntryIconPosition icon_pos, GdkEvent * event, GladeEditorProperty * eprop)
{
GtkTreeIter iter;
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeWidget * widget = glade_property_get_widget (p);
GladeProject * project = glade_widget_get_project (widget);
GtkListStore * store = ((GladeVnList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
gchar * path = GLADE_EPROP_ITEMS (eprop)->path;
if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
return;
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, PARAM_COL, &widget, -1);
if (glade_editor_property_show_object_dialog (project,
_("Select a GvnParam"), NULL, GVN_TYPE_PARAM, NULL, &widget))
{
if (widget)
gtk_list_store_set (store, &iter, PARAM_COL, widget, -1);
else
gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
}
}
static gboolean glade_eprop_items_on_param_key_pressed (GtkEntry * entry,
GdkEventKey * event, GladeEditorProperty * eprop)
{
if (event->keyval == GDK_KEY_Return)
{
glade_eprop_items_on_param_col_clicked (entry, 0, NULL, eprop);
return TRUE;
}
else if (event->keyval == GDK_KEY_Delete)
{
GtkTreeIter iter;
gchar * path = GLADE_EPROP_ITEMS (eprop)->path;
GladeProperty * p = glade_editor_property_get_property (eprop);
GtkListStore * store = ((GladeVnList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
if (gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
{
gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
return TRUE;
}
}
return FALSE;
}
static void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
GtkTreeModel * model, GtkTreeIter * iter, gpointer data)
{
GladeWidget * param;
gtk_tree_model_get (model, iter, PARAM_COL, &param, -1);
if (param)
g_object_set (cell, "text", glade_widget_get_name (param), NULL);
else
g_object_set (cell, "text", "", NULL);
}
static void glade_eporp_items_on_param_col_editing_started (GtkCellRendererText * cell,
GtkEntry * entry, gchar * path, GladeEditorProperty * eprop)
{
GladeEPropItems * obj = GLADE_EPROP_ITEMS (eprop);
if (GTK_IS_ENTRY (entry))
{
GList * n;
gboolean have_params = FALSE;
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeProject * project = glade_widget_get_project
(glade_property_get_widget (p));
GList * objects = (GList *) glade_project_get_objects (project);
for (n = objects; n; n = n->next)
if ((have_params = GVN_IS_PARAM (n->data)))
break;
if (have_params)
{
g_object_set (entry
,"secondary-icon-name", "content-loading-symbolic"
,"secondary-icon-sensitive", TRUE
,"secondary-icon-tooltip-text", _("Select the parameter from a list")
,NULL);
if (obj->path)
g_free (obj->path);
obj->path = g_strdup (path);
g_signal_connect (entry, "icon-press",
G_CALLBACK (glade_eprop_items_on_param_col_clicked), eprop);
g_signal_connect (entry, "key-press-event",
G_CALLBACK (glade_eprop_items_on_param_key_pressed), eprop);
}
else
{
g_object_set (entry
,"secondary-icon-name", "dialog-warning-symbolic"
,"secondary-icon-sensitive", FALSE
,"secondary-icon-tooltip-text", _("You need to create at least "
"one GvnParam or derived object")
,NULL);
g_signal_handlers_disconnect_by_data (entry, eprop);
}
g_object_set (entry, "editable", FALSE, NULL);
}
}
static void glade_eporp_items_on_id_col_edited (GtkCellRendererText * cell,
gchar * path, const gchar * text, GladeEditorProperty * eprop)
{
GtkTreeIter iter;
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeVnList * list = g_value_get_boxed (glade_property_inline_value (p));
GtkListStore * store = list->list;
if (!gtk_tree_model_get_iter_from_string (GTK_TREE_MODEL (store), &iter, path))
return;
gtk_list_store_set (store, &iter, ID_COL, text, -1);
}
static void glade_widget_on_remove_widget (GladeProject * project,
GladeWidget * widget, GtkListStore * store)
{
if (g_type_is_a (G_OBJECT_TYPE (glade_widget_get_object (widget)), GVN_TYPE_PARAM))
{
GtkTreeIter iter;
GtkTreeModel * m = GTK_TREE_MODEL (store);
if (gtk_tree_model_get_iter_first (m, &iter))
do
{
GladeWidget * param;
gtk_tree_model_get (m, &iter, PARAM_COL, &param, -1);
if (param == widget)
gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
}
while (gtk_tree_model_iter_next (m, &iter));
}
}
static void glade_eporp_items_on_add_clicked (GtkButton * button,
GladeEPropItems * obj)
{
GtkTreeIter iter;
GtkTreePath * path;
GladeVnList * list;
GtkListStore * store;
GladeProperty * p = glade_editor_property_get_property (GLADE_EDITOR_PROPERTY (obj));
if (!(list = g_value_get_boxed (glade_property_inline_value (p))))
{
list = g_new (GladeVnList, 1);
list->list = gtk_list_store_new (N_COLS,
G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
glade_property_set (p, list);
g_signal_connect (glade_widget_get_project (glade_property_get_widget (p)),
"remove-widget", G_CALLBACK (glade_widget_on_remove_widget), list->list);
}
store = list->list;
gtk_tree_view_set_model (obj->view, GTK_TREE_MODEL (store));
gtk_list_store_append (store, &iter);
path = gtk_tree_model_get_path (GTK_TREE_MODEL (store), &iter);
gtk_tree_view_scroll_to_cell (obj->view, path, NULL, FALSE, 0, 0);
gtk_tree_view_set_cursor (obj->view, path, NULL, TRUE);
gtk_widget_grab_focus (GTK_WIDGET (obj->view));
gtk_tree_path_free (path);
}
static void glade_eporp_items_on_remove_clicked (GtkButton * button,
GladeEPropItems * obj)
{
GtkTreeIter iter;
GtkListStore * store;
GtkTreeSelection * selection = gtk_tree_view_get_selection (obj->view);
GladeProperty * p;
if (!gtk_tree_selection_get_selected (selection, (GtkTreeModel **) &store, &iter))
return;
p = glade_editor_property_get_property (GLADE_EDITOR_PROPERTY (obj));
gtk_list_store_remove (store, &iter);
if (!gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter))
{
gtk_tree_view_set_model (obj->view, NULL);
glade_command_set_property (p, NULL);
g_signal_handlers_disconnect_by_func
(glade_widget_get_project (glade_property_get_widget (p)),
glade_widget_on_remove_widget, store);
}
}
static gboolean glade_eprop_items_on_view_key_press (GtkWidget * treeview,
GdkEventKey * event, GladeEPropItems * obj)
{
if (event->keyval == GDK_KEY_Delete)
{
glade_eporp_items_on_remove_clicked (NULL, obj);
return TRUE;
}
else if ((event->state & GDK_CONTROL_MASK) != 0
&& (event->keyval == GDK_KEY_n || event->keyval == GDK_KEY_N))
{
glade_eporp_items_on_add_clicked (NULL, obj);
return TRUE;
}
return FALSE;
}
static GtkWidget * glade_eprop_items_create_input (GladeEditorProperty * eprop)
{
GtkCellRenderer * cell;
GtkTreeViewColumn * column;
GladeEPropItems * obj = GLADE_EPROP_ITEMS (eprop);
GtkWidget * scroll, * button, * label,
* hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4),
* box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
label = gtk_label_new (_("<b>Add or remove items</b>"));
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_misc_set_padding (GTK_MISC (label), 2, 4);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_icon_name ("list-add-symbolic", GTK_ICON_SIZE_BUTTON));
g_signal_connect (button, "clicked",
G_CALLBACK (glade_eporp_items_on_add_clicked), obj);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_icon_name ("list-remove-symbolic", GTK_ICON_SIZE_BUTTON));
g_signal_connect (button, "clicked",
G_CALLBACK (glade_eporp_items_on_remove_clicked), obj);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
scroll = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_box_pack_start (GTK_BOX (box), scroll, TRUE, TRUE, 0);
obj->view = GTK_TREE_VIEW (gtk_tree_view_new ());
g_signal_connect (obj->view, "key-press-event",
G_CALLBACK (glade_eprop_items_on_view_key_press), obj);
gtk_container_add (GTK_CONTAINER (scroll), GTK_WIDGET (obj->view));
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Identifier"), cell,
"text", ID_COL, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "edited",
G_CALLBACK (glade_eporp_items_on_id_col_edited), obj);
gtk_tree_view_append_column (obj->view, column);
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Parameter"), cell, NULL);
gtk_tree_view_column_set_cell_data_func (column, cell, param_col_cell_data, obj, NULL);
gtk_tree_view_column_set_expand (column, TRUE);
g_signal_connect (cell, "editing-started",
G_CALLBACK (glade_eporp_items_on_param_col_editing_started), obj);
gtk_tree_view_append_column (obj->view, column);
g_object_set (G_OBJECT (box), "height-request", 200, NULL);
gtk_widget_show_all (box);
return box;
}
static void glade_eprop_items_finalize (GObject * object)
{
GladeEPropItems * obj = GLADE_EPROP_ITEMS (object);
GObjectClass * parent =
g_type_class_peek_parent (GLADE_EPROP_ITEMS_GET_CLASS (obj));
parent->finalize (G_OBJECT (obj));
}
static void glade_eprop_items_load (GladeEditorProperty * eprop, GladeProperty * property)
{
GladeVnList * list;
GladeEPropItems * obj = GLADE_EPROP_ITEMS (eprop);
GladeEditorPropertyClass * parent_class =
g_type_class_peek_parent (GLADE_EDITOR_PROPERTY_GET_CLASS (eprop));
parent_class->load (eprop, property);
if (!property)
return;
if ((list = g_value_get_boxed (glade_property_inline_value (property))))
gtk_tree_view_set_model (obj->view, GTK_TREE_MODEL (list->list));
else
gtk_tree_view_set_model (obj->view, NULL);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++ SqlBatch Widget Adaptor
GladeEditorProperty * glade_sql_batch_create_eprop (GladeWidgetAdaptor * adaptor,
GladePropertyClass * klass, gboolean use_command)
{
GladeEditorProperty * eprop;
const gchar * prop_id = glade_property_class_id (klass);
if (!g_strcmp0 (prop_id, "items"))
eprop = g_object_new (GLADE_TYPE_EPROP_ITEMS,
"property-class", klass,
"use-command", use_command, NULL);
else
eprop = GWA_GET_CLASS (G_TYPE_OBJECT)->create_eprop (adaptor,
klass, use_command);
return eprop;
}
GladeEditable * glade_sql_batch_create_editable (GladeWidgetAdaptor * adaptor,
GladeEditorPageType type)
{
GladeEditable * editable =
GWA_GET_CLASS (G_TYPE_OBJECT)->create_editable (adaptor, type);
if (type == GLADE_PAGE_GENERAL)
return GLADE_EDITABLE (glade_sql_batch_editor_new (adaptor, editable));
return editable;
}
void glade_sql_batch_write_widget (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlContext * context, GladeXmlNode * node)
{
GtkTreeIter iter;
GladeVnList * l;
GtkTreeModel * m;
GladeXmlNode * items_node;
GladeProperty * prop;
if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET))
return;
GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
prop = glade_widget_get_property (widget, "items");
// Custom tag for the "items" property, e.g.:
// <items>
// <item id="id" param="param1"/>
// </items>
if (!(l = g_value_get_boxed (glade_property_inline_value (prop))))
return;
m = GTK_TREE_MODEL (l->list);
if (!gtk_tree_model_get_iter_first (m, &iter))
return;
items_node = glade_xml_node_new (context, "items");
do
{
gchar * id;
GladeWidget * param;
GladeXmlNode * item_node;
gtk_tree_model_get (m, &iter
,ID_COL, &id
,PARAM_COL, &param
, -1);
item_node = glade_xml_node_new (context, "item");
glade_xml_node_append_child (items_node, item_node);
glade_xml_node_set_property_string (item_node, "id", id ? id : "");
glade_xml_node_set_property_string (item_node, "param",
param ? glade_widget_get_name (param) : "");
g_free (id);
}
while (gtk_tree_model_iter_next (m, &iter));
if (!glade_xml_node_get_children (items_node))
glade_xml_node_delete (items_node);
else
glade_xml_node_append_child (node, items_node);
}
typedef struct
{
GtkListStore * store;
GtkTreeIter * iter;
gchar * param_name;
}
ParseData;
void glade_sql_batch_on_parse_finished (GladeProject * p, ParseData * pd)
{
GladeWidget * param = glade_project_get_widget_by_name (p, pd->param_name);
gtk_list_store_set (pd->store, pd->iter, PARAM_COL, param, -1);
g_object_unref (pd->store);
gtk_tree_iter_free (pd->iter);
g_free (pd->param_name);
g_free (pd);
}
void glade_sql_batch_read_widget (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlNode * node)
{
GladeXmlNode * items_node;
GladeProperty * prop;
GladeProject * proj;
GladeVnList * list;
GtkListStore * store;
if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET))
return;
GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
if ((items_node = glade_xml_search_child (node, "items")) == NULL)
return;
proj = glade_widget_get_project (widget);
list = g_new (GladeVnList, 1);
store = gtk_list_store_new (N_COLS, G_TYPE_STRING, GLADE_TYPE_WIDGET);
list->list = store;
for (items_node = glade_xml_node_get_children (items_node); items_node;
items_node = glade_xml_node_next (items_node))
{
GtkTreeIter iter;
gint col = PARAM_COL;
gchar * id = glade_xml_get_property_string (items_node, "id"),
* param_name = glade_xml_get_property_string (items_node, "param");
GladeWidget * param = glade_project_get_widget_by_name (proj, param_name);
gtk_list_store_append (store, &iter);
if (!param)
{
// If the parameter hasn't been read yet, load it after the parse
ParseData * pd;
pd = g_new (ParseData, 1);
pd->store = g_object_ref (store);
pd->iter = gtk_tree_iter_copy (&iter);
pd->param_name = g_strdup (param_name);
g_signal_connect (proj, "parse-finished",
G_CALLBACK (glade_sql_batch_on_parse_finished), pd);
col = -1;
}
gtk_list_store_set (store, &iter
,ID_COL, id
,col, param
,-1);
g_free (id);
g_free (param_name);
}
prop = glade_widget_get_property (widget, "items");
glade_property_set (prop, list);
}

View File

@ -1,69 +0,0 @@
/*
* Copyright (C) 2013 - Juan Ferrer Toribio
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "glade-vn.h"
void glade_vn_set_add_child (GladeWidgetAdaptor * adaptor,
VnSet * group, GObject * child)
{
if (G_IS_OBJECT (child))
vn_set_add (group, child);
}
void glade_vn_set_remove_child (GladeWidgetAdaptor * adaptor,
VnSet * group, GObject * child)
{
if (G_IS_OBJECT (child))
vn_set_remove (group, child);
}
void glade_vn_set_replace_child (GladeWidgetAdaptor * adaptor,
GObject * container, GObject * current, GObject * new)
{
VnSet * group = VN_SET (container);
glade_vn_set_remove_child (adaptor, group, current);
glade_vn_set_add_child (adaptor, group, new);
}
GList * glade_vn_set_get_children (GladeWidgetAdaptor * adaptor,
VnSet * group)
{
return vn_set_get_objects_list (group);
}
gboolean glade_vn_set_add_verify (GladeWidgetAdaptor * adaptor,
VnSet * container, GObject * child, gboolean user_feedback)
{
if (G_IS_OBJECT (child))
return TRUE;
if (user_feedback)
{
GladeWidgetAdaptor * object_adaptor =
glade_widget_adaptor_get_by_type (G_TYPE_OBJECT);
glade_util_ui_message (glade_app_get_window ()
,GLADE_UI_INFO
,NULL
,"Only objects of type %s can be added to objects of type %s."
,glade_widget_adaptor_get_name (object_adaptor)
,glade_widget_adaptor_get_name (adaptor)
);
}
return FALSE;
}

View File

@ -17,18 +17,6 @@
#include "glade-vn.h" #include "glade-vn.h"
GObject * glade_vn_field_get_internal_child (GladeWidgetAdaptor * adaptor,
GObject * parent, const gchar * name)
{
return G_OBJECT (vn_field_get_widget (VN_FIELD (parent)));
}
GObject * glade_vn_column_get_internal_child (GladeWidgetAdaptor * adaptor,
GObject * parent, const gchar * name)
{
return G_OBJECT (vn_column_get_cell_renderer (VN_COLUMN (parent)));
}
gboolean glade_vn_set_first_catalog (gpointer catalog_name) gboolean glade_vn_set_first_catalog (gpointer catalog_name)
{ {
GList * l, * catalogs = glade_app_get_catalogs (), GList * l, * catalogs = glade_app_get_catalogs (),
@ -70,3 +58,40 @@ void glade_vn_init ()
g_idle_add (glade_vn_set_first_catalog, "vn"); g_idle_add (glade_vn_set_first_catalog, "vn");
} }
//+++++++++++++++++++++++++++++++++++++++++++++++++++ GladeDbList
G_DEFINE_BOXED_TYPE (GladeVnList, glade_vn_list, glade_vn_list_copy, glade_vn_list_free);
void glade_vn_list_free (GladeVnList * list)
{
if (!list)
return;
if (list->list)
g_object_unref (list->list);
g_free (list);
list = NULL;
}
GladeVnList * glade_vn_list_copy (const GladeVnList * list)
{
GladeVnList * l = g_new (GladeVnList, 1);
l->list = list->list ? g_object_ref (list->list) : NULL;
return l;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++ Internal children
GObject * glade_vn_field_get_internal_child (GladeWidgetAdaptor * adaptor,
GObject * parent, const gchar * name)
{
return G_OBJECT (vn_field_get_widget (VN_FIELD (parent)));
}
GObject * glade_vn_column_get_internal_child (GladeWidgetAdaptor * adaptor,
GObject * parent, const gchar * name)
{
return G_OBJECT (vn_column_get_cell_renderer (VN_COLUMN (parent)));
}

View File

@ -23,4 +23,17 @@
void glade_vn_init (); void glade_vn_init ();
#define GLADE_TYPE_VN_LIST (glade_vn_list_get_type())
typedef struct _GladeVnList GladeVnList;
struct _GladeVnList
{
GtkListStore * list;
};
GType glade_vn_list_get_type (void) G_GNUC_CONST;
void glade_vn_list_free (GladeVnList * list);
GladeVnList * glade_vn_list_copy (const GladeVnList * list);
#endif #endif

View File

@ -5,11 +5,19 @@
<init-function>glade_vn_init</init-function> <init-function>glade_vn_init</init-function>
<glade-widget-classes> <glade-widget-classes>
<glade-widget-class name="GvnParam" generic-name="param" title="Parameter" icon-name="widget-gtk-action"> <glade-widget-class name="VnBatch" generic-name="batch" title="Batch" icon-name="widget-gtk-listbox">
<properties> <properties>
<property id="null" ignore="True"/> <property id="items" save="False" ignore="True" disabled="True" name="Items">
<property id="editable" ignore="True"/> <parameter-spec>
<type>GParamBoxed</type>
<value-type>GladeVnList</value-type>
</parameter-spec>
</property>
</properties> </properties>
<create-editor-property-function>glade_sql_batch_create_eprop</create-editor-property-function>
<create-editable-function>glade_sql_batch_create_editable</create-editable-function>
<write-widget-function>glade_sql_batch_write_widget</write-widget-function>
<read-widget-function>glade_sql_batch_read_widget</read-widget-function>
</glade-widget-class> </glade-widget-class>
<glade-widget-class name="DbCalc" generic-name="calc" title="Calculated field" icon-name="widget-gtk-entry"> <glade-widget-class name="DbCalc" generic-name="calc" title="Calculated field" icon-name="widget-gtk-entry">
@ -29,13 +37,7 @@
<property id="links" save="False" ignore="True" disabled="True" name="Links"> <property id="links" save="False" ignore="True" disabled="True" name="Links">
<parameter-spec> <parameter-spec>
<type>GParamBoxed</type> <type>GParamBoxed</type>
<value-type>GladeDbList</value-type> <value-type>GladeVnList</value-type>
</parameter-spec>
</property>
<property id="batch" save="False" ignore="True" disabled="True" name="Batch">
<parameter-spec>
<type>GParamBoxed</type>
<value-type>GladeDbList</value-type>
</parameter-spec> </parameter-spec>
</property> </property>
</properties> </properties>
@ -203,7 +205,7 @@
</glade-widget-classes> </glade-widget-classes>
<glade-widget-group name="db-toplevels" title="Data Handling"> <glade-widget-group name="db-toplevels" title="Data Handling">
<glade-widget-class-ref name="GvnParam"/> <glade-widget-class-ref name="VnBatch"/>
<glade-widget-class-ref name="VnModel"/> <glade-widget-class-ref name="VnModel"/>
<glade-widget-class-ref name="VnIterator"/> <glade-widget-class-ref name="VnIterator"/>
<glade-widget-class-ref name="DbParam"/> <glade-widget-class-ref name="DbParam"/>

View File

@ -1,15 +1,15 @@
<interface> <interface>
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<menu id='menu'> <menu id="menu">
<item> <item>
<attribute name='label' translatable='yes'>Send</attribute> <attribute name="label" translatable="yes">Send</attribute>
<attribute name='action'>win.send</attribute> <attribute name="action">win.send</attribute>
<attribute name='accel'>&lt;Shift&gt;s</attribute> <attribute name="accel">&lt;Shift&gt;s</attribute>
</item> </item>
<item> <item>
<attribute name='label' translatable='yes'>Clean</attribute> <attribute name="label" translatable="yes">Clean</attribute>
<attribute name='action'>win.clean</attribute> <attribute name="action">win.clean</attribute>
<attribute name='accel'>&lt;Shift&gt;c</attribute> <attribute name="accel">&lt;Shift&gt;c</attribute>
</item> </item>
</menu> </menu>
</interface> </interface>

View File

@ -1,18 +1,18 @@
<interface> <interface>
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<menu id='menu'> <menu id="menu">
<section> <section>
<item> <item>
<attribute name='label' translatable='yes'>Consulter</attribute> <attribute name="label" translatable="yes">Consulter</attribute>
<attribute name='action'>win.open-form</attribute> <attribute name="action">win.open-form</attribute>
<attribute name='target'>consulter</attribute> <attribute name="target">consulter</attribute>
<attribute name='accel'>F12</attribute> <attribute name="accel">F12</attribute>
</item> </item>
<item> <item>
<attribute name='label' translatable='yes'>Customer</attribute> <attribute name="label" translatable="yes">Customer</attribute>
<attribute name='action'>win.open-form</attribute> <attribute name="action">win.open-form</attribute>
<attribute name='target'>customer</attribute> <attribute name="target">customer</attribute>
<attribute name='accel'>F11</attribute> <attribute name="accel">F11</attribute>
</item> </item>
</section> </section>
</menu> </menu>

View File

@ -51,13 +51,14 @@ vn/column/vn-column-image.c
vn/gui/login.glade vn/gui/login.glade
vn/gui/main.glade vn/gui/main.glade
vn/gui/menu.glade
vn/gui/date-chooser.glade vn/gui/date-chooser.glade
vn/gui/menu.glade
glade/glade-db-model.c glade/glade-db-model.c
glade/glade-db-model-editor.c glade/glade-db-model-editor.c
glade/glade-eprop-model.c glade/glade-eprop-model.c
glade/glade-db-iterator.c glade/glade-db-iterator.c
glade/glade-sql-batch.c
[type: gettext/glade]glade/vn.xml [type: gettext/glade]glade/vn.xml
[type: gettext/glade]module/data/example.xml [type: gettext/glade]module/data/example.xml

413
po/ca.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hedera 1.0\n" "Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-07 15:57+0200\n" "POT-Creation-Date: 2014-07-15 14:27+0200\n"
"PO-Revision-Date: 2013-06-04 13:38+0200\n" "PO-Revision-Date: 2013-06-04 13:38+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n" "Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Catalan\n" "Language-Team: Catalan\n"
@ -31,7 +31,7 @@ msgstr "El parametre no pot ser nul"
msgid "Incompatible type for this param" msgid "Incompatible type for this param"
msgstr "Tipus incompatible per a aquest parametre" msgstr "Tipus incompatible per a aquest parametre"
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:573 #: ../gvn/gvn-param.c:443 ../sql/sql-value.c:255 ../vn/vn-field.c:576
msgid "Value" msgid "Value"
msgstr "" msgstr ""
@ -47,7 +47,7 @@ msgstr ""
msgid "The master GvnParam of this parameter" msgid "The master GvnParam of this parameter"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1055 #: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1062
msgid "Mode" msgid "Mode"
msgstr "" msgstr ""
@ -71,15 +71,15 @@ msgstr ""
msgid "The spec of the parameter" msgid "The spec of the parameter"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:601 #: ../gvn/gvn-param.c:478 ../vn/vn-field.c:604
msgid "Glib Type" msgid "Glib Type"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:602 #: ../gvn/gvn-param.c:479 ../vn/vn-field.c:605
msgid "The type of the value" msgid "The type of the value"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:608 ../vn/vn-column.c:504 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:611 ../vn/vn-column.c:507
msgid "Editable" msgid "Editable"
msgstr "" msgstr ""
@ -87,7 +87,7 @@ msgstr ""
msgid "Whether the param value can be modified" msgid "Whether the param value can be modified"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:615 ../vn/vn-column.c:511 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:618 ../vn/vn-column.c:514
msgid "Null" msgid "Null"
msgstr "" msgstr ""
@ -95,11 +95,11 @@ msgstr ""
msgid "Whether the param value can be of type GVN_TYPE_NULL" msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:622 #: ../gvn/gvn-param.c:499 ../vn/vn-field.c:625
msgid "Default Value" msgid "Default Value"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:623 #: ../gvn/gvn-param.c:500 ../vn/vn-field.c:626
msgid "The default value" msgid "The default value"
msgstr "" msgstr ""
@ -124,19 +124,19 @@ msgstr ""
msgid "The character used for delimite the name of fields, tables..." msgid "The character used for delimite the name of fields, tables..."
msgstr "" msgstr ""
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:530 #: ../sql/sql-value.c:248 ../glade/glade-db-model.c:638
msgid "Param" msgid "Param"
msgstr "" msgstr ""
#: ../sql/sql-value.c:246 #: ../sql/sql-value.c:249
msgid "The param which is linked" msgid "The param which is linked"
msgstr "" msgstr ""
#: ../sql/sql-value.c:253 #: ../sql/sql-value.c:256
msgid "The value" msgid "The value"
msgstr "" msgstr ""
#: ../sql/sql-string.c:188 ../db/db-model.c:3311 ../db/db-request.c:449 #: ../sql/sql-string.c:188 ../db/db-model.c:3315 ../db/db-request.c:449
msgid "SQL" msgid "SQL"
msgstr "" msgstr ""
@ -212,7 +212,7 @@ msgstr ""
msgid "The function parameters" msgid "The function parameters"
msgstr "" msgstr ""
#: ../sql/sql-holder.c:124 ../glade/glade-db-model.c:369 #: ../sql/sql-holder.c:124 ../glade/glade-sql-batch.c:436
msgid "Identifier" msgid "Identifier"
msgstr "" msgstr ""
@ -329,97 +329,97 @@ msgstr ""
msgid "Can't allocate the needed memory" msgid "Can't allocate the needed memory"
msgstr "" msgstr ""
#: ../db/db-iterator.c:1056 #: ../db/db-iterator.c:1063
msgid "The mode in which the iterator is working" msgid "The mode in which the iterator is working"
msgstr "" msgstr ""
#: ../db/db-iterator.c:1063 #: ../db/db-iterator.c:1070
#, fuzzy #, fuzzy
msgid "Remember selection" msgid "Remember selection"
msgstr "Recordar" msgstr "Recordar"
#: ../db/db-iterator.c:1064 #: ../db/db-iterator.c:1071
msgid "Wether to rememeber the selection when model is refreshed" msgid "Wether to rememeber the selection when model is refreshed"
msgstr "" msgstr ""
#: ../db/db-model.c:3285 ../db/db-request.c:442 ../vn/vn-gui.c:1560 #: ../db/db-model.c:3289 ../db/db-request.c:442 ../vn/vn-gui.c:1472
#: ../vn/vn-form.c:245 #: ../vn/vn-form.c:245
msgid "Connection" msgid "Connection"
msgstr "" msgstr ""
#: ../db/db-model.c:3286 #: ../db/db-model.c:3290
msgid "The DbConn that manages the connection to the database" msgid "The DbConn that manages the connection to the database"
msgstr "" msgstr ""
#: ../db/db-model.c:3293 #: ../db/db-model.c:3297
msgid "Statement" msgid "Statement"
msgstr "" msgstr ""
#: ../db/db-model.c:3294 #: ../db/db-model.c:3298
msgid "The statement which retrieves the data" msgid "The statement which retrieves the data"
msgstr "" msgstr ""
#: ../db/db-model.c:3301 #: ../db/db-model.c:3305
msgid "Use file" msgid "Use file"
msgstr "" msgstr ""
#: ../db/db-model.c:3302 #: ../db/db-model.c:3306
msgid "" msgid ""
"If this is set to TRUE, the \"sql\" property will hold the name of a file " "If this is set to TRUE, the \"sql\" property will hold the name of a file "
"containing a query, if set to FALSE, \"sql\" is used as an SQL string" "containing a query, if set to FALSE, \"sql\" is used as an SQL string"
msgstr "" msgstr ""
#: ../db/db-model.c:3312 #: ../db/db-model.c:3316
msgid "" msgid ""
"Depending on the \"use-file\" property this will be the path to a file with " "Depending on the \"use-file\" property this will be the path to a file with "
"queries for the model or a SQL string" "queries for the model or a SQL string"
msgstr "" msgstr ""
#: ../db/db-model.c:3321 #: ../db/db-model.c:3325
msgid "Main Table" msgid "Main Table"
msgstr "" msgstr ""
#: ../db/db-model.c:3322 #: ../db/db-model.c:3326
msgid "The main table of the model" msgid "The main table of the model"
msgstr "" msgstr ""
#: ../db/db-model.c:3329 #: ../db/db-model.c:3333
msgid "Update flags" msgid "Update flags"
msgstr "" msgstr ""
#: ../db/db-model.c:3330 #: ../db/db-model.c:3334
msgid "The flags that indicate how a model can be modified" msgid "The flags that indicate how a model can be modified"
msgstr "" msgstr ""
#: ../db/db-model.c:3338 #: ../db/db-model.c:3342
msgid "Result position" msgid "Result position"
msgstr "" msgstr ""
#: ../db/db-model.c:3339 #: ../db/db-model.c:3343
msgid "" msgid ""
"The position where the query that will fill the model will be placed in a " "The position where the query that will fill the model will be placed in a "
"multi-query" "multi-query"
msgstr "" msgstr ""
#: ../db/db-model.c:3349 #: ../db/db-model.c:3353
msgid "Partial delete" msgid "Partial delete"
msgstr "" msgstr ""
#: ../db/db-model.c:3350 #: ../db/db-model.c:3354
msgid "" msgid ""
"When a row is deleted set all the fields from the table to null rather than " "When a row is deleted set all the fields from the table to null rather than "
"delete it." "delete it."
msgstr "" msgstr ""
#: ../db/db-model.c:3358 #: ../db/db-model.c:3362
msgid "Batch" msgid "Batch"
msgstr "" msgstr ""
#: ../db/db-model.c:3359 #: ../db/db-model.c:3363
msgid "The batch assigned to the model" msgid "The batch assigned to the model"
msgstr "" msgstr ""
#: ../db/db-model-holder.c:71 ../db/db-calc.c:329 #: ../db/db-model-holder.c:71 ../db/db-calc.c:405
msgid "Model" msgid "Model"
msgstr "" msgstr ""
@ -427,43 +427,52 @@ msgstr ""
msgid "The model used by the holder" msgid "The model used by the holder"
msgstr "" msgstr ""
#: ../db/db-calc.c:330 #: ../db/db-calc.c:406
msgid "The model where the operations will be applied" msgid "The model where the operations will be applied"
msgstr "" msgstr ""
#: ../db/db-calc.c:337 #: ../db/db-calc.c:413
msgid "Operation type" msgid "Operation type"
msgstr "" msgstr ""
#: ../db/db-calc.c:338 #: ../db/db-calc.c:414
msgid "The type of the operation applied over the function" msgid "The type of the operation applied over the function"
msgstr "" msgstr ""
#: ../db/db-calc.c:346 #: ../db/db-calc.c:422
msgid "Function" msgid "Function"
msgstr "" msgstr ""
#: ../db/db-calc.c:347 #: ../db/db-calc.c:423
msgid "The function to execute" msgid "The function to execute"
msgstr "" msgstr ""
#: ../db/db-calc.c:353 #: ../db/db-calc.c:429
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#: ../db/db-calc.c:354 #: ../db/db-calc.c:430
msgid "The user provided data for the function" msgid "The user provided data for the function"
msgstr "" msgstr ""
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:293 #: ../db/db-calc.c:436 ../db/db-param.c:258 ../vn/vn-column.c:493
msgid "Column" msgid "Column index"
msgstr "" msgstr ""
#: ../db/db-calc.c:361 #: ../db/db-calc.c:437
msgid "A column to apply the operations over it" msgid "A column to apply the operations over it"
msgstr "" msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:587 #: ../db/db-calc.c:446 ../db/db-param.c:265 ../vn/vn-field.c:597
#: ../vn/vn-column.c:500
msgid "Column name"
msgstr "Nom de la columna"
#: ../db/db-calc.c:447
msgid "A column name to apply the operations over it"
msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:421 ../vn/vn-field.c:590
msgid "Iterator" msgid "Iterator"
msgstr "" msgstr ""
@ -471,19 +480,11 @@ msgstr ""
msgid "The iterator owner of param" msgid "The iterator owner of param"
msgstr "" msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:490
msgid "Column index"
msgstr ""
#: ../db/db-param.c:259 #: ../db/db-param.c:259
msgid "The referenced column index" msgid "The referenced column index"
msgstr "" msgstr ""
#: ../db/db-param.c:265 ../vn/vn-field.c:594 ../vn/vn-column.c:497 #: ../db/db-param.c:266 ../vn/vn-column.c:501
msgid "Column name"
msgstr "Nom de la columna"
#: ../db/db-param.c:266 ../vn/vn-column.c:498
msgid "The referenced column name" msgid "The referenced column name"
msgstr "Nom de la columna referenciada" msgstr "Nom de la columna referenciada"
@ -524,7 +525,7 @@ msgid "The path where query files are located"
msgstr "" msgstr ""
#: ../db/db-conn.c:1062 ../db/db-file-loader.c:716 #: ../db/db-conn.c:1062 ../db/db-file-loader.c:716
#: ../vn/column/vn-column-image.c:493 #: ../vn/column/vn-column-image.c:498
msgid "Host" msgid "Host"
msgstr "" msgstr ""
@ -587,11 +588,11 @@ msgstr ""
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:494 #: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:499
msgid "The host web server name to get the images" msgid "The host web server name to get the images"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501 #: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:506
msgid "Path" msgid "Path"
msgstr "" msgstr ""
@ -617,63 +618,63 @@ msgstr ""
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:632 #: ../vn/vn-gui.c:545
msgid "Connection has been lost. Do you want to reconnect?" msgid "Connection has been lost. Do you want to reconnect?"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:639 #: ../vn/vn-gui.c:552
msgid "An error occurred in the connection." msgid "An error occurred in the connection."
msgstr "" msgstr ""
#: ../vn/vn-gui.c:642 #: ../vn/vn-gui.c:555
msgid "Database error" msgid "Database error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:649 #: ../vn/vn-gui.c:562
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:998 #: ../vn/vn-gui.c:910
msgid "Closing connection" msgid "Closing connection"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1000 #: ../vn/vn-gui.c:912
msgid "Transaction started" msgid "Transaction started"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1002 #: ../vn/vn-gui.c:914
msgid "Connecting" msgid "Connecting"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1004 #: ../vn/vn-gui.c:916
msgid "Connection lost" msgid "Connection lost"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1006 #: ../vn/vn-gui.c:918
msgid "Connection closed" msgid "Connection closed"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1008 ../vn/field/vn-http-image.c:119 #: ../vn/vn-gui.c:920 ../vn/field/vn-http-image.c:119
msgid "Loading" msgid "Loading"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1010 #: ../vn/vn-gui.c:922
msgid "Ready" msgid "Ready"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1561 #: ../vn/vn-gui.c:1473
msgid "The connection used by Gui" msgid "The connection used by Gui"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1567 #: ../vn/vn-gui.c:1479
msgid "Application" msgid "Application"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1568 #: ../vn/vn-gui.c:1480
msgid "The application handler for the entire program" msgid "The application handler for the entire program"
msgstr "" msgstr ""
#: ../vn/vn-grid.c:519 #: ../vn/vn-grid.c:422
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "" msgstr ""
@ -725,19 +726,19 @@ msgstr ""
msgid "Move to the last row" msgid "Move to the last row"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:529 #: ../vn/vn-handler.c:531
msgid "Show flags" msgid "Show flags"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:530 #: ../vn/vn-handler.c:532
msgid "Sets the buttons that will be shown on the interface" msgid "Sets the buttons that will be shown on the interface"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:537 #: ../vn/vn-handler.c:539
msgid "Simple record" msgid "Simple record"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:538 #: ../vn/vn-handler.c:540
msgid "Sets if it is used to handle a iterator with a single record" msgid "Sets if it is used to handle a iterator with a single record"
msgstr "" msgstr ""
@ -782,75 +783,75 @@ msgstr ""
msgid "The application identifier" msgid "The application identifier"
msgstr "" msgstr ""
#: ../vn/vn-field.c:574 #: ../vn/vn-field.c:577
msgid "The current value of the field" msgid "The current value of the field"
msgstr "" msgstr ""
#: ../vn/vn-field.c:580 ../glade/glade-db-iterator.c:71 #: ../vn/vn-field.c:583 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116 #: ../glade/glade-db-iterator.c:116 ../glade/glade-sql-batch.c:445
msgid "Parameter" msgid "Parameter"
msgstr "" msgstr ""
#: ../vn/vn-field.c:581 #: ../vn/vn-field.c:584
msgid "The param where the field can read/write its value" msgid "The param where the field can read/write its value"
msgstr "" msgstr ""
#: ../vn/vn-field.c:588 #: ../vn/vn-field.c:591
msgid "The iterator used to get the field param" msgid "The iterator used to get the field param"
msgstr "" msgstr ""
#: ../vn/vn-field.c:595 #: ../vn/vn-field.c:598
msgid "The column name on the iterator" msgid "The column name on the iterator"
msgstr "" msgstr ""
#: ../vn/vn-field.c:609 #: ../vn/vn-field.c:612
msgid "Whether the field value is user editable" msgid "Whether the field value is user editable"
msgstr "" msgstr ""
#: ../vn/vn-field.c:616 ../vn/vn-column.c:512 #: ../vn/vn-field.c:619 ../vn/vn-column.c:515
msgid "Whether the field value can be of type GVN_TYPE_NULL" msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "" msgstr ""
#: ../vn/vn-field.c:629 ../vn/vn-column.c:525 #: ../vn/vn-field.c:632 ../vn/vn-column.c:528
msgid "Style function" msgid "Style function"
msgstr "" msgstr ""
#: ../vn/vn-field.c:630 #: ../vn/vn-field.c:633
msgid "" msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value" "A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr "" msgstr ""
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:489 #: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:477
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122 #: ../vn/field/vn-label.c:115 ../vn/column/vn-column-entry.c:127
msgid "Format" msgid "Format"
msgstr "" msgstr ""
#: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:115 #: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:116
#: ../vn/column/vn-column-entry.c:123 #: ../vn/column/vn-column-entry.c:128
msgid "The format string describing the output of the entry." msgid "The format string describing the output of the entry."
msgstr "" msgstr ""
#: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:246 #: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:201
msgid "Digits" msgid "Digits"
msgstr "" msgstr ""
#: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:247 #: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:202
msgid "The number of decimal places to display." msgid "The number of decimal places to display."
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:333 #: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:340
msgid "Index column" msgid "Index column"
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:334 #: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:341
msgid "The column index of the model" msgid "The column index of the model"
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:340 #: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:347
msgid "Show column" msgid "Show column"
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:341 #: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:348
msgid "The column of the model shown by combo" msgid "The column of the model shown by combo"
msgstr "" msgstr ""
@ -862,34 +863,34 @@ msgstr ""
msgid "The name of the field used for the search" msgid "The name of the field used for the search"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:438 #: ../vn/field/vn-date-chooser.c:426
msgid "Change date" msgid "Change date"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:490 #: ../vn/field/vn-date-chooser.c:478
msgid "The date format string describing the order of the elements." msgid "The date format string describing the order of the elements."
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:491 #: ../vn/field/vn-date-chooser.c:479
msgctxt "Default date format string" msgctxt "Default date format string"
msgid "%a, %d %b %Y" msgid "%a, %d %b %Y"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:497 #: ../vn/field/vn-date-chooser.c:485
msgid "Show time" msgid "Show time"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:498 #: ../vn/field/vn-date-chooser.c:486
msgid "" msgid ""
"Whether to show the hour, minute and second fields to set the time of the " "Whether to show the hour, minute and second fields to set the time of the "
"day in the popup." "day in the popup."
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:506 #: ../vn/field/vn-date-chooser.c:494
msgid "Show date" msgid "Show date"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:507 #: ../vn/field/vn-date-chooser.c:495
msgid "Whether to show the calendar to set the date in the popup." msgid "Whether to show the calendar to set the date in the popup."
msgstr "" msgstr ""
@ -911,7 +912,7 @@ msgstr ""
msgid "No image set" msgid "No image set"
msgstr "" msgstr ""
#: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:531 #: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:536
msgid "File loader" msgid "File loader"
msgstr "" msgstr ""
@ -935,92 +936,60 @@ msgstr ""
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "" msgstr ""
#: ../vn/vn-column.c:491 #: ../vn/vn-column.c:494
msgid "The column index in the model" msgid "The column index in the model"
msgstr "" msgstr ""
#: ../vn/vn-column.c:505 #: ../vn/vn-column.c:508
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "" msgstr ""
#: ../vn/vn-column.c:518 #: ../vn/vn-column.c:521
msgid "Tab index" msgid "Tab index"
msgstr "" msgstr ""
#: ../vn/vn-column.c:519 #: ../vn/vn-column.c:522
msgid "Order in which the tab selects the columns for edition" msgid "Order in which the tab selects the columns for edition"
msgstr "" msgstr ""
#: ../vn/vn-column.c:526 #: ../vn/vn-column.c:529
msgid "" msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value" "A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr "" msgstr ""
#: ../vn/column/vn-column-spin.c:238 #: ../vn/column/vn-column-combo.c:354
msgid "Climb rate"
msgstr ""
#: ../vn/column/vn-column-spin.c:239
msgid "The acceleration rate when you hold down a button."
msgstr ""
#: ../vn/column/vn-column-spin.c:254
msgid "Minimum value"
msgstr ""
#: ../vn/column/vn-column-spin.c:255
msgid "The minimum value of the internal adjustment."
msgstr ""
#: ../vn/column/vn-column-spin.c:262
msgid "Maximum value"
msgstr ""
#: ../vn/column/vn-column-spin.c:263
msgid "The maximum value of the internal adjustment."
msgstr ""
#: ../vn/column/vn-column-spin.c:270
msgid "Step Increment"
msgstr ""
#: ../vn/column/vn-column-spin.c:271
msgid "The step increment of the internal adjustment"
msgstr ""
#: ../vn/column/vn-column-combo.c:347
msgid "Sort column" msgid "Sort column"
msgstr "" msgstr ""
#: ../vn/column/vn-column-combo.c:348 #: ../vn/column/vn-column-combo.c:355
msgid "The field number of the Grid model used to sort the column" msgid "The field number of the Grid model used to sort the column"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:502 #: ../vn/column/vn-column-image.c:507
msgid "Base path from the host where the images will be downloaded" msgid "Base path from the host where the images will be downloaded"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:509 #: ../vn/column/vn-column-image.c:514
msgid "Tooltip path" msgid "Tooltip path"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:510 #: ../vn/column/vn-column-image.c:515
msgid "" msgid ""
"Prefix for the path of the images to be shown in the tooltip. Starting after " "Prefix for the path of the images to be shown in the tooltip. Starting after "
"the path of the column and appending the name on each cell" "the path of the column and appending the name on each cell"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:519 #: ../vn/column/vn-column-image.c:524
msgid "Tooltip size" msgid "Tooltip size"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:520 #: ../vn/column/vn-column-image.c:525
msgid "" msgid ""
"Size of the bigger side of the tooltip images, the another side will be " "Size of the bigger side of the tooltip images, the another side will be "
"scaled accordingly and smaller images won't be scaled" "scaled accordingly and smaller images won't be scaled"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:532 #: ../vn/column/vn-column-image.c:537
msgid "An optional file loader, if it's NULL the column will create one" msgid "An optional file loader, if it's NULL the column will create one"
msgstr "" msgstr ""
@ -1101,13 +1070,13 @@ msgid ""
"02111-1307 USA." "02111-1307 USA."
msgstr "" msgstr ""
#: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:72 #: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:143
#: ../glade/glade-eprop-model.c:163 #: ../glade/glade-eprop-model.c:150
msgid "OK" msgid "OK"
msgstr "" msgstr ""
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73 #: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:144
#: ../glade/glade-eprop-model.c:164 #: ../glade/glade-eprop-model.c:151
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@ -1115,76 +1084,100 @@ msgstr ""
msgid "Now" msgid "Now"
msgstr "" msgstr ""
#: ../vn/gui/menu.glade.h:1
msgid "New window"
msgstr ""
#: ../vn/gui/menu.glade.h:2
msgid "Logout"
msgstr ""
#: ../vn/gui/menu.glade.h:3
msgid "Connect"
msgstr ""
#: ../vn/gui/menu.glade.h:4
msgid "About"
msgstr ""
#: ../vn/gui/menu.glade.h:5
msgid "Quit"
msgstr ""
#: ../vn/gui/menu.glade.h:6
msgid "Close"
msgstr ""
#: ../glade/glade-db-model.c:37 #: ../glade/glade-db-model.c:37
msgid "New SQL statement" msgid "New SQL statement"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:69 #: ../glade/glade-db-model.c:100
msgid "Save as..."
msgstr ""
#: ../glade/glade-db-model.c:140
msgid "SQL Editor" msgid "SQL Editor"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:165 #: ../glade/glade-db-model.c:145 ../glade/glade-eprop-model.c:152
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:184 #: ../glade/glade-db-model.c:203
msgid "Save project"
msgstr ""
#: ../glade/glade-db-model.c:274
msgid "Open the SQL Editor" msgid "Open the SQL Editor"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:289 #: ../glade/glade-db-model.c:354 ../glade/glade-sql-batch.c:185
msgid "Select a GvnParam"
msgstr ""
#: ../glade/glade-db-model.c:422 ../glade/glade-sql-batch.c:253
msgid "Select the parameter from a list"
msgstr ""
#: ../glade/glade-db-model.c:440 ../glade/glade-sql-batch.c:271
msgid "You need to create at least one GvnParam or derived object"
msgstr ""
#: ../glade/glade-db-model.c:594
msgid "<b>Add or remove links</b>" msgid "<b>Add or remove links</b>"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:303 #: ../glade/glade-db-model.c:629
msgid "Column"
msgstr ""
#: ../glade/glade-db-model.c:646
msgctxt "Verb" msgctxt "Verb"
msgid "Link" msgid "Link"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:365 #: ../glade/glade-db-model-editor.c:54
msgid "<b>Add or remove holders</b>"
msgstr ""
#: ../glade/glade-db-model.c:440
msgid "Select a GvnParam"
msgstr ""
#: ../glade/glade-db-model.c:497
msgid "Select the parameter from a list"
msgstr ""
#: ../glade/glade-db-model.c:515
msgid "You need to create at least one GvnParam or derived object"
msgstr ""
#: ../glade/glade-db-model-editor.c:62
msgid "List of parameters linked to the model" msgid "List of parameters linked to the model"
msgstr "" msgstr ""
#: ../glade/glade-db-model-editor.c:65 #: ../glade/glade-eprop-model.c:118
msgid "List of SqlHolders and identifiers"
msgstr ""
#: ../glade/glade-eprop-model.c:128
msgid "Create and set a model for a DbModelHolder" msgid "Create and set a model for a DbModelHolder"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:160 #: ../glade/glade-eprop-model.c:147
msgid "Model configuration" msgid "Model configuration"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:160 #: ../glade/glade-eprop-model.c:218
msgid "Model properties configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:243
msgid "Select a VnModel for the property" msgid "Select a VnModel for the property"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:264 ../glade/glade-eprop-model.c:310 #: ../glade/glade-eprop-model.c:239 ../glade/glade-eprop-model.c:285
msgid "New Model" msgid "New Model"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:305 #: ../glade/glade-eprop-model.c:280
msgid "Edit Model" msgid "Edit Model"
msgstr "" msgstr ""
@ -1215,6 +1208,14 @@ msgstr ""
msgid "Automatic generation of params for %s" msgid "Automatic generation of params for %s"
msgstr "" msgstr ""
#: ../glade/glade-sql-batch.c:79
msgid "List of items"
msgstr ""
#: ../glade/glade-sql-batch.c:401
msgid "<b>Add or remove items</b>"
msgstr ""
#: ../glade/vn.xml.h:1 #: ../glade/vn.xml.h:1
msgid "The model held by the object" msgid "The model held by the object"
msgstr "" msgstr ""
@ -1224,10 +1225,28 @@ msgid "Example"
msgstr "" msgstr ""
#: ../module/data/example.xml.h:2 #: ../module/data/example.xml.h:2
msgid ""
"\n"
"\t\t\tConsulter\n"
"\t\t"
msgstr ""
#: ../module/data/example.xml.h:5
msgid ""
"\n"
"\t\t\tCustomer\n"
"\t\t"
msgstr ""
#: ../module/data/example-menu.xml.h:1
msgid "Consulter" msgid "Consulter"
msgstr "" msgstr ""
#: ../module/data/consulter.glade.h:1 #: ../module/data/example-menu.xml.h:2
msgid "Customer"
msgstr ""
#: ../module/data/consulter.glade.h:1 ../module/data/consulter-menu.xml.h:1
msgid "Send" msgid "Send"
msgstr "" msgstr ""
@ -1235,7 +1254,7 @@ msgstr ""
msgid "Send the current query" msgid "Send the current query"
msgstr "" msgstr ""
#: ../module/data/consulter.glade.h:3 #: ../module/data/consulter.glade.h:3 ../module/data/consulter-menu.xml.h:2
msgid "Clean" msgid "Clean"
msgstr "" msgstr ""
@ -1252,15 +1271,15 @@ msgid "Query:"
msgstr "" msgstr ""
#: ../module/data/consulter.glade.h:7 #: ../module/data/consulter.glade.h:7
msgid "Immediate changes"
msgstr ""
#: ../module/src/vn-consulter.c:234
msgid "Type or select a query" msgid "Type or select a query"
msgstr "" msgstr ""
#: ../module/src/vn-consulter.c:236 #: ../module/data/consulter.glade.h:8
msgid "Message" msgid "Log"
msgstr ""
#: ../module/data/consulter.glade.h:9
msgid "Immediate changes"
msgstr "" msgstr ""
#~ msgid "Hedera" #~ msgid "Hedera"

489
po/es.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hedera 1.0\n" "Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-07 15:57+0200\n" "POT-Creation-Date: 2014-07-15 14:27+0200\n"
"PO-Revision-Date: 2013-06-04 13:36+0200\n" "PO-Revision-Date: 2013-06-04 13:36+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n" "Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Spanish\n" "Language-Team: Spanish\n"
@ -33,7 +33,7 @@ msgstr "El parámetro no puede ser nulo"
msgid "Incompatible type for this param" msgid "Incompatible type for this param"
msgstr "Tipo incompatible para este parametro" msgstr "Tipo incompatible para este parametro"
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:573 #: ../gvn/gvn-param.c:443 ../sql/sql-value.c:255 ../vn/vn-field.c:576
msgid "Value" msgid "Value"
msgstr "Valor" msgstr "Valor"
@ -49,7 +49,7 @@ msgstr "Maestro"
msgid "The master GvnParam of this parameter" msgid "The master GvnParam of this parameter"
msgstr "El GvnParam maestro de este parámetro" msgstr "El GvnParam maestro de este parámetro"
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1055 #: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1062
msgid "Mode" msgid "Mode"
msgstr "Modo" msgstr "Modo"
@ -73,15 +73,15 @@ msgstr "Spec"
msgid "The spec of the parameter" msgid "The spec of the parameter"
msgstr "Datos específicos del parámetro" msgstr "Datos específicos del parámetro"
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:601 #: ../gvn/gvn-param.c:478 ../vn/vn-field.c:604
msgid "Glib Type" msgid "Glib Type"
msgstr "Tipo Glib" msgstr "Tipo Glib"
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:602 #: ../gvn/gvn-param.c:479 ../vn/vn-field.c:605
msgid "The type of the value" msgid "The type of the value"
msgstr "El tipo del valor" msgstr "El tipo del valor"
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:608 ../vn/vn-column.c:504 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:611 ../vn/vn-column.c:507
msgid "Editable" msgid "Editable"
msgstr "Editable" msgstr "Editable"
@ -89,7 +89,7 @@ msgstr "Editable"
msgid "Whether the param value can be modified" msgid "Whether the param value can be modified"
msgstr "Indica si el parámetro puede modificarse" msgstr "Indica si el parámetro puede modificarse"
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:615 ../vn/vn-column.c:511 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:618 ../vn/vn-column.c:514
msgid "Null" msgid "Null"
msgstr "Nulo" msgstr "Nulo"
@ -97,11 +97,11 @@ msgstr "Nulo"
msgid "Whether the param value can be of type GVN_TYPE_NULL" msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "Indica si el parámetro puede ser nulo" msgstr "Indica si el parámetro puede ser nulo"
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:622 #: ../gvn/gvn-param.c:499 ../vn/vn-field.c:625
msgid "Default Value" msgid "Default Value"
msgstr "Valor por defecto" msgstr "Valor por defecto"
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:623 #: ../gvn/gvn-param.c:500 ../vn/vn-field.c:626
msgid "The default value" msgid "The default value"
msgstr "El valor por defecto" msgstr "El valor por defecto"
@ -126,19 +126,19 @@ msgstr "Delimitador"
msgid "The character used for delimite the name of fields, tables..." msgid "The character used for delimite the name of fields, tables..."
msgstr "El carácter usado para delimitar los nombres de campos, tablas..." msgstr "El carácter usado para delimitar los nombres de campos, tablas..."
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:530 #: ../sql/sql-value.c:248 ../glade/glade-db-model.c:638
msgid "Param" msgid "Param"
msgstr "Parámetro" msgstr "Parámetro"
#: ../sql/sql-value.c:246 #: ../sql/sql-value.c:249
msgid "The param which is linked" msgid "The param which is linked"
msgstr "El parametro al cual está vinculado" msgstr "El parametro al cual está vinculado"
#: ../sql/sql-value.c:253 #: ../sql/sql-value.c:256
msgid "The value" msgid "The value"
msgstr "Valor" msgstr "Valor"
#: ../sql/sql-string.c:188 ../db/db-model.c:3311 ../db/db-request.c:449 #: ../sql/sql-string.c:188 ../db/db-model.c:3315 ../db/db-request.c:449
msgid "SQL" msgid "SQL"
msgstr "SQL" msgstr "SQL"
@ -210,7 +210,7 @@ msgstr "Parámetros"
msgid "The function parameters" msgid "The function parameters"
msgstr "Los parametros de la función" msgstr "Los parametros de la función"
#: ../sql/sql-holder.c:124 ../glade/glade-db-model.c:369 #: ../sql/sql-holder.c:124 ../glade/glade-sql-batch.c:436
msgid "Identifier" msgid "Identifier"
msgstr "Identificador" msgstr "Identificador"
@ -327,41 +327,41 @@ msgstr "Una de las posibles opciones de #SqlSelectType"
msgid "Can't allocate the needed memory" msgid "Can't allocate the needed memory"
msgstr "No es posible asignar la memoria necesaria" msgstr "No es posible asignar la memoria necesaria"
#: ../db/db-iterator.c:1056 #: ../db/db-iterator.c:1063
msgid "The mode in which the iterator is working" msgid "The mode in which the iterator is working"
msgstr "El modo en el que está trabajando el Iterator" msgstr "El modo en el que está trabajando el Iterator"
#: ../db/db-iterator.c:1063 #: ../db/db-iterator.c:1070
msgid "Remember selection" msgid "Remember selection"
msgstr "Recordar fila seleccionada" msgstr "Recordar fila seleccionada"
#: ../db/db-iterator.c:1064 #: ../db/db-iterator.c:1071
msgid "Wether to rememeber the selection when model is refreshed" msgid "Wether to rememeber the selection when model is refreshed"
msgstr "" msgstr ""
"Si se recordará o no la fila seleccionado cuando se refresque el modelo" "Si se recordará o no la fila seleccionado cuando se refresque el modelo"
#: ../db/db-model.c:3285 ../db/db-request.c:442 ../vn/vn-gui.c:1560 #: ../db/db-model.c:3289 ../db/db-request.c:442 ../vn/vn-gui.c:1472
#: ../vn/vn-form.c:245 #: ../vn/vn-form.c:245
msgid "Connection" msgid "Connection"
msgstr "Conexión" msgstr "Conexión"
#: ../db/db-model.c:3286 #: ../db/db-model.c:3290
msgid "The DbConn that manages the connection to the database" msgid "The DbConn that manages the connection to the database"
msgstr "La DbConn que controla la conexión a la base de datos" msgstr "La DbConn que controla la conexión a la base de datos"
#: ../db/db-model.c:3293 #: ../db/db-model.c:3297
msgid "Statement" msgid "Statement"
msgstr "Consulta" msgstr "Consulta"
#: ../db/db-model.c:3294 #: ../db/db-model.c:3298
msgid "The statement which retrieves the data" msgid "The statement which retrieves the data"
msgstr "La consulta que recupera los datos" msgstr "La consulta que recupera los datos"
#: ../db/db-model.c:3301 #: ../db/db-model.c:3305
msgid "Use file" msgid "Use file"
msgstr "Usa fichero" msgstr "Usa fichero"
#: ../db/db-model.c:3302 #: ../db/db-model.c:3306
msgid "" msgid ""
"If this is set to TRUE, the \"sql\" property will hold the name of a file " "If this is set to TRUE, the \"sql\" property will hold the name of a file "
"containing a query, if set to FALSE, \"sql\" is used as an SQL string" "containing a query, if set to FALSE, \"sql\" is used as an SQL string"
@ -369,7 +369,7 @@ msgstr ""
"Si es TRUE, la propiedad \"sql\" contiene el nombre de un archivo, si es " "Si es TRUE, la propiedad \"sql\" contiene el nombre de un archivo, si es "
"falso, \"sql\" se usa como una cadena SQL" "falso, \"sql\" se usa como una cadena SQL"
#: ../db/db-model.c:3312 #: ../db/db-model.c:3316
msgid "" msgid ""
"Depending on the \"use-file\" property this will be the path to a file with " "Depending on the \"use-file\" property this will be the path to a file with "
"queries for the model or a SQL string" "queries for the model or a SQL string"
@ -377,27 +377,27 @@ msgstr ""
"Dependiendo de la propiedad \"use-file\", esta propiedad será la ruta a un " "Dependiendo de la propiedad \"use-file\", esta propiedad será la ruta a un "
"fichero con consultas para el modelo o una cadena SQL" "fichero con consultas para el modelo o una cadena SQL"
#: ../db/db-model.c:3321 #: ../db/db-model.c:3325
msgid "Main Table" msgid "Main Table"
msgstr "Tabla principal" msgstr "Tabla principal"
#: ../db/db-model.c:3322 #: ../db/db-model.c:3326
msgid "The main table of the model" msgid "The main table of the model"
msgstr "La tabla principal del modelo" msgstr "La tabla principal del modelo"
#: ../db/db-model.c:3329 #: ../db/db-model.c:3333
msgid "Update flags" msgid "Update flags"
msgstr "Flags de actualización" msgstr "Flags de actualización"
#: ../db/db-model.c:3330 #: ../db/db-model.c:3334
msgid "The flags that indicate how a model can be modified" msgid "The flags that indicate how a model can be modified"
msgstr "Indican como se puede modificar el modelo" msgstr "Indican como se puede modificar el modelo"
#: ../db/db-model.c:3338 #: ../db/db-model.c:3342
msgid "Result position" msgid "Result position"
msgstr "Posición del resultado" msgstr "Posición del resultado"
#: ../db/db-model.c:3339 #: ../db/db-model.c:3343
msgid "" msgid ""
"The position where the query that will fill the model will be placed in a " "The position where the query that will fill the model will be placed in a "
"multi-query" "multi-query"
@ -405,11 +405,11 @@ msgstr ""
"La posición en la que se situa la consulta que pone datos en el modelo en " "La posición en la que se situa la consulta que pone datos en el modelo en "
"una consulta múltiple" "una consulta múltiple"
#: ../db/db-model.c:3349 #: ../db/db-model.c:3353
msgid "Partial delete" msgid "Partial delete"
msgstr "Delete parcial" msgstr "Delete parcial"
#: ../db/db-model.c:3350 #: ../db/db-model.c:3354
msgid "" msgid ""
"When a row is deleted set all the fields from the table to null rather than " "When a row is deleted set all the fields from the table to null rather than "
"delete it." "delete it."
@ -417,15 +417,15 @@ msgstr ""
"Cuando una fila es eliminada, poner todos los campos de la tabla a nulo en " "Cuando una fila es eliminada, poner todos los campos de la tabla a nulo en "
"lugar de borrarla." "lugar de borrarla."
#: ../db/db-model.c:3358 #: ../db/db-model.c:3362
msgid "Batch" msgid "Batch"
msgstr "Batch" msgstr "Batch"
#: ../db/db-model.c:3359 #: ../db/db-model.c:3363
msgid "The batch assigned to the model" msgid "The batch assigned to the model"
msgstr "El batch asignado al modelo" msgstr "El batch asignado al modelo"
#: ../db/db-model-holder.c:71 ../db/db-calc.c:329 #: ../db/db-model-holder.c:71 ../db/db-calc.c:405
msgid "Model" msgid "Model"
msgstr "Modelo" msgstr "Modelo"
@ -433,43 +433,52 @@ msgstr "Modelo"
msgid "The model used by the holder" msgid "The model used by the holder"
msgstr "La conexión empleada por el objeto" msgstr "La conexión empleada por el objeto"
#: ../db/db-calc.c:330 #: ../db/db-calc.c:406
msgid "The model where the operations will be applied" msgid "The model where the operations will be applied"
msgstr "El modelo en el que se aplicarán las operaciones" msgstr "El modelo en el que se aplicarán las operaciones"
#: ../db/db-calc.c:337 #: ../db/db-calc.c:413
msgid "Operation type" msgid "Operation type"
msgstr "Tipo de operación" msgstr "Tipo de operación"
#: ../db/db-calc.c:338 #: ../db/db-calc.c:414
msgid "The type of the operation applied over the function" msgid "The type of the operation applied over the function"
msgstr "El tipo de operación aplicada sobre la función" msgstr "El tipo de operación aplicada sobre la función"
#: ../db/db-calc.c:346 #: ../db/db-calc.c:422
msgid "Function" msgid "Function"
msgstr "Función" msgstr "Función"
#: ../db/db-calc.c:347 #: ../db/db-calc.c:423
msgid "The function to execute" msgid "The function to execute"
msgstr "Función a ejecutar" msgstr "Función a ejecutar"
#: ../db/db-calc.c:353 #: ../db/db-calc.c:429
msgid "Data" msgid "Data"
msgstr "Datos" msgstr "Datos"
#: ../db/db-calc.c:354 #: ../db/db-calc.c:430
msgid "The user provided data for the function" msgid "The user provided data for the function"
msgstr "Datos proporcionados por el usuario" msgstr "Datos proporcionados por el usuario"
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:293 #: ../db/db-calc.c:436 ../db/db-param.c:258 ../vn/vn-column.c:493
msgid "Column" msgid "Column index"
msgstr "Columna" msgstr "Posición"
#: ../db/db-calc.c:361 #: ../db/db-calc.c:437
msgid "A column to apply the operations over it" msgid "A column to apply the operations over it"
msgstr "Una columna sobre la que se aplicarán las operaciones" msgstr "Una columna sobre la que se aplicarán las operaciones"
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:587 #: ../db/db-calc.c:446 ../db/db-param.c:265 ../vn/vn-field.c:597
#: ../vn/vn-column.c:500
msgid "Column name"
msgstr "Nombre de la columna"
#: ../db/db-calc.c:447
msgid "A column name to apply the operations over it"
msgstr "Nombre de la columna sobre la que se aplicarán las operaciones"
#: ../db/db-param.c:251 ../vn/vn-grid.c:421 ../vn/vn-field.c:590
msgid "Iterator" msgid "Iterator"
msgstr "Iterator" msgstr "Iterator"
@ -477,19 +486,11 @@ msgstr "Iterator"
msgid "The iterator owner of param" msgid "The iterator owner of param"
msgstr "El Iterator dueño del parámetro" msgstr "El Iterator dueño del parámetro"
#: ../db/db-param.c:258 ../vn/vn-column.c:490
msgid "Column index"
msgstr "Posición"
#: ../db/db-param.c:259 #: ../db/db-param.c:259
msgid "The referenced column index" msgid "The referenced column index"
msgstr "La posición de la columna en el Grid" msgstr "La posición de la columna en el Grid"
#: ../db/db-param.c:265 ../vn/vn-field.c:594 ../vn/vn-column.c:497 #: ../db/db-param.c:266 ../vn/vn-column.c:501
msgid "Column name"
msgstr "Nombre de la columna"
#: ../db/db-param.c:266 ../vn/vn-column.c:498
msgid "The referenced column name" msgid "The referenced column name"
msgstr "" msgstr ""
"El nombre del campo en el Iterator vinculado al Grid al que pretenece la " "El nombre del campo en el Iterator vinculado al Grid al que pretenece la "
@ -532,7 +533,7 @@ msgid "The path where query files are located"
msgstr "La ruta donde se encuentran los archivos de consultas" msgstr "La ruta donde se encuentran los archivos de consultas"
#: ../db/db-conn.c:1062 ../db/db-file-loader.c:716 #: ../db/db-conn.c:1062 ../db/db-file-loader.c:716
#: ../vn/column/vn-column-image.c:493 #: ../vn/column/vn-column-image.c:498
msgid "Host" msgid "Host"
msgstr "Host" msgstr "Host"
@ -595,11 +596,11 @@ msgstr "No se ha guardado %s en la cache"
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "Longitud del contenido del archivo %s desconocida" msgstr "Longitud del contenido del archivo %s desconocida"
#: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:494 #: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:499
msgid "The host web server name to get the images" msgid "The host web server name to get the images"
msgstr "El nombre del servidor web al que se conectará" msgstr "El nombre del servidor web al que se conectará"
#: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501 #: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:506
msgid "Path" msgid "Path"
msgstr "Ruta" msgstr "Ruta"
@ -627,63 +628,63 @@ msgstr "Tamaño máximo de la caché"
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "El tamaño máximo para los contenidos del directorio de caché" msgstr "El tamaño máximo para los contenidos del directorio de caché"
#: ../vn/vn-gui.c:632 #: ../vn/vn-gui.c:545
msgid "Connection has been lost. Do you want to reconnect?" msgid "Connection has been lost. Do you want to reconnect?"
msgstr "Se ha perdido la conexión. ¿Quieres reconectar?" msgstr "Se ha perdido la conexión. ¿Quieres reconectar?"
#: ../vn/vn-gui.c:639 #: ../vn/vn-gui.c:552
msgid "An error occurred in the connection." msgid "An error occurred in the connection."
msgstr "Ha habido un error en la conexión." msgstr "Ha habido un error en la conexión."
#: ../vn/vn-gui.c:642 #: ../vn/vn-gui.c:555
msgid "Database error" msgid "Database error"
msgstr "Error en la base de datos" msgstr "Error en la base de datos"
#: ../vn/vn-gui.c:649 #: ../vn/vn-gui.c:562
msgid "Unknown error" msgid "Unknown error"
msgstr "Error desconocido" msgstr "Error desconocido"
#: ../vn/vn-gui.c:998 #: ../vn/vn-gui.c:910
msgid "Closing connection" msgid "Closing connection"
msgstr "Cerrando conexión" msgstr "Cerrando conexión"
#: ../vn/vn-gui.c:1000 #: ../vn/vn-gui.c:912
msgid "Transaction started" msgid "Transaction started"
msgstr "Transacción iniciada" msgstr "Transacción iniciada"
#: ../vn/vn-gui.c:1002 #: ../vn/vn-gui.c:914
msgid "Connecting" msgid "Connecting"
msgstr "Conectando" msgstr "Conectando"
#: ../vn/vn-gui.c:1004 #: ../vn/vn-gui.c:916
msgid "Connection lost" msgid "Connection lost"
msgstr "Conexión perdida" msgstr "Conexión perdida"
#: ../vn/vn-gui.c:1006 #: ../vn/vn-gui.c:918
msgid "Connection closed" msgid "Connection closed"
msgstr "Conexión cerrada" msgstr "Conexión cerrada"
#: ../vn/vn-gui.c:1008 ../vn/field/vn-http-image.c:119 #: ../vn/vn-gui.c:920 ../vn/field/vn-http-image.c:119
msgid "Loading" msgid "Loading"
msgstr "Cargando" msgstr "Cargando"
#: ../vn/vn-gui.c:1010 #: ../vn/vn-gui.c:922
msgid "Ready" msgid "Ready"
msgstr "Preparado" msgstr "Preparado"
#: ../vn/vn-gui.c:1561 #: ../vn/vn-gui.c:1473
msgid "The connection used by Gui" msgid "The connection used by Gui"
msgstr "La conexión empleada por Gui" msgstr "La conexión empleada por Gui"
#: ../vn/vn-gui.c:1567 #: ../vn/vn-gui.c:1479
msgid "Application" msgid "Application"
msgstr "Aplicación" msgstr "Aplicación"
#: ../vn/vn-gui.c:1568 #: ../vn/vn-gui.c:1480
msgid "The application handler for the entire program" msgid "The application handler for the entire program"
msgstr "El manejador de la aplicación para todo el programa" msgstr "El manejador de la aplicación para todo el programa"
#: ../vn/vn-grid.c:519 #: ../vn/vn-grid.c:422
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "El Iterator empleado por VnGrid" msgstr "El Iterator empleado por VnGrid"
@ -735,19 +736,19 @@ msgstr "Mover a la siguiente fila"
msgid "Move to the last row" msgid "Move to the last row"
msgstr "Mover a la última fila" msgstr "Mover a la última fila"
#: ../vn/vn-handler.c:529 #: ../vn/vn-handler.c:531
msgid "Show flags" msgid "Show flags"
msgstr "Visibilidad" msgstr "Visibilidad"
#: ../vn/vn-handler.c:530 #: ../vn/vn-handler.c:532
msgid "Sets the buttons that will be shown on the interface" msgid "Sets the buttons that will be shown on the interface"
msgstr "Indica los botones que se mostrarán en la interfaz" msgstr "Indica los botones que se mostrarán en la interfaz"
#: ../vn/vn-handler.c:537 #: ../vn/vn-handler.c:539
msgid "Simple record" msgid "Simple record"
msgstr "Registro simple" msgstr "Registro simple"
#: ../vn/vn-handler.c:538 #: ../vn/vn-handler.c:540
msgid "Sets if it is used to handle a iterator with a single record" msgid "Sets if it is used to handle a iterator with a single record"
msgstr "Indica si se utiliza para manejar solo un registro" msgstr "Indica si se utiliza para manejar solo un registro"
@ -792,77 +793,77 @@ msgstr "Id de la aplicación"
msgid "The application identifier" msgid "The application identifier"
msgstr "El identificador de la aplicación" msgstr "El identificador de la aplicación"
#: ../vn/vn-field.c:574 #: ../vn/vn-field.c:577
msgid "The current value of the field" msgid "The current value of the field"
msgstr "El valor actual del campo" msgstr "El valor actual del campo"
#: ../vn/vn-field.c:580 ../glade/glade-db-iterator.c:71 #: ../vn/vn-field.c:583 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116 #: ../glade/glade-db-iterator.c:116 ../glade/glade-sql-batch.c:445
msgid "Parameter" msgid "Parameter"
msgstr "Parámetro" msgstr "Parámetro"
#: ../vn/vn-field.c:581 #: ../vn/vn-field.c:584
msgid "The param where the field can read/write its value" msgid "The param where the field can read/write its value"
msgstr "El parámetro en el que el campo escribe/lee su valor" msgstr "El parámetro en el que el campo escribe/lee su valor"
#: ../vn/vn-field.c:588 #: ../vn/vn-field.c:591
msgid "The iterator used to get the field param" msgid "The iterator used to get the field param"
msgstr "El Iterator con el que se obtiene el parámetro" msgstr "El Iterator con el que se obtiene el parámetro"
#: ../vn/vn-field.c:595 #: ../vn/vn-field.c:598
msgid "The column name on the iterator" msgid "The column name on the iterator"
msgstr "El nombre de la columna en el Iterator" msgstr "El nombre de la columna en el Iterator"
#: ../vn/vn-field.c:609 #: ../vn/vn-field.c:612
msgid "Whether the field value is user editable" msgid "Whether the field value is user editable"
msgstr "Si el valor de campo puede ser editado por el usuario" msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-field.c:616 ../vn/vn-column.c:512 #: ../vn/vn-field.c:619 ../vn/vn-column.c:515
msgid "Whether the field value can be of type GVN_TYPE_NULL" msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "Si el campo puede ser del tipo GVN_TYPE_NULL" msgstr "Si el campo puede ser del tipo GVN_TYPE_NULL"
#: ../vn/vn-field.c:629 ../vn/vn-column.c:525 #: ../vn/vn-field.c:632 ../vn/vn-column.c:528
msgid "Style function" msgid "Style function"
msgstr "Función de estilo" msgstr "Función de estilo"
#: ../vn/vn-field.c:630 #: ../vn/vn-field.c:633
msgid "" msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value" "A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr "" msgstr ""
"Una VnFieldStyleFunc para configurar las propiedades de cada campo " "Una VnFieldStyleFunc para configurar las propiedades de cada campo "
"dependiendo de su valor" "dependiendo de su valor"
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:489 #: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:477
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122 #: ../vn/field/vn-label.c:115 ../vn/column/vn-column-entry.c:127
msgid "Format" msgid "Format"
msgstr "Formato" msgstr "Formato"
#: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:115 #: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:116
#: ../vn/column/vn-column-entry.c:123 #: ../vn/column/vn-column-entry.c:128
msgid "The format string describing the output of the entry." msgid "The format string describing the output of the entry."
msgstr "La cadena de formato que describe la salida del campo de texto." msgstr "La cadena de formato que describe la salida del campo de texto."
#: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:246 #: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:201
msgid "Digits" msgid "Digits"
msgstr "Dígitos" msgstr "Dígitos"
#: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:247 #: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:202
msgid "The number of decimal places to display." msgid "The number of decimal places to display."
msgstr "El número de posiciones decimales que se muestran" msgstr "El número de posiciones decimales que se muestran"
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:333 #: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:340
msgid "Index column" msgid "Index column"
msgstr "Columna índice" msgstr "Columna índice"
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:334 #: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:341
msgid "The column index of the model" msgid "The column index of the model"
msgstr "La columna índice del modelo" msgstr "La columna índice del modelo"
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:340 #: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:347
msgid "Show column" msgid "Show column"
msgstr "Columna visible" msgstr "Columna visible"
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:341 #: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:348
msgid "The column of the model shown by combo" msgid "The column of the model shown by combo"
msgstr "La columna del modelo que se mostrará en el combo" msgstr "La columna del modelo que se mostrará en el combo"
@ -874,25 +875,25 @@ msgstr "Campo"
msgid "The name of the field used for the search" msgid "The name of the field used for the search"
msgstr "El nombre del campo usado para la búsqueda" msgstr "El nombre del campo usado para la búsqueda"
#: ../vn/field/vn-date-chooser.c:438 #: ../vn/field/vn-date-chooser.c:426
msgid "Change date" msgid "Change date"
msgstr "Cambiar fecha" msgstr "Cambiar fecha"
#: ../vn/field/vn-date-chooser.c:490 #: ../vn/field/vn-date-chooser.c:478
msgid "The date format string describing the order of the elements." msgid "The date format string describing the order of the elements."
msgstr "" msgstr ""
"La cadena de formato de fechas que describe la salida del campo de texto." "La cadena de formato de fechas que describe la salida del campo de texto."
#: ../vn/field/vn-date-chooser.c:491 #: ../vn/field/vn-date-chooser.c:479
msgctxt "Default date format string" msgctxt "Default date format string"
msgid "%a, %d %b %Y" msgid "%a, %d %b %Y"
msgstr "%a, %d %b %Y" msgstr "%a, %d %b %Y"
#: ../vn/field/vn-date-chooser.c:497 #: ../vn/field/vn-date-chooser.c:485
msgid "Show time" msgid "Show time"
msgstr "Mostrar tiempo" msgstr "Mostrar tiempo"
#: ../vn/field/vn-date-chooser.c:498 #: ../vn/field/vn-date-chooser.c:486
msgid "" msgid ""
"Whether to show the hour, minute and second fields to set the time of the " "Whether to show the hour, minute and second fields to set the time of the "
"day in the popup." "day in the popup."
@ -900,11 +901,11 @@ msgstr ""
"Si se muestran los campos para hora, minuto y segundo para indicar el " "Si se muestran los campos para hora, minuto y segundo para indicar el "
"instante del día en el emergente" "instante del día en el emergente"
#: ../vn/field/vn-date-chooser.c:506 #: ../vn/field/vn-date-chooser.c:494
msgid "Show date" msgid "Show date"
msgstr "Mostrar fecha" msgstr "Mostrar fecha"
#: ../vn/field/vn-date-chooser.c:507 #: ../vn/field/vn-date-chooser.c:495
msgid "Whether to show the calendar to set the date in the popup." msgid "Whether to show the calendar to set the date in the popup."
msgstr "Si se debe mostrar el calendario para poner la fecha en el emergente." msgstr "Si se debe mostrar el calendario para poner la fecha en el emergente."
@ -926,7 +927,7 @@ msgstr "Ya se ha especificado un cargador de archivos"
msgid "No image set" msgid "No image set"
msgstr "Sin imagen" msgstr "Sin imagen"
#: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:531 #: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:536
msgid "File loader" msgid "File loader"
msgstr "Cargador de archivos" msgstr "Cargador de archivos"
@ -950,79 +951,47 @@ msgstr "Bytes"
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "Una estructura GBytes con los datos de la imágen" msgstr "Una estructura GBytes con los datos de la imágen"
#: ../vn/vn-column.c:491 #: ../vn/vn-column.c:494
msgid "The column index in the model" msgid "The column index in the model"
msgstr "El índice de la columna en el modelo" msgstr "El índice de la columna en el modelo"
#: ../vn/vn-column.c:505 #: ../vn/vn-column.c:508
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "Si el valor de campo puede ser editado por el usuario" msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-column.c:518 #: ../vn/vn-column.c:521
msgid "Tab index" msgid "Tab index"
msgstr "Tab index" msgstr "Tab index"
#: ../vn/vn-column.c:519 #: ../vn/vn-column.c:522
msgid "Order in which the tab selects the columns for edition" msgid "Order in which the tab selects the columns for edition"
msgstr "Orden en el cual el tabulador selecciona las columnas para editar" msgstr "Orden en el cual el tabulador selecciona las columnas para editar"
#: ../vn/vn-column.c:526 #: ../vn/vn-column.c:529
msgid "" msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value" "A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr "" msgstr ""
"Una VnColumnStyleFunc para configurar las propiedadesde cada celda " "Una VnColumnStyleFunc para configurar las propiedadesde cada celda "
"dependiendo de su valor" "dependiendo de su valor"
#: ../vn/column/vn-column-spin.c:238 #: ../vn/column/vn-column-combo.c:354
msgid "Climb rate"
msgstr "Tasa de subida"
#: ../vn/column/vn-column-spin.c:239
msgid "The acceleration rate when you hold down a button."
msgstr "La tasa de aceleración cuando se mantiene apretado el botón."
#: ../vn/column/vn-column-spin.c:254
msgid "Minimum value"
msgstr "Valor mínimo"
#: ../vn/column/vn-column-spin.c:255
msgid "The minimum value of the internal adjustment."
msgstr "Valor mínimo del ajuste interno."
#: ../vn/column/vn-column-spin.c:262
msgid "Maximum value"
msgstr "Valor máximo"
#: ../vn/column/vn-column-spin.c:263
msgid "The maximum value of the internal adjustment."
msgstr "Valor máximo del ajuste interno."
#: ../vn/column/vn-column-spin.c:270
msgid "Step Increment"
msgstr "Incremento del paso"
#: ../vn/column/vn-column-spin.c:271
msgid "The step increment of the internal adjustment"
msgstr "El incremento del paso del ajuste interno"
#: ../vn/column/vn-column-combo.c:347
msgid "Sort column" msgid "Sort column"
msgstr "Columna de ordenación" msgstr "Columna de ordenación"
#: ../vn/column/vn-column-combo.c:348 #: ../vn/column/vn-column-combo.c:355
msgid "The field number of the Grid model used to sort the column" msgid "The field number of the Grid model used to sort the column"
msgstr "" msgstr ""
"El número de campo del modelo del Grid que se usa para ordenar la columna" "El número de campo del modelo del Grid que se usa para ordenar la columna"
#: ../vn/column/vn-column-image.c:502 #: ../vn/column/vn-column-image.c:507
msgid "Base path from the host where the images will be downloaded" msgid "Base path from the host where the images will be downloaded"
msgstr "La ruta base del servidor desde donde se descargarán las imágenes." msgstr "La ruta base del servidor desde donde se descargarán las imágenes."
#: ../vn/column/vn-column-image.c:509 #: ../vn/column/vn-column-image.c:514
msgid "Tooltip path" msgid "Tooltip path"
msgstr "Ruta del tooltip" msgstr "Ruta del tooltip"
#: ../vn/column/vn-column-image.c:510 #: ../vn/column/vn-column-image.c:515
msgid "" msgid ""
"Prefix for the path of the images to be shown in the tooltip. Starting after " "Prefix for the path of the images to be shown in the tooltip. Starting after "
"the path of the column and appending the name on each cell" "the path of the column and appending the name on each cell"
@ -1031,11 +1000,11 @@ msgstr ""
"Empezando desde la ruta de la columna y añadiendo después el nombre de cada " "Empezando desde la ruta de la columna y añadiendo después el nombre de cada "
"celda" "celda"
#: ../vn/column/vn-column-image.c:519 #: ../vn/column/vn-column-image.c:524
msgid "Tooltip size" msgid "Tooltip size"
msgstr "Tamaño del tooltip" msgstr "Tamaño del tooltip"
#: ../vn/column/vn-column-image.c:520 #: ../vn/column/vn-column-image.c:525
msgid "" msgid ""
"Size of the bigger side of the tooltip images, the another side will be " "Size of the bigger side of the tooltip images, the another side will be "
"scaled accordingly and smaller images won't be scaled" "scaled accordingly and smaller images won't be scaled"
@ -1043,7 +1012,7 @@ msgstr ""
"Tamaño del lado más grande de las imágenes de tooltip, el otro lado se " "Tamaño del lado más grande de las imágenes de tooltip, el otro lado se "
"escalará de acuerdo a este y las imágenes más pequeñas no se escalarán" "escalará de acuerdo a este y las imágenes más pequeñas no se escalarán"
#: ../vn/column/vn-column-image.c:532 #: ../vn/column/vn-column-image.c:537
msgid "An optional file loader, if it's NULL the column will create one" msgid "An optional file loader, if it's NULL the column will create one"
msgstr "Un cargador de archivos opcional, si es nulo la columna creará uno" msgstr "Un cargador de archivos opcional, si es nulo la columna creará uno"
@ -1138,13 +1107,13 @@ msgstr ""
"Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\n" "Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA\n"
"02111-1307 USA." "02111-1307 USA."
#: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:72 #: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:143
#: ../glade/glade-eprop-model.c:163 #: ../glade/glade-eprop-model.c:150
msgid "OK" msgid "OK"
msgstr "OK" msgstr "OK"
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73 #: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:144
#: ../glade/glade-eprop-model.c:164 #: ../glade/glade-eprop-model.c:151
msgid "Clear" msgid "Clear"
msgstr "Limpiar" msgstr "Limpiar"
@ -1152,76 +1121,100 @@ msgstr "Limpiar"
msgid "Now" msgid "Now"
msgstr "Ahora" msgstr "Ahora"
#: ../vn/gui/menu.glade.h:1
msgid "New window"
msgstr "Nueva ventana"
#: ../vn/gui/menu.glade.h:2
msgid "Logout"
msgstr "Desconectar"
#: ../vn/gui/menu.glade.h:3
msgid "Connect"
msgstr "Conectar"
#: ../vn/gui/menu.glade.h:4
msgid "About"
msgstr "Acerca de"
#: ../vn/gui/menu.glade.h:5
msgid "Quit"
msgstr "Salir"
#: ../vn/gui/menu.glade.h:6
msgid "Close"
msgstr "Cerrar"
#: ../glade/glade-db-model.c:37 #: ../glade/glade-db-model.c:37
msgid "New SQL statement" msgid "New SQL statement"
msgstr "Nueva consulta SQL" msgstr "Nueva consulta SQL"
#: ../glade/glade-db-model.c:69 #: ../glade/glade-db-model.c:100
msgid "Save as..."
msgstr "Guardar como..."
#: ../glade/glade-db-model.c:140
msgid "SQL Editor" msgid "SQL Editor"
msgstr "Editor SQL" msgstr "Editor SQL"
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:165 #: ../glade/glade-db-model.c:145 ../glade/glade-eprop-model.c:152
msgid "Cancel" msgid "Cancel"
msgstr "Cancelar" msgstr "Cancelar"
#: ../glade/glade-db-model.c:184 #: ../glade/glade-db-model.c:203
msgid "Save project"
msgstr "Guardar proyecto"
#: ../glade/glade-db-model.c:274
msgid "Open the SQL Editor" msgid "Open the SQL Editor"
msgstr "Abrir el Editor SQL" msgstr "Abrir el Editor SQL"
#: ../glade/glade-db-model.c:289 #: ../glade/glade-db-model.c:354 ../glade/glade-sql-batch.c:185
msgid "Select a GvnParam"
msgstr "Elige un GvnParam"
#: ../glade/glade-db-model.c:422 ../glade/glade-sql-batch.c:253
msgid "Select the parameter from a list"
msgstr "Eligir un parametro de una lista"
#: ../glade/glade-db-model.c:440 ../glade/glade-sql-batch.c:271
msgid "You need to create at least one GvnParam or derived object"
msgstr "Necesitas crear por lo menos un GvnParam o algun objeto derivado"
#: ../glade/glade-db-model.c:594
msgid "<b>Add or remove links</b>" msgid "<b>Add or remove links</b>"
msgstr "<b>Añadir o quitar enlaces</b>" msgstr "<b>Añadir o quitar enlaces</b>"
#: ../glade/glade-db-model.c:303 #: ../glade/glade-db-model.c:629
msgid "Column"
msgstr "Columna"
#: ../glade/glade-db-model.c:646
msgctxt "Verb" msgctxt "Verb"
msgid "Link" msgid "Link"
msgstr "Enlazar" msgstr "Enlazar"
#: ../glade/glade-db-model.c:365 #: ../glade/glade-db-model-editor.c:54
msgid "<b>Add or remove holders</b>"
msgstr "<b>Añadir o quitar holders</b>"
#: ../glade/glade-db-model.c:440
msgid "Select a GvnParam"
msgstr "Elige un GvnParam"
#: ../glade/glade-db-model.c:497
msgid "Select the parameter from a list"
msgstr "Eligir un parametro de una lista"
#: ../glade/glade-db-model.c:515
msgid "You need to create at least one GvnParam or derived object"
msgstr "Necesitas crear por lo menos un GvnParam o algun objeto derivado"
#: ../glade/glade-db-model-editor.c:62
msgid "List of parameters linked to the model" msgid "List of parameters linked to the model"
msgstr "Lista de parámetros vinculados al modelo" msgstr "Lista de parámetros vinculados al modelo"
#: ../glade/glade-db-model-editor.c:65 #: ../glade/glade-eprop-model.c:118
msgid "List of SqlHolders and identifiers"
msgstr "Lista de SqlHolders e identificadores"
#: ../glade/glade-eprop-model.c:128
msgid "Create and set a model for a DbModelHolder" msgid "Create and set a model for a DbModelHolder"
msgstr "Crear y poner el modelo a un DbModelHolder" msgstr "Crear y poner el modelo a un DbModelHolder"
#: ../glade/glade-eprop-model.c:160 #: ../glade/glade-eprop-model.c:147
msgid "Model configuration" msgid "Model configuration"
msgstr "Configuración del modelo" msgstr "Configuración del modelo"
#: ../glade/glade-eprop-model.c:160 #: ../glade/glade-eprop-model.c:218
msgid "Model properties configuration"
msgstr "Configuración de propiedades del modelo"
#: ../glade/glade-eprop-model.c:243
msgid "Select a VnModel for the property" msgid "Select a VnModel for the property"
msgstr "Elige un VnModel para la propiedad" msgstr "Elige un VnModel para la propiedad"
#: ../glade/glade-eprop-model.c:264 ../glade/glade-eprop-model.c:310 #: ../glade/glade-eprop-model.c:239 ../glade/glade-eprop-model.c:285
msgid "New Model" msgid "New Model"
msgstr "Nuevo Modelo" msgstr "Nuevo Modelo"
#: ../glade/glade-eprop-model.c:305 #: ../glade/glade-eprop-model.c:280
msgid "Edit Model" msgid "Edit Model"
msgstr "Editar Modelo" msgstr "Editar Modelo"
@ -1252,6 +1245,14 @@ msgstr "%s debe tener \"Modelo\" asignado. %s"
msgid "Automatic generation of params for %s" msgid "Automatic generation of params for %s"
msgstr "Generación automatica de params para %s" msgstr "Generación automatica de params para %s"
#: ../glade/glade-sql-batch.c:79
msgid "List of items"
msgstr "Lista de elementos"
#: ../glade/glade-sql-batch.c:401
msgid "<b>Add or remove items</b>"
msgstr "<b>Añadir o quitar elementos</b>"
#: ../glade/vn.xml.h:1 #: ../glade/vn.xml.h:1
msgid "The model held by the object" msgid "The model held by the object"
msgstr "La conexión empleada por el objeto" msgstr "La conexión empleada por el objeto"
@ -1261,10 +1262,34 @@ msgid "Example"
msgstr "Ejemplo" msgstr "Ejemplo"
#: ../module/data/example.xml.h:2 #: ../module/data/example.xml.h:2
msgid ""
"\n"
"\t\t\tConsulter\n"
"\t\t"
msgstr ""
"\n"
"\t\t\tConsultor\n"
"\t\t"
#: ../module/data/example.xml.h:5
msgid ""
"\n"
"\t\t\tCustomer\n"
"\t\t"
msgstr ""
"\n"
"\t\t\tCliente\n"
"\t\t"
#: ../module/data/example-menu.xml.h:1
msgid "Consulter" msgid "Consulter"
msgstr "Consultor" msgstr "Consultor"
#: ../module/data/consulter.glade.h:1 #: ../module/data/example-menu.xml.h:2
msgid "Customer"
msgstr "Cliente"
#: ../module/data/consulter.glade.h:1 ../module/data/consulter-menu.xml.h:1
msgid "Send" msgid "Send"
msgstr "Enviar" msgstr "Enviar"
@ -1272,7 +1297,7 @@ msgstr "Enviar"
msgid "Send the current query" msgid "Send the current query"
msgstr "Enviar la consulta actual" msgstr "Enviar la consulta actual"
#: ../module/data/consulter.glade.h:3 #: ../module/data/consulter.glade.h:3 ../module/data/consulter-menu.xml.h:2
msgid "Clean" msgid "Clean"
msgstr "Limpiar" msgstr "Limpiar"
@ -1289,16 +1314,58 @@ msgid "Query:"
msgstr "Consulta:" msgstr "Consulta:"
#: ../module/data/consulter.glade.h:7 #: ../module/data/consulter.glade.h:7
msgid "Immediate changes"
msgstr "Cambios inmediatos"
#: ../module/src/vn-consulter.c:234
msgid "Type or select a query" msgid "Type or select a query"
msgstr "Escribe o elige una consulta" msgstr "Escribe o elige una consulta"
#: ../module/src/vn-consulter.c:236 #: ../module/data/consulter.glade.h:8
msgid "Message" msgid "Log"
msgstr "Mensaje" msgstr "Registro"
#: ../module/data/consulter.glade.h:9
msgid "Immediate changes"
msgstr "Cambios inmediatos"
#~ msgid "Set property value"
#~ msgstr "Establecer valor"
#~ msgid "Climb rate"
#~ msgstr "Tasa de subida"
#~ msgid "The acceleration rate when you hold down a button."
#~ msgstr "La tasa de aceleración cuando se mantiene apretado el botón."
#~ msgid "Minimum value"
#~ msgstr "Valor mínimo"
#~ msgid "The minimum value of the internal adjustment."
#~ msgstr "Valor mínimo del ajuste interno."
#~ msgid "Maximum value"
#~ msgstr "Valor máximo"
#~ msgid "The maximum value of the internal adjustment."
#~ msgstr "Valor máximo del ajuste interno."
#~ msgid "Step Increment"
#~ msgstr "Incremento del paso"
#~ msgid "The step increment of the internal adjustment"
#~ msgstr "El incremento del paso del ajuste interno"
#~ msgid "Message"
#~ msgstr "Mensaje"
#~ msgid "<b>Add or remove holders</b>"
#~ msgstr "<b>Añadir o quitar holders</b>"
#~ msgid "List of SqlHolders and identifiers"
#~ msgstr "Lista de SqlHolders e identificadores"
#~ msgid "Save"
#~ msgstr "Guardar"
#~ msgid "Model properties configuration"
#~ msgstr "Configuración de propiedades del modelo"
#~ msgid "The statement to execute" #~ msgid "The statement to execute"
#~ msgstr "La instrucción a ejecutar" #~ msgstr "La instrucción a ejecutar"
@ -1309,21 +1376,9 @@ msgstr "Mensaje"
#~ msgid "[user-name]" #~ msgid "[user-name]"
#~ msgstr "[user-name]" #~ msgstr "[user-name]"
#~ msgid "_Logout"
#~ msgstr "_Desconectar"
#~ msgid "Logout"
#~ msgstr "Desconectar"
#~ msgid "_Quit" #~ msgid "_Quit"
#~ msgstr "_Salir" #~ msgstr "_Salir"
#~ msgid "Quit"
#~ msgstr "Salir"
#~ msgid "_About"
#~ msgstr "_Acerca de"
#~ msgid "_File" #~ msgid "_File"
#~ msgstr "_Archivo" #~ msgstr "_Archivo"
@ -1336,9 +1391,6 @@ msgstr "Mensaje"
#~ msgid "Reconnect" #~ msgid "Reconnect"
#~ msgstr "Reconectar" #~ msgstr "Reconectar"
#~ msgid "_Close"
#~ msgstr "_Cerrar"
#~ msgid "_View" #~ msgid "_View"
#~ msgstr "_Ver" #~ msgstr "_Ver"
@ -1353,15 +1405,6 @@ msgstr "Mensaje"
#~ msgid "Tool_bar" #~ msgid "Tool_bar"
#~ msgstr "_Barra de herramientas" #~ msgstr "_Barra de herramientas"
#~ msgid ""
#~ "\n"
#~ "\t\t\tCustomer\n"
#~ "\t\t"
#~ msgstr ""
#~ "\n"
#~ "\t\t\tCliente\n"
#~ "\t\t"
#~ msgid "Err" #~ msgid "Err"
#~ msgstr "Err" #~ msgstr "Err"

413
po/nl.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hedera 1.0\n" "Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-07-07 15:57+0200\n" "POT-Creation-Date: 2014-07-15 14:27+0200\n"
"PO-Revision-Date: 2012-10-09 11:38+0200\n" "PO-Revision-Date: 2012-10-09 11:38+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n" "Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Dutch\n" "Language-Team: Dutch\n"
@ -33,7 +33,7 @@ msgstr ""
msgid "Incompatible type for this param" msgid "Incompatible type for this param"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:573 #: ../gvn/gvn-param.c:443 ../sql/sql-value.c:255 ../vn/vn-field.c:576
msgid "Value" msgid "Value"
msgstr "" msgstr ""
@ -49,7 +49,7 @@ msgstr ""
msgid "The master GvnParam of this parameter" msgid "The master GvnParam of this parameter"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1055 #: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1062
msgid "Mode" msgid "Mode"
msgstr "" msgstr ""
@ -73,15 +73,15 @@ msgstr ""
msgid "The spec of the parameter" msgid "The spec of the parameter"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:601 #: ../gvn/gvn-param.c:478 ../vn/vn-field.c:604
msgid "Glib Type" msgid "Glib Type"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:602 #: ../gvn/gvn-param.c:479 ../vn/vn-field.c:605
msgid "The type of the value" msgid "The type of the value"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:608 ../vn/vn-column.c:504 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:611 ../vn/vn-column.c:507
msgid "Editable" msgid "Editable"
msgstr "" msgstr ""
@ -89,7 +89,7 @@ msgstr ""
msgid "Whether the param value can be modified" msgid "Whether the param value can be modified"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:615 ../vn/vn-column.c:511 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:618 ../vn/vn-column.c:514
msgid "Null" msgid "Null"
msgstr "" msgstr ""
@ -97,11 +97,11 @@ msgstr ""
msgid "Whether the param value can be of type GVN_TYPE_NULL" msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:622 #: ../gvn/gvn-param.c:499 ../vn/vn-field.c:625
msgid "Default Value" msgid "Default Value"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:623 #: ../gvn/gvn-param.c:500 ../vn/vn-field.c:626
msgid "The default value" msgid "The default value"
msgstr "" msgstr ""
@ -126,19 +126,19 @@ msgstr ""
msgid "The character used for delimite the name of fields, tables..." msgid "The character used for delimite the name of fields, tables..."
msgstr "" msgstr ""
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:530 #: ../sql/sql-value.c:248 ../glade/glade-db-model.c:638
msgid "Param" msgid "Param"
msgstr "" msgstr ""
#: ../sql/sql-value.c:246 #: ../sql/sql-value.c:249
msgid "The param which is linked" msgid "The param which is linked"
msgstr "" msgstr ""
#: ../sql/sql-value.c:253 #: ../sql/sql-value.c:256
msgid "The value" msgid "The value"
msgstr "" msgstr ""
#: ../sql/sql-string.c:188 ../db/db-model.c:3311 ../db/db-request.c:449 #: ../sql/sql-string.c:188 ../db/db-model.c:3315 ../db/db-request.c:449
msgid "SQL" msgid "SQL"
msgstr "" msgstr ""
@ -210,7 +210,7 @@ msgstr ""
msgid "The function parameters" msgid "The function parameters"
msgstr "" msgstr ""
#: ../sql/sql-holder.c:124 ../glade/glade-db-model.c:369 #: ../sql/sql-holder.c:124 ../glade/glade-sql-batch.c:436
msgid "Identifier" msgid "Identifier"
msgstr "" msgstr ""
@ -327,96 +327,96 @@ msgstr ""
msgid "Can't allocate the needed memory" msgid "Can't allocate the needed memory"
msgstr "" msgstr ""
#: ../db/db-iterator.c:1056 #: ../db/db-iterator.c:1063
msgid "The mode in which the iterator is working" msgid "The mode in which the iterator is working"
msgstr "" msgstr ""
#: ../db/db-iterator.c:1063 #: ../db/db-iterator.c:1070
msgid "Remember selection" msgid "Remember selection"
msgstr "" msgstr ""
#: ../db/db-iterator.c:1064 #: ../db/db-iterator.c:1071
msgid "Wether to rememeber the selection when model is refreshed" msgid "Wether to rememeber the selection when model is refreshed"
msgstr "" msgstr ""
#: ../db/db-model.c:3285 ../db/db-request.c:442 ../vn/vn-gui.c:1560 #: ../db/db-model.c:3289 ../db/db-request.c:442 ../vn/vn-gui.c:1472
#: ../vn/vn-form.c:245 #: ../vn/vn-form.c:245
msgid "Connection" msgid "Connection"
msgstr "" msgstr ""
#: ../db/db-model.c:3286 #: ../db/db-model.c:3290
msgid "The DbConn that manages the connection to the database" msgid "The DbConn that manages the connection to the database"
msgstr "" msgstr ""
#: ../db/db-model.c:3293 #: ../db/db-model.c:3297
msgid "Statement" msgid "Statement"
msgstr "" msgstr ""
#: ../db/db-model.c:3294 #: ../db/db-model.c:3298
msgid "The statement which retrieves the data" msgid "The statement which retrieves the data"
msgstr "" msgstr ""
#: ../db/db-model.c:3301 #: ../db/db-model.c:3305
msgid "Use file" msgid "Use file"
msgstr "" msgstr ""
#: ../db/db-model.c:3302 #: ../db/db-model.c:3306
msgid "" msgid ""
"If this is set to TRUE, the \"sql\" property will hold the name of a file " "If this is set to TRUE, the \"sql\" property will hold the name of a file "
"containing a query, if set to FALSE, \"sql\" is used as an SQL string" "containing a query, if set to FALSE, \"sql\" is used as an SQL string"
msgstr "" msgstr ""
#: ../db/db-model.c:3312 #: ../db/db-model.c:3316
msgid "" msgid ""
"Depending on the \"use-file\" property this will be the path to a file with " "Depending on the \"use-file\" property this will be the path to a file with "
"queries for the model or a SQL string" "queries for the model or a SQL string"
msgstr "" msgstr ""
#: ../db/db-model.c:3321 #: ../db/db-model.c:3325
msgid "Main Table" msgid "Main Table"
msgstr "" msgstr ""
#: ../db/db-model.c:3322 #: ../db/db-model.c:3326
msgid "The main table of the model" msgid "The main table of the model"
msgstr "" msgstr ""
#: ../db/db-model.c:3329 #: ../db/db-model.c:3333
msgid "Update flags" msgid "Update flags"
msgstr "" msgstr ""
#: ../db/db-model.c:3330 #: ../db/db-model.c:3334
msgid "The flags that indicate how a model can be modified" msgid "The flags that indicate how a model can be modified"
msgstr "" msgstr ""
#: ../db/db-model.c:3338 #: ../db/db-model.c:3342
msgid "Result position" msgid "Result position"
msgstr "" msgstr ""
#: ../db/db-model.c:3339 #: ../db/db-model.c:3343
msgid "" msgid ""
"The position where the query that will fill the model will be placed in a " "The position where the query that will fill the model will be placed in a "
"multi-query" "multi-query"
msgstr "" msgstr ""
#: ../db/db-model.c:3349 #: ../db/db-model.c:3353
msgid "Partial delete" msgid "Partial delete"
msgstr "" msgstr ""
#: ../db/db-model.c:3350 #: ../db/db-model.c:3354
msgid "" msgid ""
"When a row is deleted set all the fields from the table to null rather than " "When a row is deleted set all the fields from the table to null rather than "
"delete it." "delete it."
msgstr "" msgstr ""
#: ../db/db-model.c:3358 #: ../db/db-model.c:3362
msgid "Batch" msgid "Batch"
msgstr "" msgstr ""
#: ../db/db-model.c:3359 #: ../db/db-model.c:3363
msgid "The batch assigned to the model" msgid "The batch assigned to the model"
msgstr "" msgstr ""
#: ../db/db-model-holder.c:71 ../db/db-calc.c:329 #: ../db/db-model-holder.c:71 ../db/db-calc.c:405
msgid "Model" msgid "Model"
msgstr "" msgstr ""
@ -424,43 +424,52 @@ msgstr ""
msgid "The model used by the holder" msgid "The model used by the holder"
msgstr "" msgstr ""
#: ../db/db-calc.c:330 #: ../db/db-calc.c:406
msgid "The model where the operations will be applied" msgid "The model where the operations will be applied"
msgstr "" msgstr ""
#: ../db/db-calc.c:337 #: ../db/db-calc.c:413
msgid "Operation type" msgid "Operation type"
msgstr "" msgstr ""
#: ../db/db-calc.c:338 #: ../db/db-calc.c:414
msgid "The type of the operation applied over the function" msgid "The type of the operation applied over the function"
msgstr "" msgstr ""
#: ../db/db-calc.c:346 #: ../db/db-calc.c:422
msgid "Function" msgid "Function"
msgstr "" msgstr ""
#: ../db/db-calc.c:347 #: ../db/db-calc.c:423
msgid "The function to execute" msgid "The function to execute"
msgstr "" msgstr ""
#: ../db/db-calc.c:353 #: ../db/db-calc.c:429
msgid "Data" msgid "Data"
msgstr "" msgstr ""
#: ../db/db-calc.c:354 #: ../db/db-calc.c:430
msgid "The user provided data for the function" msgid "The user provided data for the function"
msgstr "" msgstr ""
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:293 #: ../db/db-calc.c:436 ../db/db-param.c:258 ../vn/vn-column.c:493
msgid "Column" msgid "Column index"
msgstr "" msgstr ""
#: ../db/db-calc.c:361 #: ../db/db-calc.c:437
msgid "A column to apply the operations over it" msgid "A column to apply the operations over it"
msgstr "" msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:587 #: ../db/db-calc.c:446 ../db/db-param.c:265 ../vn/vn-field.c:597
#: ../vn/vn-column.c:500
msgid "Column name"
msgstr ""
#: ../db/db-calc.c:447
msgid "A column name to apply the operations over it"
msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:421 ../vn/vn-field.c:590
msgid "Iterator" msgid "Iterator"
msgstr "" msgstr ""
@ -468,19 +477,11 @@ msgstr ""
msgid "The iterator owner of param" msgid "The iterator owner of param"
msgstr "" msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:490
msgid "Column index"
msgstr ""
#: ../db/db-param.c:259 #: ../db/db-param.c:259
msgid "The referenced column index" msgid "The referenced column index"
msgstr "" msgstr ""
#: ../db/db-param.c:265 ../vn/vn-field.c:594 ../vn/vn-column.c:497 #: ../db/db-param.c:266 ../vn/vn-column.c:501
msgid "Column name"
msgstr ""
#: ../db/db-param.c:266 ../vn/vn-column.c:498
msgid "The referenced column name" msgid "The referenced column name"
msgstr "" msgstr ""
@ -521,7 +522,7 @@ msgid "The path where query files are located"
msgstr "" msgstr ""
#: ../db/db-conn.c:1062 ../db/db-file-loader.c:716 #: ../db/db-conn.c:1062 ../db/db-file-loader.c:716
#: ../vn/column/vn-column-image.c:493 #: ../vn/column/vn-column-image.c:498
msgid "Host" msgid "Host"
msgstr "" msgstr ""
@ -584,11 +585,11 @@ msgstr ""
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:494 #: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:499
msgid "The host web server name to get the images" msgid "The host web server name to get the images"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501 #: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:506
msgid "Path" msgid "Path"
msgstr "" msgstr ""
@ -614,63 +615,63 @@ msgstr ""
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:632 #: ../vn/vn-gui.c:545
msgid "Connection has been lost. Do you want to reconnect?" msgid "Connection has been lost. Do you want to reconnect?"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:639 #: ../vn/vn-gui.c:552
msgid "An error occurred in the connection." msgid "An error occurred in the connection."
msgstr "" msgstr ""
#: ../vn/vn-gui.c:642 #: ../vn/vn-gui.c:555
msgid "Database error" msgid "Database error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:649 #: ../vn/vn-gui.c:562
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:998 #: ../vn/vn-gui.c:910
msgid "Closing connection" msgid "Closing connection"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1000 #: ../vn/vn-gui.c:912
msgid "Transaction started" msgid "Transaction started"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1002 #: ../vn/vn-gui.c:914
msgid "Connecting" msgid "Connecting"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1004 #: ../vn/vn-gui.c:916
msgid "Connection lost" msgid "Connection lost"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1006 #: ../vn/vn-gui.c:918
msgid "Connection closed" msgid "Connection closed"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1008 ../vn/field/vn-http-image.c:119 #: ../vn/vn-gui.c:920 ../vn/field/vn-http-image.c:119
msgid "Loading" msgid "Loading"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1010 #: ../vn/vn-gui.c:922
msgid "Ready" msgid "Ready"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1561 #: ../vn/vn-gui.c:1473
msgid "The connection used by Gui" msgid "The connection used by Gui"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1567 #: ../vn/vn-gui.c:1479
msgid "Application" msgid "Application"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1568 #: ../vn/vn-gui.c:1480
msgid "The application handler for the entire program" msgid "The application handler for the entire program"
msgstr "" msgstr ""
#: ../vn/vn-grid.c:519 #: ../vn/vn-grid.c:422
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "" msgstr ""
@ -722,19 +723,19 @@ msgstr ""
msgid "Move to the last row" msgid "Move to the last row"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:529 #: ../vn/vn-handler.c:531
msgid "Show flags" msgid "Show flags"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:530 #: ../vn/vn-handler.c:532
msgid "Sets the buttons that will be shown on the interface" msgid "Sets the buttons that will be shown on the interface"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:537 #: ../vn/vn-handler.c:539
msgid "Simple record" msgid "Simple record"
msgstr "" msgstr ""
#: ../vn/vn-handler.c:538 #: ../vn/vn-handler.c:540
msgid "Sets if it is used to handle a iterator with a single record" msgid "Sets if it is used to handle a iterator with a single record"
msgstr "" msgstr ""
@ -779,75 +780,75 @@ msgstr ""
msgid "The application identifier" msgid "The application identifier"
msgstr "" msgstr ""
#: ../vn/vn-field.c:574 #: ../vn/vn-field.c:577
msgid "The current value of the field" msgid "The current value of the field"
msgstr "" msgstr ""
#: ../vn/vn-field.c:580 ../glade/glade-db-iterator.c:71 #: ../vn/vn-field.c:583 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116 #: ../glade/glade-db-iterator.c:116 ../glade/glade-sql-batch.c:445
msgid "Parameter" msgid "Parameter"
msgstr "" msgstr ""
#: ../vn/vn-field.c:581 #: ../vn/vn-field.c:584
msgid "The param where the field can read/write its value" msgid "The param where the field can read/write its value"
msgstr "" msgstr ""
#: ../vn/vn-field.c:588 #: ../vn/vn-field.c:591
msgid "The iterator used to get the field param" msgid "The iterator used to get the field param"
msgstr "" msgstr ""
#: ../vn/vn-field.c:595 #: ../vn/vn-field.c:598
msgid "The column name on the iterator" msgid "The column name on the iterator"
msgstr "" msgstr ""
#: ../vn/vn-field.c:609 #: ../vn/vn-field.c:612
msgid "Whether the field value is user editable" msgid "Whether the field value is user editable"
msgstr "" msgstr ""
#: ../vn/vn-field.c:616 ../vn/vn-column.c:512 #: ../vn/vn-field.c:619 ../vn/vn-column.c:515
msgid "Whether the field value can be of type GVN_TYPE_NULL" msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "" msgstr ""
#: ../vn/vn-field.c:629 ../vn/vn-column.c:525 #: ../vn/vn-field.c:632 ../vn/vn-column.c:528
msgid "Style function" msgid "Style function"
msgstr "" msgstr ""
#: ../vn/vn-field.c:630 #: ../vn/vn-field.c:633
msgid "" msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value" "A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr "" msgstr ""
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:489 #: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:477
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122 #: ../vn/field/vn-label.c:115 ../vn/column/vn-column-entry.c:127
msgid "Format" msgid "Format"
msgstr "" msgstr ""
#: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:115 #: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:116
#: ../vn/column/vn-column-entry.c:123 #: ../vn/column/vn-column-entry.c:128
msgid "The format string describing the output of the entry." msgid "The format string describing the output of the entry."
msgstr "" msgstr ""
#: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:246 #: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:201
msgid "Digits" msgid "Digits"
msgstr "" msgstr ""
#: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:247 #: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:202
msgid "The number of decimal places to display." msgid "The number of decimal places to display."
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:333 #: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:340
msgid "Index column" msgid "Index column"
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:334 #: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:341
msgid "The column index of the model" msgid "The column index of the model"
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:340 #: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:347
msgid "Show column" msgid "Show column"
msgstr "" msgstr ""
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:341 #: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:348
msgid "The column of the model shown by combo" msgid "The column of the model shown by combo"
msgstr "" msgstr ""
@ -859,34 +860,34 @@ msgstr ""
msgid "The name of the field used for the search" msgid "The name of the field used for the search"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:438 #: ../vn/field/vn-date-chooser.c:426
msgid "Change date" msgid "Change date"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:490 #: ../vn/field/vn-date-chooser.c:478
msgid "The date format string describing the order of the elements." msgid "The date format string describing the order of the elements."
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:491 #: ../vn/field/vn-date-chooser.c:479
msgctxt "Default date format string" msgctxt "Default date format string"
msgid "%a, %d %b %Y" msgid "%a, %d %b %Y"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:497 #: ../vn/field/vn-date-chooser.c:485
msgid "Show time" msgid "Show time"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:498 #: ../vn/field/vn-date-chooser.c:486
msgid "" msgid ""
"Whether to show the hour, minute and second fields to set the time of the " "Whether to show the hour, minute and second fields to set the time of the "
"day in the popup." "day in the popup."
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:506 #: ../vn/field/vn-date-chooser.c:494
msgid "Show date" msgid "Show date"
msgstr "" msgstr ""
#: ../vn/field/vn-date-chooser.c:507 #: ../vn/field/vn-date-chooser.c:495
msgid "Whether to show the calendar to set the date in the popup." msgid "Whether to show the calendar to set the date in the popup."
msgstr "" msgstr ""
@ -908,7 +909,7 @@ msgstr ""
msgid "No image set" msgid "No image set"
msgstr "" msgstr ""
#: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:531 #: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:536
msgid "File loader" msgid "File loader"
msgstr "" msgstr ""
@ -932,92 +933,60 @@ msgstr ""
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "" msgstr ""
#: ../vn/vn-column.c:491 #: ../vn/vn-column.c:494
msgid "The column index in the model" msgid "The column index in the model"
msgstr "" msgstr ""
#: ../vn/vn-column.c:505 #: ../vn/vn-column.c:508
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "" msgstr ""
#: ../vn/vn-column.c:518 #: ../vn/vn-column.c:521
msgid "Tab index" msgid "Tab index"
msgstr "" msgstr ""
#: ../vn/vn-column.c:519 #: ../vn/vn-column.c:522
msgid "Order in which the tab selects the columns for edition" msgid "Order in which the tab selects the columns for edition"
msgstr "" msgstr ""
#: ../vn/vn-column.c:526 #: ../vn/vn-column.c:529
msgid "" msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value" "A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr "" msgstr ""
#: ../vn/column/vn-column-spin.c:238 #: ../vn/column/vn-column-combo.c:354
msgid "Climb rate"
msgstr ""
#: ../vn/column/vn-column-spin.c:239
msgid "The acceleration rate when you hold down a button."
msgstr ""
#: ../vn/column/vn-column-spin.c:254
msgid "Minimum value"
msgstr ""
#: ../vn/column/vn-column-spin.c:255
msgid "The minimum value of the internal adjustment."
msgstr ""
#: ../vn/column/vn-column-spin.c:262
msgid "Maximum value"
msgstr ""
#: ../vn/column/vn-column-spin.c:263
msgid "The maximum value of the internal adjustment."
msgstr ""
#: ../vn/column/vn-column-spin.c:270
msgid "Step Increment"
msgstr ""
#: ../vn/column/vn-column-spin.c:271
msgid "The step increment of the internal adjustment"
msgstr ""
#: ../vn/column/vn-column-combo.c:347
msgid "Sort column" msgid "Sort column"
msgstr "" msgstr ""
#: ../vn/column/vn-column-combo.c:348 #: ../vn/column/vn-column-combo.c:355
msgid "The field number of the Grid model used to sort the column" msgid "The field number of the Grid model used to sort the column"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:502 #: ../vn/column/vn-column-image.c:507
msgid "Base path from the host where the images will be downloaded" msgid "Base path from the host where the images will be downloaded"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:509 #: ../vn/column/vn-column-image.c:514
msgid "Tooltip path" msgid "Tooltip path"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:510 #: ../vn/column/vn-column-image.c:515
msgid "" msgid ""
"Prefix for the path of the images to be shown in the tooltip. Starting after " "Prefix for the path of the images to be shown in the tooltip. Starting after "
"the path of the column and appending the name on each cell" "the path of the column and appending the name on each cell"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:519 #: ../vn/column/vn-column-image.c:524
msgid "Tooltip size" msgid "Tooltip size"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:520 #: ../vn/column/vn-column-image.c:525
msgid "" msgid ""
"Size of the bigger side of the tooltip images, the another side will be " "Size of the bigger side of the tooltip images, the another side will be "
"scaled accordingly and smaller images won't be scaled" "scaled accordingly and smaller images won't be scaled"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:532 #: ../vn/column/vn-column-image.c:537
msgid "An optional file loader, if it's NULL the column will create one" msgid "An optional file loader, if it's NULL the column will create one"
msgstr "" msgstr ""
@ -1097,13 +1066,13 @@ msgid ""
"02111-1307 USA." "02111-1307 USA."
msgstr "" msgstr ""
#: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:72 #: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:143
#: ../glade/glade-eprop-model.c:163 #: ../glade/glade-eprop-model.c:150
msgid "OK" msgid "OK"
msgstr "" msgstr ""
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73 #: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:144
#: ../glade/glade-eprop-model.c:164 #: ../glade/glade-eprop-model.c:151
msgid "Clear" msgid "Clear"
msgstr "" msgstr ""
@ -1111,76 +1080,100 @@ msgstr ""
msgid "Now" msgid "Now"
msgstr "" msgstr ""
#: ../vn/gui/menu.glade.h:1
msgid "New window"
msgstr ""
#: ../vn/gui/menu.glade.h:2
msgid "Logout"
msgstr ""
#: ../vn/gui/menu.glade.h:3
msgid "Connect"
msgstr ""
#: ../vn/gui/menu.glade.h:4
msgid "About"
msgstr ""
#: ../vn/gui/menu.glade.h:5
msgid "Quit"
msgstr ""
#: ../vn/gui/menu.glade.h:6
msgid "Close"
msgstr ""
#: ../glade/glade-db-model.c:37 #: ../glade/glade-db-model.c:37
msgid "New SQL statement" msgid "New SQL statement"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:69 #: ../glade/glade-db-model.c:100
msgid "Save as..."
msgstr ""
#: ../glade/glade-db-model.c:140
msgid "SQL Editor" msgid "SQL Editor"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:165 #: ../glade/glade-db-model.c:145 ../glade/glade-eprop-model.c:152
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:184 #: ../glade/glade-db-model.c:203
msgid "Save project"
msgstr ""
#: ../glade/glade-db-model.c:274
msgid "Open the SQL Editor" msgid "Open the SQL Editor"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:289 #: ../glade/glade-db-model.c:354 ../glade/glade-sql-batch.c:185
msgid "Select a GvnParam"
msgstr ""
#: ../glade/glade-db-model.c:422 ../glade/glade-sql-batch.c:253
msgid "Select the parameter from a list"
msgstr ""
#: ../glade/glade-db-model.c:440 ../glade/glade-sql-batch.c:271
msgid "You need to create at least one GvnParam or derived object"
msgstr ""
#: ../glade/glade-db-model.c:594
msgid "<b>Add or remove links</b>" msgid "<b>Add or remove links</b>"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:303 #: ../glade/glade-db-model.c:629
msgid "Column"
msgstr ""
#: ../glade/glade-db-model.c:646
msgctxt "Verb" msgctxt "Verb"
msgid "Link" msgid "Link"
msgstr "" msgstr ""
#: ../glade/glade-db-model.c:365 #: ../glade/glade-db-model-editor.c:54
msgid "<b>Add or remove holders</b>"
msgstr ""
#: ../glade/glade-db-model.c:440
msgid "Select a GvnParam"
msgstr ""
#: ../glade/glade-db-model.c:497
msgid "Select the parameter from a list"
msgstr ""
#: ../glade/glade-db-model.c:515
msgid "You need to create at least one GvnParam or derived object"
msgstr ""
#: ../glade/glade-db-model-editor.c:62
msgid "List of parameters linked to the model" msgid "List of parameters linked to the model"
msgstr "" msgstr ""
#: ../glade/glade-db-model-editor.c:65 #: ../glade/glade-eprop-model.c:118
msgid "List of SqlHolders and identifiers"
msgstr ""
#: ../glade/glade-eprop-model.c:128
msgid "Create and set a model for a DbModelHolder" msgid "Create and set a model for a DbModelHolder"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:160 #: ../glade/glade-eprop-model.c:147
msgid "Model configuration" msgid "Model configuration"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:160 #: ../glade/glade-eprop-model.c:218
msgid "Model properties configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:243
msgid "Select a VnModel for the property" msgid "Select a VnModel for the property"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:264 ../glade/glade-eprop-model.c:310 #: ../glade/glade-eprop-model.c:239 ../glade/glade-eprop-model.c:285
msgid "New Model" msgid "New Model"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:305 #: ../glade/glade-eprop-model.c:280
msgid "Edit Model" msgid "Edit Model"
msgstr "" msgstr ""
@ -1211,6 +1204,14 @@ msgstr ""
msgid "Automatic generation of params for %s" msgid "Automatic generation of params for %s"
msgstr "" msgstr ""
#: ../glade/glade-sql-batch.c:79
msgid "List of items"
msgstr ""
#: ../glade/glade-sql-batch.c:401
msgid "<b>Add or remove items</b>"
msgstr ""
#: ../glade/vn.xml.h:1 #: ../glade/vn.xml.h:1
msgid "The model held by the object" msgid "The model held by the object"
msgstr "" msgstr ""
@ -1220,10 +1221,28 @@ msgid "Example"
msgstr "" msgstr ""
#: ../module/data/example.xml.h:2 #: ../module/data/example.xml.h:2
msgid ""
"\n"
"\t\t\tConsulter\n"
"\t\t"
msgstr ""
#: ../module/data/example.xml.h:5
msgid ""
"\n"
"\t\t\tCustomer\n"
"\t\t"
msgstr ""
#: ../module/data/example-menu.xml.h:1
msgid "Consulter" msgid "Consulter"
msgstr "" msgstr ""
#: ../module/data/consulter.glade.h:1 #: ../module/data/example-menu.xml.h:2
msgid "Customer"
msgstr ""
#: ../module/data/consulter.glade.h:1 ../module/data/consulter-menu.xml.h:1
msgid "Send" msgid "Send"
msgstr "" msgstr ""
@ -1231,7 +1250,7 @@ msgstr ""
msgid "Send the current query" msgid "Send the current query"
msgstr "" msgstr ""
#: ../module/data/consulter.glade.h:3 #: ../module/data/consulter.glade.h:3 ../module/data/consulter-menu.xml.h:2
msgid "Clean" msgid "Clean"
msgstr "" msgstr ""
@ -1248,13 +1267,13 @@ msgid "Query:"
msgstr "" msgstr ""
#: ../module/data/consulter.glade.h:7 #: ../module/data/consulter.glade.h:7
msgid "Immediate changes"
msgstr ""
#: ../module/src/vn-consulter.c:234
msgid "Type or select a query" msgid "Type or select a query"
msgstr "" msgstr ""
#: ../module/src/vn-consulter.c:236 #: ../module/data/consulter.glade.h:8
msgid "Message" msgid "Log"
msgstr ""
#: ../module/data/consulter.glade.h:9
msgid "Immediate changes"
msgstr "" msgstr ""

View File

@ -17,7 +17,6 @@ vn_include_HEADERS = \
vn-grid.h \ vn-grid.h \
vn-handler.h \ vn-handler.h \
vn-set.h \ vn-set.h \
vn-batch.h \
field/field.h \ field/field.h \
column/column.h column/column.h
@ -48,7 +47,9 @@ glade_files = \
$(top_srcdir)/vn/glade/vn-iterator.h \ $(top_srcdir)/vn/glade/vn-iterator.h \
$(top_srcdir)/vn/glade/vn-iterator.c \ $(top_srcdir)/vn/glade/vn-iterator.c \
$(top_srcdir)/vn/glade/vn-model.h \ $(top_srcdir)/vn/glade/vn-model.h \
$(top_srcdir)/vn/glade/vn-model.c $(top_srcdir)/vn/glade/vn-model.c \
$(top_srcdir)/vn/glade/vn-batch.h \
$(top_srcdir)/vn/glade/vn-batch.c
libvn_la_SOURCES = \ libvn_la_SOURCES = \
$(libvn_files) \ $(libvn_files) \
$(glade_files) $(glade_files)

View File

@ -17,124 +17,118 @@
#include "vn-batch.h" #include "vn-batch.h"
/**
* SECTION: vn-batch
* @Short_description: a group of objects
* @Title: VnBatch
*
* A group of GObjects.
*/
static void vn_batch_buildable_interface_init (GtkBuildableIface * iface); static void vn_batch_buildable_interface_init (GtkBuildableIface * iface);
G_DEFINE_TYPE_WITH_CODE (VnBatch, vn_batch, G_TYPE_OBJECT, G_DEFINE_TYPE_WITH_CODE (VnBatch, vn_batch, SQL_TYPE_BATCH,
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE, G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
vn_batch_buildable_interface_init) vn_batch_buildable_interface_init)
); );
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Methods /* GtkBuildable custom tag implementation:
* <items>
* <item id="identifier" param="param-id"/>
* ...
* </items>
*/
/** typedef struct
* vn_batch_add:
* @obj: a #VnBatch
* @child: a #GObject
*
* Adds a child identified whith @id to the group.
**/
void vn_batch_add (VnBatch * obj, GObject * child)
{ {
g_return_if_fail (VN_IS_BATCH (obj)); GtkBuilder * builder;
g_return_if_fail (G_IS_OBJECT (child)); SqlBatch * batch;
GSList * ids;
GSList * params;
}
VnBatchData;
obj->objects = g_list_prepend (obj->objects, child); //+++++++++++++++++++++++++++++++++++++++++++++++++++ GtkBuildable
obj->count++;
static void vn_batch_start_element (GMarkupParseContext * context,
const gchar * element, const gchar ** names,
const gchar ** values, gpointer data, GError ** err)
{
guint i;
VnBatchData * d = data;
if (!g_strcmp0 (element, "item"))
{
for (i = 0; names[i]; i++)
if (!g_strcmp0 (names[i], "id"))
d->ids = g_slist_prepend (d->ids, g_strdup (values[i]));
else if (!g_strcmp0 (names[i], "param"))
d->params = g_slist_prepend (d->params, g_strdup (values[i]));
}
} }
/** static const GMarkupParser vn_batch_parser =
* vn_batch_remove:
* @obj: a #VnBatch
* @child: a #GObject contained by @obj
*
* Removes a child from the group.
**/
void vn_batch_remove (VnBatch * obj, GObject * child)
{ {
g_return_if_fail (VN_IS_BATCH (obj)); vn_batch_start_element
};
obj->objects = g_list_remove (obj->objects, child); static gboolean vn_batch_buildable_custom_tag_start (GtkBuildable * buildable,
obj->count--; GtkBuilder * builder, GObject * child, const gchar * tag,
GMarkupParser * parser, gpointer * data)
{
if (child)
return FALSE;
if (!g_strcmp0 (tag, "items"))
{
VnBatchData * data_ptr = g_slice_new (VnBatchData);
data_ptr->builder = builder;
data_ptr->batch = SQL_BATCH (buildable);
data_ptr->ids = NULL;
data_ptr->params = NULL;
*data = data_ptr;
*parser = vn_batch_parser;
return TRUE;
}
else
g_warning ("Unknown custom batch tag: %s", tag);
return FALSE;
} }
/** static void vn_batch_buildable_custom_finished (GtkBuildable * buildable,
* vn_batch_get_objects_list: GtkBuilder * builder, GObject * child, const gchar * tagname, gpointer data)
* @obj: a #VnBatch
*
* Returns all the #GObject<!-- -->s in @obj, copying the list. This method is
* mainly for internal use, use vn_batch_get_objects() instead if you don't need
* to do further use of the list of objects.
*
* Return value: (transfer container) (element-type GObject): a #GList with all
* the objects, that must be freed with #g_list_free
**/
GList * vn_batch_get_objects_list (VnBatch * obj)
{ {
g_return_val_if_fail (VN_IS_BATCH (obj), NULL); GSList * i, * p;
VnBatchData * d = data;
return g_list_copy (obj->objects); g_return_if_fail (d->builder);
}
/** if (!g_strcmp0 (tagname, "items"))
* vn_batch_get_objects: {
* @obj: a #VnBatch for (i = d->ids, p = d->params;
* i && p;
* Returns all the #GObject<!-- -->s in @obj. i = i->next, p = p->next)
* {
* Return value: (transfer none) (element-type GObject): a #GList with all gchar * id = i->data;
* the objects, that must not be freed GvnParam * param = GVN_PARAM (gtk_builder_get_object (d->builder, p->data));
**/ sql_batch_add_from_param (SQL_BATCH (buildable), id, param);
const GList * vn_batch_get_objects (VnBatch * obj) }
{
g_return_val_if_fail (VN_IS_BATCH (obj), NULL);
return obj->objects; g_slist_free_full (d->ids, g_free);
} g_slist_free_full (d->params, g_free);
g_slice_free (VnBatchData, d);
/** }
* vn_batch_get_length:
* @obj: a #VnBatch
*
* Returns the number of childs currently contained in @obj.
*
* Return value: the number of childs
**/
guint vn_batch_get_length (VnBatch * obj)
{
g_return_val_if_fail (VN_IS_BATCH (obj), 0);
return obj->count;
}
static void vn_batch_buildable_add_child (GtkBuildable * obj,
GtkBuilder * builder, GObject * child, const gchar * type)
{
vn_batch_add (VN_BATCH (obj), child);
} }
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class //+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
static void vn_batch_buildable_interface_init (GtkBuildableIface * iface)
{
iface->custom_tag_start = vn_batch_buildable_custom_tag_start;
iface->custom_finished = vn_batch_buildable_custom_finished;
}
static void vn_batch_init (VnBatch * obj) static void vn_batch_init (VnBatch * obj)
{ {
obj->objects = NULL;
obj->count = 0;
} }
static void vn_batch_finalize (VnBatch * obj) static void vn_batch_finalize (VnBatch * obj)
{ {
GObjectClass * parent = g_type_class_peek_parent (VN_BATCH_GET_CLASS (obj)); G_OBJECT_CLASS (vn_batch_parent_class)->finalize (G_OBJECT (obj));
g_list_free (obj->objects);
parent->finalize (G_OBJECT (obj));
} }
static void vn_batch_class_init (VnBatchClass * klass) static void vn_batch_class_init (VnBatchClass * klass)
@ -142,8 +136,3 @@ static void vn_batch_class_init (VnBatchClass * klass)
GObjectClass * k = G_OBJECT_CLASS (klass); GObjectClass * k = G_OBJECT_CLASS (klass);
k->finalize = (GObjectFinalizeFunc) vn_batch_finalize; k->finalize = (GObjectFinalizeFunc) vn_batch_finalize;
} }
static void vn_batch_buildable_interface_init (GtkBuildableIface * iface)
{
iface->add_child = vn_batch_buildable_add_child;
}

View File

@ -18,7 +18,7 @@
#ifndef VN_BATCH_H #ifndef VN_BATCH_H
#define VN_BATCH_H #define VN_BATCH_H
#include <db/db.h> #include <sql/sql.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#define VN_TYPE_BATCH (vn_batch_get_type ()) #define VN_TYPE_BATCH (vn_batch_get_type ())
@ -31,15 +31,9 @@
typedef struct _VnBatch VnBatch; typedef struct _VnBatch VnBatch;
typedef struct _VnBatchClass VnBatchClass; typedef struct _VnBatchClass VnBatchClass;
/**
* VnBatch:
* @objects: (element-type GObject):
**/
struct _VnBatch struct _VnBatch
{ {
GObject parent; SqlBatch parent;
GList * objects;
guint count;
}; };
struct _VnBatchClass struct _VnBatchClass
@ -49,12 +43,4 @@ struct _VnBatchClass
GType vn_batch_get_type (); GType vn_batch_get_type ();
void vn_batch_add (VnBatch * obj
,GObject * child);
void vn_batch_remove (VnBatch * obj
,GObject * child);
const GList * vn_batch_get_objects (VnBatch * obj);
GList * vn_batch_get_objects_list (VnBatch * obj);
guint vn_batch_get_length (VnBatch * obj);
#endif #endif

View File

@ -26,16 +26,10 @@ G_DEFINE_TYPE_WITH_CODE (VnModel, vn_model, DB_TYPE_MODEL,
); );
/* GtkBuildable custom tag implementation: /* GtkBuildable custom tag implementation:
*
* <links> * <links>
* <link field="db.table.field" param="param-id" linked="true"/> * <link field="db.table.field" param="param-id" linked="true"/>
* ... * ...
* </links> * </links>
*
* <batch>
* <holder id="id" param="param-id"/>
* ...
* </batch>
*/ */
typedef struct typedef struct
@ -70,12 +64,6 @@ static void vn_model_start_element (GMarkupParseContext * context,
d->linked = g_slist_prepend (d->linked, GINT_TO_POINTER (b)); d->linked = g_slist_prepend (d->linked, GINT_TO_POINTER (b));
} }
} }
else if (!g_strcmp0 (element, "holder"))
for (i = 0; names[i]; i++)
if (!g_strcmp0 (names[i], "id"))
d->fields = g_slist_prepend (d->fields, g_strdup (values[i]));
else if (!g_strcmp0 (names[i], "param"))
d->params = g_slist_prepend (d->params, g_strdup (values[i]));
} }
static const GMarkupParser vn_model_parser = static const GMarkupParser vn_model_parser =
@ -90,7 +78,7 @@ static gboolean vn_model_buildable_custom_tag_start (GtkBuildable * buildable,
if (child) if (child)
return FALSE; return FALSE;
if (!g_strcmp0 (tag, "links") || !g_strcmp0 (tag, "batch")) if (!g_strcmp0 (tag, "links"))
{ {
VnModelData * data_ptr = g_slice_new (VnModelData); VnModelData * data_ptr = g_slice_new (VnModelData);
data_ptr->builder = builder; data_ptr->builder = builder;
@ -135,30 +123,6 @@ static void vn_model_buildable_custom_finished (GtkBuildable * buildable,
g_slist_free (d->linked); g_slist_free (d->linked);
g_slice_free (VnModelData, d); g_slice_free (VnModelData, d);
} }
else if (!g_strcmp0 (tagname, "batch"))
{
for (f = d->fields, p = d->params;
f && p;
f = f->next, p = p->next)
{
gchar * id = f->data;
GvnParam * param = GVN_PARAM (gtk_builder_get_object (d->builder, p->data));
SqlBatch * batch = db_model_get_batch (d->model);
if (!batch)
{
batch = sql_batch_new ();
sql_batch_add_from_param (batch, id, param);
db_model_set_batch (d->model, batch);
}
else
sql_batch_add_from_param (batch, id, param);
}
g_slist_free_full (d->fields, g_free);
g_slist_free_full (d->params, g_free);
g_slice_free (VnModelData, d);
}
} }
static void vn_model_buildable_set_buildable_property (GtkBuildable * buildable, static void vn_model_buildable_set_buildable_property (GtkBuildable * buildable,
@ -179,10 +143,6 @@ static void vn_model_buildable_set_buildable_property (GtkBuildable * buildable,
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class //+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
static void vn_model_class_init (VnModelClass * klass)
{
}
static void vn_model_buildable_init (GtkBuildableIface * iface) static void vn_model_buildable_init (GtkBuildableIface * iface)
{ {
iface->custom_tag_start = vn_model_buildable_custom_tag_start; iface->custom_tag_start = vn_model_buildable_custom_tag_start;
@ -193,3 +153,13 @@ static void vn_model_buildable_init (GtkBuildableIface * iface)
static void vn_model_init (VnModel * obj) static void vn_model_init (VnModel * obj)
{} {}
static void vn_model_finalize (VnModel * obj)
{
G_OBJECT_CLASS (vn_model_parent_class)->finalize (G_OBJECT (obj));
}
static void vn_model_class_init (VnModelClass * klass)
{
GObjectClass * k = G_OBJECT_CLASS (klass);
k->finalize = (GObjectFinalizeFunc) vn_model_finalize;
}

View File

@ -1,48 +1,48 @@
<interface> <interface>
<requires lib="gtk+" version="3.0"/> <requires lib="gtk+" version="3.0"/>
<menu id='app-menu'> <menu id="app-menu">
<section> <section>
<item> <item>
<attribute name='label' translatable='yes'>New window</attribute> <attribute name="label" translatable="yes">New window</attribute>
<attribute name='action'>app.new-window</attribute> <attribute name="action">app.new-window</attribute>
<attribute name='accel'>&lt;Primary&gt;n</attribute> <attribute name="accel">&lt;Primary&gt;n</attribute>
</item> </item>
</section> </section>
<section> <section>
<item> <item>
<attribute name='label' translatable='yes'>Logout</attribute> <attribute name="label" translatable="yes">Logout</attribute>
<attribute name='action'>app.logout</attribute> <attribute name="action">app.logout</attribute>
<attribute name='accel'>&lt;Primary&gt;&lt;Shift&gt;l</attribute> <attribute name="accel">&lt;Primary&gt;&lt;Shift&gt;l</attribute>
</item> </item>
<item> <item>
<attribute name='label' translatable='yes'>Connect</attribute> <attribute name="label" translatable="yes">Connect</attribute>
<attribute name='action'>app.connect</attribute> <attribute name="action">app.connect</attribute>
<attribute name='accel'>&lt;Primary&gt;l</attribute> <attribute name="accel">&lt;Primary&gt;l</attribute>
</item> </item>
</section> </section>
<section> <section>
<item> <item>
<attribute name='label' translatable='yes'>About</attribute> <attribute name="label" translatable="yes">About</attribute>
<attribute name='action'>app.about</attribute> <attribute name="action">app.about</attribute>
<attribute name='accel'>&lt;Primary&gt;h</attribute> <attribute name="accel">&lt;Primary&gt;h</attribute>
</item> </item>
</section> </section>
<section> <section>
<item> <item>
<attribute name='label' translatable='yes'>Quit</attribute> <attribute name="label" translatable="yes">Quit</attribute>
<attribute name='action'>app.quit</attribute> <attribute name="action">app.quit</attribute>
<attribute name='accel'>&lt;Primary&gt;q</attribute> <attribute name="accel">&lt;Primary&gt;q</attribute>
</item> </item>
</section> </section>
</menu> </menu>
<menu id='win-menu'> <menu id="win-menu">
<section id='modules'> <section id="modules">
</section> </section>
<section> <section>
<item> <item>
<attribute name='label' translatable='yes'>Close</attribute> <attribute name="label" translatable="yes">Close</attribute>
<attribute name='action'>win.close</attribute> <attribute name="action">win.close</attribute>
<attribute name='accel'>&lt;Primary&gt;w</attribute> <attribute name="accel">&lt;Primary&gt;w</attribute>
</item> </item>
</section> </section>
</menu> </menu>

View File

@ -31,7 +31,7 @@ typedef struct _VnFormClass VnFormClass;
#include "vn-gui.h" #include "vn-gui.h"
typedef GType (* VnFormGetTypeFunc) (); typedef GType (* VnFormGetTypeFunc) ();
typedef void (* VnFormOpenFunc) (VnForm * obj, GtkBuilder * builder, gpointer user_data); typedef void (* VnFormOpenFunc) (VnForm * obj);
typedef void (* VnFormActivateFunc) (VnForm * obj); typedef void (* VnFormActivateFunc) (VnForm * obj);
typedef void (* VnFormDeactivateFunc) (VnForm * obj); typedef void (* VnFormDeactivateFunc) (VnForm * obj);