Se ha añadido a VnField y VnColumn una propiedad "style-func" para que se pueda modificar el

estilo con el que se muestran dependiendo del valor que contienen.
Se ha dejado de usar algunas funciones obsoletas.
This commit is contained in:
Alejandro T. Colombini Gómez 2014-04-15 11:36:14 +02:00
parent f5396702a7
commit c71abbb4f3
20 changed files with 363 additions and 234 deletions

View File

@ -451,6 +451,7 @@ static void db_file_loader_thread_download (File * file, DbFileLoader * obj)
"%s: '%s'", status_line, file->name);
}
if (data)
file->data = g_bytes_new_take (data, len);
final:

View File

@ -69,14 +69,14 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
(_("SQL Editor")
,GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (eprop)))
,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT
,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL
,GTK_STOCK_CLEAR, GTK_RESPONSE_REJECT
,GTK_STOCK_OK, GTK_RESPONSE_OK
,_("OK"), GTK_RESPONSE_OK
,_("Clear"), GTK_RESPONSE_REJECT
,_("Cancel"), GTK_RESPONSE_CANCEL
,NULL
));
gtk_dialog_set_alternative_button_order (dialog,
GTK_RESPONSE_OK, GTK_RESPONSE_REJECT, GTK_RESPONSE_CANCEL, -1);
/* gtk_dialog_set_alternative_button_order (dialog,
GTK_RESPONSE_OK, GTK_RESPONSE_REJECT, GTK_RESPONSE_CANCEL, -1);*/
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
gtk_window_set_default_size (GTK_WINDOW (dialog), obj->width, obj->height);
@ -84,9 +84,9 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
gtk_adjustment_new (0,0,0,0,0,0));
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_widget_set_margin_top (scroll, 6);
gtk_widget_set_margin_right (scroll, 6);
gtk_widget_set_margin_bottom (scroll, 6);
gtk_widget_set_margin_left (scroll, 6);
gtk_widget_set_margin_start (scroll, 6);
gtk_widget_set_margin_end (scroll, 6);
gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)),
scroll, TRUE, TRUE, 6);

View File

@ -161,13 +161,11 @@ static void glade_eprop_model_show_dialog (GtkButton * button, GObject * object)
(eprop ? _("Model configuration") : _("Model properties configuration")
,GTK_WINDOW (glade_app_get_window ())
,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT
,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL
,GTK_STOCK_CLEAR, GTK_RESPONSE_REJECT
,GTK_STOCK_OK, GTK_RESPONSE_OK
,_("OK"), GTK_RESPONSE_OK
,_("Clear"), GTK_RESPONSE_REJECT
,_("Cancel"), GTK_RESPONSE_CANCEL
,NULL
));
gtk_dialog_set_alternative_button_order (dialog,
GTK_RESPONSE_OK, GTK_RESPONSE_REJECT, GTK_RESPONSE_CANCEL, -1);
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300);

View File

