Plugin de galde:

- Añadido editor para SqlBatch del modelo.
	- Se muestran como "internal child" los widgets de los VnField y los cell renderers de los VnColumn.
VnMod:
	- Ahora el fichero de descripción del menú utiliza extensión xml ({nombre-modulo}-menu.xml)
Algunos bugs arreglados
This commit is contained in:
Alejandro T. Colombini Gómez 2014-07-07 17:00:21 +02:00
parent 9e15be3b0c
commit 8fd996579f
32 changed files with 1209 additions and 677 deletions

View File

@ -1,4 +1,5 @@
[+ autogen5 template +]
<!DOCTYPE hedera-module>
<module>
<library translatable="yes" name="[+Name+]">[+ClassName+]</library>
<form-group>

View File

@ -3006,6 +3006,7 @@ typedef enum
,PROP_UPDATE_FLAGS
,PROP_RESULT_POS
,PROP_PARTIAL_DELETE
,PROP_BATCH
}
DbModelProp;
@ -3035,6 +3036,9 @@ static void db_model_set_property (DbModel * self, guint property_id,
case PROP_PARTIAL_DELETE:
self->priv->partial_delete = g_value_get_boolean (value);
break;
case PROP_BATCH:
db_model_set_batch (self, g_value_get_object (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (self, property_id, pspec);
}
@ -3069,6 +3073,9 @@ static void db_model_get_property (DbModel * self, guint property_id,
case PROP_PARTIAL_DELETE:
g_value_set_boolean (value, self->priv->partial_delete);
break;
case PROP_BATCH:
g_value_set_object (value, self->priv->batch);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (self, property_id, pspec);
}
@ -3345,6 +3352,14 @@ static void db_model_class_init (DbModelClass *k)
,FALSE
,G_PARAM_READWRITE
));
g_object_class_install_property (klass, PROP_BATCH,
g_param_spec_object ("batch"
,_("Batch")
,_("The batch assigned to the model")
,SQL_TYPE_BATCH
,G_PARAM_READWRITE
));
}
GType db_model_update_flags_get_type ()

View File

@ -23,9 +23,9 @@ static void glade_model_editor_add_eprop (GladeModelEditor * obj,
GladeWidgetAdaptor * adaptor, const gchar * name, const gchar * tooltip)
{
GtkWidget * frame, * alignment, * vbox;
GladeEditorProperty * eprop =
glade_widget_adaptor_create_eprop_by_name (adaptor, name, FALSE, TRUE);
obj->props = g_list_prepend (obj->props, eprop);
frame = gtk_frame_new (NULL);
@ -62,7 +62,7 @@ GtkWidget * glade_model_editor_new (GladeWidgetAdaptor * adaptor,
_("List of parameters linked to the model"));
glade_model_editor_add_eprop (obj, adaptor, "batch",
_("List of SQLHolders and identifiers"));
_("List of SqlHolders and identifiers"));
gtk_widget_show_all (GTK_WIDGET (obj));
return GTK_WIDGET (obj);

View File

