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,7 +451,8 @@ static void db_file_loader_thread_download (File * file, DbFileLoader * obj)
"%s: '%s'", status_line, file->name); "%s: '%s'", status_line, file->name);
} }
file->data = g_bytes_new_take (data, len); if (data)
file->data = g_bytes_new_take (data, len);
final: final:
g_free (request); g_free (request);

View File

@ -69,14 +69,14 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
(_("SQL Editor") (_("SQL Editor")
,GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (eprop))) ,GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (eprop)))
,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT ,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT
,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL ,_("OK"), GTK_RESPONSE_OK
,GTK_STOCK_CLEAR, GTK_RESPONSE_REJECT ,_("Clear"), GTK_RESPONSE_REJECT
,GTK_STOCK_OK, GTK_RESPONSE_OK ,_("Cancel"), GTK_RESPONSE_CANCEL
,NULL ,NULL
)); ));
gtk_dialog_set_alternative_button_order (dialog, /* gtk_dialog_set_alternative_button_order (dialog,
GTK_RESPONSE_OK, GTK_RESPONSE_REJECT, GTK_RESPONSE_CANCEL, -1); GTK_RESPONSE_OK, GTK_RESPONSE_REJECT, GTK_RESPONSE_CANCEL, -1);*/
gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK); gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
gtk_window_set_default_size (GTK_WINDOW (dialog), obj->width, obj->height); gtk_window_set_default_size (GTK_WINDOW (dialog), obj->width, obj->height);
@ -84,9 +84,9 @@ static void glade_eprop_sql_show_dialog (GtkButton * button, GladeEditorProperty
gtk_adjustment_new (0,0,0,0,0,0)); gtk_adjustment_new (0,0,0,0,0,0));
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN); gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_widget_set_margin_top (scroll, 6); gtk_widget_set_margin_top (scroll, 6);
gtk_widget_set_margin_right (scroll, 6);
gtk_widget_set_margin_bottom (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)), gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)),
scroll, TRUE, TRUE, 6); 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") (eprop ? _("Model configuration") : _("Model properties configuration")
,GTK_WINDOW (glade_app_get_window ()) ,GTK_WINDOW (glade_app_get_window ())
,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT ,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT
,GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL ,_("OK"), GTK_RESPONSE_OK
,GTK_STOCK_CLEAR, GTK_RESPONSE_REJECT ,_("Clear"), GTK_RESPONSE_REJECT
,GTK_STOCK_OK, GTK_RESPONSE_OK ,_("Cancel"), GTK_RESPONSE_CANCEL
,NULL ,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_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300); gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300);

View File

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