@ -24,10 +24,6 @@
* @Title: Miscelaneous utility functions
**/
/**
* GETTEXT_PACKAGE: (skip)
**/
/**
* gvn_object_warning:
* @instance: the object instance within which the warning was emitted

145
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-03-27 13:39+0100\n"
"POT-Creation-Date: 2014-04-15 10:53+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:235 ../vn/vn-field.c:518
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:529
msgid "Value"
msgstr ""
@ -71,15 +71,15 @@ msgstr ""
msgid "The spec of the parameter"
msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:546
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:557
msgid "Glib Type"
msgstr ""
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:547
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:558
msgid "The type of the value"
msgstr ""
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:442
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:564 ../vn/vn-column.c:467
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:560 ../vn/vn-column.c:449
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:571 ../vn/vn-column.c:474
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:567
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:578
msgid "Default Value"
msgstr ""
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:568
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:579
msgid "The default value"
msgstr ""
@ -116,11 +116,11 @@ msgstr ""
msgid "No"
msgstr ""
#: ../sql/sql-render.c:413
#: ../sql/sql-render.c:420
msgid "Delimiter"
msgstr ""
#: ../sql/sql-render.c:414
#: ../sql/sql-render.c:421
msgid "The character used for delimite the name of fields, tables..."
msgstr ""
@ -162,8 +162,8 @@ msgstr "Recordar"
msgid "Wether to rememeber the selection when model is refreshed"
msgstr ""
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1564
#: ../vn/vn-form.c:244
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1556
#: ../vn/vn-form.c:243
msgid "Connection"
msgstr ""
@ -265,7 +265,7 @@ msgstr ""
msgid "A column to apply the operations over it"
msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:543
msgid "Iterator"
msgstr ""
@ -273,7 +273,7 @@ msgstr ""
msgid "The iterator owner of param"
msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:428
#: ../db/db-param.c:258 ../vn/vn-column.c:453
msgid "Column index"
msgstr ""
@ -281,11 +281,11 @@ msgstr ""
msgid "The referenced column index"
msgstr ""
#: ../db/db-param.c:265 ../vn/vn-field.c:539 ../vn/vn-column.c:435
#: ../db/db-param.c:265 ../vn/vn-field.c:550 ../vn/vn-column.c:460
msgid "Column name"
msgstr "Nom de la columna"
#: ../db/db-param.c:266 ../vn/vn-column.c:436
#: ../db/db-param.c:266 ../vn/vn-column.c:461
msgid "The referenced column name"
msgstr "Nom de la columna referenciada"
@ -325,7 +325,7 @@ msgstr ""
msgid "The path where query files are located"
msgstr ""
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:715
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:716
#: ../vn/column/vn-column-image.c:493
msgid "Host"
msgstr ""
@ -393,93 +393,93 @@ msgstr ""
msgid "Unknown content length of file %s"
msgstr ""
#: ../db/db-file-loader.c:716 ../vn/column/vn-column-image.c:494
#: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:494
msgid "The host web server name to get the images"
msgstr ""
#: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:501
#: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501
msgid "Path"
msgstr ""
#: ../db/db-file-loader.c:724
#: ../db/db-file-loader.c:725
msgid "The path of the directory to interact with"
msgstr ""
#: ../db/db-file-loader.c:731
#: ../db/db-file-loader.c:732
msgid "Cache directory"
msgstr ""
#: ../db/db-file-loader.c:732
#: ../db/db-file-loader.c:733
msgid ""
"The local directory where the downloaded files will be stored. The default "
"cache directory is 'hedera', under g_get_user_cache_dir()."
msgstr ""
#: ../db/db-file-loader.c:740
#: ../db/db-file-loader.c:741
msgid "Maximal cache size"
msgstr ""
#: ../db/db-file-loader.c:741
#: ../db/db-file-loader.c:742
msgid "The maximal size for the contents of the cache directory"
msgstr ""
#: ../vn/vn-gui.c:642
#: ../vn/vn-gui.c:634
msgid "Connection has been lost. Do you want to reconnect?"
msgstr ""
#: ../vn/vn-gui.c:649
#: ../vn/vn-gui.c:641
msgid "An error occurred in the connection."
msgstr ""
#: ../vn/vn-gui.c:652
#: ../vn/vn-gui.c:644
msgid "Database error"
msgstr ""
#: ../vn/vn-gui.c:659
#: ../vn/vn-gui.c:651
msgid "Unknown error"
msgstr ""
#: ../vn/vn-gui.c:999
#: ../vn/vn-gui.c:991
msgid "Closing connection"
msgstr ""
#: ../vn/vn-gui.c:1001
#: ../vn/vn-gui.c:993
msgid "Transaction started"
msgstr ""
#: ../vn/vn-gui.c:1003
#: ../vn/vn-gui.c:995
msgid "Connecting"
msgstr ""
#: ../vn/vn-gui.c:1005
#: ../vn/vn-gui.c:997
msgid "Connection lost"
msgstr ""
#: ../vn/vn-gui.c:1007
#: ../vn/vn-gui.c:999
msgid "Connection closed"
msgstr ""
#: ../vn/vn-gui.c:1009 ../vn/field/vn-http-image.c:116
#: ../vn/vn-gui.c:1001 ../vn/field/vn-http-image.c:116
msgid "Loading"
msgstr ""
#: ../vn/vn-gui.c:1011 ../vn/gui/main.glade.h:19
#: ../vn/vn-gui.c:1003 ../vn/gui/main.glade.h:19
msgid "Ready"
msgstr ""
#: ../vn/vn-gui.c:1565
#: ../vn/vn-gui.c:1557
msgid "The connection used by Gui"
msgstr ""
#: ../vn/vn-gui.c:1571
#: ../vn/vn-gui.c:1563
msgid "Application"
msgstr ""
#: ../vn/vn-gui.c:1572
#: ../vn/vn-gui.c:1564
msgid "The application handler for the entire program"
msgstr ""
#: ../vn/vn-grid.c:520
#: ../vn/vn-grid.c:519
msgid "The iterator used by VnGrid"
msgstr ""
@ -543,31 +543,31 @@ msgstr ""
msgid "Sets if it is used to handle a iterator with a single record"
msgstr ""
#: ../vn/vn-form.c:230
#: ../vn/vn-form.c:229
msgid "Name"
msgstr ""
#: ../vn/vn-form.c:231
#: ../vn/vn-form.c:230
msgid "The form name"
msgstr ""
#: ../vn/vn-form.c:237
#: ../vn/vn-form.c:236
msgid "Gui"
msgstr ""
#: ../vn/vn-form.c:238
#: ../vn/vn-form.c:237
msgid "The Gui object"
msgstr ""
#: ../vn/vn-form.c:245
#: ../vn/vn-form.c:244
msgid "The connection used by the module"
msgstr ""
#: ../vn/vn-form.c:251
#: ../vn/vn-form.c:250
msgid "Module"
msgstr ""
#: ../vn/vn-form.c:252
#: ../vn/vn-form.c:251
msgid "The module"
msgstr ""
@ -588,35 +588,44 @@ msgstr ""
msgid "The application identifier"
msgstr ""
#: ../vn/vn-field.c:519
#: ../vn/vn-field.c:530
msgid "The current value of the field"
msgstr ""
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71
#: ../vn/vn-field.c:536 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116
msgid "Parameter"
msgstr ""
#: ../vn/vn-field.c:526
#: ../vn/vn-field.c:537
msgid "The param where the field can read/write its value"
msgstr ""
#: ../vn/vn-field.c:533
#: ../vn/vn-field.c:544
msgid "The iterator used to get the field param"
msgstr ""
#: ../vn/vn-field.c:540
#: ../vn/vn-field.c:551
msgid "The column name on the iterator"
msgstr ""
#: ../vn/vn-field.c:554
#: ../vn/vn-field.c:565
msgid "Whether the field value is user editable"
msgstr ""
#: ../vn/vn-field.c:561 ../vn/vn-column.c:450
#: ../vn/vn-field.c:572 ../vn/vn-column.c:475
msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr ""
#: ../vn/vn-field.c:585 ../vn/vn-column.c:488
msgid "Style function"
msgstr ""
#: ../vn/vn-field.c:586
msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr ""
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:363
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
msgid "Format"
@ -732,22 +741,27 @@ msgstr ""
msgid "A GBytes structure with the image data"
msgstr ""
#: ../vn/vn-column.c:429
#: ../vn/vn-column.c:454
msgid "The column index in the model"
msgstr ""
#: ../vn/vn-column.c:443
#: ../vn/vn-column.c:468
msgid "Whether the column values are editable"
msgstr ""
#: ../vn/vn-column.c:456
#: ../vn/vn-column.c:481
msgid "Tab index"
msgstr ""
#: ../vn/vn-column.c:457
#: ../vn/vn-column.c:482
msgid "Order in which the tab selects the columns for edition"
msgstr ""
#: ../vn/vn-column.c:489
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
#: ../vn/column/vn-column-spin.c:238
msgid "Climb rate"
msgstr ""
@ -963,7 +977,8 @@ msgstr ""
msgid "Now"
msgstr ""
#: ../vn/gui/date-chooser.glade.h:2
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73
#: ../glade/glade-eprop-model.c:165
msgid "Clear"
msgstr ""
@ -975,6 +990,14 @@ msgstr ""
msgid "SQL Editor"
msgstr ""
#: ../glade/glade-db-model.c:72 ../glade/glade-eprop-model.c:164
msgid "OK"
msgstr ""
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:166
msgid "Cancel"
msgstr ""
#: ../glade/glade-db-model.c:186
msgid "Open the SQL Editor"
msgstr ""
@ -1011,15 +1034,15 @@ msgstr ""
msgid "Model properties configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:246
#: ../glade/glade-eprop-model.c:244
msgid "Select a VnModel for the property"
msgstr ""
#: ../glade/glade-eprop-model.c:267 ../glade/glade-eprop-model.c:313
#: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
msgid "New Model"
msgstr ""
#: ../glade/glade-eprop-model.c:308
#: ../glade/glade-eprop-model.c:306
msgid "Edit Model"
msgstr ""

149
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-03-27 13:39+0100\n"
"POT-Creation-Date: 2014-04-15 10:53+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:235 ../vn/vn-field.c:518
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:529
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:546
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:557
msgid "Glib Type"
msgstr "Tipo Glib"
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:547
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:558
msgid "The type of the value"
msgstr "El tipo del valor"
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:442
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:564 ../vn/vn-column.c:467
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:560 ../vn/vn-column.c:449
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:571 ../vn/vn-column.c:474
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:567
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:578
msgid "Default Value"
msgstr "Valor por defecto"
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:568
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:579
msgid "The default value"
msgstr "El valor por defecto"
@ -118,11 +118,11 @@ msgstr "Sí"
msgid "No"
msgstr "No"
#: ../sql/sql-render.c:413
#: ../sql/sql-render.c:420
msgid "Delimiter"
msgstr "Delimitador"
#: ../sql/sql-render.c:414
#: ../sql/sql-render.c:421
msgid "The character used for delimite the name of fields, tables..."
msgstr "El carácter usado para delimitar los nombres de campos, tablas..."
@ -164,8 +164,8 @@ 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:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1564
#: ../vn/vn-form.c:244
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1556
#: ../vn/vn-form.c:243
msgid "Connection"
msgstr "Conexión"
@ -273,7 +273,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:519 ../vn/vn-field.c:532
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:543
msgid "Iterator"
msgstr "Iterator"
@ -281,7 +281,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:428
#: ../db/db-param.c:258 ../vn/vn-column.c:453
msgid "Column index"
msgstr "Posición"
@ -289,11 +289,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:539 ../vn/vn-column.c:435
#: ../db/db-param.c:265 ../vn/vn-field.c:550 ../vn/vn-column.c:460
msgid "Column name"
msgstr "Nombre de la columna"
#: ../db/db-param.c:266 ../vn/vn-column.c:436
#: ../db/db-param.c:266 ../vn/vn-column.c:461
msgid "The referenced column name"
msgstr ""
"El nombre del campo en el Iterator vinculado al Grid al que pretenece la "
@ -335,7 +335,7 @@ msgstr "Ruta de consultas"
msgid "The path where query files are located"
msgstr "La ruta donde se encuentran los archivos de consultas"
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:715
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:716
#: ../vn/column/vn-column-image.c:493
msgid "Host"
msgstr "Host"
@ -403,23 +403,23 @@ msgstr "No se ha guardado %s en la cache"
msgid "Unknown content length of file %s"
msgstr "Longitud del contenido del archivo %s desconocida"
#: ../db/db-file-loader.c:716 ../vn/column/vn-column-image.c:494
#: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:494
msgid "The host web server name to get the images"
msgstr "El nombre del servidor web al que se conectará"
#: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:501
#: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501
msgid "Path"
msgstr "Ruta"
#: ../db/db-file-loader.c:724
#: ../db/db-file-loader.c:725
msgid "The path of the directory to interact with"
msgstr "La ruta del directorio con el que se interactuará"
#: ../db/db-file-loader.c:731
#: ../db/db-file-loader.c:732
msgid "Cache directory"
msgstr "Directorio de caché"
#: ../db/db-file-loader.c:732
#: ../db/db-file-loader.c:733
msgid ""
"The local directory where the downloaded files will be stored. The default "
"cache directory is 'hedera', under g_get_user_cache_dir()."
@ -427,71 +427,71 @@ msgstr ""
"El directorio local en el cual se guardarán los archivos descargados.El "
"directorio por defecto es 'hedera', debajo de g_get_user_cache_dir()."
#: ../db/db-file-loader.c:740
#: ../db/db-file-loader.c:741
msgid "Maximal cache size"
msgstr "Tamaño máximo de la caché"
#: ../db/db-file-loader.c:741
#: ../db/db-file-loader.c:742
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:642
#: ../vn/vn-gui.c:634
msgid "Connection has been lost. Do you want to reconnect?"
msgstr "Se ha perdido la conexión. ¿Quieres reconectar?"
#: ../vn/vn-gui.c:649
#: ../vn/vn-gui.c:641
msgid "An error occurred in the connection."
msgstr "Ha habido un error en la conexión."
#: ../vn/vn-gui.c:652
#: ../vn/vn-gui.c:644
msgid "Database error"
msgstr "Error en la base de datos"
#: ../vn/vn-gui.c:659
#: ../vn/vn-gui.c:651
msgid "Unknown error"
msgstr "Error desconocido"
#: ../vn/vn-gui.c:999
#: ../vn/vn-gui.c:991
msgid "Closing connection"
msgstr "Cerrando conexión"
#: ../vn/vn-gui.c:1001
#: ../vn/vn-gui.c:993
msgid "Transaction started"
msgstr "Transacción iniciada"
#: ../vn/vn-gui.c:1003
#: ../vn/vn-gui.c:995
msgid "Connecting"
msgstr "Conectando"
#: ../vn/vn-gui.c:1005
#: ../vn/vn-gui.c:997
msgid "Connection lost"
msgstr "Conexión perdida"
#: ../vn/vn-gui.c:1007
#: ../vn/vn-gui.c:999
msgid "Connection closed"
msgstr "Conexión cerrada"
#: ../vn/vn-gui.c:1009 ../vn/field/vn-http-image.c:116
#: ../vn/vn-gui.c:1001 ../vn/field/vn-http-image.c:116
msgid "Loading"
msgstr "Cargando"
#: ../vn/vn-gui.c:1011 ../vn/gui/main.glade.h:19
#: ../vn/vn-gui.c:1003 ../vn/gui/main.glade.h:19
msgid "Ready"
msgstr "Listo"
#: ../vn/vn-gui.c:1565
#: ../vn/vn-gui.c:1557
msgid "The connection used by Gui"
msgstr "La conexión empleada por Gui"
#: ../vn/vn-gui.c:1571
#: ../vn/vn-gui.c:1563
msgid "Application"
msgstr "Aplicación"
#: ../vn/vn-gui.c:1572
#: ../vn/vn-gui.c:1564
msgid "The application handler for the entire program"
msgstr "El manejador de la aplicación para todo el programa"
#: ../vn/vn-grid.c:520
#: ../vn/vn-grid.c:519
msgid "The iterator used by VnGrid"
msgstr "El Iterator empleado por VnGrid"
@ -555,31 +555,31 @@ msgstr "Registro simple"
msgid "Sets if it is used to handle a iterator with a single record"
msgstr "Indica si se utiliza para manejar solo un registro"
#: ../vn/vn-form.c:230
#: ../vn/vn-form.c:229
msgid "Name"
msgstr "Nombre"
#: ../vn/vn-form.c:231
#: ../vn/vn-form.c:230
msgid "The form name"
msgstr "El nombre del form"
#: ../vn/vn-form.c:237
#: ../vn/vn-form.c:236
msgid "Gui"
msgstr "Gui"
#: ../vn/vn-form.c:238
#: ../vn/vn-form.c:237
msgid "The Gui object"
msgstr "El objeto Gui"
#: ../vn/vn-form.c:245
#: ../vn/vn-form.c:244
msgid "The connection used by the module"
msgstr "La conexión empleada por el módulo"
#: ../vn/vn-form.c:251
#: ../vn/vn-form.c:250
msgid "Module"
msgstr "Módulo"
#: ../vn/vn-form.c:252
#: ../vn/vn-form.c:251
msgid "The module"
msgstr "El módulo"
@ -600,35 +600,46 @@ msgstr "Id de la aplicación"
msgid "The application identifier"
msgstr "El identificador de la aplicación"
#: ../vn/vn-field.c:519
#: ../vn/vn-field.c:530
msgid "The current value of the field"
msgstr "El valor actual del campo"
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71
#: ../vn/vn-field.c:536 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116
msgid "Parameter"
msgstr "Parámetro"
#: ../vn/vn-field.c:526
#: ../vn/vn-field.c:537
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:533
#: ../vn/vn-field.c:544
msgid "The iterator used to get the field param"
msgstr "El Iterator con el que se obtiene el parámetro"
#: ../vn/vn-field.c:540
#: ../vn/vn-field.c:551
msgid "The column name on the iterator"
msgstr "El nombre de la columna en el Iterator"
#: ../vn/vn-field.c:554
#: ../vn/vn-field.c:565
msgid "Whether the field value is user editable"
msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-field.c:561 ../vn/vn-column.c:450
#: ../vn/vn-field.c:572 ../vn/vn-column.c:475
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:585 ../vn/vn-column.c:488
msgid "Style function"
msgstr "Función de estilo"
#: ../vn/vn-field.c:586
msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr ""
"Una VnFieldStyleFunc para configurar las propiedades de cada campo dependiendo"
" de su valor"
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:363
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
msgid "Format"
@ -747,22 +758,29 @@ msgstr "Bytes"
msgid "A GBytes structure with the image data"
msgstr "Una estructura GBytes con los datos de la imágen"
#: ../vn/vn-column.c:429
#: ../vn/vn-column.c:454
msgid "The column index in the model"
msgstr "El índice de la columna en el modelo"
#: ../vn/vn-column.c:443
#: ../vn/vn-column.c:468
msgid "Whether the column values are editable"
msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-column.c:456
#: ../vn/vn-column.c:481
msgid "Tab index"
msgstr "Tab index"
#: ../vn/vn-column.c:457
#: ../vn/vn-column.c:482
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
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
"Una VnColumnStyleFunc para configurar las propiedadesde cada celda dependiendo"
" de su valor"
#: ../vn/column/vn-column-spin.c:238
msgid "Climb rate"
msgstr "Tasa de subida"
@ -998,7 +1016,8 @@ msgstr "_Barra de herramientas"
msgid "Now"
msgstr "Ahora"
#: ../vn/gui/date-chooser.glade.h:2
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73
#: ../glade/glade-eprop-model.c:165
msgid "Clear"
msgstr "Limpiar"
@ -1010,6 +1029,14 @@ msgstr "Nueva consulta SQL"
msgid "SQL Editor"
msgstr "Editor SQL"
#: ../glade/glade-db-model.c:72 ../glade/glade-eprop-model.c:164
msgid "OK"
msgstr "OK"
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:166
msgid "Cancel"
msgstr "Cancelar"
#: ../glade/glade-db-model.c:186
msgid "Open the SQL Editor"
msgstr "Abrir el Editor SQL"
@ -1046,15 +1073,15 @@ msgstr "Configuración del modelo"
msgid "Model properties configuration"
msgstr "Configuración de propiedades del modelo"
#: ../glade/glade-eprop-model.c:246
#: ../glade/glade-eprop-model.c:244
msgid "Select a VnModel for the property"
msgstr "Elige un VnModel para la propiedad"
#: ../glade/glade-eprop-model.c:267 ../glade/glade-eprop-model.c:313
#: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
msgid "New Model"
msgstr "Nuevo Modelo"
#: ../glade/glade-eprop-model.c:308
#: ../glade/glade-eprop-model.c:306
msgid "Edit Model"
msgstr "Editar Modelo"

145
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-03-27 13:39+0100\n"
"POT-Creation-Date: 2014-04-15 10:53+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:235 ../vn/vn-field.c:518
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:529
msgid "Value"
msgstr ""
@ -73,15 +73,15 @@ msgstr ""
msgid "The spec of the parameter"
msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:546
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:557
msgid "Glib Type"
msgstr ""
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:547
#: ../gvn/gvn-param.c:479 ../vn/vn-field.c:558
msgid "The type of the value"
msgstr ""
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:442
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:564 ../vn/vn-column.c:467
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:560 ../vn/vn-column.c:449
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:571 ../vn/vn-column.c:474
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:567
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:578
msgid "Default Value"
msgstr ""
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:568
#: ../gvn/gvn-param.c:500 ../vn/vn-field.c:579
msgid "The default value"
msgstr ""
@ -118,11 +118,11 @@ msgstr ""
msgid "No"
msgstr ""
#: ../sql/sql-render.c:413
#: ../sql/sql-render.c:420
msgid "Delimiter"
msgstr ""
#: ../sql/sql-render.c:414
#: ../sql/sql-render.c:421
msgid "The character used for delimite the name of fields, tables..."
msgstr ""
@ -163,8 +163,8 @@ msgstr ""
msgid "Wether to rememeber the selection when model is refreshed"
msgstr ""
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1564
#: ../vn/vn-form.c:244
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1556
#: ../vn/vn-form.c:243
msgid "Connection"
msgstr ""
@ -266,7 +266,7 @@ msgstr ""
msgid "A column to apply the operations over it"
msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532
#: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:543
msgid "Iterator"
msgstr ""
@ -274,7 +274,7 @@ msgstr ""
msgid "The iterator owner of param"
msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:428
#: ../db/db-param.c:258 ../vn/vn-column.c:453
msgid "Column index"
msgstr ""
@ -282,11 +282,11 @@ msgstr ""
msgid "The referenced column index"
msgstr ""
#: ../db/db-param.c:265 ../vn/vn-field.c:539 ../vn/vn-column.c:435
#: ../db/db-param.c:265 ../vn/vn-field.c:550 ../vn/vn-column.c:460
msgid "Column name"
msgstr ""
#: ../db/db-param.c:266 ../vn/vn-column.c:436
#: ../db/db-param.c:266 ../vn/vn-column.c:461
msgid "The referenced column name"
msgstr ""
@ -326,7 +326,7 @@ msgstr ""
msgid "The path where query files are located"
msgstr ""
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:715
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:716
#: ../vn/column/vn-column-image.c:493
msgid "Host"
msgstr ""
@ -394,93 +394,93 @@ msgstr ""
msgid "Unknown content length of file %s"
msgstr ""
#: ../db/db-file-loader.c:716 ../vn/column/vn-column-image.c:494
#: ../db/db-file-loader.c:717 ../vn/column/vn-column-image.c:494
msgid "The host web server name to get the images"
msgstr ""
#: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:501
#: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501
msgid "Path"
msgstr ""
#: ../db/db-file-loader.c:724
#: ../db/db-file-loader.c:725
msgid "The path of the directory to interact with"
msgstr ""
#: ../db/db-file-loader.c:731
#: ../db/db-file-loader.c:732
msgid "Cache directory"
msgstr ""
#: ../db/db-file-loader.c:732
#: ../db/db-file-loader.c:733
msgid ""
"The local directory where the downloaded files will be stored. The default "
"cache directory is 'hedera', under g_get_user_cache_dir()."
msgstr ""
#: ../db/db-file-loader.c:740
#: ../db/db-file-loader.c:741
msgid "Maximal cache size"
msgstr ""
#: ../db/db-file-loader.c:741
#: ../db/db-file-loader.c:742
msgid "The maximal size for the contents of the cache directory"
msgstr ""
#: ../vn/vn-gui.c:642
#: ../vn/vn-gui.c:634
msgid "Connection has been lost. Do you want to reconnect?"
msgstr ""
#: ../vn/vn-gui.c:649
#: ../vn/vn-gui.c:641
msgid "An error occurred in the connection."
msgstr ""
#: ../vn/vn-gui.c:652
#: ../vn/vn-gui.c:644
msgid "Database error"
msgstr ""
#: ../vn/vn-gui.c:659
#: ../vn/vn-gui.c:651
msgid "Unknown error"
msgstr ""
#: ../vn/vn-gui.c:999
#: ../vn/vn-gui.c:991
msgid "Closing connection"
msgstr ""
#: ../vn/vn-gui.c:1001
#: ../vn/vn-gui.c:993
msgid "Transaction started"
msgstr ""
#: ../vn/vn-gui.c:1003
#: ../vn/vn-gui.c:995
msgid "Connecting"
msgstr ""
#: ../vn/vn-gui.c:1005
#: ../vn/vn-gui.c:997
msgid "Connection lost"
msgstr ""
#: ../vn/vn-gui.c:1007
#: ../vn/vn-gui.c:999
msgid "Connection closed"
msgstr ""
#: ../vn/vn-gui.c:1009 ../vn/field/vn-http-image.c:116
#: ../vn/vn-gui.c:1001 ../vn/field/vn-http-image.c:116
msgid "Loading"
msgstr ""
#: ../vn/vn-gui.c:1011 ../vn/gui/main.glade.h:19
#: ../vn/vn-gui.c:1003 ../vn/gui/main.glade.h:19
msgid "Ready"
msgstr ""
#: ../vn/vn-gui.c:1565
#: ../vn/vn-gui.c:1557
msgid "The connection used by Gui"
msgstr ""
#: ../vn/vn-gui.c:1571
#: ../vn/vn-gui.c:1563
msgid "Application"
msgstr ""
#: ../vn/vn-gui.c:1572
#: ../vn/vn-gui.c:1564
msgid "The application handler for the entire program"
msgstr ""
#: ../vn/vn-grid.c:520
#: ../vn/vn-grid.c:519
msgid "The iterator used by VnGrid"
msgstr ""
@ -544,31 +544,31 @@ msgstr ""
msgid "Sets if it is used to handle a iterator with a single record"
msgstr ""
#: ../vn/vn-form.c:230
#: ../vn/vn-form.c:229
msgid "Name"
msgstr ""
#: ../vn/vn-form.c:231
#: ../vn/vn-form.c:230
msgid "The form name"
msgstr ""
#: ../vn/vn-form.c:237
#: ../vn/vn-form.c:236
msgid "Gui"
msgstr ""
#: ../vn/vn-form.c:238
#: ../vn/vn-form.c:237
msgid "The Gui object"
msgstr ""
#: ../vn/vn-form.c:245
#: ../vn/vn-form.c:244
msgid "The connection used by the module"
msgstr ""
#: ../vn/vn-form.c:251
#: ../vn/vn-form.c:250
msgid "Module"
msgstr ""
#: ../vn/vn-form.c:252
#: ../vn/vn-form.c:251
msgid "The module"
msgstr ""
@ -589,35 +589,44 @@ msgstr ""
msgid "The application identifier"
msgstr ""
#: ../vn/vn-field.c:519
#: ../vn/vn-field.c:530
msgid "The current value of the field"
msgstr ""
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71
#: ../vn/vn-field.c:536 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116
msgid "Parameter"
msgstr ""
#: ../vn/vn-field.c:526
#: ../vn/vn-field.c:537
msgid "The param where the field can read/write its value"
msgstr ""
#: ../vn/vn-field.c:533
#: ../vn/vn-field.c:544
msgid "The iterator used to get the field param"
msgstr ""
#: ../vn/vn-field.c:540
#: ../vn/vn-field.c:551
msgid "The column name on the iterator"
msgstr ""
#: ../vn/vn-field.c:554
#: ../vn/vn-field.c:565
msgid "Whether the field value is user editable"
msgstr ""
#: ../vn/vn-field.c:561 ../vn/vn-column.c:450
#: ../vn/vn-field.c:572 ../vn/vn-column.c:475
msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr ""
#: ../vn/vn-field.c:585 ../vn/vn-column.c:488
msgid "Style function"
msgstr ""
#: ../vn/vn-field.c:586
msgid ""
"A VnFieldStyleFunc to set the properties of each field depending on its value"
msgstr ""
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:363
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
msgid "Format"
@ -733,22 +742,27 @@ msgstr ""
msgid "A GBytes structure with the image data"
msgstr ""
#: ../vn/vn-column.c:429
#: ../vn/vn-column.c:454
msgid "The column index in the model"
msgstr ""
#: ../vn/vn-column.c:443
#: ../vn/vn-column.c:468
msgid "Whether the column values are editable"
msgstr ""
#: ../vn/vn-column.c:456
#: ../vn/vn-column.c:481
msgid "Tab index"
msgstr ""
#: ../vn/vn-column.c:457
#: ../vn/vn-column.c:482
msgid "Order in which the tab selects the columns for edition"
msgstr ""
#: ../vn/vn-column.c:489
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
#: ../vn/column/vn-column-spin.c:238
msgid "Climb rate"
msgstr ""
@ -963,7 +977,8 @@ msgstr ""
msgid "Now"
msgstr ""
#: ../vn/gui/date-chooser.glade.h:2
#: ../vn/gui/date-chooser.glade.h:2 ../glade/glade-db-model.c:73
#: ../glade/glade-eprop-model.c:165
msgid "Clear"
msgstr ""
@ -975,6 +990,14 @@ msgstr ""
msgid "SQL Editor"
msgstr ""
#: ../glade/glade-db-model.c:72 ../glade/glade-eprop-model.c:164
msgid "OK"
msgstr ""
#: ../glade/glade-db-model.c:74 ../glade/glade-eprop-model.c:166
msgid "Cancel"
msgstr ""
#: ../glade/glade-db-model.c:186
msgid "Open the SQL Editor"
msgstr ""
@ -1011,15 +1034,15 @@ msgstr ""
msgid "Model properties configuration"
msgstr ""
#: ../glade/glade-eprop-model.c:246
#: ../glade/glade-eprop-model.c:244
msgid "Select a VnModel for the property"
msgstr ""
#: ../glade/glade-eprop-model.c:267 ../glade/glade-eprop-model.c:313
#: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
msgid "New Model"
msgstr ""
#: ../glade/glade-eprop-model.c:308
#: ../glade/glade-eprop-model.c:306
msgid "Edit Model"
msgstr ""

View File

@ -253,7 +253,7 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
g_param_spec_double ("lower"
,_("Minimum value")
,_("The minimum value of the internal adjustment.")
,-G_MAXDOUBLE ,G_MAXDOUBLE ,0.0
,-G_MAXDOUBLE ,G_MAXDOUBLE ,-G_MAXDOUBLE
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
));
@ -261,7 +261,7 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
g_param_spec_double ("upper"
,_("Maximum value")
,_("The maximum value of the internal adjustment.")
,-G_MAXDOUBLE ,G_MAXDOUBLE ,0.0
,-G_MAXDOUBLE ,G_MAXDOUBLE ,G_MAXDOUBLE
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
));

View File

@ -126,7 +126,7 @@ static void vn_date_chooser_on_day_selected (GtkCalendar * calendar, VnDateChoos
vn_date_chooser_changed (obj);
}
static gboolean vn_date_chooser_on_buton_press (GtkWidget * widget,
static gboolean vn_date_chooser_on_button_press (GtkWidget * widget,
GdkEventButton * event, VnDateChooser * obj)
{
gint x, y;
@ -322,7 +322,7 @@ static void vn_date_chooser_init (VnDateChooser * obj)
gtk_box_pack_start (GTK_BOX (obj->box),
GTK_WIDGET (obj->button), FALSE, FALSE, 0);
image = gtk_image_new_from_stock (GTK_STOCK_EDIT, GTK_ICON_SIZE_BUTTON);
image = gtk_image_new_from_icon_name ("gtk-edit", GTK_ICON_SIZE_BUTTON);
gtk_button_set_image (GTK_BUTTON (obj->button), image);
obj->label = GTK_LABEL (gtk_label_new (NULL));
@ -332,7 +332,7 @@ static void vn_date_chooser_init (VnDateChooser * obj)
obj->popup = gtk_window_new (GTK_WINDOW_POPUP);
g_object_connect (obj->popup
,"signal::button-press-event", vn_date_chooser_on_buton_press, obj
,"signal::button-press-event", vn_date_chooser_on_button_press, obj
,"signal::key-press-event", vn_date_chooser_on_key_press, obj
,NULL
);

View File

@ -48,7 +48,7 @@ static void vn_model_start_element (GMarkupParseContext * context,
const gchar ** values, gpointer data, GError ** err)
{
guint i;
VnModelData * d = (VnModelData *) data;
VnModelData * d = data;
for (i = 0; names[i]; i++)
if (!g_strcmp0 (names[i], "field"))
@ -61,7 +61,7 @@ static void vn_model_end_element (GMarkupParseContext * context,
const gchar * element, gpointer data, GError ** error)
{
GSList * f, * p;
VnModelData * d = (VnModelData *) data;
VnModelData * d = data;
g_return_if_fail (d->builder);
@ -107,16 +107,22 @@ static gboolean vn_model_buildable_custom_tag_start (GtkBuildable *buildable,
data_ptr->model = DB_MODEL (buildable);
data_ptr->fields = NULL;
data_ptr->params = NULL;
*data = data_ptr;
*parser = vn_model_parser;
return TRUE;
}
else
g_warning ("Unknown custom model tag: %s", tag);
return FALSE;
}
/*XXX TEST
static void vn_model_buildable_set_buildable_property (GtkBuildable *buildable,
GtkBuilder * builder, const gchar * name, const GValue * value)
{
g_message ("set buildable property");
}*/
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
static void vn_model_finalize (VnModel * obj)
@ -133,6 +139,7 @@ static void vn_model_class_init (VnModelClass * klass)
static void vn_model_buildable_init (GtkBuildableIface * iface)
{
iface->custom_tag_start = vn_model_buildable_custom_tag_start;
// iface->set_buildable_property = vn_model_buildable_set_buildable_property;
}
static void vn_model_init (VnModel * obj)