@ -215,8 +215,7 @@ static void glade_eprop_sql_finalize (GObject * object)
GObjectClass * parent_class = g_type_class_peek_parent (G_OBJECT_GET_CLASS (object));
G_OBJECT_CLASS (parent_class)->finalize (object);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Links Editor Property
//++++++++++++++++++++++++++++ Structure and prototypes for Links and Batch
typedef struct
{
@ -225,7 +224,19 @@ typedef struct
GtkTreeView * view;
gchar * path;
}
GladeEPropLinks;
GladeListEProp;
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)
#define GLADE_TYPE_EPROP_LINKS (glade_eprop_links_get_type ())
@ -237,66 +248,171 @@ GLADE_MAKE_EPROP (GladeEPropLinks, glade_eprop_links)
enum
{
FIELD_COL
,PARAM_COL
,LINKED_COL
,N_COLS
LINKS_FIELD_COL
,LINKS_PARAM_COL
,LINKS_LINKED_COL
,LINKS_N_COLS
};
static void glade_eprop_links_on_param_col_clicked (GtkEntry * entry,
GtkEntryIconPosition icon_pos, GdkEvent * event, GladeEditorProperty * eprop)
static void linked_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
GtkTreeModel * model, GtkTreeIter * iter, gpointer data)
{
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;
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 = GLADE_EPROP_LINKS (eprop)->path;
GladeDbList * 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, 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);
}
gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, LINKS_LINKED_COL, &val, -1);
gtk_list_store_set (store, &iter, LINKS_LINKED_COL, !val, -1);
}
static gboolean glade_eprop_links_on_param_key_pressed (GtkEntry * entry,
GdkEventKey * event, GladeEditorProperty * eprop)
static GtkWidget * glade_eprop_links_create_input (GladeEditorProperty * eprop)
{
if (event->keyval == GDK_KEY_Return)
{
glade_eprop_links_on_param_col_clicked (entry, 0, NULL, eprop);
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 = ((GladeDbList *) g_value_get_boxed (glade_property_inline_value (p)))->list;
GtkCellRenderer * cell;
GtkTreeViewColumn * column;
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
GtkWidget * box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
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;
glade_list_eprop_create_input ((GladeListEProp *) obj, box,
_("<b>Add or remove links</b>"));
cell = gtk_cell_renderer_text_new ();
g_object_set (cell, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes (_("Column"), cell,
"text", LINKS_FIELD_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);
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)
{
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)
{
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_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)
{
GladeWidget * param;
gtk_tree_model_get (model, iter, PARAM_COL, &param, -1);
gint col = GLADE_IS_EPROP_LINKS (data) ? LINKS_PARAM_COL : BATCH_PARAM_COL;
gtk_tree_model_get (model, iter, col, &param, -1);
if (param)
g_object_set (cell, "text", glade_widget_get_name (param), NULL);
@ -304,10 +420,61 @@ void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
g_object_set (cell, "text", "", NULL);
}
static void glade_eporp_links_on_param_col_editing_started (GtkCellRendererText * cell,
static void glade_list_eprop_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 = ((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)
{
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
GladeListEProp * obj = (GladeListEProp *) eprop;
if (GTK_IS_ENTRY (entry))
{
@ -336,9 +503,9 @@ static void glade_eporp_links_on_param_col_editing_started (GtkCellRendererText
obj->path = g_strdup (path);
g_signal_connect (entry, "icon-press",
G_CALLBACK (glade_eprop_links_on_param_col_clicked), eprop);
G_CALLBACK (glade_list_eprop_on_param_col_clicked), eprop);
g_signal_connect (entry, "key-press-event",
G_CALLBACK (glade_eprop_links_on_param_key_pressed), eprop);
G_CALLBACK (glade_list_eprop_on_param_key_pressed), eprop);
}
else
{
@ -355,42 +522,32 @@ static void glade_eporp_links_on_param_col_editing_started (GtkCellRendererText
}
}
static void glade_eporp_links_on_field_col_edited (GtkCellRendererText * cell,
static void glade_list_eprop_add_param_column (GladeListEProp * obj)
{
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)
{
GtkTreeIter iter;
gint col = GLADE_IS_EPROP_LINKS (eprop) ? LINKS_FIELD_COL : BATCH_ID_COL;
GladeProperty * p = glade_editor_property_get_property (eprop);
GladeDbList * 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))
return;
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);
GladeDbList * 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);
gtk_list_store_set (store, &iter, col, text, -1);
}
static void glade_widget_on_remove_widget (GladeProject * project,
@ -404,18 +561,18 @@ static void glade_widget_on_remove_widget (GladeProject * project,
if (gtk_tree_model_get_iter_first (m, &iter))
do
{
gint col = 1; // XXX LINKS_PARAM_COL and BATCH_PARAM_COL
GladeWidget * param;
gtk_tree_model_get (m, &iter, PARAM_COL, &param, -1);
gtk_tree_model_get (m, &iter, col, &param, -1);
if (param == widget)
gtk_list_store_set (store, &iter, PARAM_COL, NULL, -1);
gtk_list_store_set (store, &iter, col, NULL, -1);
}
while (gtk_tree_model_iter_next (m, &iter));
}
}
static void glade_eporp_links_on_add_clicked (GtkButton * button,
GladeEPropLinks * obj)
static void glade_list_eprop_on_add_clicked (GtkButton * button, GladeListEProp * obj)
{
GtkTreeIter iter;
GtkTreePath * path;
@ -424,10 +581,16 @@ static void glade_eporp_links_on_add_clicked (GtkButton * button,
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 (GladeDbList, 1);
list->list = gtk_list_store_new (N_COLS,
G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
if (GLADE_IS_EPROP_LINKS (obj))
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);
g_signal_connect (glade_widget_get_project (glade_property_get_widget (p)),
@ -447,8 +610,8 @@ static void glade_eporp_links_on_add_clicked (GtkButton * button,
gtk_tree_path_free (path);
}
static void glade_eporp_links_on_remove_clicked (GtkButton * button,
GladeEPropLinks * obj)
static void glade_list_eprop_on_remove_clicked (GtkButton * button,
GladeListEProp * obj)
{
GtkTreeIter iter;
GtkListStore * store;
@ -472,34 +635,31 @@ static void glade_eporp_links_on_remove_clicked (GtkButton * button,
}
}
static gboolean glade_eprop_links_on_view_key_press (GtkWidget * treeview,
GdkEventKey * event, GladeEPropLinks * obj)
static gboolean glade_list_eprop_on_view_key_press (GtkWidget * treeview,
GdkEventKey * event, GladeListEProp * obj)
{
if (event->keyval == GDK_KEY_Delete)
{
glade_eporp_links_on_remove_clicked (NULL, obj);
glade_list_eprop_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_links_on_add_clicked (NULL, obj);
glade_list_eprop_on_add_clicked (NULL, obj);
return TRUE;
}
return FALSE;
}
static GtkWidget * glade_eprop_links_create_input (GladeEditorProperty * eprop)
static void glade_list_eprop_create_input (GladeListEProp * obj, GtkWidget * box,
gchar * string)
{
GtkCellRenderer * cell;
GtkTreeViewColumn * column;
GladeEPropLinks * obj = GLADE_EPROP_LINKS (eprop);
GtkWidget * scroll, * button, * label,
* hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4),
* box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
* hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
label = gtk_label_new (_("<b>Add or remove links</b>"));
label = gtk_label_new (string);
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);
@ -507,16 +667,14 @@ static GtkWidget * glade_eprop_links_create_input (GladeEditorProperty * eprop)
button = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (button),
gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_BUTTON));
g_signal_connect (button, "clicked",
G_CALLBACK (glade_eporp_links_on_add_clicked), obj);
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);
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", GTK_ICON_SIZE_BUTTON));
g_signal_connect (button, "clicked",
G_CALLBACK (glade_eporp_links_on_remove_clicked), obj);
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);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (box), hbox, FALSE, FALSE, 0);
@ -528,111 +686,30 @@ static GtkWidget * glade_eprop_links_create_input (GladeEditorProperty * eprop)
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_links_on_view_key_press), obj);
g_signal_connect (obj->view, "key-press-event", G_CALLBACK (glade_list_eprop_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 (_("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)
{
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
/*
TODO Implementar!
typedef struct
{
GladeEditorProperty parent;
GtkTreeView * view;
gchar * path;
}
GladeEPropBatch;
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_links_create_input (GladeEditorProperty * eprop)
{}
static void glade_eprop_links_finalize (GObject * object)
{}
static void glade_eprop_links_load (GladeEditorProperty * eprop, GladeProperty * property)
{}
*/
//++++++++++++++++++++++++++++++++++++++++++++++++++ DbModel Widget Adaptor
GladeEditorProperty * glade_db_model_create_eprop (GladeWidgetAdaptor * adaptor,
GladePropertyClass * klass, gboolean use_command)
{
GladeEditorProperty * eprop;
GParamSpec * pspec = glade_property_class_get_pspec (klass);
const gchar * prop_id = glade_property_class_id (klass);
if (!g_strcmp0 (pspec->name, "sql"))
if (!g_strcmp0 (prop_id, "sql"))
eprop = g_object_new (GLADE_TYPE_EPROP_SQL,
"property-class", klass,
"use-command", use_command, NULL);
else if (pspec->value_type == GLADE_TYPE_DB_LIST)
// TODO Encontrar una forma de diferenciar entre "Links" y "Batch"
else if (!g_strcmp0 (prop_id, "links"))
eprop = g_object_new (GLADE_TYPE_EPROP_LINKS,
"property-class", klass,
"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
eprop = GWA_GET_CLASS (G_TYPE_OBJECT)->create_eprop (adaptor,
klass, use_command);
@ -656,9 +733,8 @@ void glade_db_model_write_widget (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlContext * context, GladeXmlNode * node)
{
GtkTreeIter iter;
GladeDbList * l;
GtkTreeModel * m;
GladeXmlNode * links_node;
GladeDbList * l;
GladeProperty * prop;
if (!glade_xml_node_verify (node, GLADE_XML_TAG_WIDGET))
@ -671,51 +747,93 @@ void glade_db_model_write_widget (GladeWidgetAdaptor * adaptor,
glade_property_write (prop, context, node);
GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
//FIXME
prop = glade_widget_get_property (widget, "links");
// Custom tag for the "links" property, e.g.:
// <links>
// <link field="table.name" param="param1" linked="TRUE"/>
// </links>
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;
links_node = glade_xml_node_new (context, "links");
do
if ((l = g_value_get_boxed (glade_property_inline_value (prop))))
{
gchar * field;
GladeWidget * param;
gboolean linked;
GladeXmlNode * link_node;
m = GTK_TREE_MODEL (l->list);
gtk_tree_model_get (m, &iter
,FIELD_COL, &field
,PARAM_COL, &param
,LINKED_COL, &linked
, -1);
if (gtk_tree_model_get_iter_first (m, &iter))
{
GladeXmlNode * links_node = glade_xml_node_new (context, "links");
link_node = glade_xml_node_new (context, "link");
glade_xml_node_append_child (links_node, link_node);
glade_xml_node_set_property_string (link_node, "field",
field ? field : "");
glade_xml_node_set_property_string (link_node, "param",
param ? glade_widget_get_name (param) : "");
glade_xml_node_set_property_boolean (link_node, "linked", linked);
do
{
gchar * field;
GladeWidget * param;
gboolean linked;
GladeXmlNode * link_node;
g_free (field);
gtk_tree_model_get (m, &iter
,LINKS_FIELD_COL, &field
,LINKS_PARAM_COL, &param
,LINKS_LINKED_COL, &linked
, -1);
link_node = glade_xml_node_new (context, "link");
glade_xml_node_append_child (links_node, link_node);
glade_xml_node_set_property_string (link_node,
"field", field ? field : "");
glade_xml_node_set_property_string (link_node, "param",
param ? glade_widget_get_name (param) : "");
glade_xml_node_set_property_boolean (link_node, "linked", linked);
g_free (field);
}
while (gtk_tree_model_iter_next (m, &iter));
if (!glade_xml_node_get_children (links_node))
glade_xml_node_delete (links_node);
else
glade_xml_node_append_child (node, links_node);
}
}
while (gtk_tree_model_iter_next (m, &iter));
prop = glade_widget_get_property (widget, "batch");
// Custom tag for the "links" 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 (!glade_xml_node_get_children (links_node))
glade_xml_node_delete (links_node);
else
glade_xml_node_append_child (node, links_node);
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
@ -729,8 +847,9 @@ ParseData;
void glade_db_model_on_parse_finished (GladeProject * p, ParseData * pd)
{
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);
gtk_tree_iter_free (pd->iter);
@ -741,7 +860,7 @@ void glade_db_model_on_parse_finished (GladeProject * p, ParseData * pd)
void glade_db_model_read_widget (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlNode * node)
{
GladeXmlNode * links_node;
GladeXmlNode * prop_node;
GladeProperty * prop;
GladeProject * proj;
GladeDbList * list;
@ -752,51 +871,99 @@ void glade_db_model_read_widget (GladeWidgetAdaptor * adaptor,
GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
if ((links_node = glade_xml_search_child (node, "links")) == NULL)
return;
proj = glade_widget_get_project (widget);
list = g_new (GladeDbList, 1);
store = gtk_list_store_new (N_COLS, G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
list->list = store;
for (links_node = glade_xml_node_get_children (links_node); links_node;
links_node = glade_xml_node_next (links_node))
if ((prop_node = glade_xml_search_child (node, "links")))
{
GtkTreeIter iter;
gint col = PARAM_COL;
gchar * field = glade_xml_get_property_string (links_node, "field"),
* param_name = glade_xml_get_property_string (links_node, "param");
gboolean linked = glade_xml_get_property_boolean (links_node, "linked", TRUE);
GladeWidget * param = glade_project_get_widget_by_name (proj, param_name);
GladeXmlNode * links_node = prop_node;
proj = glade_widget_get_project (widget);
list = g_new (GladeDbList, 1);
store = gtk_list_store_new (LINKS_N_COLS, G_TYPE_STRING, GLADE_TYPE_WIDGET, G_TYPE_BOOLEAN);
list->list = store;
gtk_list_store_append (store, &iter);
if (!param)
for (links_node = glade_xml_node_get_children (links_node); links_node;
links_node = glade_xml_node_next (links_node))
{
// 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);
GtkTreeIter iter;
gint col = LINKS_PARAM_COL;
gchar * field = glade_xml_get_property_string (links_node, "field"),
* param_name = glade_xml_get_property_string (links_node, "param");
gboolean linked = glade_xml_get_property_boolean (links_node, "linked", TRUE);
GladeWidget * param = glade_project_get_widget_by_name (proj, param_name);
g_signal_connect (proj, "parse-finished",
G_CALLBACK (glade_db_model_on_parse_finished), pd);
gtk_list_store_append (store, &iter);
col = -1;
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
,LINKS_FIELD_COL, field
,LINKS_LINKED_COL, linked
,col, param
,-1);
g_free (field);
g_free (param_name);
}
gtk_list_store_set (store, &iter
,FIELD_COL, field
,LINKED_COL, linked
,col, param
,-1);
g_free (field);
g_free (param_name);
prop = glade_widget_get_property (widget, "links");
glade_property_set (prop, list);
}
prop = glade_widget_get_property (widget, "links");
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);
}
}

View File

@ -81,8 +81,7 @@ static GladeWidget * glade_model_create (GladeProperty * prop)
{
batch_w = glade_command_create
(glade_widget_adaptor_get_by_type (VN_TYPE_BATCH), NULL, NULL, project);
glade_widget_set_name (batch_w,
glade_project_new_widget_name (project, batch_w, "models"));
glade_widget_set_name (batch_w, "models");
}
else
batch_w = glade_widget_get_from_gobject (batch);
@ -349,4 +348,4 @@ void glade_db_model_action_activate (GladeWidgetAdaptor * adaptor,
{
glade_eprop_model_show_dialog (NULL,
(GObject *) glade_widget_get_from_gobject (model));
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2012 - Juan Ferrer Toribio
* 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

View File

@ -17,6 +17,18 @@
#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)
{
GList * l, * catalogs = glade_app_get_catalogs (),

View File

@ -32,6 +32,12 @@
<value-type>GladeDbList</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>
</property>
</properties>
<create-editor-property-function>glade_db_model_create_eprop</create-editor-property-function>
<create-editable-function>glade_db_model_create_editable</create-editable-function>
@ -88,6 +94,13 @@
<glade-widget-class name="VnGrid" generic-name="grid" title="Grid" icon-name="widget-gtk-treeview"/>
<glade-widget-class name="VnColumn" title="Column">
<internal-children>
<object name="cell"/>
</internal-children>
<get-internal-child-function>glade_vn_column_get_internal_child</get-internal-child-function>
</glade-widget-class>
<glade-widget-class name="VnColumnCheck" generic-name="column-check" title="Column Check" icon-name="widget-gtk-cellrenderertoggle"/>
<glade-widget-class name="VnColumnEntry" generic-name="column-entry" title="Column Entry" icon-name="widget-gtk-cellrenderertext"/>
@ -129,7 +142,13 @@
</properties>
</glade-widget-class>
<glade-widget-class name="VnField" title="Field"/>
<glade-widget-class name="VnField" title="Field">
<internal-children>
<object name="widget"/>
</internal-children>
<get-internal-child-function>glade_vn_field_get_internal_child</get-internal-child-function>
</glade-widget-class>
<glade-widget-class name="VnCombo" generic-name="combo" title="Combo Box Field" icon-name="widget-gtk-combobox">
<properties>
<property id="model" ignore="True">

View File

@ -4,9 +4,9 @@ exampledir = $(module_datadir)
example_DATA = \
example.xml \
example-menu.glade \
example-menu.xml \
consulter.glade \
consulter-menu.glade
consulter-menu.xml
# customer.glade
# signer.glade

View File

@ -13,4 +13,3 @@
</item>
</menu>
</interface>

View File

@ -1,11 +0,0 @@
<interface>
<requires lib="gtk+" version="3.0"/>
<menu id='menu'>
<item>
<attribute name='label' translatable='yes'>Consulter</attribute>
<attribute name='action'>win.open-consulter</attribute>
<attribute name='accel'>F1</attribute>
</item>
</menu>
</interface>

View File

@ -0,0 +1,18 @@
<interface>
<requires lib="gtk+" version="3.0"/>
<menu id='menu'>
<section>
<item>
<attribute name='label' translatable='yes'>Consulter</attribute>
<attribute name='action'>win.open-consulter</attribute>
<attribute name='accel'>F1</attribute>
</item>
</section>
<section>
<item>
<attribute name='label' translatable='yes'>Consulter action</attribute>
<attribute name='action'>win.example-action</attribute>
</item>
</section>
</menu>
</interface>

View File

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hedera-module>
<module>
<library translatable="yes" name="example">Example</library>
<!-- <action-group>-->
<!-- <action-->
<!-- translatable="yes"-->
<!-- name="action-menu-example">Example</action>-->
<!-- </action-group>-->
<form-group>
<form
translatable="yes"
@ -14,4 +9,3 @@
action-name="open-consulter">Consulter</form>
</form-group>
</module>

View File

@ -61,7 +61,7 @@ glade/glade-db-iterator.c
[type: gettext/glade]glade/vn.xml
[type: gettext/glade]module/data/example.xml
module/data/example-menu.glade
[type: gettext/glade]module/data/example-menu.xml
module/data/consulter.glade
module/data/consulter-menu.glade
[type: gettext/glade]module/data/consulter-menu.xml
module/src/vn-consulter.c

198
po/ca.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-25 16:41+0200\n"
"POT-Creation-Date: 2014-07-07 15:57+0200\n"
"PO-Revision-Date: 2013-06-04 13:38+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Catalan\n"
@ -31,7 +31,7 @@ msgstr "El parametre no pot ser nul"
msgid "Incompatible type for this param"
msgstr "Tipus incompatible per a aquest parametre"
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:538
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:573
msgid "Value"
msgstr ""
@ -71,15 +71,15 @@ msgstr ""
msgid "The spec of the parameter"
msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:566
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:601
msgid "Glib Type"
msgstr ""
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:567
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:602
msgid "The type of the value"
msgstr ""
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:573 ../vn/vn-column.c:467
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:608 ../vn/vn-column.c:504
msgid "Editable"
msgstr ""
@ -87,7 +87,7 @@ msgstr ""
msgid "Whether the param value can be modified"
msgstr ""
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:580 ../vn/vn-column.c:474
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:615 ../vn/vn-column.c:511
msgid "Null"
msgstr ""
@ -95,11 +95,11 @@ msgstr ""
msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr ""
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:587
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:622
msgid "Default Value"
msgstr ""
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:588
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:623
msgid "The default value"
msgstr ""
@ -124,7 +124,7 @@ msgstr ""
msgid "The character used for delimite the name of fields, tables..."
msgstr ""
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:546
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:530
msgid "Param"
msgstr ""
@ -136,7 +136,7 @@ msgstr ""
msgid "The value"
msgstr ""
#: ../sql/sql-string.c:188 ../db/db-model.c:3304 ../db/db-request.c:449
#: ../sql/sql-string.c:188 ../db/db-model.c:3311 ../db/db-request.c:449
msgid "SQL"
msgstr ""
@ -212,7 +212,7 @@ msgstr ""
msgid "The function parameters"
msgstr ""
#: ../sql/sql-holder.c:124
#: ../sql/sql-holder.c:124 ../glade/glade-db-model.c:369
msgid "Identifier"
msgstr ""
@ -342,75 +342,83 @@ msgstr "Recordar"
msgid "Wether to rememeber the selection when model is refreshed"
msgstr ""
#: ../db/db-model.c:3278 ../db/db-request.c:442 ../vn/vn-gui.c:1443
#: ../db/db-model.c:3285 ../db/db-request.c:442 ../vn/vn-gui.c:1560
#: ../vn/vn-form.c:245
msgid "Connection"
msgstr ""
#: ../db/db-model.c:3279
#: ../db/db-model.c:3286
msgid "The DbConn that manages the connection to the database"
msgstr ""
#: ../db/db-model.c:3286
#: ../db/db-model.c:3293
msgid "Statement"
msgstr ""
#: ../db/db-model.c:3287
#: ../db/db-model.c:3294
msgid "The statement which retrieves the data"
msgstr ""
#: ../db/db-model.c:3294
#: ../db/db-model.c:3301
msgid "Use file"
msgstr ""
#: ../db/db-model.c:3295
#: ../db/db-model.c:3302
msgid ""
"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"
msgstr ""
#: ../db/db-model.c:3305
#: ../db/db-model.c:3312
msgid ""
"Depending on the \"use-file\" property this will be the path to a file with "
"queries for the model or a SQL string"
msgstr ""
#: ../db/db-model.c:3314
#: ../db/db-model.c:3321
msgid "Main Table"
msgstr ""
#: ../db/db-model.c:3315
#: ../db/db-model.c:3322
msgid "The main table of the model"
msgstr ""
#: ../db/db-model.c:3322
#: ../db/db-model.c:3329
msgid "Update flags"
msgstr ""
#: ../db/db-model.c:3323
#: ../db/db-model.c:3330
msgid "The flags that indicate how a model can be modified"
msgstr ""
#: ../db/db-model.c:3331
#: ../db/db-model.c:3338
msgid "Result position"
msgstr ""
#: ../db/db-model.c:3332
#: ../db/db-model.c:3339
msgid ""
"The position where the query that will fill the model will be placed in a "
"multi-query"
msgstr ""
#: ../db/db-model.c:3342
#: ../db/db-model.c:3349
msgid "Partial delete"
msgstr ""
#: ../db/db-model.c:3343
#: ../db/db-model.c:3350
msgid ""
"When a row is deleted set all the fields from the table to null rather than "
"delete it."
msgstr ""
#: ../db/db-model.c:3358
msgid "Batch"
msgstr ""
#: ../db/db-model.c:3359
msgid "The batch assigned to the model"
msgstr ""
#: ../db/db-model-holder.c:71 ../db/db-calc.c:329
msgid "Model"
msgstr ""
@ -447,7 +455,7 @@ msgstr ""
msgid "The user provided data for the function"
msgstr ""
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:537
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:293
msgid "Column"
msgstr ""
@ -455,7 +463,7 @@ msgstr ""
msgid "A column to apply the operations over it"
msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:552
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:587
msgid "Iterator"
msgstr ""
@ -463,7 +471,7 @@ msgstr ""
msgid "The iterator owner of param"
msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:453
#: ../db/db-param.c:258 ../vn/vn-column.c:490
msgid "Column index"
msgstr ""
@ -471,11 +479,11 @@ msgstr ""
msgid "The referenced column index"
msgstr ""
#: ../db/db-param.c:265 ../vn/vn-field.c:559 ../vn/vn-column.c:460
#: ../db/db-param.c:265 ../vn/vn-field.c:594 ../vn/vn-column.c:497
msgid "Column name"
msgstr "Nom de la columna"
#: ../db/db-param.c:266 ../vn/vn-column.c:461
#: ../db/db-param.c:266 ../vn/vn-column.c:498
msgid "The referenced column name"
msgstr "Nom de la columna referenciada"
@ -609,59 +617,59 @@ msgstr ""
msgid "The maximal size for the contents of the cache directory"
msgstr ""
#: ../vn/vn-gui.c:516
#: ../vn/vn-gui.c:632
msgid "Connection has been lost. Do you want to reconnect?"
msgstr ""
#: ../vn/vn-gui.c:523
#: ../vn/vn-gui.c:639
msgid "An error occurred in the connection."
msgstr ""
#: ../vn/vn-gui.c:526
#: ../vn/vn-gui.c:642
msgid "Database error"
msgstr ""
#: ../vn/vn-gui.c:533
#: ../vn/vn-gui.c:649
msgid "Unknown error"
msgstr ""
#: ../vn/vn-gui.c:880
#: ../vn/vn-gui.c:998
msgid "Closing connection"
msgstr ""
#: ../vn/vn-gui.c:882
#: ../vn/vn-gui.c:1000
msgid "Transaction started"
msgstr ""
#: ../vn/vn-gui.c:884
#: ../vn/vn-gui.c:1002
msgid "Connecting"
msgstr ""
#: ../vn/vn-gui.c:886
#: ../vn/vn-gui.c:1004
msgid "Connection lost"
msgstr ""
#: ../vn/vn-gui.c:888
#: ../vn/vn-gui.c:1006
msgid "Connection closed"
msgstr ""
#: ../vn/vn-gui.c:890 ../vn/field/vn-http-image.c:116
#: ../vn/vn-gui.c:1008 ../vn/field/vn-http-image.c:119
msgid "Loading"
msgstr ""
#: ../vn/vn-gui.c:892
#: ../vn/vn-gui.c:1010
msgid "Ready"
msgstr ""
#: ../vn/vn-gui.c:1444
#: ../vn/vn-gui.c:1561
msgid "The connection used by Gui"
msgstr ""
#: ../vn/vn-gui.c:1450
#: ../vn/vn-gui.c:1567
msgid "Application"
msgstr ""
#: ../vn/vn-gui.c:1451
#: ../vn/vn-gui.c:1568
msgid "The application handler for the entire program"
msgstr ""
@ -766,48 +774,48 @@ msgstr ""
msgid "Bad connection settings, please check it."
msgstr ""
#: ../vn/vn-login.c:484
#: ../vn/vn-login.c:489
msgid "Application id"
msgstr ""
#: ../vn/vn-login.c:485
#: ../vn/vn-login.c:490
msgid "The application identifier"
msgstr ""
#: ../vn/vn-field.c:539
#: ../vn/vn-field.c:574
msgid "The current value of the field"
msgstr ""
#: ../vn/vn-field.c:545 ../glade/glade-db-iterator.c:71
#: ../vn/vn-field.c:580 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116
msgid "Parameter"
msgstr ""
#: ../vn/vn-field.c:546
#: ../vn/vn-field.c:581
msgid "The param where the field can read/write its value"
msgstr ""
#: ../vn/vn-field.c:553
#: ../vn/vn-field.c:588
msgid "The iterator used to get the field param"
msgstr ""
#: ../vn/vn-field.c:560
#: ../vn/vn-field.c:595
msgid "The column name on the iterator"
msgstr ""
#: ../vn/vn-field.c:574
#: ../vn/vn-field.c:609
msgid "Whether the field value is user editable"
msgstr ""
#: ../vn/vn-field.c:581 ../vn/vn-column.c:475
#: ../vn/vn-field.c:616 ../vn/vn-column.c:512
msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr ""
#: ../vn/vn-field.c:594 ../vn/vn-column.c:488
#: ../vn/vn-field.c:629 ../vn/vn-column.c:525
msgid "Style function"
msgstr ""
#: ../vn/vn-field.c:595
#: ../vn/vn-field.c:630
msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr ""
@ -893,57 +901,57 @@ msgstr ""
msgid "Undefined error"
msgstr ""
#: ../vn/field/vn-http-image.c:142
#: ../vn/field/vn-http-image.c:145
msgid "File loader already set"
msgstr ""
#. Se usará para subir imagenes y cambiar nombres, o abrir un menu contextual
#. g_signal_connect (obj, "event", G_CALLBACK (vn_http_image_cb_event), obj);
#: ../vn/field/vn-http-image.c:181
#: ../vn/field/vn-http-image.c:184
msgid "No image set"
msgstr ""
#: ../vn/field/vn-http-image.c:207 ../vn/column/vn-column-image.c:531
#: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:531
msgid "File loader"
msgstr ""
#: ../vn/field/vn-http-image.c:208
#: ../vn/field/vn-http-image.c:212
msgid "A DbFileLoader, used to download the files"
msgstr ""
#: ../vn/field/vn-http-image.c:215
#: ../vn/field/vn-http-image.c:219
msgid "File path"
msgstr ""
#: ../vn/field/vn-http-image.c:216
#: ../vn/field/vn-http-image.c:220
msgid "The relative path to the image from file loader path"
msgstr ""
#: ../vn/field/vn-http-image.c:223
#: ../vn/field/vn-http-image.c:227
msgid "Image bytes"
msgstr ""
#: ../vn/field/vn-http-image.c:224
#: ../vn/field/vn-http-image.c:228
msgid "A GBytes structure with the image data"
msgstr ""
#: ../vn/vn-column.c:454
#: ../vn/vn-column.c:491
msgid "The column index in the model"
msgstr ""
#: ../vn/vn-column.c:468
#: ../vn/vn-column.c:505
msgid "Whether the column values are editable"
msgstr ""
#: ../vn/vn-column.c:481
#: ../vn/vn-column.c:518
msgid "Tab index"
msgstr ""
#: ../vn/vn-column.c:482
#: ../vn/vn-column.c:519
msgid "Order in which the tab selects the columns for edition"
msgstr ""
#: ../vn/vn-column.c:489
#: ../vn/vn-column.c:526
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
@ -1094,12 +1102,12 @@ msgid ""
msgstr ""
#: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:72
#: ../glade/glade-eprop-model.c:164
#: ../glade/glade-eprop-model.c:163
msgid "OK"
msgstr ""
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73
#: ../glade/glade-eprop-model.c:165
#: ../glade/glade-eprop-model.c:164
msgid "Clear"
msgstr ""
@ -1115,7 +1123,7 @@ msgstr ""
msgid "SQL Editor"
msgstr ""
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:166
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:165
msgid "Cancel"
msgstr ""
@ -1123,56 +1131,60 @@ msgstr ""
msgid "Open the SQL Editor"
msgstr ""
#: ../glade/glade-db-model.c:262
msgid "Select a GvnParam"
msgstr ""
#: ../glade/glade-db-model.c:330
msgid "Select the parameter from a list"
msgstr ""
#: ../glade/glade-db-model.c:348
msgid "You need to create at least one GvnParam or derived object"
msgstr ""
#: ../glade/glade-db-model.c:502
#: ../glade/glade-db-model.c:289
msgid "<b>Add or remove links</b>"
msgstr ""
#: ../glade/glade-db-model.c:554
#: ../glade/glade-db-model.c:303
msgctxt "Verb"
msgid "Link"
msgstr ""
#: ../glade/glade-db-model.c:365
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"
msgstr ""
#: ../glade/glade-db-model-editor.c:65
msgid "List of SQLHolders and identifiers"
msgid "List of SqlHolders and identifiers"
msgstr ""
#: ../glade/glade-eprop-model.c:129
#: ../glade/glade-eprop-model.c:128
msgid "Create and set a model for a DbModelHolder"
msgstr ""
#: ../glade/glade-eprop-model.c:161
#: ../glade/glade-eprop-model.c:160
msgid "Model configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:161
#: ../glade/glade-eprop-model.c:160
msgid "Model properties configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:244
#: ../glade/glade-eprop-model.c:243
msgid "Select a VnModel for the property"
msgstr ""
#: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
#: ../glade/glade-eprop-model.c:264 ../glade/glade-eprop-model.c:310
msgid "New Model"
msgstr ""
#: ../glade/glade-eprop-model.c:306
#: ../glade/glade-eprop-model.c:305
msgid "Edit Model"
msgstr ""

202
po/es.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-25 16:41+0200\n"
"POT-Creation-Date: 2014-07-07 15:57+0200\n"
"PO-Revision-Date: 2013-06-04 13:36+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Spanish\n"
@ -33,7 +33,7 @@ msgstr "El parámetro no puede ser nulo"
msgid "Incompatible type for this param"
msgstr "Tipo incompatible para este parametro"
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:538
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:573
msgid "Value"
msgstr "Valor"
@ -73,15 +73,15 @@ msgstr "Spec"
msgid "The spec of the parameter"
msgstr "Datos específicos del parámetro"
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:566
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:601
msgid "Glib Type"
msgstr "Tipo Glib"
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:567
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:602
msgid "The type of the value"
msgstr "El tipo del valor"
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:573 ../vn/vn-column.c:467
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:608 ../vn/vn-column.c:504
msgid "Editable"
msgstr "Editable"
@ -89,7 +89,7 @@ msgstr "Editable"
msgid "Whether the param value can be modified"
msgstr "Indica si el parámetro puede modificarse"
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:580 ../vn/vn-column.c:474
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:615 ../vn/vn-column.c:511
msgid "Null"
msgstr "Nulo"
@ -97,11 +97,11 @@ msgstr "Nulo"
msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "Indica si el parámetro puede ser nulo"
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:587
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:622
msgid "Default Value"
msgstr "Valor por defecto"
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:588
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:623
msgid "The default value"
msgstr "El valor por defecto"
@ -126,7 +126,7 @@ msgstr "Delimitador"
msgid "The character used for delimite the name of fields, tables..."
msgstr "El carácter usado para delimitar los nombres de campos, tablas..."
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:546
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:530
msgid "Param"
msgstr "Parámetro"
@ -138,7 +138,7 @@ msgstr "El parametro al cual está vinculado"
msgid "The value"
msgstr "Valor"
#: ../sql/sql-string.c:188 ../db/db-model.c:3304 ../db/db-request.c:449
#: ../sql/sql-string.c:188 ../db/db-model.c:3311 ../db/db-request.c:449
msgid "SQL"
msgstr "SQL"
@ -210,7 +210,7 @@ msgstr "Parámetros"
msgid "The function parameters"
msgstr "Los parametros de la función"
#: ../sql/sql-holder.c:124
#: ../sql/sql-holder.c:124 ../glade/glade-db-model.c:369
msgid "Identifier"
msgstr "Identificador"
@ -340,28 +340,28 @@ msgid "Wether to rememeber the selection when model is refreshed"
msgstr ""
"Si se recordará o no la fila seleccionado cuando se refresque el modelo"
#: ../db/db-model.c:3278 ../db/db-request.c:442 ../vn/vn-gui.c:1443
#: ../db/db-model.c:3285 ../db/db-request.c:442 ../vn/vn-gui.c:1560
#: ../vn/vn-form.c:245
msgid "Connection"
msgstr "Conexión"
#: ../db/db-model.c:3279
#: ../db/db-model.c:3286
msgid "The DbConn that manages the connection to the database"
msgstr "La DbConn que controla la conexión a la base de datos"
#: ../db/db-model.c:3286
#: ../db/db-model.c:3293
msgid "Statement"
msgstr "Consulta"
#: ../db/db-model.c:3287
#: ../db/db-model.c:3294
msgid "The statement which retrieves the data"
msgstr "La consulta que recupera los datos"
#: ../db/db-model.c:3294
#: ../db/db-model.c:3301
msgid "Use file"
msgstr "Usa fichero"
#: ../db/db-model.c:3295
#: ../db/db-model.c:3302
msgid ""
"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"
@ -369,7 +369,7 @@ msgstr ""
"Si es TRUE, la propiedad \"sql\" contiene el nombre de un archivo, si es "
"falso, \"sql\" se usa como una cadena SQL"
#: ../db/db-model.c:3305
#: ../db/db-model.c:3312
msgid ""
"Depending on the \"use-file\" property this will be the path to a file with "
"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 "
"fichero con consultas para el modelo o una cadena SQL"
#: ../db/db-model.c:3314
#: ../db/db-model.c:3321
msgid "Main Table"
msgstr "Tabla principal"
#: ../db/db-model.c:3315
#: ../db/db-model.c:3322
msgid "The main table of the model"
msgstr "La tabla principal del modelo"
#: ../db/db-model.c:3322
#: ../db/db-model.c:3329
msgid "Update flags"
msgstr "Flags de actualización"
#: ../db/db-model.c:3323
#: ../db/db-model.c:3330
msgid "The flags that indicate how a model can be modified"
msgstr "Indican como se puede modificar el modelo"
#: ../db/db-model.c:3331
#: ../db/db-model.c:3338
msgid "Result position"
msgstr "Posición del resultado"
#: ../db/db-model.c:3332
#: ../db/db-model.c:3339
msgid ""
"The position where the query that will fill the model will be placed in a "
"multi-query"
@ -405,11 +405,11 @@ msgstr ""
"La posición en la que se situa la consulta que pone datos en el modelo en "
"una consulta múltiple"
#: ../db/db-model.c:3342
#: ../db/db-model.c:3349
msgid "Partial delete"
msgstr "Delete parcial"
#: ../db/db-model.c:3343
#: ../db/db-model.c:3350
msgid ""
"When a row is deleted set all the fields from the table to null rather than "
"delete it."
@ -417,6 +417,14 @@ msgstr ""
"Cuando una fila es eliminada, poner todos los campos de la tabla a nulo en "
"lugar de borrarla."
#: ../db/db-model.c:3358
msgid "Batch"
msgstr "Batch"
#: ../db/db-model.c:3359
msgid "The batch assigned to the model"
msgstr "El batch asignado al modelo"
#: ../db/db-model-holder.c:71 ../db/db-calc.c:329
msgid "Model"
msgstr "Modelo"
@ -453,7 +461,7 @@ msgstr "Datos"
msgid "The user provided data for the function"
msgstr "Datos proporcionados por el usuario"
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:537
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:293
msgid "Column"
msgstr "Columna"
@ -461,7 +469,7 @@ msgstr "Columna"
msgid "A column to apply the operations over it"
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:552
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:587
msgid "Iterator"
msgstr "Iterator"
@ -469,7 +477,7 @@ msgstr "Iterator"
msgid "The iterator owner of param"
msgstr "El Iterator dueño del parámetro"
#: ../db/db-param.c:258 ../vn/vn-column.c:453
#: ../db/db-param.c:258 ../vn/vn-column.c:490
msgid "Column index"
msgstr "Posición"
@ -477,11 +485,11 @@ msgstr "Posición"
msgid "The referenced column index"
msgstr "La posición de la columna en el Grid"
#: ../db/db-param.c:265 ../vn/vn-field.c:559 ../vn/vn-column.c:460
#: ../db/db-param.c:265 ../vn/vn-field.c:594 ../vn/vn-column.c:497
msgid "Column name"
msgstr "Nombre de la columna"
#: ../db/db-param.c:266 ../vn/vn-column.c:461
#: ../db/db-param.c:266 ../vn/vn-column.c:498
msgid "The referenced column name"
msgstr ""
"El nombre del campo en el Iterator vinculado al Grid al que pretenece la "
@ -619,59 +627,59 @@ msgstr "Tamaño máximo de la caché"
msgid "The maximal size for the contents of the cache directory"
msgstr "El tamaño máximo para los contenidos del directorio de caché"
#: ../vn/vn-gui.c:516
#: ../vn/vn-gui.c:632
msgid "Connection has been lost. Do you want to reconnect?"
msgstr "Se ha perdido la conexión. ¿Quieres reconectar?"
#: ../vn/vn-gui.c:523
#: ../vn/vn-gui.c:639
msgid "An error occurred in the connection."
msgstr "Ha habido un error en la conexión."
#: ../vn/vn-gui.c:526
#: ../vn/vn-gui.c:642
msgid "Database error"
msgstr "Error en la base de datos"
#: ../vn/vn-gui.c:533
#: ../vn/vn-gui.c:649
msgid "Unknown error"
msgstr "Error desconocido"
#: ../vn/vn-gui.c:880
#: ../vn/vn-gui.c:998
msgid "Closing connection"
msgstr "Cerrando conexión"
#: ../vn/vn-gui.c:882
#: ../vn/vn-gui.c:1000
msgid "Transaction started"
msgstr "Transacción iniciada"
#: ../vn/vn-gui.c:884
#: ../vn/vn-gui.c:1002
msgid "Connecting"
msgstr "Conectando"
#: ../vn/vn-gui.c:886
#: ../vn/vn-gui.c:1004
msgid "Connection lost"
msgstr "Conexión perdida"
#: ../vn/vn-gui.c:888
#: ../vn/vn-gui.c:1006
msgid "Connection closed"
msgstr "Conexión cerrada"
#: ../vn/vn-gui.c:890 ../vn/field/vn-http-image.c:116
#: ../vn/vn-gui.c:1008 ../vn/field/vn-http-image.c:119
msgid "Loading"
msgstr "Cargando"
#: ../vn/vn-gui.c:892
#: ../vn/vn-gui.c:1010
msgid "Ready"
msgstr "Listo"
msgstr "Preparado"
#: ../vn/vn-gui.c:1444
#: ../vn/vn-gui.c:1561
msgid "The connection used by Gui"
msgstr "La conexión empleada por Gui"
#: ../vn/vn-gui.c:1450
#: ../vn/vn-gui.c:1567
msgid "Application"
msgstr "Aplicación"
#: ../vn/vn-gui.c:1451
#: ../vn/vn-gui.c:1568
msgid "The application handler for the entire program"
msgstr "El manejador de la aplicación para todo el programa"
@ -776,48 +784,48 @@ msgstr "Error de acceso"
msgid "Bad connection settings, please check it."
msgstr "Los parámetros de la conexión son incorrectos, compruébelos por favor."
#: ../vn/vn-login.c:484
#: ../vn/vn-login.c:489
msgid "Application id"
msgstr "Id de la aplicación"
#: ../vn/vn-login.c:485
#: ../vn/vn-login.c:490
msgid "The application identifier"
msgstr "El identificador de la aplicación"
#: ../vn/vn-field.c:539
#: ../vn/vn-field.c:574
msgid "The current value of the field"
msgstr "El valor actual del campo"
#: ../vn/vn-field.c:545 ../glade/glade-db-iterator.c:71
#: ../vn/vn-field.c:580 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116
msgid "Parameter"
msgstr "Parámetro"
#: ../vn/vn-field.c:546
#: ../vn/vn-field.c:581
msgid "The param where the field can read/write its value"
msgstr "El parámetro en el que el campo escribe/lee su valor"
#: ../vn/vn-field.c:553
#: ../vn/vn-field.c:588
msgid "The iterator used to get the field param"
msgstr "El Iterator con el que se obtiene el parámetro"
#: ../vn/vn-field.c:560
#: ../vn/vn-field.c:595
msgid "The column name on the iterator"
msgstr "El nombre de la columna en el Iterator"
#: ../vn/vn-field.c:574
#: ../vn/vn-field.c:609
msgid "Whether the field value is user editable"
msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-field.c:581 ../vn/vn-column.c:475
#: ../vn/vn-field.c:616 ../vn/vn-column.c:512
msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "Si el campo puede ser del tipo GVN_TYPE_NULL"
#: ../vn/vn-field.c:594 ../vn/vn-column.c:488
#: ../vn/vn-field.c:629 ../vn/vn-column.c:525
msgid "Style function"
msgstr "Función de estilo"
#: ../vn/vn-field.c:595
#: ../vn/vn-field.c:630
msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr ""
@ -908,57 +916,57 @@ msgstr "Selecciona la imagen"
msgid "Undefined error"
msgstr "Error indefinido"
#: ../vn/field/vn-http-image.c:142
#: ../vn/field/vn-http-image.c:145
msgid "File loader already set"
msgstr "Ya se ha especificado un cargador de archivos"
#. Se usará para subir imagenes y cambiar nombres, o abrir un menu contextual
#. g_signal_connect (obj, "event", G_CALLBACK (vn_http_image_cb_event), obj);
#: ../vn/field/vn-http-image.c:181
#: ../vn/field/vn-http-image.c:184
msgid "No image set"
msgstr "Sin imagen"
#: ../vn/field/vn-http-image.c:207 ../vn/column/vn-column-image.c:531
#: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:531
msgid "File loader"
msgstr "Cargador de archivos"
#: ../vn/field/vn-http-image.c:208
#: ../vn/field/vn-http-image.c:212
msgid "A DbFileLoader, used to download the files"
msgstr "Un DbFileLoader que se usará para descargar los archivos"
#: ../vn/field/vn-http-image.c:215
#: ../vn/field/vn-http-image.c:219
msgid "File path"
msgstr "Ruta del archivo"
#: ../vn/field/vn-http-image.c:216
#: ../vn/field/vn-http-image.c:220
msgid "The relative path to the image from file loader path"
msgstr "La ruta relativa a la imagen desde la del cargador de archivos"
#: ../vn/field/vn-http-image.c:223
#: ../vn/field/vn-http-image.c:227
msgid "Image bytes"
msgstr "Bytes"
#: ../vn/field/vn-http-image.c:224
#: ../vn/field/vn-http-image.c:228
msgid "A GBytes structure with the image data"
msgstr "Una estructura GBytes con los datos de la imágen"
#: ../vn/vn-column.c:454
#: ../vn/vn-column.c:491
msgid "The column index in the model"
msgstr "El índice de la columna en el modelo"
#: ../vn/vn-column.c:468
#: ../vn/vn-column.c:505
msgid "Whether the column values are editable"
msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-column.c:481
#: ../vn/vn-column.c:518
msgid "Tab index"
msgstr "Tab index"
#: ../vn/vn-column.c:482
#: ../vn/vn-column.c:519
msgid "Order in which the tab selects the columns for edition"
msgstr "Orden en el cual el tabulador selecciona las columnas para editar"
#: ../vn/vn-column.c:489
#: ../vn/vn-column.c:526
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
@ -1131,12 +1139,12 @@ msgstr ""
"02111-1307 USA."
#: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:72
#: ../glade/glade-eprop-model.c:164
#: ../glade/glade-eprop-model.c:163
msgid "OK"
msgstr "OK"
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73
#: ../glade/glade-eprop-model.c:165
#: ../glade/glade-eprop-model.c:164
msgid "Clear"
msgstr "Limpiar"
@ -1152,7 +1160,7 @@ msgstr "Nueva consulta SQL"
msgid "SQL Editor"
msgstr "Editor SQL"
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:166
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:165
msgid "Cancel"
msgstr "Cancelar"
@ -1160,56 +1168,60 @@ msgstr "Cancelar"
msgid "Open the SQL Editor"
msgstr "Abrir el Editor SQL"
#: ../glade/glade-db-model.c:262
msgid "Select a GvnParam"
msgstr "Elige un GvnParam"
#: ../glade/glade-db-model.c:330
msgid "Select the parameter from a list"
msgstr "Eligir un parametro de una lista"
#: ../glade/glade-db-model.c:348
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:502
#: ../glade/glade-db-model.c:289
msgid "<b>Add or remove links</b>"
msgstr "<b>Añadir o quitar enlaces</b>"
#: ../glade/glade-db-model.c:554
#: ../glade/glade-db-model.c:303
msgctxt "Verb"
msgid "Link"
msgstr "Enlazar"
#: ../glade/glade-db-model.c:365
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"
msgstr "Lista de parámetros vinculados al modelo"
#: ../glade/glade-db-model-editor.c:65
msgid "List of SQLHolders and identifiers"
msgstr "Lista de SQLHolders e identificadores"
msgid "List of SqlHolders and identifiers"
msgstr "Lista de SqlHolders e identificadores"
#: ../glade/glade-eprop-model.c:129
#: ../glade/glade-eprop-model.c:128
msgid "Create and set a model for a DbModelHolder"
msgstr "Crear y poner el modelo a un DbModelHolder"
#: ../glade/glade-eprop-model.c:161
#: ../glade/glade-eprop-model.c:160
msgid "Model configuration"
msgstr "Configuración del modelo"
#: ../glade/glade-eprop-model.c:161
#: ../glade/glade-eprop-model.c:160
msgid "Model properties configuration"
msgstr "Configuración de propiedades del modelo"
#: ../glade/glade-eprop-model.c:244
#: ../glade/glade-eprop-model.c:243
msgid "Select a VnModel for the property"
msgstr "Elige un VnModel para la propiedad"
#: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
#: ../glade/glade-eprop-model.c:264 ../glade/glade-eprop-model.c:310
msgid "New Model"
msgstr "Nuevo Modelo"
#: ../glade/glade-eprop-model.c:306
#: ../glade/glade-eprop-model.c:305
msgid "Edit Model"
msgstr "Editar Modelo"

198
po/nl.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-25 16:41+0200\n"
"POT-Creation-Date: 2014-07-07 15:57+0200\n"
"PO-Revision-Date: 2012-10-09 11:38+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Dutch\n"
@ -33,7 +33,7 @@ msgstr ""
msgid "Incompatible type for this param"
msgstr ""
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:538
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:252 ../vn/vn-field.c:573
msgid "Value"
msgstr ""
@ -73,15 +73,15 @@ msgstr ""
msgid "The spec of the parameter"
msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:566
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:601
msgid "Glib Type"
msgstr ""
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:567
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:602
msgid "The type of the value"
msgstr ""
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:573 ../vn/vn-column.c:467
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:608 ../vn/vn-column.c:504
msgid "Editable"
msgstr ""
@ -89,7 +89,7 @@ msgstr ""
msgid "Whether the param value can be modified"
msgstr ""
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:580 ../vn/vn-column.c:474
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:615 ../vn/vn-column.c:511
msgid "Null"
msgstr ""
@ -97,11 +97,11 @@ msgstr ""
msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr ""
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:587
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:622
msgid "Default Value"
msgstr ""
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:588
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:623
msgid "The default value"
msgstr ""
@ -126,7 +126,7 @@ msgstr ""
msgid "The character used for delimite the name of fields, tables..."
msgstr ""
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:546
#: ../sql/sql-value.c:245 ../glade/glade-db-model.c:530
msgid "Param"
msgstr ""
@ -138,7 +138,7 @@ msgstr ""
msgid "The value"
msgstr ""
#: ../sql/sql-string.c:188 ../db/db-model.c:3304 ../db/db-request.c:449
#: ../sql/sql-string.c:188 ../db/db-model.c:3311 ../db/db-request.c:449
msgid "SQL"
msgstr ""
@ -210,7 +210,7 @@ msgstr ""
msgid "The function parameters"
msgstr ""
#: ../sql/sql-holder.c:124
#: ../sql/sql-holder.c:124 ../glade/glade-db-model.c:369
msgid "Identifier"
msgstr ""
@ -339,75 +339,83 @@ msgstr ""
msgid "Wether to rememeber the selection when model is refreshed"
msgstr ""
#: ../db/db-model.c:3278 ../db/db-request.c:442 ../vn/vn-gui.c:1443
#: ../db/db-model.c:3285 ../db/db-request.c:442 ../vn/vn-gui.c:1560
#: ../vn/vn-form.c:245
msgid "Connection"
msgstr ""
#: ../db/db-model.c:3279
#: ../db/db-model.c:3286
msgid "The DbConn that manages the connection to the database"
msgstr ""
#: ../db/db-model.c:3286
#: ../db/db-model.c:3293
msgid "Statement"
msgstr ""
#: ../db/db-model.c:3287
#: ../db/db-model.c:3294
msgid "The statement which retrieves the data"
msgstr ""
#: ../db/db-model.c:3294
#: ../db/db-model.c:3301
msgid "Use file"
msgstr ""
#: ../db/db-model.c:3295
#: ../db/db-model.c:3302
msgid ""
"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"
msgstr ""
#: ../db/db-model.c:3305
#: ../db/db-model.c:3312
msgid ""
"Depending on the \"use-file\" property this will be the path to a file with "
"queries for the model or a SQL string"
msgstr ""
#: ../db/db-model.c:3314
#: ../db/db-model.c:3321
msgid "Main Table"
msgstr ""
#: ../db/db-model.c:3315
#: ../db/db-model.c:3322
msgid "The main table of the model"
msgstr ""
#: ../db/db-model.c:3322
#: ../db/db-model.c:3329
msgid "Update flags"
msgstr ""
#: ../db/db-model.c:3323
#: ../db/db-model.c:3330
msgid "The flags that indicate how a model can be modified"
msgstr ""
#: ../db/db-model.c:3331
#: ../db/db-model.c:3338
msgid "Result position"
msgstr ""
#: ../db/db-model.c:3332
#: ../db/db-model.c:3339
msgid ""
"The position where the query that will fill the model will be placed in a "
"multi-query"
msgstr ""
#: ../db/db-model.c:3342
#: ../db/db-model.c:3349
msgid "Partial delete"
msgstr ""
#: ../db/db-model.c:3343
#: ../db/db-model.c:3350
msgid ""
"When a row is deleted set all the fields from the table to null rather than "
"delete it."
msgstr ""
#: ../db/db-model.c:3358
msgid "Batch"
msgstr ""
#: ../db/db-model.c:3359
msgid "The batch assigned to the model"
msgstr ""
#: ../db/db-model-holder.c:71 ../db/db-calc.c:329
msgid "Model"
msgstr ""
@ -444,7 +452,7 @@ msgstr ""
msgid "The user provided data for the function"
msgstr ""
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:537
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:293
msgid "Column"
msgstr ""
@ -452,7 +460,7 @@ msgstr ""
msgid "A column to apply the operations over it"
msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:552
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:587
msgid "Iterator"
msgstr ""
@ -460,7 +468,7 @@ msgstr ""
msgid "The iterator owner of param"
msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:453
#: ../db/db-param.c:258 ../vn/vn-column.c:490
msgid "Column index"
msgstr ""
@ -468,11 +476,11 @@ msgstr ""
msgid "The referenced column index"
msgstr ""
#: ../db/db-param.c:265 ../vn/vn-field.c:559 ../vn/vn-column.c:460
#: ../db/db-param.c:265 ../vn/vn-field.c:594 ../vn/vn-column.c:497
msgid "Column name"
msgstr ""
#: ../db/db-param.c:266 ../vn/vn-column.c:461
#: ../db/db-param.c:266 ../vn/vn-column.c:498
msgid "The referenced column name"
msgstr ""
@ -606,59 +614,59 @@ msgstr ""
msgid "The maximal size for the contents of the cache directory"
msgstr ""
#: ../vn/vn-gui.c:516
#: ../vn/vn-gui.c:632
msgid "Connection has been lost. Do you want to reconnect?"
msgstr ""
#: ../vn/vn-gui.c:523
#: ../vn/vn-gui.c:639
msgid "An error occurred in the connection."
msgstr ""
#: ../vn/vn-gui.c:526
#: ../vn/vn-gui.c:642
msgid "Database error"
msgstr ""
#: ../vn/vn-gui.c:533
#: ../vn/vn-gui.c:649
msgid "Unknown error"
msgstr ""
#: ../vn/vn-gui.c:880
#: ../vn/vn-gui.c:998
msgid "Closing connection"
msgstr ""
#: ../vn/vn-gui.c:882
#: ../vn/vn-gui.c:1000
msgid "Transaction started"
msgstr ""
#: ../vn/vn-gui.c:884
#: ../vn/vn-gui.c:1002
msgid "Connecting"
msgstr ""
#: ../vn/vn-gui.c:886
#: ../vn/vn-gui.c:1004
msgid "Connection lost"
msgstr ""
#: ../vn/vn-gui.c:888
#: ../vn/vn-gui.c:1006
msgid "Connection closed"
msgstr ""
#: ../vn/vn-gui.c:890 ../vn/field/vn-http-image.c:116
#: ../vn/vn-gui.c:1008 ../vn/field/vn-http-image.c:119
msgid "Loading"
msgstr ""
#: ../vn/vn-gui.c:892
#: ../vn/vn-gui.c:1010
msgid "Ready"
msgstr ""
#: ../vn/vn-gui.c:1444
#: ../vn/vn-gui.c:1561
msgid "The connection used by Gui"
msgstr ""
#: ../vn/vn-gui.c:1450
#: ../vn/vn-gui.c:1567
msgid "Application"
msgstr ""
#: ../vn/vn-gui.c:1451
#: ../vn/vn-gui.c:1568
msgid "The application handler for the entire program"
msgstr ""
@ -763,48 +771,48 @@ msgstr ""
msgid "Bad connection settings, please check it."
msgstr ""
#: ../vn/vn-login.c:484
#: ../vn/vn-login.c:489
msgid "Application id"
msgstr ""
#: ../vn/vn-login.c:485
#: ../vn/vn-login.c:490
msgid "The application identifier"
msgstr ""
#: ../vn/vn-field.c:539
#: ../vn/vn-field.c:574
msgid "The current value of the field"
msgstr ""
#: ../vn/vn-field.c:545 ../glade/glade-db-iterator.c:71
#: ../vn/vn-field.c:580 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116
msgid "Parameter"
msgstr ""
#: ../vn/vn-field.c:546
#: ../vn/vn-field.c:581
msgid "The param where the field can read/write its value"
msgstr ""
#: ../vn/vn-field.c:553
#: ../vn/vn-field.c:588
msgid "The iterator used to get the field param"
msgstr ""
#: ../vn/vn-field.c:560
#: ../vn/vn-field.c:595
msgid "The column name on the iterator"
msgstr ""
#: ../vn/vn-field.c:574
#: ../vn/vn-field.c:609
msgid "Whether the field value is user editable"
msgstr ""
#: ../vn/vn-field.c:581 ../vn/vn-column.c:475
#: ../vn/vn-field.c:616 ../vn/vn-column.c:512
msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr ""
#: ../vn/vn-field.c:594 ../vn/vn-column.c:488
#: ../vn/vn-field.c:629 ../vn/vn-column.c:525
msgid "Style function"
msgstr ""
#: ../vn/vn-field.c:595
#: ../vn/vn-field.c:630
msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr ""
@ -890,57 +898,57 @@ msgstr ""
msgid "Undefined error"
msgstr ""
#: ../vn/field/vn-http-image.c:142
#: ../vn/field/vn-http-image.c:145
msgid "File loader already set"
msgstr ""
#. Se usará para subir imagenes y cambiar nombres, o abrir un menu contextual
#. g_signal_connect (obj, "event", G_CALLBACK (vn_http_image_cb_event), obj);
#: ../vn/field/vn-http-image.c:181
#: ../vn/field/vn-http-image.c:184
msgid "No image set"
msgstr ""
#: ../vn/field/vn-http-image.c:207 ../vn/column/vn-column-image.c:531
#: ../vn/field/vn-http-image.c:211 ../vn/column/vn-column-image.c:531
msgid "File loader"
msgstr ""
#: ../vn/field/vn-http-image.c:208
#: ../vn/field/vn-http-image.c:212
msgid "A DbFileLoader, used to download the files"
msgstr ""
#: ../vn/field/vn-http-image.c:215
#: ../vn/field/vn-http-image.c:219
msgid "File path"
msgstr ""
#: ../vn/field/vn-http-image.c:216
#: ../vn/field/vn-http-image.c:220
msgid "The relative path to the image from file loader path"
msgstr ""
#: ../vn/field/vn-http-image.c:223
#: ../vn/field/vn-http-image.c:227
msgid "Image bytes"
msgstr ""
#: ../vn/field/vn-http-image.c:224
#: ../vn/field/vn-http-image.c:228
msgid "A GBytes structure with the image data"
msgstr ""
#: ../vn/vn-column.c:454
#: ../vn/vn-column.c:491
msgid "The column index in the model"
msgstr ""
#: ../vn/vn-column.c:468
#: ../vn/vn-column.c:505
msgid "Whether the column values are editable"
msgstr ""
#: ../vn/vn-column.c:481
#: ../vn/vn-column.c:518
msgid "Tab index"
msgstr ""
#: ../vn/vn-column.c:482
#: ../vn/vn-column.c:519
msgid "Order in which the tab selects the columns for edition"
msgstr ""
#: ../vn/vn-column.c:489
#: ../vn/vn-column.c:526
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
@ -1090,12 +1098,12 @@ msgid ""
msgstr ""
#: ../vn/gui/date-chooser.glade.h:1 ../glade/glade-db-model.c:72
#: ../glade/glade-eprop-model.c:164
#: ../glade/glade-eprop-model.c:163
msgid "OK"
msgstr ""
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73
#: ../glade/glade-eprop-model.c:165
#: ../glade/glade-eprop-model.c:164
msgid "Clear"
msgstr ""
@ -1111,7 +1119,7 @@ msgstr ""
msgid "SQL Editor"
msgstr ""
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:166
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:165
msgid "Cancel"
msgstr ""
@ -1119,56 +1127,60 @@ msgstr ""
msgid "Open the SQL Editor"
msgstr ""
#: ../glade/glade-db-model.c:262
msgid "Select a GvnParam"
msgstr ""
#: ../glade/glade-db-model.c:330
msgid "Select the parameter from a list"
msgstr ""
#: ../glade/glade-db-model.c:348
msgid "You need to create at least one GvnParam or derived object"
msgstr ""
#: ../glade/glade-db-model.c:502
#: ../glade/glade-db-model.c:289
msgid "<b>Add or remove links</b>"
msgstr ""
#: ../glade/glade-db-model.c:554
#: ../glade/glade-db-model.c:303
msgctxt "Verb"
msgid "Link"
msgstr ""
#: ../glade/glade-db-model.c:365
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"
msgstr ""
#: ../glade/glade-db-model-editor.c:65
msgid "List of SQLHolders and identifiers"
msgid "List of SqlHolders and identifiers"
msgstr ""
#: ../glade/glade-eprop-model.c:129
#: ../glade/glade-eprop-model.c:128
msgid "Create and set a model for a DbModelHolder"
msgstr ""
#: ../glade/glade-eprop-model.c:161
#: ../glade/glade-eprop-model.c:160
msgid "Model configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:161
#: ../glade/glade-eprop-model.c:160
msgid "Model properties configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:244
#: ../glade/glade-eprop-model.c:243
msgid "Select a VnModel for the property"
msgstr ""
#: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
#: ../glade/glade-eprop-model.c:264 ../glade/glade-eprop-model.c:310
msgid "New Model"
msgstr ""
#: ../glade/glade-eprop-model.c:306
#: ../glade/glade-eprop-model.c:305
msgid "Edit Model"
msgstr ""

View File

@ -254,7 +254,7 @@ static void vn_date_chooser_on_toggled (GtkToggleButton * button, VnDateChooser
GtkAllocation allocation;
GtkWidget * widget = GTK_WIDGET (button);
// Set the date on the calendar
// Set the date/time on the calendar
if (obj->datetime)
{

View File

@ -67,10 +67,11 @@ VnField * vn_http_image_new (DbFileLoader * loader, const gchar * name)
static void vn_http_image_cb_error (VnHttpImage * obj, const GError * error)
{
gchar * e = error ? error->message : _("Undefined error");
gchar * msg = error ? error->message : _("Undefined error");
const gchar * name = g_value_get_string (vn_field_get_value (VN_FIELD (obj)));
g_warning ("VnHttpImage (%s%s): %s", obj->priv->path, name, e);
SET_ICON ("missing-image", e);
g_warning ("VnHttpImage (%s%s): %s", obj->priv->path, name, msg);
SET_ICON ("missing-image", msg);
g_object_unref (obj);
}
static void vn_http_image_cb_download
@ -102,6 +103,8 @@ static void vn_http_image_cb_download
g_object_unref (loader);
}
g_object_unref (obj);
}
/*
static void vn_http_image_cb_upload
@ -115,7 +118,7 @@ static void vn_http_image_set_value (VnHttpImage * obj, const GValue * value)
SET_ICON ("view-refresh", _("Loading"));
db_file_loader_download (obj->priv->loader, full_path,
(DbFileLoaderCallbackFunc) vn_http_image_cb_download, obj);
(DbFileLoaderCallbackFunc) vn_http_image_cb_download, g_object_ref (obj));
g_free (full_path);
}
@ -175,7 +178,7 @@ static void vn_http_image_init (VnHttpImage * obj)
obj->priv->path = g_strdup ("");
obj->priv->loader = NULL;
obj->priv->image = GTK_IMAGE (gtk_image_new ());
obj->priv->image = g_object_ref_sink (GTK_IMAGE (gtk_image_new ()));
//Se usará para subir imagenes y cambiar nombres, o abrir un menu contextual
// g_signal_connect (obj, "event", G_CALLBACK (vn_http_image_cb_event), obj);
SET_ICON ("missing-image", _("No image set"));
@ -189,6 +192,7 @@ static void vn_http_image_finalize (VnHttpImage * obj)
g_clear_object (&obj->priv->loader);
g_free (obj->priv->path);
g_bytes_unref (obj->priv->bytes);
g_object_unref (obj->priv->image);
G_OBJECT_CLASS (vn_http_image_parent_class)->finalize (G_OBJECT (obj));
}

View File

@ -52,16 +52,23 @@ static void vn_model_start_element (GMarkupParseContext * context,
guint i;
VnModelData * d = data;
for (i = 0; names[i]; i++)
if (!g_strcmp0 (names[i], "field"))
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]));
else if (!g_strcmp0 (names[i], "linked"))
{
gboolean b = values[i] && !g_strcmp0 (values[i], "True") ? TRUE : FALSE;
d->linked = g_slist_prepend (d->linked, GINT_TO_POINTER (b));
}
if (!g_strcmp0 (element, "link"))
for (i = 0; names[i]; i++)
if (!g_strcmp0 (names[i], "field"))
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]));
else if (!g_strcmp0 (names[i], "linked"))
{
gboolean b = values[i] && !g_strcmp0 (values[i], "True") ? TRUE : FALSE;
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 =
@ -76,14 +83,14 @@ static gboolean vn_model_buildable_custom_tag_start (GtkBuildable * buildable,
if (child)
return FALSE;
if (!g_strcmp0 (tag, "links"))
if (!g_strcmp0 (tag, "links") || !g_strcmp0 (tag, "batch"))
{
VnModelData * data_ptr = g_slice_new (VnModelData);
data_ptr->builder = builder;
data_ptr->model = DB_MODEL (buildable);
data_ptr->fields = NULL;
data_ptr->params = NULL;
data_ptr->linked = NULL;
data_ptr->linked = FALSE;
*data = data_ptr;
*parser = vn_model_parser;
@ -103,31 +110,61 @@ static void vn_model_buildable_custom_finished (GtkBuildable * buildable,
g_return_if_fail (d->builder);
if (g_strcmp0 (tagname, "links"))
return;
d->fields = g_slist_reverse (d->fields);
d->params = g_slist_reverse (d->params);
d->linked = g_slist_reverse (d->linked);
for (f = d->fields, p = d->params, l = d->linked;
f && p && l;
f = f->next, p = p->next, l = l->next)
if (!g_strcmp0 (tagname, "links"))
{
gchar * field = f->data;
gboolean linked = GPOINTER_TO_INT (l->data);
GvnParam * param = GVN_PARAM (gtk_builder_get_object (d->builder, p->data));
d->fields = g_slist_reverse (d->fields);
d->params = g_slist_reverse (d->params);
d->linked = g_slist_reverse (d->linked);
db_model_set_default_value_from_param (d->model, field, param, linked);
for (f = d->fields, p = d->params, l = d->linked;
f && p && l;
f = f->next, p = p->next, l = l->next)
{
gchar * field = f->data;
gboolean linked = GPOINTER_TO_INT (l->data);
GvnParam * param = GVN_PARAM (gtk_builder_get_object (d->builder, p->data));
g_free (f->data);
g_free (p->data);
db_model_set_default_value_from_param (d->model, field, param, linked);
g_free (f->data);
g_free (p->data);
}
g_slist_free (d->fields);
g_slist_free (d->params);
g_slist_free (d->linked);
g_slice_free (VnModelData, d);
}
else if (!g_strcmp0 (tagname, "batch"))
{
d->fields = g_slist_reverse (d->fields);
d->params = g_slist_reverse (d->params);
g_slist_free (d->fields);
g_slist_free (d->params);
g_slist_free (d->linked);
g_slice_free (VnModelData, d);
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_free (f->data);
g_free (p->data);
}
g_slist_free (d->fields);
g_slist_free (d->params);
g_slice_free (VnModelData, d);
}
}
static void vn_model_buildable_set_buildable_property (GtkBuildable * buildable,

View File

@ -1,17 +1,17 @@
<!ELEMENT module (library|action-group|form-group)* >
<!ELEMENT library (#PCDATA) >
<!ELEMENT action-group (action)* >
<!ELEMENT action (#PCDATA) >
<!ELEMENT form-group (form)* >
<!ELEMENT form (#PCDATA) >
<!ELEMENT module (library|action-group|form-group)*>
<!ELEMENT library (#PCDATA)>
<!ELEMENT action-group (action)*>
<!ELEMENT action EMPTY>
<!ELEMENT form-group (form)*>
<!ELEMENT form (#PCDATA)>
<!ATTLIST library
translatable (yes|no) #IMPLIED
name CDATA #REQUIRED
>
<!ATTLIST action
translatable (yes|no) #IMPLIED
name CDATA #REQUIRED
activate CDATA #REQUIRED
>
<!ATTLIST form
translatable (yes|no) #IMPLIED

View File

@ -18,7 +18,12 @@
#include "vn-column.h"
#include "vn-grid.h"
G_DEFINE_ABSTRACT_TYPE (VnColumn, vn_column, GTK_TYPE_TREE_VIEW_COLUMN);
static void vn_column_buildable_init (GtkBuildableIface * iface);
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (VnColumn, vn_column, GTK_TYPE_TREE_VIEW_COLUMN,
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
vn_column_buildable_init)
);
static GdkRGBA vn_column_red;
static GdkRGBA vn_column_green;
@ -352,6 +357,34 @@ void vn_column_model_changed (VnColumn * obj)
klass->model_changed (obj);
}
/**
* vn_column_get_cell_renderer:
* @obj: a #VnColumn
*
* Retrieves the cell renderer used by the column.
*
* Return value: (transfer none): a #GtkCellRenderer
**/
GtkCellRenderer * vn_column_get_cell_renderer (VnColumn * obj)
{
g_return_if_fail (VN_IS_COLUMN (obj));
return obj->cell;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Buildable
static GtkBuildableIface * parent_buildable_iface;
static GObject * vn_column_buildable_get_internal_child (GtkBuildable * buildable,
GtkBuilder * builder, const gchar * childname)
{
if (!g_strcmp0 (childname, "cell"))
return G_OBJECT (vn_column_get_cell_renderer (VN_COLUMN (buildable)));
return parent_buildable_iface->get_internal_child (buildable, builder, childname);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Properties
enum
@ -422,6 +455,7 @@ static void vn_column_get_property (VnColumn * obj, guint id,
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
static void vn_column_init (VnColumn * obj)
{
obj->column_index = -1;
@ -435,6 +469,12 @@ static void vn_column_finalize (VnColumn * obj)
G_OBJECT_CLASS (vn_column_parent_class)->finalize (G_OBJECT (obj));
}
static void vn_column_buildable_init (GtkBuildableIface * iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
iface->get_internal_child = vn_column_buildable_get_internal_child;
}
static void vn_column_class_init (VnColumnClass * klass)
{
GObjectClass * k = G_OBJECT_CLASS (klass);

View File

@ -80,5 +80,6 @@ void vn_column_set_tab_index (VnColumn * obj, gint tab_index);
DbModel * vn_column_get_model (VnColumn * obj);
gboolean vn_column_get_iter (VnColumn * obj, const gchar * path, DbIter * iter);
void vn_column_model_changed (VnColumn * obj);
GtkCellRenderer * vn_column_get_cell_renderer (VnColumn * obj);
#endif

View File

@ -17,7 +17,12 @@
#include "vn-field.h"
G_DEFINE_ABSTRACT_TYPE (VnField, vn_field, GTK_TYPE_EVENT_BOX);
static void vn_field_buildable_init (GtkBuildableIface * iface);
G_DEFINE_ABSTRACT_TYPE_WITH_CODE (VnField, vn_field, GTK_TYPE_EVENT_BOX,
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
vn_field_buildable_init)
);
enum {
VALUE_CHANGED
@ -393,6 +398,33 @@ void vn_field_set_to_default (VnField * obj)
gvn_param_spec_get_default (obj->spec));
}
/**
* vn_field_get_widget:
* @obj: the #VnField
*
* Gets the internal widget of @obj.
*
* Return value: (transfer none): the widget
**/
GtkWidget * vn_field_get_widget (VnField * obj)
{
g_return_if_fail (VN_IS_FIELD (obj));
return obj->field;
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Buildable
static GtkBuildableIface *parent_buildable_iface;
static GObject * vn_field_buildable_get_internal_child (GtkBuildable * buildable,
GtkBuilder * builder, const gchar * childname)
{
if (!g_strcmp0 (childname, "widget"))
return G_OBJECT (vn_field_get_widget (VN_FIELD (buildable)));
return parent_buildable_iface->get_internal_child (buildable, builder, childname);
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Properties
enum
@ -520,6 +552,12 @@ static void vn_field_finalize (VnField * obj)
G_OBJECT_CLASS (vn_field_parent_class)->finalize (G_OBJECT (obj));
}
static void vn_field_buildable_init (GtkBuildableIface * iface)
{
parent_buildable_iface = g_type_interface_peek_parent (iface);
iface->get_internal_child = vn_field_buildable_get_internal_child;
}
static void vn_field_class_init (VnFieldClass * klass)
{
GObjectClass * k = G_OBJECT_CLASS (klass);

View File

@ -73,5 +73,6 @@ void vn_field_set_editable (VnField * obj, gboolean editable);
const GValue * vn_field_get_default (VnField * obj);
void vn_field_set_default (VnField * obj, const GValue * def);
void vn_field_set_to_default (VnField * obj);
GtkWidget * vn_field_get_widget (VnField * obj);
#endif

View File

@ -58,7 +58,7 @@ void vn_form_open (VnForm * obj)
// Loading menu
g_free (file);
file = g_strdup_printf ("%s/%s-menu.glade", dir, obj->name);
file = g_strdup_printf ("%s/%s-menu.xml", dir, obj->name);
if (gtk_builder_add_from_file (obj->builder, file, &err))
{

View File

@ -58,7 +58,7 @@ struct _VnFormClass
GtkAlignmentClass parent;
/*< public >*/
void (* open) (VnForm * obj, GtkBuilder * builder, gpointer user_data);
const GActionEntry * (* get_actions) (VnForm * obj, int * size);
const GActionEntry * (* get_actions) (VnForm * obj, gint * size);
/* void (* activate) (VnForm * obj);
void (* deactivate) (VnForm * obj);*/
};

View File

@ -199,55 +199,80 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
GdomeDOMString * name_str;
gchar * path = g_strdup_printf ("%s/%s", dir, file);
if (!vn_gui_validate_module_definition (obj, path))
{
g_warning ("The module definition at \"%s\" is not valid", path);
g_free (path);
return;
}
// Getting the module info from XML file
di = gdome_di_mkref ();
doc = gdome_di_createDocFromURI (di, path, 0, &e);
g_free (path);
gdome_di_unref (di, &e);
name_str = S("name");
if (doc)
{
GdomeDOMString * library_str = S("library"),
* form_str = S("form");
gboolean is_module = FALSE;
GdomeDocumentType * dt = gdome_doc_doctype (doc, &e);
nl = gdome_doc_getElementsByTagName (doc, library_str, &e);
el = (GdomeElement *) gdome_nl_item (nl, 0, &e);
gdome_str_unref (library_str);
gdome_nl_unref (nl, &e);
if (dt)
{
GdomeDOMString * dt_name = gdome_dt_name (dt, &e);
is_module = dt_name && !g_strcmp0 (dt_name->str, "hedera-module");
gdome_str_unref (dt_name);
gdome_dt_unref (dt, &e);
}
library = gdome_el_getAttribute (el, name_str, &e);
mod_name = g_strdup (library->str);
if (is_module)
{
if (vn_gui_validate_module_definition (obj, path))
{
GdomeDOMString * library_str = S("library"),
* form_str = S("form");
node = gdome_el_firstChild (el, &e);
mod_title = gdome_n_nodeValue (node, &e);
mod_title_strip = g_strstrip (g_strdup (mod_title->str));
nl = gdome_doc_getElementsByTagName (doc, form_str, &e);
nl = gdome_doc_getElementsByTagName (doc, library_str, &e);
el = (GdomeElement *) gdome_nl_item (nl, 0, &e);
gdome_str_unref (library_str);
gdome_nl_unref (nl, &e);
gdome_str_unref (form_str);
gdome_str_unref (library);
gdome_doc_unref (doc, &e);
gdome_n_unref (node, &e);
gdome_el_unref (el, &e);
library = gdome_el_getAttribute (el, name_str, &e);
mod_name = g_strdup (library->str);
node = gdome_el_firstChild (el, &e);
mod_title = gdome_n_nodeValue (node, &e);
mod_title_strip = g_strstrip (g_strdup (mod_title->str));
nl = gdome_doc_getElementsByTagName (doc, form_str, &e);
gdome_str_unref (form_str);
gdome_str_unref (library);
gdome_doc_unref (doc, &e);
gdome_n_unref (node, &e);
gdome_el_unref (el, &e);
}
else
{
g_warning ("VnGui: The module definition at \"%s\" is not valid", path);
gdome_doc_unref (doc, &e);
gdome_str_unref (name_str);
g_free (path);
return;
}
}
else
{
gdome_doc_unref (doc, &e);
gdome_str_unref (name_str);
g_free (path);
return;
}
}
else
{
g_warning ("VnGui: Error loading module info file: %s", (gchar *) file);
gdome_str_unref (name_str);
g_free (path);
return;
}
g_free (path);
// Loading the module dynamically
for (n = 0; obj->lib_dirs[n] && !module; n++)
@ -259,19 +284,27 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
if (module)
{
//TODO Get the type of the module
// gchar * c_name = g_strdelimit (g_strdup (mod_name), "-. ", '_');
g_module_make_resident (module);
// symbol_name = g_strdup_printf ("vn_%s_get_type", c_name);
mod = g_object_new (VN_TYPE_MOD
,"name" ,mod_name
,"data-dir" ,dir
,"module" ,module
,"title" ,mod_title_strip
,"gui" ,obj
,NULL
);
// g_free (c_name);
}
else
g_warning ("VnGui: Can't load module %s: %s", mod_name, g_module_error ());
// If successful, load forms, actions and UI
// If successful, load forms
if (mod)
{
@ -374,6 +407,84 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
gdome_str_unref (icon_str);
gdome_str_unref (action_name_str);
}
/* {
gulong len, n;
GtkTreeIter parent_iter;
GdomeDOMString * icon_str = S("icon");
// Creating folder to put forms inside
text_dom = vn_mod_get_text_domain (mod);
gtk_tree_store_append (obj->tree, &parent_iter, NULL);
gtk_tree_store_set (obj->tree, &parent_iter
,COL_ICON ,"gtk-directory"
,COL_TITLE ,g_dgettext (text_dom, mod_title_strip)
,COL_TYPE ,G_TYPE_NONE
,COL_NAME ,NULL
,-1
);
len = gdome_nl_length (nl, &e) ;
for (n = 0; n < len; n++)
{
gchar * c_name, * title_strip, * symbol_name;
GdomeDOMString * icon, * name, * title;
VnFormGetTypeFunc mod_get_type_func;
el = (GdomeElement *) gdome_nl_item (nl, n, &e);
icon = gdome_el_getAttribute (el, icon_str, &e);
name = gdome_el_getAttribute (el, name_str, &e);
c_name = g_strdelimit (g_strdup (name->str), "-. ", '_');
node = gdome_el_firstChild (el, &e);
title = gdome_n_nodeValue (node, &e);
title_strip = g_strstrip (g_strdup (g_dgettext (text_dom, title->str)));
gdome_n_unref (node, &e);
gdome_el_unref (el, &e);
symbol_name = g_strdup_printf ("vn_%s_get_type", c_name);
if (g_module_symbol (module, symbol_name, (gpointer) &mod_get_type_func))
{
GType type = mod_get_type_func ();
if (g_type_is_a (type, VN_TYPE_FORM))
{
GtkTreeIter * iter = g_new (GtkTreeIter, 1);
gtk_tree_store_append (obj->tree, iter, &parent_iter);
gtk_tree_store_set (obj->tree, iter
,COL_NAME ,name->str
,COL_ICON ,icon->str
,COL_TITLE ,title_strip
,COL_TYPE ,type
,COL_MODULE ,mod
,-1
);
g_hash_table_replace (obj->forms, g_strdup (name->str), iter);
}
else
g_warning ("VnGui: %s isn't a VnForm", g_type_name (type));
}
else
g_warning ("VnGui: Error loading form: %s", g_module_error ());
g_free (c_name);
g_free (title_strip);
g_free (symbol_name);
gdome_str_unref (name);
gdome_str_unref (icon);
gdome_str_unref (title);
}
obj->modules = g_slist_prepend (obj->modules, mod);
gdome_str_unref (icon_str);
}
*/
g_free (mod_title_strip);
g_free (mod_name);
@ -491,8 +602,13 @@ static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNoteboo
// Loading the modules actions
for (n = obj->modules; n; n = n->next)
{
g_action_map_add_action_entries (G_ACTION_MAP (window->widget),
vn_mod_get_action_entries (VN_MOD (n->data)), -1, window);
/*gint size;
const GActionEntry * actions = vn_mod_get_actions (VN_MOD (n->data), &size);
g_action_map_add_action_entries (G_ACTION_MAP (window->widget), actions, size, window);*/
}
vn_gui_set_menu_accels (obj, obj->main_menu, TRUE);
@ -854,8 +970,10 @@ void vn_gui_on_close_tab_activated (GSimpleAction * a, GVariant * v, gpointer w)
if (window->active_form)
vn_gui_close_form (window->obj, window->active_form);
else if (window == obj->active_window && !obj->windows->next)
else if (!obj->windows->next)
vn_gui_logout (obj, TRUE);
else
gtk_widget_destroy (GTK_WIDGET (window->widget));
}
//--------------------------------------------------- Connection handlers
@ -990,7 +1108,7 @@ void vn_gui_open (VnGui * obj)
gtk_window_maximize (window->widget);
forms = g_key_file_get_string_list (config, windows[m], "forms", NULL, NULL);
for (n = 0; forms[n]; n++)
vn_gui_open_form_at_window (obj, forms[n], window);
@ -1337,16 +1455,15 @@ static void vn_gui_set_property (VnGui * obj, guint id,
if (dir)
{
while ((file = g_dir_read_name (dir)))
if (!g_strcmp0 (".xml", g_strrstr (file, ".")))
vn_gui_load_module (obj, obj->data_dirs[n], file);
if (!g_strcmp0 (".xml", g_strrstr (file, ".")))
vn_gui_load_module (obj, obj->data_dirs[n], file);
g_dir_close (dir);
}
else
{
g_warning ("VnGui: Error opening directory at module data path: %s"
,err->message
);
,err->message);
g_error_free (err);
}
}

View File

@ -282,7 +282,7 @@ static gboolean vn_login_done (ConnectData * connect_data)
vn_gui_open (obj->gui);
}
else
{
{
GtkWidget * dialog;
dialog = gtk_message_dialog_new (obj->window
@ -410,14 +410,17 @@ void vn_login_cb_pass_hide (GtkEntry * entry, GtkEntryIconPosition * pos,
**/
void vn_login_run (VnLogin * obj)
{
GApplication * app;
g_return_if_fail (VN_IS_LOGIN (obj));
if (g_application_register (G_APPLICATION (obj->app), NULL, NULL))
app = G_APPLICATION (obj->app);
if (g_application_register (app, NULL, NULL)
&& !g_application_get_is_remote (app))
{
g_object_set (gtk_settings_get_default (),
"gtk-button-images", TRUE, NULL
);
vn_login_show (obj);
g_object_set (gtk_settings_get_default (), "gtk-button-images", TRUE, NULL);
vn_login_show (obj);
gtk_main ();
}
}
@ -441,17 +444,17 @@ static void vn_login_set_property (VnLogin * obj, guint id,
obj->settings = g_settings_new (id);
break;
}
default:
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
}
static void vn_login_get_property (VnLogin * obj, guint id,
GValue * value, GParamSpec * pspec)
{
{
switch (id)
{
default:
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
}

View File

@ -23,6 +23,7 @@ struct _VnModPrivate
gchar * data_dir;
gchar * text_domain;
gchar * title;
VnGui * gui;
GModule * module;
GActionEntry * actions;
};
@ -89,7 +90,7 @@ GMenuModel * vn_mod_get_menu_model (VnMod * obj)
g_return_val_if_fail (VN_IS_MOD (obj), NULL);
menu_file = g_strdup_printf ("%s/%s-menu.glade",
menu_file = g_strdup_printf ("%s/%s-menu.xml",
obj->priv->data_dir, obj->priv->name);
builder = gtk_builder_new ();
@ -137,6 +138,28 @@ const GActionEntry * vn_mod_get_action_entries (VnMod * obj)
return obj->priv->actions;
}
/**
* vn_mod_get_actions: (virtual get_actions):
* @obj: a #VnMod
* @size:(out): the return location for the size of the array
*
* Returns the actions implemented by @obj.
*
* Return value:(transfer none) (array length=size): a #GActionEntry array
**/
const GActionEntry * vn_mod_get_actions (VnMod * obj, gint * size)
{
g_return_if_fail (VN_IS_MOD (obj));
if (!VN_MOD_GET_CLASS (obj)->get_actions)
{
*size = 0;
return NULL;
}
else
return VN_MOD_GET_CLASS (obj)->get_actions (obj, size);
}
static void vn_mod_free_action_entry (VnMod * obj)
{
gint i;
@ -161,6 +184,7 @@ enum
,PROP_MODULE
,PROP_TEXT_DOMAIN
,PROP_TITLE
,PROP_GUI
};
static void vn_mod_set_property (VnMod * obj, guint id,
@ -188,6 +212,9 @@ static void vn_mod_set_property (VnMod * obj, guint id,
case PROP_TITLE:
obj->priv->title = g_value_dup_string (value);
break;
case PROP_GUI:
obj->priv->gui = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
@ -213,6 +240,9 @@ static void vn_mod_get_property (VnMod * obj, guint id,
case PROP_TITLE:
g_value_set_string (value, obj->priv->title);
break;
case PROP_GUI:
g_value_set_object (value, obj->priv->gui);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
@ -222,12 +252,15 @@ static void vn_mod_get_property (VnMod * obj, guint id,
static void vn_mod_init (VnMod * obj)
{
obj->priv = G_TYPE_INSTANCE_GET_PRIVATE (obj, VN_TYPE_MOD, VnModPrivate);
obj->priv->name = NULL;
obj->priv->data_dir = NULL;
obj->priv->module = NULL;
obj->priv->text_domain = NULL;
obj->priv->actions = NULL;
VnModPrivate * priv;
priv = obj->priv = G_TYPE_INSTANCE_GET_PRIVATE (obj, VN_TYPE_MOD, VnModPrivate);
priv->name = NULL;
priv->gui = NULL;
priv->data_dir = NULL;
priv->module = NULL;
priv->text_domain = NULL;
priv->actions = NULL;
}
static void vn_mod_finalize (VnMod * obj)
@ -281,4 +314,11 @@ static void vn_mod_class_init (VnModClass * k)
,NULL
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE
));
g_object_class_install_property (klass, PROP_GUI,
g_param_spec_object ("gui"
,"Gui"
,"The Gui object"
,VN_TYPE_GUI
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE
));
}

View File

@ -43,7 +43,8 @@ struct _VnMod
struct _VnModClass
{
GObjectClass parent;
void (* activate) (VnMod * obj);
const GActionEntry * (* get_actions) (VnMod * obj, gint * size);
void (* activate) (VnMod * obj);
};
GType vn_mod_get_type ();
@ -53,6 +54,7 @@ const gchar * vn_mod_get_text_domain (VnMod * obj);
const gchar * vn_mod_get_data_dir (VnMod * obj);
const gchar * vn_mod_get_title (VnMod * obj);
GMenuModel * vn_mod_get_menu_model (VnMod * obj);
const GActionEntry * vn_mod_get_actions (VnMod * obj, int * size);
void vn_mod_set_action_entries (VnMod * obj, GActionEntry * actions);
const GActionEntry * vn_mod_get_action_entries (VnMod * obj);