145
po/ca.po
View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hedera 1.0\n" "Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-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" "PO-Revision-Date: 2013-06-04 13:38+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n" "Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Catalan\n" "Language-Team: Catalan\n"
@ -31,7 +31,7 @@ msgstr "El parametre no pot ser nul"
msgid "Incompatible type for this param" msgid "Incompatible type for this param"
msgstr "Tipus incompatible per a aquest parametre" msgstr "Tipus incompatible per a aquest parametre"
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:518 #: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:529
msgid "Value" msgid "Value"
msgstr "" msgstr ""
@ -71,15 +71,15 @@ msgstr ""
msgid "The spec of the parameter" msgid "The spec of the parameter"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:546 #: ../gvn/gvn-param.c:478 ../vn/vn-field.c:557
msgid "Glib Type" msgid "Glib Type"
msgstr "" 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" msgid "The type of the value"
msgstr "" 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" msgid "Editable"
msgstr "" msgstr ""
@ -87,7 +87,7 @@ msgstr ""
msgid "Whether the param value can be modified" msgid "Whether the param value can be modified"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:560 ../vn/vn-column.c:449 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:571 ../vn/vn-column.c:474
msgid "Null" msgid "Null"
msgstr "" msgstr ""
@ -95,11 +95,11 @@ msgstr ""
msgid "Whether the param value can be of type GVN_TYPE_NULL" msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:567 #: ../gvn/gvn-param.c:499 ../vn/vn-field.c:578
msgid "Default Value" msgid "Default Value"
msgstr "" 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" msgid "The default value"
msgstr "" msgstr ""
@ -116,11 +116,11 @@ msgstr ""
msgid "No" msgid "No"
msgstr "" msgstr ""
#: ../sql/sql-render.c:413 #: ../sql/sql-render.c:420
msgid "Delimiter" msgid "Delimiter"
msgstr "" msgstr ""
#: ../sql/sql-render.c:414 #: ../sql/sql-render.c:421
msgid "The character used for delimite the name of fields, tables..." msgid "The character used for delimite the name of fields, tables..."
msgstr "" msgstr ""
@ -162,8 +162,8 @@ msgstr "Recordar"
msgid "Wether to rememeber the selection when model is refreshed" msgid "Wether to rememeber the selection when model is refreshed"
msgstr "" msgstr ""
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1564 #: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1556
#: ../vn/vn-form.c:244 #: ../vn/vn-form.c:243
msgid "Connection" msgid "Connection"
msgstr "" msgstr ""
@ -265,7 +265,7 @@ msgstr ""
msgid "A column to apply the operations over it" msgid "A column to apply the operations over it"
msgstr "" msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532 #: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:543
msgid "Iterator" msgid "Iterator"
msgstr "" msgstr ""
@ -273,7 +273,7 @@ msgstr ""
msgid "The iterator owner of param" msgid "The iterator owner of param"
msgstr "" msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:428 #: ../db/db-param.c:258 ../vn/vn-column.c:453
msgid "Column index" msgid "Column index"
msgstr "" msgstr ""
@ -281,11 +281,11 @@ msgstr ""
msgid "The referenced column index" msgid "The referenced column index"
msgstr "" 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" msgid "Column name"
msgstr "Nom de la columna" 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" msgid "The referenced column name"
msgstr "Nom de la columna referenciada" msgstr "Nom de la columna referenciada"
@ -325,7 +325,7 @@ msgstr ""
msgid "The path where query files are located" msgid "The path where query files are located"
msgstr "" 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 #: ../vn/column/vn-column-image.c:493
msgid "Host" msgid "Host"
msgstr "" msgstr ""
@ -393,93 +393,93 @@ msgstr ""
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "" 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" msgid "The host web server name to get the images"
msgstr "" 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" msgid "Path"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:724 #: ../db/db-file-loader.c:725
msgid "The path of the directory to interact with" msgid "The path of the directory to interact with"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:731 #: ../db/db-file-loader.c:732
msgid "Cache directory" msgid "Cache directory"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:732 #: ../db/db-file-loader.c:733
msgid "" msgid ""
"The local directory where the downloaded files will be stored. The default " "The local directory where the downloaded files will be stored. The default "
"cache directory is 'hedera', under g_get_user_cache_dir()." "cache directory is 'hedera', under g_get_user_cache_dir()."
msgstr "" msgstr ""
#: ../db/db-file-loader.c:740 #: ../db/db-file-loader.c:741
msgid "Maximal cache size" msgid "Maximal cache size"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:741 #: ../db/db-file-loader.c:742
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:642 #: ../vn/vn-gui.c:634
msgid "Connection has been lost. Do you want to reconnect?" msgid "Connection has been lost. Do you want to reconnect?"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:649 #: ../vn/vn-gui.c:641
msgid "An error occurred in the connection." msgid "An error occurred in the connection."
msgstr "" msgstr ""
#: ../vn/vn-gui.c:652 #: ../vn/vn-gui.c:644
msgid "Database error" msgid "Database error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:659 #: ../vn/vn-gui.c:651
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:999 #: ../vn/vn-gui.c:991
msgid "Closing connection" msgid "Closing connection"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1001 #: ../vn/vn-gui.c:993
msgid "Transaction started" msgid "Transaction started"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1003 #: ../vn/vn-gui.c:995
msgid "Connecting" msgid "Connecting"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1005 #: ../vn/vn-gui.c:997
msgid "Connection lost" msgid "Connection lost"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1007 #: ../vn/vn-gui.c:999
msgid "Connection closed" msgid "Connection closed"
msgstr "" 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" msgid "Loading"
msgstr "" 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" msgid "Ready"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1565 #: ../vn/vn-gui.c:1557
msgid "The connection used by Gui" msgid "The connection used by Gui"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1571 #: ../vn/vn-gui.c:1563
msgid "Application" msgid "Application"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1572 #: ../vn/vn-gui.c:1564
msgid "The application handler for the entire program" msgid "The application handler for the entire program"
msgstr "" msgstr ""
#: ../vn/vn-grid.c:520 #: ../vn/vn-grid.c:519
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "" msgstr ""
@ -543,31 +543,31 @@ msgstr ""
msgid "Sets if it is used to handle a iterator with a single record" msgid "Sets if it is used to handle a iterator with a single record"
msgstr "" msgstr ""
#: ../vn/vn-form.c:230 #: ../vn/vn-form.c:229
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: ../vn/vn-form.c:231 #: ../vn/vn-form.c:230
msgid "The form name" msgid "The form name"
msgstr "" msgstr ""
#: ../vn/vn-form.c:237 #: ../vn/vn-form.c:236
msgid "Gui" msgid "Gui"
msgstr "" msgstr ""
#: ../vn/vn-form.c:238 #: ../vn/vn-form.c:237
msgid "The Gui object" msgid "The Gui object"
msgstr "" msgstr ""
#: ../vn/vn-form.c:245 #: ../vn/vn-form.c:244
msgid "The connection used by the module" msgid "The connection used by the module"
msgstr "" msgstr ""
#: ../vn/vn-form.c:251 #: ../vn/vn-form.c:250
msgid "Module" msgid "Module"
msgstr "" msgstr ""
#: ../vn/vn-form.c:252 #: ../vn/vn-form.c:251
msgid "The module" msgid "The module"
msgstr "" msgstr ""
@ -588,35 +588,44 @@ msgstr ""
msgid "The application identifier" msgid "The application identifier"
msgstr "" msgstr ""
#: ../vn/vn-field.c:519 #: ../vn/vn-field.c:530
msgid "The current value of the field" msgid "The current value of the field"
msgstr "" 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 #: ../glade/glade-db-iterator.c:116
msgid "Parameter" msgid "Parameter"
msgstr "" msgstr ""
#: ../vn/vn-field.c:526 #: ../vn/vn-field.c:537
msgid "The param where the field can read/write its value" msgid "The param where the field can read/write its value"
msgstr "" msgstr ""
#: ../vn/vn-field.c:533 #: ../vn/vn-field.c:544
msgid "The iterator used to get the field param" msgid "The iterator used to get the field param"
msgstr "" msgstr ""
#: ../vn/vn-field.c:540 #: ../vn/vn-field.c:551
msgid "The column name on the iterator" msgid "The column name on the iterator"
msgstr "" msgstr ""
#: ../vn/vn-field.c:554 #: ../vn/vn-field.c:565
msgid "Whether the field value is user editable" msgid "Whether the field value is user editable"
msgstr "" 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" msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "" 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-entry.c:156 ../vn/field/vn-date-chooser.c:363
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122 #: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
msgid "Format" msgid "Format"
@ -732,22 +741,27 @@ msgstr ""
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "" msgstr ""
#: ../vn/vn-column.c:429 #: ../vn/vn-column.c:454
msgid "The column index in the model" msgid "The column index in the model"
msgstr "" msgstr ""
#: ../vn/vn-column.c:443 #: ../vn/vn-column.c:468
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "" msgstr ""
#: ../vn/vn-column.c:456 #: ../vn/vn-column.c:481
msgid "Tab index" msgid "Tab index"
msgstr "" msgstr ""
#: ../vn/vn-column.c:457 #: ../vn/vn-column.c:482
msgid "Order in which the tab selects the columns for edition" msgid "Order in which the tab selects the columns for edition"
msgstr "" msgstr ""
#: ../vn/vn-column.c:489
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
#: ../vn/column/vn-column-spin.c:238 #: ../vn/column/vn-column-spin.c:238
msgid "Climb rate" msgid "Climb rate"
msgstr "" msgstr ""
@ -963,7 +977,8 @@ msgstr ""
msgid "Now" msgid "Now"
msgstr "" 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" msgid "Clear"
msgstr "" msgstr ""
@ -975,6 +990,14 @@ msgstr ""
msgid "SQL Editor" msgid "SQL Editor"
msgstr "" 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 #: ../glade/glade-db-model.c:186
msgid "Open the SQL Editor" msgid "Open the SQL Editor"
msgstr "" msgstr ""
@ -1011,15 +1034,15 @@ msgstr ""
msgid "Model properties configuration" msgid "Model properties configuration"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:246 #: ../glade/glade-eprop-model.c:244
msgid "Select a VnModel for the property" msgid "Select a VnModel for the property"
msgstr "" 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" msgid "New Model"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:308 #: ../glade/glade-eprop-model.c:306
msgid "Edit Model" msgid "Edit Model"
msgstr "" msgstr ""