View File

@ -25,7 +25,6 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="scrollable">True</property>
<signal name="page-removed" handler="vn_gui_on_page_removed" swapped="no"/>
<signal name="switch-page" handler="vn_gui_on_switch_page" swapped="no"/>

View File

@ -86,7 +86,6 @@ Juan Ferrer Toribio</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="scrollable">True</property>
<property name="group_name">vn-notebook</property>
<signal name="page-removed" handler="vn_gui_on_main_page_removed" swapped="no"/>

View File

@ -23,6 +23,19 @@ G_DEFINE_ABSTRACT_TYPE (VnColumn, vn_column, GTK_TYPE_TREE_VIEW_COLUMN);
static GdkRGBA vn_column_red;
static GdkRGBA vn_column_green;
/**
* VnColumnStyleFunc:
* @obj: a #VnColumn
* @cell: the #GtkCellRenderer of the column
* @iter: the #GtkTreeIter pointing the row
* @value: (transfer none): the current value in the cell
*
* Function used to modify the cell depending on @value. This function is called
* during the #GtkTreeCellDataFunc of #VnColumn, so the actions made here will
* impact the speed of the user interface rendering, as this function is called
* constantly to show the #VnGrid on the screen.
**/
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Private
static void vn_column_value_changed (VnColumn * obj, const gchar * path, const GValue * value)
@ -44,7 +57,6 @@ static void vn_column_data_func (GtkTreeViewColumn * col, GtkCellRenderer * cell
GValue value = G_VALUE_INIT;
gtk_tree_model_get_value (model, iter, obj->column_index, &value);
obj->set_value (obj, model, iter, cell, &value);
g_value_unset (&value);
vn_gtk_tree_iter_to_db_iter (iter, &dbiter);
ops = db_model_get_row_operations (
@ -60,6 +72,11 @@ static void vn_column_data_func (GtkTreeViewColumn * col, GtkCellRenderer * cell
background = NULL;
g_object_set (cell, "cell-background-rgba", background, NULL);
if (obj->style_func)
obj->style_func (VN_COLUMN (col), cell, iter, &value);
g_value_unset (&value);
}
static void vn_column_set_renderer (VnColumn * obj, GtkCellRenderer * cell)
@ -344,6 +361,7 @@ enum
,PROP_EDITABLE
,PROP_NULL
,PROP_TAB_INDEX
,PROP_STYLE_FUNC
};
static void vn_column_set_property (VnColumn * obj, guint id,
@ -366,6 +384,9 @@ static void vn_column_set_property (VnColumn * obj, guint id,
case PROP_TAB_INDEX:
vn_column_set_tab_index (obj, g_value_get_int (value));
break;
case PROP_STYLE_FUNC:
obj->style_func = g_value_get_pointer (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
@ -391,6 +412,9 @@ static void vn_column_get_property (VnColumn * obj, guint id,
case PROP_TAB_INDEX:
g_value_set_int (value, obj->tab_index);
break;
case PROP_STYLE_FUNC:
g_value_set_pointer (value, obj->style_func);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
@ -402,6 +426,7 @@ static void vn_column_init (VnColumn * obj)
{
obj->column_index = -1;
obj->column_name = NULL;
obj->style_func = NULL;
}
static void vn_column_finalize (VnColumn * obj)
@ -458,4 +483,11 @@ static void vn_column_class_init (VnColumnClass * klass)
,-1, 255, 0
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
));
g_object_class_install_property (k, PROP_STYLE_FUNC,
g_param_spec_pointer ("style-func"
,_("Style function")
,_("A VnColumnStyleFunc to set the properties of each cell "
"depending on its value")
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
));
}

View File

@ -39,6 +39,9 @@ typedef void (*VnColumnSetEditableFunc) (VnColumn * obj, gboolean editable);
typedef void (*VnColumnSetNullFunc) (VnColumn * obj, gboolean null);
typedef void (*VnColumnModelChangedFunc) (VnColumn * obj);
typedef void (*VnColumnStyleFunc) (VnColumn * obj, GtkCellRenderer * cell,
GtkTreeIter * iter, const GValue * value);
struct _VnColumn
{
GtkTreeViewColumn parent;
@ -48,6 +51,7 @@ struct _VnColumn
gboolean editable;
gboolean null;
gint tab_index;
VnColumnStyleFunc style_func;
VnColumnSetValueFunc set_value;
};

View File

@ -26,6 +26,15 @@ enum {
static guint signals[LAST_SIGNAL] = {0};
/**
* VnFieldStyleFunc:
* @obj: a #VnField
* @widget: the #GtkWidget held by the field
* @value: (transfer none): the current value in the cell
*
* Function used to modify the field depending on @value.
**/
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Private
static void vn_field_spec_changed (VnField * obj)
@ -92,6 +101,9 @@ static void vn_field_changed (VnField * obj)
vn_field_on_param_value_changed, obj);
}
if (obj->style_func)
obj->style_func (obj, obj->field, obj->value);
g_signal_emit (obj, signals[VALUE_CHANGED], 0, obj->value);
}
@ -393,6 +405,7 @@ enum
,PROP_EDITABLE
,PROP_NULL
,PROP_DEFAULT
,PROP_STYLE_FUNC
};
static void vn_field_set_property (VnField * obj, guint id,
@ -428,6 +441,9 @@ static void vn_field_set_property (VnField * obj, guint id,
case PROP_DEFAULT:
vn_field_set_default (obj, g_value_get_boxed (value));
break;
case PROP_STYLE_FUNC:
obj->style_func = g_value_get_pointer (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
@ -462,6 +478,9 @@ static void vn_field_get_property (VnField * obj, guint id,
case PROP_DEFAULT:
g_value_set_boxed (value, vn_field_get_default (obj));
break;
case PROP_STYLE_FUNC:
g_value_set_pointer (value, obj->style_func);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
}
@ -480,6 +499,7 @@ static void vn_field_init (VnField * obj)
obj->spec = gvn_param_spec_new ();
obj->iterator = NULL;
obj->column_name = NULL;
obj->style_func = NULL;
obj->value = g_new0 (GValue, 1);
g_value_init (obj->value, GVN_TYPE_NULL);
@ -569,4 +589,11 @@ static void vn_field_class_init (VnFieldClass * klass)
,G_TYPE_VALUE
,G_PARAM_READWRITE
));
g_object_class_install_property (k, PROP_STYLE_FUNC,
g_param_spec_pointer ("style-func"
,_("Style function")
,_("A VnFieldStyleFunc to set the properties of each field "
"depending on its value")
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
));
}

View File

@ -33,6 +33,9 @@ typedef struct _VnFieldClass VnFieldClass;
typedef void (*VnFieldSetValueFunc) (VnField * obj, const GValue * value);
typedef void (*VnFieldValueChangedFunc) (VnField * obj, const GValue * value);
typedef void (*VnFieldStyleFunc) (VnField * obj, GtkWidget * widget,
const GValue * value);
struct _VnField
{
GtkEventBox parent;
@ -45,6 +48,7 @@ struct _VnField
gboolean update_param;
DbIterator * iterator;
gchar * column_name;
VnFieldStyleFunc style_func;
};
struct _VnFieldClass

View File

@ -23,11 +23,10 @@ G_DEFINE_ABSTRACT_TYPE (VnForm, vn_form, GTK_TYPE_ALIGNMENT);
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Public
/**
* vn_form_open:
* vn_form_open: (virtual open):
* @obj: the #VnForm
*
* Activates the form.
* Virtual: open
**/
void vn_form_open (VnForm * obj)
{

View File

@ -111,7 +111,6 @@ static void vn_grid_on_iter_changed (DbIterator * iterator, GtkTreeView * obj)
gtk_tree_view_set_cursor (obj, path, NULL, FALSE);
g_signal_handlers_unblock_by_func (obj, vn_grid_on_cursor_changed, iterator);
gtk_widget_grab_focus (GTK_WIDGET (obj));
gtk_tree_path_free (path);
}
else if (selection)

View File

@ -515,11 +515,9 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNotebook * notebook)
{
GdkRGBA color;
GSList * n, * m;
GError * err = NULL;
GtkActionGroup * actions = NULL;
GtkStyleContext * style;
GtkBuilder * builder;
VnWindow * window;
@ -536,12 +534,6 @@ static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNoteboo
gtk_notebook_set_group_name (notebook,
g_application_get_application_id (G_APPLICATION (obj->app)));
style = gtk_widget_get_style_context (GTK_WIDGET (widget));
gtk_style_context_get_background_color (style,
GTK_STATE_FLAG_NORMAL, &color);
gtk_widget_override_background_color (GTK_WIDGET (notebook),
GTK_STATE_FLAG_NORMAL, &color);
gtk_widget_show_all (GTK_WIDGET (widget));
// Loading the bars and associated actions

View File

@ -32,11 +32,10 @@ G_DEFINE_TYPE (VnMod, vn_mod, G_TYPE_OBJECT);
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Public
/**
* vn_mod_activate:
* vn_mod_activate: (virtual activate)
* @obj: the #VnMod
*
* Activates the module.
* Virtual: activate
**/
void vn_mod_activate (VnMod * obj)
{