149
po/es.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hedera 1.0\n" "Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-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" "PO-Revision-Date: 2013-06-04 13:36+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n" "Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Spanish\n" "Language-Team: Spanish\n"
@ -33,7 +33,7 @@ msgstr "El parámetro no puede ser nulo"
msgid "Incompatible type for this param" msgid "Incompatible type for this param"
msgstr "Tipo incompatible para este parametro" msgstr "Tipo incompatible para este parametro"
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:518 #: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:529
msgid "Value" msgid "Value"
msgstr "Valor" msgstr "Valor"
@ -73,15 +73,15 @@ msgstr "Spec"
msgid "The spec of the parameter" msgid "The spec of the parameter"
msgstr "Datos específicos del parámetro" msgstr "Datos específicos del parámetro"
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:546 #: ../gvn/gvn-param.c:478 ../vn/vn-field.c:557
msgid "Glib Type" msgid "Glib Type"
msgstr "Tipo Glib" 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" msgid "The type of the value"
msgstr "El tipo del valor" msgstr "El tipo del valor"
#: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:442 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:564 ../vn/vn-column.c:467
msgid "Editable" msgid "Editable"
msgstr "Editable" msgstr "Editable"
@ -89,7 +89,7 @@ msgstr "Editable"
msgid "Whether the param value can be modified" msgid "Whether the param value can be modified"
msgstr "Indica si el parámetro puede modificarse" msgstr "Indica si el parámetro puede modificarse"
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:560 ../vn/vn-column.c:449 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:571 ../vn/vn-column.c:474
msgid "Null" msgid "Null"
msgstr "Nulo" msgstr "Nulo"
@ -97,11 +97,11 @@ msgstr "Nulo"
msgid "Whether the param value can be of type GVN_TYPE_NULL" msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "Indica si el parámetro puede ser nulo" msgstr "Indica si el parámetro puede ser nulo"
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:567 #: ../gvn/gvn-param.c:499 ../vn/vn-field.c:578
msgid "Default Value" msgid "Default Value"
msgstr "Valor por defecto" 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" msgid "The default value"
msgstr "El valor por defecto" msgstr "El valor por defecto"
@ -118,11 +118,11 @@ msgstr "Sí"
msgid "No" msgid "No"
msgstr "No" msgstr "No"
#: ../sql/sql-render.c:413 #: ../sql/sql-render.c:420
msgid "Delimiter" msgid "Delimiter"
msgstr "Delimitador" msgstr "Delimitador"
#: ../sql/sql-render.c:414 #: ../sql/sql-render.c:421
msgid "The character used for delimite the name of fields, tables..." msgid "The character used for delimite the name of fields, tables..."
msgstr "El carácter usado para delimitar los nombres de campos, tablas..." msgstr "El carácter usado para delimitar los nombres de campos, tablas..."
@ -164,8 +164,8 @@ msgid "Wether to rememeber the selection when model is refreshed"
msgstr "" msgstr ""
"Si se recordará o no la fila seleccionado cuando se refresque el modelo" "Si se recordará o no la fila seleccionado cuando se refresque el modelo"
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1564 #: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1556
#: ../vn/vn-form.c:244 #: ../vn/vn-form.c:243
msgid "Connection" msgid "Connection"
msgstr "Conexión" msgstr "Conexión"
@ -273,7 +273,7 @@ msgstr "Columna"
msgid "A column to apply the operations over it" msgid "A column to apply the operations over it"
msgstr "Una columna sobre la que se aplicarán las operaciones" msgstr "Una columna sobre la que se aplicarán las operaciones"
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532 #: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:543
msgid "Iterator" msgid "Iterator"
msgstr "Iterator" msgstr "Iterator"
@ -281,7 +281,7 @@ msgstr "Iterator"
msgid "The iterator owner of param" msgid "The iterator owner of param"
msgstr "El Iterator dueño del parámetro" msgstr "El Iterator dueño del parámetro"
#: ../db/db-param.c:258 ../vn/vn-column.c:428 #: ../db/db-param.c:258 ../vn/vn-column.c:453
msgid "Column index" msgid "Column index"
msgstr "Posición" msgstr "Posición"
@ -289,11 +289,11 @@ msgstr "Posición"
msgid "The referenced column index" msgid "The referenced column index"
msgstr "La posición de la columna en el Grid" msgstr "La posición de la columna en el Grid"
#: ../db/db-param.c:265 ../vn/vn-field.c:539 ../vn/vn-column.c:435 #: ../db/db-param.c:265 ../vn/vn-field.c:550 ../vn/vn-column.c:460
msgid "Column name" msgid "Column name"
msgstr "Nombre de la columna" 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" msgid "The referenced column name"
msgstr "" msgstr ""
"El nombre del campo en el Iterator vinculado al Grid al que pretenece la " "El nombre del campo en el Iterator vinculado al Grid al que pretenece la "
@ -335,7 +335,7 @@ msgstr "Ruta de consultas"
msgid "The path where query files are located" msgid "The path where query files are located"
msgstr "La ruta donde se encuentran los archivos de consultas" msgstr "La ruta donde se encuentran los archivos de consultas"
#: ../db/db-conn.c: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 #: ../vn/column/vn-column-image.c:493
msgid "Host" msgid "Host"
msgstr "Host" msgstr "Host"
@ -403,23 +403,23 @@ msgstr "No se ha guardado %s en la cache"
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "Longitud del contenido del archivo %s desconocida" msgstr "Longitud del contenido del archivo %s desconocida"
#: ../db/db-file-loader.c: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" msgid "The host web server name to get the images"
msgstr "El nombre del servidor web al que se conectará" msgstr "El nombre del servidor web al que se conectará"
#: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:501 #: ../db/db-file-loader.c:724 ../vn/column/vn-column-image.c:501
msgid "Path" msgid "Path"
msgstr "Ruta" msgstr "Ruta"
#: ../db/db-file-loader.c:724 #: ../db/db-file-loader.c:725
msgid "The path of the directory to interact with" msgid "The path of the directory to interact with"
msgstr "La ruta del directorio con el que se interactuará" 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" msgid "Cache directory"
msgstr "Directorio de caché" msgstr "Directorio de caché"
#: ../db/db-file-loader.c:732 #: ../db/db-file-loader.c:733
msgid "" msgid ""
"The local directory where the downloaded files will be stored. The default " "The local directory where the downloaded files will be stored. The default "
"cache directory is 'hedera', under g_get_user_cache_dir()." "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 " "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()." "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" msgid "Maximal cache size"
msgstr "Tamaño máximo de la caché" 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" msgid "The maximal size for the contents of the cache directory"
msgstr "El tamaño máximo para los contenidos del directorio de caché" msgstr "El tamaño máximo para los contenidos del directorio de caché"
#: ../vn/vn-gui.c:642 #: ../vn/vn-gui.c:634
msgid "Connection has been lost. Do you want to reconnect?" msgid "Connection has been lost. Do you want to reconnect?"
msgstr "Se ha perdido la conexión. ¿Quieres reconectar?" msgstr "Se ha perdido la conexión. ¿Quieres reconectar?"
#: ../vn/vn-gui.c:649 #: ../vn/vn-gui.c:641
msgid "An error occurred in the connection." msgid "An error occurred in the connection."
msgstr "Ha habido un error en la conexión." msgstr "Ha habido un error en la conexión."
#: ../vn/vn-gui.c:652 #: ../vn/vn-gui.c:644
msgid "Database error" msgid "Database error"
msgstr "Error en la base de datos" msgstr "Error en la base de datos"
#: ../vn/vn-gui.c:659 #: ../vn/vn-gui.c:651
msgid "Unknown error" msgid "Unknown error"
msgstr "Error desconocido" msgstr "Error desconocido"
#: ../vn/vn-gui.c:999 #: ../vn/vn-gui.c:991
msgid "Closing connection" msgid "Closing connection"
msgstr "Cerrando conexión" msgstr "Cerrando conexión"
#: ../vn/vn-gui.c:1001 #: ../vn/vn-gui.c:993
msgid "Transaction started" msgid "Transaction started"
msgstr "Transacción iniciada" msgstr "Transacción iniciada"
#: ../vn/vn-gui.c:1003 #: ../vn/vn-gui.c:995
msgid "Connecting" msgid "Connecting"
msgstr "Conectando" msgstr "Conectando"
#: ../vn/vn-gui.c:1005 #: ../vn/vn-gui.c:997
msgid "Connection lost" msgid "Connection lost"
msgstr "Conexión perdida" msgstr "Conexión perdida"
#: ../vn/vn-gui.c:1007 #: ../vn/vn-gui.c:999
msgid "Connection closed" msgid "Connection closed"
msgstr "Conexión cerrada" 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" msgid "Loading"
msgstr "Cargando" 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" msgid "Ready"
msgstr "Listo" msgstr "Listo"
#: ../vn/vn-gui.c:1565 #: ../vn/vn-gui.c:1557
msgid "The connection used by Gui" msgid "The connection used by Gui"
msgstr "La conexión empleada por Gui" msgstr "La conexión empleada por Gui"
#: ../vn/vn-gui.c:1571 #: ../vn/vn-gui.c:1563
msgid "Application" msgid "Application"
msgstr "Aplicación" msgstr "Aplicación"
#: ../vn/vn-gui.c:1572 #: ../vn/vn-gui.c:1564
msgid "The application handler for the entire program" msgid "The application handler for the entire program"
msgstr "El manejador de la aplicación para todo el programa" msgstr "El manejador de la aplicación para todo el programa"
#: ../vn/vn-grid.c:520 #: ../vn/vn-grid.c:519
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "El Iterator empleado por 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" msgid "Sets if it is used to handle a iterator with a single record"
msgstr "Indica si se utiliza para manejar solo un registro" msgstr "Indica si se utiliza para manejar solo un registro"
#: ../vn/vn-form.c:230 #: ../vn/vn-form.c:229
msgid "Name" msgid "Name"
msgstr "Nombre" msgstr "Nombre"
#: ../vn/vn-form.c:231 #: ../vn/vn-form.c:230
msgid "The form name" msgid "The form name"
msgstr "El nombre del form" msgstr "El nombre del form"
#: ../vn/vn-form.c:237 #: ../vn/vn-form.c:236
msgid "Gui" msgid "Gui"
msgstr "Gui" msgstr "Gui"
#: ../vn/vn-form.c:238 #: ../vn/vn-form.c:237
msgid "The Gui object" msgid "The Gui object"
msgstr "El objeto Gui" msgstr "El objeto Gui"
#: ../vn/vn-form.c:245 #: ../vn/vn-form.c:244
msgid "The connection used by the module" msgid "The connection used by the module"
msgstr "La conexión empleada por el módulo" msgstr "La conexión empleada por el módulo"
#: ../vn/vn-form.c:251 #: ../vn/vn-form.c:250
msgid "Module" msgid "Module"
msgstr "Módulo" msgstr "Módulo"
#: ../vn/vn-form.c:252 #: ../vn/vn-form.c:251
msgid "The module" msgid "The module"
msgstr "El módulo" msgstr "El módulo"
@ -600,35 +600,46 @@ msgstr "Id de la aplicación"
msgid "The application identifier" msgid "The application identifier"
msgstr "El identificador de la aplicación" msgstr "El identificador de la aplicación"
#: ../vn/vn-field.c:519 #: ../vn/vn-field.c:530
msgid "The current value of the field" msgid "The current value of the field"
msgstr "El valor actual del campo" msgstr "El valor actual del campo"
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71 #: ../vn/vn-field.c:536 ../glade/glade-db-iterator.c:71
#: ../glade/glade-db-iterator.c:116 #: ../glade/glade-db-iterator.c:116
msgid "Parameter" msgid "Parameter"
msgstr "Parámetro" msgstr "Parámetro"
#: ../vn/vn-field.c:526 #: ../vn/vn-field.c:537
msgid "The param where the field can read/write its value" msgid "The param where the field can read/write its value"
msgstr "El parámetro en el que el campo escribe/lee su valor" msgstr "El parámetro en el que el campo escribe/lee su valor"
#: ../vn/vn-field.c:533 #: ../vn/vn-field.c:544
msgid "The iterator used to get the field param" msgid "The iterator used to get the field param"
msgstr "El Iterator con el que se obtiene el parámetro" msgstr "El Iterator con el que se obtiene el parámetro"
#: ../vn/vn-field.c:540 #: ../vn/vn-field.c:551
msgid "The column name on the iterator" msgid "The column name on the iterator"
msgstr "El nombre de la columna en el Iterator" msgstr "El nombre de la columna en el Iterator"
#: ../vn/vn-field.c:554 #: ../vn/vn-field.c:565
msgid "Whether the field value is user editable" msgid "Whether the field value is user editable"
msgstr "Si el valor de campo puede ser editado por el usuario" msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-field.c: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" msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "Si el campo puede ser del tipo GVN_TYPE_NULL" msgstr "Si el campo puede ser del tipo GVN_TYPE_NULL"
#: ../vn/vn-field.c: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-entry.c:156 ../vn/field/vn-date-chooser.c:363
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122 #: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
msgid "Format" msgid "Format"
@ -747,22 +758,29 @@ msgstr "Bytes"
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "Una estructura GBytes con los datos de la imágen" msgstr "Una estructura GBytes con los datos de la imágen"
#: ../vn/vn-column.c:429 #: ../vn/vn-column.c:454
msgid "The column index in the model" msgid "The column index in the model"
msgstr "El índice de la columna en el modelo" msgstr "El índice de la columna en el modelo"
#: ../vn/vn-column.c:443 #: ../vn/vn-column.c:468
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "Si el valor de campo puede ser editado por el usuario" msgstr "Si el valor de campo puede ser editado por el usuario"
#: ../vn/vn-column.c:456 #: ../vn/vn-column.c:481
msgid "Tab index" msgid "Tab index"
msgstr "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" msgid "Order in which the tab selects the columns for edition"
msgstr "Orden en el cual el tabulador selecciona las columnas para editar" msgstr "Orden en el cual el tabulador selecciona las columnas para editar"
#: ../vn/vn-column.c: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 #: ../vn/column/vn-column-spin.c:238
msgid "Climb rate" msgid "Climb rate"
msgstr "Tasa de subida" msgstr "Tasa de subida"
@ -998,7 +1016,8 @@ msgstr "_Barra de herramientas"
msgid "Now" msgid "Now"
msgstr "Ahora" 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" msgid "Clear"
msgstr "Limpiar" msgstr "Limpiar"
@ -1010,6 +1029,14 @@ msgstr "Nueva consulta SQL"
msgid "SQL Editor" msgid "SQL Editor"
msgstr "Editor SQL" 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 #: ../glade/glade-db-model.c:186
msgid "Open the SQL Editor" msgid "Open the SQL Editor"
msgstr "Abrir el Editor SQL" msgstr "Abrir el Editor SQL"
@ -1046,15 +1073,15 @@ msgstr "Configuración del modelo"
msgid "Model properties configuration" msgid "Model properties configuration"
msgstr "Configuración de propiedades del modelo" 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" msgid "Select a VnModel for the property"
msgstr "Elige un VnModel para la propiedad" msgstr "Elige un VnModel para la propiedad"
#: ../glade/glade-eprop-model.c:267 ../glade/glade-eprop-model.c:313 #: ../glade/glade-eprop-model.c:265 ../glade/glade-eprop-model.c:311
msgid "New Model" msgid "New Model"
msgstr "Nuevo Modelo" msgstr "Nuevo Modelo"
#: ../glade/glade-eprop-model.c:308 #: ../glade/glade-eprop-model.c:306
msgid "Edit Model" msgid "Edit Model"
msgstr "Editar Modelo" msgstr "Editar Modelo"

145
po/nl.po
View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: hedera 1.0\n" "Project-Id-Version: hedera 1.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-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" "PO-Revision-Date: 2012-10-09 11:38+0200\n"
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n" "Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
"Language-Team: Dutch\n" "Language-Team: Dutch\n"
@ -33,7 +33,7 @@ msgstr ""
msgid "Incompatible type for this param" msgid "Incompatible type for this param"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:518 #: ../gvn/gvn-param.c:443 ../sql/sql-value.c:235 ../vn/vn-field.c:529
msgid "Value" msgid "Value"
msgstr "" msgstr ""
@ -73,15 +73,15 @@ msgstr ""
msgid "The spec of the parameter" msgid "The spec of the parameter"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:478 ../vn/vn-field.c:546 #: ../gvn/gvn-param.c:478 ../vn/vn-field.c:557
msgid "Glib Type" msgid "Glib Type"
msgstr "" 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" msgid "The type of the value"
msgstr "" 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" msgid "Editable"
msgstr "" msgstr ""
@ -89,7 +89,7 @@ msgstr ""
msgid "Whether the param value can be modified" msgid "Whether the param value can be modified"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:492 ../vn/vn-field.c:560 ../vn/vn-column.c:449 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:571 ../vn/vn-column.c:474
msgid "Null" msgid "Null"
msgstr "" msgstr ""
@ -97,11 +97,11 @@ msgstr ""
msgid "Whether the param value can be of type GVN_TYPE_NULL" msgid "Whether the param value can be of type GVN_TYPE_NULL"
msgstr "" msgstr ""
#: ../gvn/gvn-param.c:499 ../vn/vn-field.c:567 #: ../gvn/gvn-param.c:499 ../vn/vn-field.c:578
msgid "Default Value" msgid "Default Value"
msgstr "" 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" msgid "The default value"
msgstr "" msgstr ""
@ -118,11 +118,11 @@ msgstr ""
msgid "No" msgid "No"
msgstr "" msgstr ""
#: ../sql/sql-render.c:413 #: ../sql/sql-render.c:420
msgid "Delimiter" msgid "Delimiter"
msgstr "" msgstr ""
#: ../sql/sql-render.c:414 #: ../sql/sql-render.c:421
msgid "The character used for delimite the name of fields, tables..." msgid "The character used for delimite the name of fields, tables..."
msgstr "" msgstr ""
@ -163,8 +163,8 @@ msgstr ""
msgid "Wether to rememeber the selection when model is refreshed" msgid "Wether to rememeber the selection when model is refreshed"
msgstr "" msgstr ""
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1564 #: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1556
#: ../vn/vn-form.c:244 #: ../vn/vn-form.c:243
msgid "Connection" msgid "Connection"
msgstr "" msgstr ""
@ -266,7 +266,7 @@ msgstr ""
msgid "A column to apply the operations over it" msgid "A column to apply the operations over it"
msgstr "" msgstr ""
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532 #: ../db/db-param.c:251 ../vn/vn-grid.c:518 ../vn/vn-field.c:543
msgid "Iterator" msgid "Iterator"
msgstr "" msgstr ""
@ -274,7 +274,7 @@ msgstr ""
msgid "The iterator owner of param" msgid "The iterator owner of param"
msgstr "" msgstr ""
#: ../db/db-param.c:258 ../vn/vn-column.c:428 #: ../db/db-param.c:258 ../vn/vn-column.c:453
msgid "Column index" msgid "Column index"
msgstr "" msgstr ""
@ -282,11 +282,11 @@ msgstr ""
msgid "The referenced column index" msgid "The referenced column index"
msgstr "" 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" msgid "Column name"
msgstr "" 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" msgid "The referenced column name"
msgstr "" msgstr ""
@ -326,7 +326,7 @@ msgstr ""
msgid "The path where query files are located" msgid "The path where query files are located"
msgstr "" 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 #: ../vn/column/vn-column-image.c:493
msgid "Host" msgid "Host"
msgstr "" msgstr ""
@ -394,93 +394,93 @@ msgstr ""
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "" 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" msgid "The host web server name to get the images"
msgstr "" 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" msgid "Path"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:724 #: ../db/db-file-loader.c:725
msgid "The path of the directory to interact with" msgid "The path of the directory to interact with"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:731 #: ../db/db-file-loader.c:732
msgid "Cache directory" msgid "Cache directory"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:732 #: ../db/db-file-loader.c:733
msgid "" msgid ""
"The local directory where the downloaded files will be stored. The default " "The local directory where the downloaded files will be stored. The default "
"cache directory is 'hedera', under g_get_user_cache_dir()." "cache directory is 'hedera', under g_get_user_cache_dir()."
msgstr "" msgstr ""
#: ../db/db-file-loader.c:740 #: ../db/db-file-loader.c:741
msgid "Maximal cache size" msgid "Maximal cache size"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:741 #: ../db/db-file-loader.c:742
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:642 #: ../vn/vn-gui.c:634
msgid "Connection has been lost. Do you want to reconnect?" msgid "Connection has been lost. Do you want to reconnect?"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:649 #: ../vn/vn-gui.c:641
msgid "An error occurred in the connection." msgid "An error occurred in the connection."
msgstr "" msgstr ""
#: ../vn/vn-gui.c:652 #: ../vn/vn-gui.c:644
msgid "Database error" msgid "Database error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:659 #: ../vn/vn-gui.c:651
msgid "Unknown error" msgid "Unknown error"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:999 #: ../vn/vn-gui.c:991
msgid "Closing connection" msgid "Closing connection"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1001 #: ../vn/vn-gui.c:993
msgid "Transaction started" msgid "Transaction started"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1003 #: ../vn/vn-gui.c:995
msgid "Connecting" msgid "Connecting"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1005 #: ../vn/vn-gui.c:997
msgid "Connection lost" msgid "Connection lost"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1007 #: ../vn/vn-gui.c:999
msgid "Connection closed" msgid "Connection closed"
msgstr "" 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" msgid "Loading"
msgstr "" 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" msgid "Ready"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1565 #: ../vn/vn-gui.c:1557
msgid "The connection used by Gui" msgid "The connection used by Gui"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1571 #: ../vn/vn-gui.c:1563
msgid "Application" msgid "Application"
msgstr "" msgstr ""
#: ../vn/vn-gui.c:1572 #: ../vn/vn-gui.c:1564
msgid "The application handler for the entire program" msgid "The application handler for the entire program"
msgstr "" msgstr ""
#: ../vn/vn-grid.c:520 #: ../vn/vn-grid.c:519
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "" msgstr ""
@ -544,31 +544,31 @@ msgstr ""
msgid "Sets if it is used to handle a iterator with a single record" msgid "Sets if it is used to handle a iterator with a single record"
msgstr "" msgstr ""
#: ../vn/vn-form.c:230 #: ../vn/vn-form.c:229
msgid "Name" msgid "Name"
msgstr "" msgstr ""
#: ../vn/vn-form.c:231 #: ../vn/vn-form.c:230
msgid "The form name" msgid "The form name"
msgstr "" msgstr ""
#: ../vn/vn-form.c:237 #: ../vn/vn-form.c:236
msgid "Gui" msgid "Gui"
msgstr "" msgstr ""
#: ../vn/vn-form.c:238 #: ../vn/vn-form.c:237
msgid "The Gui object" msgid "The Gui object"
msgstr "" msgstr ""
#: ../vn/vn-form.c:245 #: ../vn/vn-form.c:244
msgid "The connection used by the module" msgid "The connection used by the module"
msgstr "" msgstr ""
#: ../vn/vn-form.c:251 #: ../vn/vn-form.c:250
msgid "Module" msgid "Module"
msgstr "" msgstr ""
#: ../vn/vn-form.c:252 #: ../vn/vn-form.c:251
msgid "The module" msgid "The module"
msgstr "" msgstr ""
@ -589,35 +589,44 @@ msgstr ""
msgid "The application identifier" msgid "The application identifier"
msgstr "" msgstr ""
#: ../vn/vn-field.c:519 #: ../vn/vn-field.c:530
msgid "The current value of the field" msgid "The current value of the field"
msgstr "" 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 #: ../glade/glade-db-iterator.c:116
msgid "Parameter" msgid "Parameter"
msgstr "" msgstr ""
#: ../vn/vn-field.c:526 #: ../vn/vn-field.c:537
msgid "The param where the field can read/write its value" msgid "The param where the field can read/write its value"
msgstr "" msgstr ""
#: ../vn/vn-field.c:533 #: ../vn/vn-field.c:544
msgid "The iterator used to get the field param" msgid "The iterator used to get the field param"
msgstr "" msgstr ""
#: ../vn/vn-field.c:540 #: ../vn/vn-field.c:551
msgid "The column name on the iterator" msgid "The column name on the iterator"
msgstr "" msgstr ""
#: ../vn/vn-field.c:554 #: ../vn/vn-field.c:565
msgid "Whether the field value is user editable" msgid "Whether the field value is user editable"
msgstr "" 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" msgid "Whether the field value can be of type GVN_TYPE_NULL"
msgstr "" 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-entry.c:156 ../vn/field/vn-date-chooser.c:363
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122 #: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
msgid "Format" msgid "Format"
@ -733,22 +742,27 @@ msgstr ""
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "" msgstr ""
#: ../vn/vn-column.c:429 #: ../vn/vn-column.c:454
msgid "The column index in the model" msgid "The column index in the model"
msgstr "" msgstr ""
#: ../vn/vn-column.c:443 #: ../vn/vn-column.c:468
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "" msgstr ""
#: ../vn/vn-column.c:456 #: ../vn/vn-column.c:481
msgid "Tab index" msgid "Tab index"
msgstr "" msgstr ""
#: ../vn/vn-column.c:457 #: ../vn/vn-column.c:482
msgid "Order in which the tab selects the columns for edition" msgid "Order in which the tab selects the columns for edition"
msgstr "" msgstr ""
#: ../vn/vn-column.c:489
msgid ""
"A VnColumnStyleFunc to set the properties of each cell depending on its value"
msgstr ""
#: ../vn/column/vn-column-spin.c:238 #: ../vn/column/vn-column-spin.c:238
msgid "Climb rate" msgid "Climb rate"
msgstr "" msgstr ""
@ -963,7 +977,8 @@ msgstr ""
msgid "Now" msgid "Now"
msgstr "" 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" msgid "Clear"
msgstr "" msgstr ""
@ -975,6 +990,14 @@ msgstr ""
msgid "SQL Editor" msgid "SQL Editor"
msgstr "" 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 #: ../glade/glade-db-model.c:186
msgid "Open the SQL Editor" msgid "Open the SQL Editor"
msgstr "" msgstr ""
@ -1011,15 +1034,15 @@ msgstr ""
msgid "Model properties configuration" msgid "Model properties configuration"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:246 #: ../glade/glade-eprop-model.c:244
msgid "Select a VnModel for the property" msgid "Select a VnModel for the property"
msgstr "" 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" msgid "New Model"
msgstr "" msgstr ""
#: ../glade/glade-eprop-model.c:308 #: ../glade/glade-eprop-model.c:306
msgid "Edit Model" msgid "Edit Model"
msgstr "" msgstr ""

View File

@ -253,7 +253,7 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
g_param_spec_double ("lower" g_param_spec_double ("lower"
,_("Minimum value") ,_("Minimum value")
,_("The minimum value of the internal adjustment.") ,_("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 ,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
)); ));
@ -261,7 +261,7 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
g_param_spec_double ("upper" g_param_spec_double ("upper"
,_("Maximum value") ,_("Maximum value")
,_("The maximum value of the internal adjustment.") ,_("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 ,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); 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) GdkEventButton * event, VnDateChooser * obj)
{ {
gint x, y; gint x, y;
@ -305,26 +305,26 @@ static void vn_date_chooser_get_property (VnDateChooser * obj, guint id,
static void vn_date_chooser_init (VnDateChooser * obj) static void vn_date_chooser_init (VnDateChooser * obj)
{ {
GtkWidget * image; GtkWidget * image;
obj->format = NULL; obj->format = NULL;
obj->popup = NULL; obj->popup = NULL;
obj->device = NULL; obj->device = NULL;
g_date_clear (&obj->date, 1); g_date_clear (&obj->date, 1);
obj->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8); obj->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
gtk_container_add (GTK_CONTAINER (obj), GTK_WIDGET (obj->box)); gtk_container_add (GTK_CONTAINER (obj), GTK_WIDGET (obj->box));
VN_FIELD (obj)->field = obj->box; VN_FIELD (obj)->field = obj->box;
obj->button = gtk_toggle_button_new (); obj->button = gtk_toggle_button_new ();
gtk_widget_set_tooltip_text (GTK_WIDGET (obj->button), _("Change date")); gtk_widget_set_tooltip_text (GTK_WIDGET (obj->button), _("Change date"));
g_signal_connect (obj->button, "toggled", g_signal_connect (obj->button, "toggled",
G_CALLBACK (vn_date_chooser_on_toggled), obj); G_CALLBACK (vn_date_chooser_on_toggled), obj);
gtk_box_pack_start (GTK_BOX (obj->box), gtk_box_pack_start (GTK_BOX (obj->box),
GTK_WIDGET (obj->button), FALSE, FALSE, 0); 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); gtk_button_set_image (GTK_BUTTON (obj->button), image);
obj->label = GTK_LABEL (gtk_label_new (NULL)); obj->label = GTK_LABEL (gtk_label_new (NULL));
gtk_misc_set_alignment (GTK_MISC (obj->label), 0, 0.5); gtk_misc_set_alignment (GTK_MISC (obj->label), 0, 0.5);
gtk_box_pack_end (GTK_BOX (obj->box), gtk_box_pack_end (GTK_BOX (obj->box),
@ -332,7 +332,7 @@ static void vn_date_chooser_init (VnDateChooser * obj)
obj->popup = gtk_window_new (GTK_WINDOW_POPUP); obj->popup = gtk_window_new (GTK_WINDOW_POPUP);
g_object_connect (obj->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 ,"signal::key-press-event", vn_date_chooser_on_key_press, obj
,NULL ,NULL
); );

View File

@ -48,7 +48,7 @@ static void vn_model_start_element (GMarkupParseContext * context,
const gchar ** values, gpointer data, GError ** err) const gchar ** values, gpointer data, GError ** err)
{ {
guint i; guint i;
VnModelData * d = (VnModelData *) data; VnModelData * d = data;
for (i = 0; names[i]; i++) for (i = 0; names[i]; i++)
if (!g_strcmp0 (names[i], "field")) 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) const gchar * element, gpointer data, GError ** error)
{ {
GSList * f, * p; GSList * f, * p;
VnModelData * d = (VnModelData *) data; VnModelData * d = data;
g_return_if_fail (d->builder); g_return_if_fail (d->builder);
@ -93,7 +93,7 @@ static const GMarkupParser vn_model_parser =
,vn_model_end_element ,vn_model_end_element
}; };
//FIXME: se pone la propiedad "sql" dos veces en el modelo (entre custom_tag_end y custom_finished) //FIXME: se pone la propiedad "sql" dos veces en el modelo (entre custom_tag_end y custom_finished)
static gboolean vn_model_buildable_custom_tag_start (GtkBuildable *buildable, static gboolean vn_model_buildable_custom_tag_start (GtkBuildable * buildable,
GtkBuilder * builder, GObject * child, const gchar * tag, GtkBuilder * builder, GObject * child, const gchar * tag,
GMarkupParser * parser, gpointer * data) GMarkupParser * parser, gpointer * data)
{ {
@ -107,16 +107,22 @@ static gboolean vn_model_buildable_custom_tag_start (GtkBuildable *buildable,
data_ptr->model = DB_MODEL (buildable); data_ptr->model = DB_MODEL (buildable);
data_ptr->fields = NULL; data_ptr->fields = NULL;
data_ptr->params = NULL; data_ptr->params = NULL;
*data = data_ptr; *data = data_ptr;
*parser = vn_model_parser; *parser = vn_model_parser;
return TRUE; return TRUE;
} }
else
g_warning ("Unknown custom model tag: %s", tag);
return FALSE; 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 //+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
static void vn_model_finalize (VnModel * obj) 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) static void vn_model_buildable_init (GtkBuildableIface * iface)
{ {
iface->custom_tag_start = vn_model_buildable_custom_tag_start; iface->custom_tag_start = vn_model_buildable_custom_tag_start;
// iface->set_buildable_property = vn_model_buildable_set_buildable_property;
} }
static void vn_model_init (VnModel * obj) static void vn_model_init (VnModel * obj)

View File

@ -25,7 +25,6 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="show_tabs">False</property> <property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="scrollable">True</property> <property name="scrollable">True</property>
<signal name="page-removed" handler="vn_gui_on_page_removed" swapped="no"/> <signal name="page-removed" handler="vn_gui_on_page_removed" swapped="no"/>
<signal name="switch-page" handler="vn_gui_on_switch_page" 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="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="show_tabs">False</property> <property name="show_tabs">False</property>
<property name="show_border">False</property>
<property name="scrollable">True</property> <property name="scrollable">True</property>
<property name="group_name">vn-notebook</property> <property name="group_name">vn-notebook</property>
<signal name="page-removed" handler="vn_gui_on_main_page_removed" swapped="no"/> <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_red;
static GdkRGBA vn_column_green; 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 //+++++++++++++++++++++++++++++++++++++++++++++++++++ Private
static void vn_column_value_changed (VnColumn * obj, const gchar * path, const GValue * value) 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; GValue value = G_VALUE_INIT;
gtk_tree_model_get_value (model, iter, obj->column_index, &value); gtk_tree_model_get_value (model, iter, obj->column_index, &value);
obj->set_value (obj, model, iter, cell, &value); obj->set_value (obj, model, iter, cell, &value);
g_value_unset (&value);
vn_gtk_tree_iter_to_db_iter (iter, &dbiter); vn_gtk_tree_iter_to_db_iter (iter, &dbiter);
ops = db_model_get_row_operations ( ops = db_model_get_row_operations (
@ -60,6 +72,11 @@ static void vn_column_data_func (GtkTreeViewColumn * col, GtkCellRenderer * cell
background = NULL; background = NULL;
g_object_set (cell, "cell-background-rgba", 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) static void vn_column_set_renderer (VnColumn * obj, GtkCellRenderer * cell)
@ -344,6 +361,7 @@ enum
,PROP_EDITABLE ,PROP_EDITABLE
,PROP_NULL ,PROP_NULL
,PROP_TAB_INDEX ,PROP_TAB_INDEX
,PROP_STYLE_FUNC
}; };
static void vn_column_set_property (VnColumn * obj, guint id, 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: case PROP_TAB_INDEX:
vn_column_set_tab_index (obj, g_value_get_int (value)); vn_column_set_tab_index (obj, g_value_get_int (value));
break; break;
case PROP_STYLE_FUNC:
obj->style_func = g_value_get_pointer (value);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec); 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: case PROP_TAB_INDEX:
g_value_set_int (value, obj->tab_index); g_value_set_int (value, obj->tab_index);
break; break;
case PROP_STYLE_FUNC:
g_value_set_pointer (value, obj->style_func);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec); 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_index = -1;
obj->column_name = NULL; obj->column_name = NULL;
obj->style_func = NULL;
} }
static void vn_column_finalize (VnColumn * obj) static void vn_column_finalize (VnColumn * obj)
@ -458,4 +483,11 @@ static void vn_column_class_init (VnColumnClass * klass)
,-1, 255, 0 ,-1, 255, 0
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE ,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 (*VnColumnSetNullFunc) (VnColumn * obj, gboolean null);
typedef void (*VnColumnModelChangedFunc) (VnColumn * obj); typedef void (*VnColumnModelChangedFunc) (VnColumn * obj);
typedef void (*VnColumnStyleFunc) (VnColumn * obj, GtkCellRenderer * cell,
GtkTreeIter * iter, const GValue * value);
struct _VnColumn struct _VnColumn
{ {
GtkTreeViewColumn parent; GtkTreeViewColumn parent;
@ -48,6 +51,7 @@ struct _VnColumn
gboolean editable; gboolean editable;
gboolean null; gboolean null;
gint tab_index; gint tab_index;
VnColumnStyleFunc style_func;
VnColumnSetValueFunc set_value; VnColumnSetValueFunc set_value;
}; };

View File

@ -26,6 +26,15 @@ enum {
static guint signals[LAST_SIGNAL] = {0}; 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 //+++++++++++++++++++++++++++++++++++++++++++++++++++ Private
static void vn_field_spec_changed (VnField * obj) static void vn_field_spec_changed (VnField * obj)
@ -78,7 +87,7 @@ static void vn_field_changed (VnField * obj)
if (obj->param && obj->update_param) if (obj->param && obj->update_param)
{ {
GError * err = NULL; GError * err = NULL;
g_signal_handlers_block_by_func (obj->param, g_signal_handlers_block_by_func (obj->param,
vn_field_on_param_value_changed, obj); vn_field_on_param_value_changed, obj);
@ -87,11 +96,14 @@ static void vn_field_changed (VnField * obj)
vn_field_set_invalid (obj, err); vn_field_set_invalid (obj, err);
g_error_free (err); g_error_free (err);
} }
g_signal_handlers_unblock_by_func (obj->param, g_signal_handlers_unblock_by_func (obj->param,
vn_field_on_param_value_changed, 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); g_signal_emit (obj, signals[VALUE_CHANGED], 0, obj->value);
} }
@ -393,6 +405,7 @@ enum
,PROP_EDITABLE ,PROP_EDITABLE
,PROP_NULL ,PROP_NULL
,PROP_DEFAULT ,PROP_DEFAULT
,PROP_STYLE_FUNC
}; };
static void vn_field_set_property (VnField * obj, guint id, 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: case PROP_DEFAULT:
vn_field_set_default (obj, g_value_get_boxed (value)); vn_field_set_default (obj, g_value_get_boxed (value));
break; break;
case PROP_STYLE_FUNC:
obj->style_func = g_value_get_pointer (value);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec); 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: case PROP_DEFAULT:
g_value_set_boxed (value, vn_field_get_default (obj)); g_value_set_boxed (value, vn_field_get_default (obj));
break; break;
case PROP_STYLE_FUNC:
g_value_set_pointer (value, obj->style_func);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec); 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->spec = gvn_param_spec_new ();
obj->iterator = NULL; obj->iterator = NULL;
obj->column_name = NULL; obj->column_name = NULL;
obj->style_func = NULL;
obj->value = g_new0 (GValue, 1); obj->value = g_new0 (GValue, 1);
g_value_init (obj->value, GVN_TYPE_NULL); g_value_init (obj->value, GVN_TYPE_NULL);
@ -569,4 +589,11 @@ static void vn_field_class_init (VnFieldClass * klass)
,G_TYPE_VALUE ,G_TYPE_VALUE
,G_PARAM_READWRITE ,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 (*VnFieldSetValueFunc) (VnField * obj, const GValue * value);
typedef void (*VnFieldValueChangedFunc) (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 struct _VnField
{ {
GtkEventBox parent; GtkEventBox parent;
@ -45,6 +48,7 @@ struct _VnField
gboolean update_param; gboolean update_param;
DbIterator * iterator; DbIterator * iterator;
gchar * column_name; gchar * column_name;
VnFieldStyleFunc style_func;
}; };
struct _VnFieldClass struct _VnFieldClass

View File

@ -23,11 +23,10 @@ G_DEFINE_ABSTRACT_TYPE (VnForm, vn_form, GTK_TYPE_ALIGNMENT);
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Public //+++++++++++++++++++++++++++++++++++++++++++++++++++ Public
/** /**
* vn_form_open: * vn_form_open: (virtual open):
* @obj: the #VnForm * @obj: the #VnForm
* *
* Activates the form. * Activates the form.
* Virtual: open
**/ **/
void vn_form_open (VnForm * obj) 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); gtk_tree_view_set_cursor (obj, path, NULL, FALSE);
g_signal_handlers_unblock_by_func (obj, vn_grid_on_cursor_changed, iterator); 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); gtk_tree_path_free (path);
} }
else if (selection) 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) static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNotebook * notebook)
{ {
GdkRGBA color;
GSList * n, * m; GSList * n, * m;
GError * err = NULL; GError * err = NULL;
GtkActionGroup * actions = NULL; GtkActionGroup * actions = NULL;
GtkStyleContext * style;
GtkBuilder * builder; GtkBuilder * builder;
VnWindow * window; VnWindow * window;
@ -536,12 +534,6 @@ static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNoteboo
gtk_notebook_set_group_name (notebook, gtk_notebook_set_group_name (notebook,
g_application_get_application_id (G_APPLICATION (obj->app))); 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)); gtk_widget_show_all (GTK_WIDGET (widget));
// Loading the bars and associated actions // Loading the bars and associated actions

View File

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