Implementado Tab Index para la navegación por VnGrid

This commit is contained in:
Alejandro T. Colombini Gómez 2013-11-05 10:22:53 +01:00
parent cfb0bcea3f
commit cee7dc52b3
9 changed files with 258 additions and 178 deletions

View File

@ -180,7 +180,8 @@ void vn_consulter_send (GtkButton * button, VnConsulter * obj)
else else
model = db_model_new_with_sql (VN_FORM (obj)->conn, sql); model = db_model_new_with_sql (VN_FORM (obj)->conn, sql);
g_signal_connect (model, "status-changed", // Get sure to connect after the columns do, to destroy them.
g_signal_connect_after (model, "status-changed",
G_CALLBACK (vn_consulter_model_status_changed), obj); G_CALLBACK (vn_consulter_model_status_changed), obj);
iterator = db_iterator_new (model); iterator = db_iterator_new (model);

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: 2013-10-21 09:24+0200\n" "POT-Creation-Date: 2013-11-05 10:03+0100\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"
@ -164,7 +164,7 @@ msgstr ""
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:401 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:440
msgid "Editable" msgid "Editable"
msgstr "" msgstr ""
@ -172,7 +172,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:408 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:560 ../vn/vn-column.c:447
msgid "Null" msgid "Null"
msgstr "" msgstr ""
@ -342,7 +342,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:357 ../vn/vn-field.c:532 #: ../db/db-param.c:251 ../vn/vn-grid.c:470 ../vn/vn-field.c:532
msgid "Iterator" msgid "Iterator"
msgstr "" msgstr ""
@ -350,7 +350,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:387 #: ../db/db-param.c:258 ../vn/vn-column.c:426
msgid "Column index" msgid "Column index"
msgstr "" msgstr ""
@ -358,11 +358,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:394 #: ../db/db-param.c:265 ../vn/vn-field.c:539 ../vn/vn-column.c:433
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:395 #: ../db/db-param.c:266 ../vn/vn-column.c:434
msgid "The referenced column name" msgid "The referenced column name"
msgstr "Nom de la columna referenciada" msgstr "Nom de la columna referenciada"
@ -402,8 +402,8 @@ msgstr ""
msgid "The path where query files are located" msgid "The path where query files are located"
msgstr "" msgstr ""
#: ../db/db-conn.c:1051 ../db/db-file-loader.c:724 #: ../db/db-conn.c:1051 ../db/db-file-loader.c:715
#: ../vn/column/vn-column-image.c:477 #: ../vn/column/vn-column-image.c:489
msgid "Host" msgid "Host"
msgstr "" msgstr ""
@ -460,43 +460,43 @@ msgstr ""
msgid "The GError, if an error ocurred" msgid "The GError, if an error ocurred"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:333 #: ../db/db-file-loader.c:330
#, c-format #, c-format
msgid "%s not cached" msgid "%s not cached"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:431 #: ../db/db-file-loader.c:426
#, c-format #, c-format
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:725 ../vn/column/vn-column-image.c:478 #: ../db/db-file-loader.c:716 ../vn/column/vn-column-image.c:490
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:732 ../vn/column/vn-column-image.c:485 #: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:497
msgid "Path" msgid "Path"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:733 #: ../db/db-file-loader.c:724
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:740 #: ../db/db-file-loader.c:731
msgid "Cache directory" msgid "Cache directory"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:741 #: ../db/db-file-loader.c:732
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:749 #: ../db/db-file-loader.c:740
msgid "Maximal cache size" msgid "Maximal cache size"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:750 #: ../db/db-file-loader.c:741
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "" msgstr ""
@ -566,7 +566,7 @@ msgstr "Funció vn_model_set_sort_func no implementada"
msgid "Function vn_model_set_default_sort_func not implemented" msgid "Function vn_model_set_default_sort_func not implemented"
msgstr "Funció vn_model_set_default_sort_func no implementada" msgstr "Funció vn_model_set_default_sort_func no implementada"
#: ../vn/vn-grid.c:358 #: ../vn/vn-grid.c:471
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "" msgstr ""
@ -699,7 +699,7 @@ msgstr ""
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:409 #: ../vn/vn-field.c:561 ../vn/vn-column.c:448
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 ""
@ -788,14 +788,22 @@ msgstr ""
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "" msgstr ""
#: ../vn/vn-column.c:388 #: ../vn/vn-column.c:427
msgid "The column index in the model" msgid "The column index in the model"
msgstr "" msgstr ""
#: ../vn/vn-column.c:402 #: ../vn/vn-column.c:441
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "" msgstr ""
#: ../vn/vn-column.c:454
msgid "Tab index"
msgstr ""
#: ../vn/vn-column.c:455
msgid "Order in which the tab selects the columns for edition"
msgstr ""
#: ../vn/column/vn-column-spin.c:130 #: ../vn/column/vn-column-spin.c:130
msgid "Climb rate" msgid "Climb rate"
msgstr "" msgstr ""
@ -812,25 +820,25 @@ msgstr ""
msgid "The field number of the Grid model used to sort the column" msgid "The field number of the Grid model used to sort the column"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:486 #: ../vn/column/vn-column-image.c:498
msgid "Base path from the host where the images will be downloaded" msgid "Base path from the host where the images will be downloaded"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:493 #: ../vn/column/vn-column-image.c:505
msgid "Tooltip path" msgid "Tooltip path"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:494 #: ../vn/column/vn-column-image.c:506
msgid "" msgid ""
"Prefix for the path of the images to be shown in the tooltip. Starting after " "Prefix for the path of the images to be shown in the tooltip. Starting after "
"the path of the column and appending the name on each cell" "the path of the column and appending the name on each cell"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:503 #: ../vn/column/vn-column-image.c:515
msgid "Tooltip size" msgid "Tooltip size"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:504 #: ../vn/column/vn-column-image.c:516
msgid "" msgid ""
"Size of the bigger side of the tooltip images, the another side will be " "Size of the bigger side of the tooltip images, the another side will be "
"scaled accordingly and smaller images won't be scaled" "scaled accordingly and smaller images won't be scaled"
@ -1140,7 +1148,11 @@ msgstr ""
msgid "Rollback" msgid "Rollback"
msgstr "" msgstr ""
#: ../module/src/vn-consulter.c:207 #: ../module/data/consulter.glade.h:11
msgid "∞"
msgstr ""
#: ../module/src/vn-consulter.c:234
msgid "Type or select a query" msgid "Type or select a query"
msgstr "" msgstr ""

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: 2013-10-21 09:24+0200\n" "POT-Creation-Date: 2013-11-05 10:03+0100\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"
@ -166,7 +166,7 @@ msgstr "Tipo Glib"
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:401 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:440
msgid "Editable" msgid "Editable"
msgstr "Editable" msgstr "Editable"
@ -174,7 +174,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:408 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:560 ../vn/vn-column.c:447
msgid "Null" msgid "Null"
msgstr "Nulo" msgstr "Nulo"
@ -350,7 +350,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:357 ../vn/vn-field.c:532 #: ../db/db-param.c:251 ../vn/vn-grid.c:470 ../vn/vn-field.c:532
msgid "Iterator" msgid "Iterator"
msgstr "Iterator" msgstr "Iterator"
@ -358,7 +358,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:387 #: ../db/db-param.c:258 ../vn/vn-column.c:426
msgid "Column index" msgid "Column index"
msgstr "Posición" msgstr "Posición"
@ -366,11 +366,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:394 #: ../db/db-param.c:265 ../vn/vn-field.c:539 ../vn/vn-column.c:433
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:395 #: ../db/db-param.c:266 ../vn/vn-column.c:434
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 "
@ -412,8 +412,8 @@ 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:1051 ../db/db-file-loader.c:724 #: ../db/db-conn.c:1051 ../db/db-file-loader.c:715
#: ../vn/column/vn-column-image.c:477 #: ../vn/column/vn-column-image.c:489
msgid "Host" msgid "Host"
msgstr "Host" msgstr "Host"
@ -470,33 +470,33 @@ msgstr "Error"
msgid "The GError, if an error ocurred" msgid "The GError, if an error ocurred"
msgstr "El GError, si ha habido algún error" msgstr "El GError, si ha habido algún error"
#: ../db/db-file-loader.c:333 #: ../db/db-file-loader.c:330
#, c-format #, c-format
msgid "%s not cached" msgid "%s not cached"
msgstr "No se ha guardado %s en la cache" msgstr "No se ha guardado %s en la cache"
#: ../db/db-file-loader.c:431 #: ../db/db-file-loader.c:426
#, c-format #, c-format
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:725 ../vn/column/vn-column-image.c:478 #: ../db/db-file-loader.c:716 ../vn/column/vn-column-image.c:490
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:732 ../vn/column/vn-column-image.c:485 #: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:497
msgid "Path" msgid "Path"
msgstr "Ruta" msgstr "Ruta"
#: ../db/db-file-loader.c:733 #: ../db/db-file-loader.c:724
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:740 #: ../db/db-file-loader.c:731
msgid "Cache directory" msgid "Cache directory"
msgstr "Directorio de caché" msgstr "Directorio de caché"
#: ../db/db-file-loader.c:741 #: ../db/db-file-loader.c:732
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()."
@ -504,11 +504,11 @@ 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:749 #: ../db/db-file-loader.c:740
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:750 #: ../db/db-file-loader.c:741
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é"
@ -578,7 +578,7 @@ msgstr "Función vn_model_set_sort_func no implementada"
msgid "Function vn_model_set_default_sort_func not implemented" msgid "Function vn_model_set_default_sort_func not implemented"
msgstr "Función vn_model_set_default_sort_func no implementada" msgstr "Función vn_model_set_default_sort_func no implementada"
#: ../vn/vn-grid.c:358 #: ../vn/vn-grid.c:471
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "El Iterator empleado por VnGrid" msgstr "El Iterator empleado por VnGrid"
@ -711,7 +711,7 @@ msgstr "El nombre de la columna en el Iterator"
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:409 #: ../vn/vn-field.c:561 ../vn/vn-column.c:448
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"
@ -800,14 +800,22 @@ 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:388 #: ../vn/vn-column.c:427
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:402 #: ../vn/vn-column.c:441
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:454
msgid "Tab index"
msgstr "Tab index"
#: ../vn/vn-column.c:455
msgid "Order in which the tab selects the columns for edition"
msgstr "Orden en el cual el tabulador selecciona las columnas para editar"
#: ../vn/column/vn-column-spin.c:130 #: ../vn/column/vn-column-spin.c:130
msgid "Climb rate" msgid "Climb rate"
msgstr "Tasa de subida" msgstr "Tasa de subida"
@ -825,15 +833,15 @@ msgid "The field number of the Grid model used to sort the column"
msgstr "" msgstr ""
"El número de campo del modelo del Grid que se usa para ordenar la columna" "El número de campo del modelo del Grid que se usa para ordenar la columna"
#: ../vn/column/vn-column-image.c:486 #: ../vn/column/vn-column-image.c:498
msgid "Base path from the host where the images will be downloaded" msgid "Base path from the host where the images will be downloaded"
msgstr "La ruta base del servidor desde donde se descargarán las imágenes." msgstr "La ruta base del servidor desde donde se descargarán las imágenes."
#: ../vn/column/vn-column-image.c:493 #: ../vn/column/vn-column-image.c:505
msgid "Tooltip path" msgid "Tooltip path"
msgstr "Ruta del tooltip" msgstr "Ruta del tooltip"
#: ../vn/column/vn-column-image.c:494 #: ../vn/column/vn-column-image.c:506
msgid "" msgid ""
"Prefix for the path of the images to be shown in the tooltip. Starting after " "Prefix for the path of the images to be shown in the tooltip. Starting after "
"the path of the column and appending the name on each cell" "the path of the column and appending the name on each cell"
@ -842,11 +850,11 @@ msgstr ""
"Empezando desde la ruta de la columna y añadiendo después el nombre de cada " "Empezando desde la ruta de la columna y añadiendo después el nombre de cada "
"celda" "celda"
#: ../vn/column/vn-column-image.c:503 #: ../vn/column/vn-column-image.c:515
msgid "Tooltip size" msgid "Tooltip size"
msgstr "Tamaño del tooltip" msgstr "Tamaño del tooltip"
#: ../vn/column/vn-column-image.c:504 #: ../vn/column/vn-column-image.c:516
msgid "" msgid ""
"Size of the bigger side of the tooltip images, the another side will be " "Size of the bigger side of the tooltip images, the another side will be "
"scaled accordingly and smaller images won't be scaled" "scaled accordingly and smaller images won't be scaled"
@ -1171,6 +1179,10 @@ msgstr "Efectuar"
msgid "Rollback" msgid "Rollback"
msgstr "Deshacer" msgstr "Deshacer"
#: ../module/src/vn-consulter.c:207 #: ../module/data/consulter.glade.h:11
msgid "∞"
msgstr "∞"
#: ../module/src/vn-consulter.c:234
msgid "Type or select a query" msgid "Type or select a query"
msgstr "Escribe o selecciona la consulta" msgstr "Escribe o selecciona la consulta"

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: 2013-10-21 09:24+0200\n" "POT-Creation-Date: 2013-11-05 10:03+0100\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"
@ -166,7 +166,7 @@ msgstr ""
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:401 #: ../gvn/gvn-param.c:485 ../vn/vn-field.c:553 ../vn/vn-column.c:440
msgid "Editable" msgid "Editable"
msgstr "" msgstr ""
@ -174,7 +174,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:408 #: ../gvn/gvn-param.c:492 ../vn/vn-field.c:560 ../vn/vn-column.c:447
msgid "Null" msgid "Null"
msgstr "" msgstr ""
@ -343,7 +343,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:357 ../vn/vn-field.c:532 #: ../db/db-param.c:251 ../vn/vn-grid.c:470 ../vn/vn-field.c:532
msgid "Iterator" msgid "Iterator"
msgstr "" msgstr ""
@ -351,7 +351,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:387 #: ../db/db-param.c:258 ../vn/vn-column.c:426
msgid "Column index" msgid "Column index"
msgstr "" msgstr ""
@ -359,11 +359,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:394 #: ../db/db-param.c:265 ../vn/vn-field.c:539 ../vn/vn-column.c:433
msgid "Column name" msgid "Column name"
msgstr "" msgstr ""
#: ../db/db-param.c:266 ../vn/vn-column.c:395 #: ../db/db-param.c:266 ../vn/vn-column.c:434
msgid "The referenced column name" msgid "The referenced column name"
msgstr "" msgstr ""
@ -403,8 +403,8 @@ msgstr ""
msgid "The path where query files are located" msgid "The path where query files are located"
msgstr "" msgstr ""
#: ../db/db-conn.c:1051 ../db/db-file-loader.c:724 #: ../db/db-conn.c:1051 ../db/db-file-loader.c:715
#: ../vn/column/vn-column-image.c:477 #: ../vn/column/vn-column-image.c:489
msgid "Host" msgid "Host"
msgstr "" msgstr ""
@ -461,43 +461,43 @@ msgstr ""
msgid "The GError, if an error ocurred" msgid "The GError, if an error ocurred"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:333 #: ../db/db-file-loader.c:330
#, c-format #, c-format
msgid "%s not cached" msgid "%s not cached"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:431 #: ../db/db-file-loader.c:426
#, c-format #, c-format
msgid "Unknown content length of file %s" msgid "Unknown content length of file %s"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:725 ../vn/column/vn-column-image.c:478 #: ../db/db-file-loader.c:716 ../vn/column/vn-column-image.c:490
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:732 ../vn/column/vn-column-image.c:485 #: ../db/db-file-loader.c:723 ../vn/column/vn-column-image.c:497
msgid "Path" msgid "Path"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:733 #: ../db/db-file-loader.c:724
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:740 #: ../db/db-file-loader.c:731
msgid "Cache directory" msgid "Cache directory"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:741 #: ../db/db-file-loader.c:732
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:749 #: ../db/db-file-loader.c:740
msgid "Maximal cache size" msgid "Maximal cache size"
msgstr "" msgstr ""
#: ../db/db-file-loader.c:750 #: ../db/db-file-loader.c:741
msgid "The maximal size for the contents of the cache directory" msgid "The maximal size for the contents of the cache directory"
msgstr "" msgstr ""
@ -567,7 +567,7 @@ msgstr ""
msgid "Function vn_model_set_default_sort_func not implemented" msgid "Function vn_model_set_default_sort_func not implemented"
msgstr "" msgstr ""
#: ../vn/vn-grid.c:358 #: ../vn/vn-grid.c:471
msgid "The iterator used by VnGrid" msgid "The iterator used by VnGrid"
msgstr "" msgstr ""
@ -700,7 +700,7 @@ msgstr ""
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:409 #: ../vn/vn-field.c:561 ../vn/vn-column.c:448
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 ""
@ -789,14 +789,22 @@ msgstr ""
msgid "A GBytes structure with the image data" msgid "A GBytes structure with the image data"
msgstr "" msgstr ""
#: ../vn/vn-column.c:388 #: ../vn/vn-column.c:427
msgid "The column index in the model" msgid "The column index in the model"
msgstr "" msgstr ""
#: ../vn/vn-column.c:402 #: ../vn/vn-column.c:441
msgid "Whether the column values are editable" msgid "Whether the column values are editable"
msgstr "" msgstr ""
#: ../vn/vn-column.c:454
msgid "Tab index"
msgstr ""
#: ../vn/vn-column.c:455
msgid "Order in which the tab selects the columns for edition"
msgstr ""
#: ../vn/column/vn-column-spin.c:130 #: ../vn/column/vn-column-spin.c:130
msgid "Climb rate" msgid "Climb rate"
msgstr "" msgstr ""
@ -813,25 +821,25 @@ msgstr ""
msgid "The field number of the Grid model used to sort the column" msgid "The field number of the Grid model used to sort the column"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:486 #: ../vn/column/vn-column-image.c:498
msgid "Base path from the host where the images will be downloaded" msgid "Base path from the host where the images will be downloaded"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:493 #: ../vn/column/vn-column-image.c:505
msgid "Tooltip path" msgid "Tooltip path"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:494 #: ../vn/column/vn-column-image.c:506
msgid "" msgid ""
"Prefix for the path of the images to be shown in the tooltip. Starting after " "Prefix for the path of the images to be shown in the tooltip. Starting after "
"the path of the column and appending the name on each cell" "the path of the column and appending the name on each cell"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:503 #: ../vn/column/vn-column-image.c:515
msgid "Tooltip size" msgid "Tooltip size"
msgstr "" msgstr ""
#: ../vn/column/vn-column-image.c:504 #: ../vn/column/vn-column-image.c:516
msgid "" msgid ""
"Size of the bigger side of the tooltip images, the another side will be " "Size of the bigger side of the tooltip images, the another side will be "
"scaled accordingly and smaller images won't be scaled" "scaled accordingly and smaller images won't be scaled"
@ -1139,6 +1147,10 @@ msgstr ""
msgid "Rollback" msgid "Rollback"
msgstr "" msgstr ""
#: ../module/src/vn-consulter.c:207 #: ../module/data/consulter.glade.h:11
msgid "∞"
msgstr ""
#: ../module/src/vn-consulter.c:234
msgid "Type or select a query" msgid "Type or select a query"
msgstr "" msgstr ""

View File

@ -142,8 +142,7 @@ static gboolean vn_column_image_on_query_tooltip (GtkTreeView * view,
GtkTreeIter iter; GtkTreeIter iter;
GtkTreePath * path = NULL; GtkTreePath * path = NULL;
if (//&& obj && VN_IS_COLUMN_IMAGE (obj) if (gtk_tree_view_get_tooltip_context (view, &x, &y, k, NULL, &path, &iter))
gtk_tree_view_get_tooltip_context (view, &x, &y, k, NULL, &path, &iter))
{ {
gint wx, wy; gint wx, wy;
GdkRectangle rect; GdkRectangle rect;
@ -266,6 +265,18 @@ static void vn_column_image_set_value (VnColumnImage * obj, GtkTreeModel * model
GtkTreeView * view = GTK_TREE_VIEW GtkTreeView * view = GTK_TREE_VIEW
(gtk_tree_view_column_get_tree_view (GTK_TREE_VIEW_COLUMN (obj))); (gtk_tree_view_column_get_tree_view (GTK_TREE_VIEW_COLUMN (obj)));
if (view != obj->tree_view)
{
if (GTK_IS_TREE_VIEW (obj->tree_view))
g_signal_handlers_disconnect_by_func (obj->tree_view,
vn_column_image_on_query_tooltip, obj);
g_signal_connect (view, "query-tooltip",
G_CALLBACK (vn_column_image_on_query_tooltip), obj);
g_object_set (view, "has-tooltip", TRUE, NULL);
obj->tree_view = view;
}
if (obj->loaded) if (obj->loaded)
{ {
if (g_hash_table_contains (obj->loaded, name)) if (g_hash_table_contains (obj->loaded, name))
@ -324,14 +335,9 @@ static void vn_column_image_set_value (VnColumnImage * obj, GtkTreeModel * model
obj->loader = db_file_loader_new (obj->host, obj->path); obj->loader = db_file_loader_new (obj->host, obj->path);
if (obj->tooltip_path && !obj->tooltips) if (obj->tooltip_path && !obj->tooltips)
{
obj->tooltips = g_hash_table_new_full obj->tooltips = g_hash_table_new_full
((GHashFunc) g_direct_hash, (GEqualFunc) g_direct_equal, ((GHashFunc) g_direct_hash, (GEqualFunc) g_direct_equal,
(GDestroyNotify) NULL, (GDestroyNotify) free_tooltip_data); (GDestroyNotify) NULL, (GDestroyNotify) free_tooltip_data);
g_object_set (view, "has-tooltip", TRUE, NULL);
g_signal_connect (view, "query-tooltip",
G_CALLBACK (vn_column_image_on_query_tooltip), obj);
}
data = g_new (DownloadData, 1); data = g_new (DownloadData, 1);
data->obj = g_object_ref (obj); data->obj = g_object_ref (obj);
@ -354,12 +360,7 @@ static void vn_column_image_on_model_changed (VnColumnImage * obj)
g_hash_table_destroy (obj->loaded); g_hash_table_destroy (obj->loaded);
if (obj->tooltips) if (obj->tooltips)
{
g_hash_table_destroy (obj->tooltips); g_hash_table_destroy (obj->tooltips);
g_signal_handlers_disconnect_by_func (GTK_TREE_VIEW
(gtk_tree_view_column_get_tree_view (GTK_TREE_VIEW_COLUMN (obj))),
vn_column_image_on_query_tooltip, obj);
}
obj->loaded = NULL; obj->loaded = NULL;
obj->tooltips = NULL; obj->tooltips = NULL;
@ -444,6 +445,7 @@ static void vn_column_image_init (VnColumnImage * obj)
obj->loader = NULL; obj->loader = NULL;
obj->loaded = NULL; obj->loaded = NULL;
obj->tooltips = NULL; obj->tooltips = NULL;
obj->tree_view = NULL;
} }
static void vn_column_image_finalize (VnColumnImage * obj) static void vn_column_image_finalize (VnColumnImage * obj)
@ -455,7 +457,7 @@ static void vn_column_image_finalize (VnColumnImage * obj)
if (obj->loader) if (obj->loader)
{ {
db_file_loader_cancel_all (obj->loader); db_file_loader_cancel_all (obj->loader);
g_object_unref (obj->loader);//XXX g_object_unref (obj->loader);
} }
if (obj->loaded) if (obj->loaded)
@ -464,6 +466,10 @@ static void vn_column_image_finalize (VnColumnImage * obj)
if (obj->tooltips) if (obj->tooltips)
g_hash_table_destroy (obj->tooltips); g_hash_table_destroy (obj->tooltips);
if (GTK_IS_TREE_VIEW (obj->tree_view))
g_signal_handlers_disconnect_by_func (obj->tree_view,
vn_column_image_on_query_tooltip, obj);
G_OBJECT_CLASS (vn_column_image_parent_class)->finalize (G_OBJECT (obj)); G_OBJECT_CLASS (vn_column_image_parent_class)->finalize (G_OBJECT (obj));
} }

View File

@ -44,6 +44,7 @@ struct _VnColumnImage
DbFileLoader * loader; DbFileLoader * loader;
GHashTable * loaded; GHashTable * loaded;
GHashTable * tooltips; GHashTable * tooltips;
GtkTreeView * tree_view;
}; };
struct _VnColumnImageClass struct _VnColumnImageClass

View File

@ -223,6 +223,39 @@ void vn_column_set_null (VnColumn * obj, gboolean null)
VN_COLUMN_GET_CLASS (obj)->set_null (obj, null); VN_COLUMN_GET_CLASS (obj)->set_null (obj, null);
} }
/**
* vn_column_get_tab_index
* @obj: the #VnColumn
*
* Sets the order in which the column will be selected while pressing Tab across
* the #VnGrid.
*
* Return value: the index of the column
**/
int vn_column_get_tab_index (VnColumn * obj)
{
g_return_if_fail (VN_IS_COLUMN (obj));
return obj->tab_index;
}
/**
* vn_column_set_tab_index
* @obj: the #VnColumn
* @tab_index: the index of the column
*
* Sets the order in which the column will be selected while pressing Tab across
* the #VnGrid. If the column is not editable, tab-index will be ignored bt the
* #VnGrid, as the column can't be edited (i.e. not accessible through pressing
* Tab).
**/
void vn_column_set_tab_index (VnColumn * obj, gint tab_index)
{
g_return_if_fail (VN_IS_COLUMN (obj));
obj->tab_index = tab_index;
}
/** /**
* vn_column_get_model: * vn_column_get_model:
* @obj: the #VnColumn * @obj: the #VnColumn
@ -309,6 +342,7 @@ enum
,PROP_COLUMN_NAME ,PROP_COLUMN_NAME
,PROP_EDITABLE ,PROP_EDITABLE
,PROP_NULL ,PROP_NULL
,PROP_TAB_INDEX
}; };
static void vn_column_set_property (VnColumn * obj, guint id, static void vn_column_set_property (VnColumn * obj, guint id,
@ -328,6 +362,9 @@ static void vn_column_set_property (VnColumn * obj, guint id,
case PROP_NULL: case PROP_NULL:
vn_column_set_null (obj, g_value_get_boolean (value)); vn_column_set_null (obj, g_value_get_boolean (value));
break; break;
case PROP_TAB_INDEX:
vn_column_set_tab_index (obj, g_value_get_int (value));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
} }
@ -350,6 +387,9 @@ static void vn_column_get_property (VnColumn * obj, guint id,
case PROP_NULL: case PROP_NULL:
g_value_set_boolean (value, obj->null); g_value_set_boolean (value, obj->null);
break; break;
case PROP_TAB_INDEX:
g_value_set_int (value, obj->tab_index);
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
} }
@ -409,4 +449,11 @@ static void vn_column_class_init (VnColumnClass * klass)
,FALSE ,FALSE
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE ,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
)); ));
g_object_class_install_property (k, PROP_TAB_INDEX,
g_param_spec_int ("tab-index"
,_("Tab index")
,_("Order in which the tab selects the columns for edition")
,-1, 255, 0
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
));
} }

View File

@ -47,6 +47,7 @@ struct _VnColumn
gchar * column_name; gchar * column_name;
gboolean editable; gboolean editable;
gboolean null; gboolean null;
gint tab_index;
VnColumnSetValueFunc set_value; VnColumnSetValueFunc set_value;
}; };
@ -70,6 +71,8 @@ gboolean vn_column_get_editable (VnColumn * obj);
void vn_column_set_editable (VnColumn * obj, gboolean editable); void vn_column_set_editable (VnColumn * obj, gboolean editable);
gboolean vn_column_get_null (VnColumn * obj); gboolean vn_column_get_null (VnColumn * obj);
void vn_column_set_null (VnColumn * obj, gboolean null); void vn_column_set_null (VnColumn * obj, gboolean null);
int vn_column_get_tab_index (VnColumn * obj);
void vn_column_set_tab_index (VnColumn * obj, gint tab_index);
DbModel * vn_column_get_model (VnColumn * obj); DbModel * vn_column_get_model (VnColumn * obj);
gboolean vn_column_get_iter (VnColumn * obj, const gchar * path, DbIter * iter); gboolean vn_column_get_iter (VnColumn * obj, const gchar * path, DbIter * iter);
void vn_column_model_changed (VnColumn * obj); void vn_column_model_changed (VnColumn * obj);

View File

@ -121,123 +121,109 @@ static void vn_grid_on_status_changed (DbIterator * iterator, gboolean ready, Vn
static gboolean vn_grid_on_cursor_key_pressed (GtkTreeView * obj, static gboolean vn_grid_on_cursor_key_pressed (GtkTreeView * obj,
GdkEventKey * event, gpointer data) GdkEventKey * event, gpointer data)
{ {
guint count, i; gboolean inverted;
gboolean passed = FALSE;
gint sel_tab_index;
VnColumn * first = NULL;
GList * n, * columns; GList * n, * columns;
GtkTreePath * path; GtkTreePath * path;
GtkTreeViewColumn * col, * next_col = NULL; GtkTreeViewColumn * col;
VnColumn * selected, * next = NULL;
GtkCellArea * area; GtkCellArea * area;
GtkCellEditable * editable;
if (!(event->type == GDK_KEY_PRESS if (!(event->type == GDK_KEY_PRESS
&& (event->keyval == GDK_KEY_Tab || event->keyval == GDK_KEY_ISO_Left_Tab))) && (event->keyval == GDK_KEY_Tab
|| event->keyval == GDK_KEY_ISO_Left_Tab
|| event->keyval == GDK_KEY_KP_Enter)))
return FALSE; return FALSE;
gtk_tree_view_get_cursor (obj, &path, &col); gtk_tree_view_get_cursor (obj, &path, &col);
selected = VN_COLUMN (col);
g_object_get (col, "cell-area", &area, NULL); g_object_get (col, "cell-area", &area, NULL);
gtk_cell_editable_editing_done (gtk_cell_area_get_edit_widget (area)); editable = gtk_cell_area_get_edit_widget (area);
if (editable)
gtk_cell_editable_editing_done (editable);
g_object_unref (area); g_object_unref (area);
columns = gtk_tree_view_get_columns (obj); columns = gtk_tree_view_get_columns (obj);
count = gtk_tree_view_get_n_columns (obj); inverted = event->keyval == GDK_KEY_ISO_Left_Tab ? TRUE : FALSE;
sel_tab_index = vn_column_get_tab_index (selected);
first = NULL;
if (event->keyval == GDK_KEY_Tab) for (n = columns; n; n = n->next)
{ {
i = 0; gint cur_tab_index;
VnColumn * current = n->data;
for (n = columns; n; n = n->next, i++) if (current == selected)
if (n->data == col) passed = TRUE;
else if (VN_IS_COLUMN (current)
&& vn_column_get_editable (current)
&& (cur_tab_index = vn_column_get_tab_index (current)) != -1)
{ {
if (n->next && i + 1 < gtk_tree_view_get_n_columns (obj)) if (!inverted)
{ {
if (n->next->data && VN_IS_COLUMN (n->next->data) if (!first || cur_tab_index < vn_column_get_tab_index (first))
&& !vn_column_get_editable ((VN_COLUMN (n->next->data)))) first = current;
if (cur_tab_index == sel_tab_index && passed)
{ {
col = n->next->data; next = current;
continue; break;
} }
else
next_col = n->next->data; if ((!next || cur_tab_index < vn_column_get_tab_index (next))
&& cur_tab_index > sel_tab_index)
next = current;
} }
else else
{ {
gtk_tree_path_next (path); if (!first || cur_tab_index >= vn_column_get_tab_index (first))
first = current;
if (VN_IS_COLUMN (columns->data) if ((cur_tab_index == sel_tab_index && !passed)
&& !vn_column_get_editable ((VN_COLUMN (columns->data)))) || (cur_tab_index < sel_tab_index
{ && (!next || cur_tab_index >= vn_column_get_tab_index (next))))
for (n = columns->next; n; n = n->next) next = current;
if (n->data && VN_IS_COLUMN (n->data)
&& vn_column_get_editable ((VN_COLUMN (n->data))))
{
next_col = n->data;
break;
}
}
else
next_col = columns->data;
if (gtk_tree_path_get_indices (path)[0] >= db_model_get_nrows
(VN_GRID (obj)->model))
{
gtk_tree_path_free (path);
return FALSE;
}
} }
break;
} }
} }
else // Shift + Tab pressed
if (!next)
{ {
GList * inv_columns = g_list_last (columns); gboolean leave = FALSE;
i = count - 1; next = first ? first : selected;
for (n = inv_columns; n; n = n->prev, i--) if (inverted)
if (n->data == col) leave = !gtk_tree_path_prev (path);
else
{ {
if (n->prev && i > 0) gtk_tree_path_next (path);
{
if (n->prev->data && VN_IS_COLUMN (n->prev->data)
&& !vn_column_get_editable ((VN_COLUMN (n->prev->data))))
{
col = n->prev->data;
continue;
}
else
next_col = n->prev->data;
}
else
{
gint current = gtk_tree_path_get_indices (path)[0];
gtk_tree_path_prev (path);
if (VN_IS_COLUMN (inv_columns->data)
&& !vn_column_get_editable ((VN_COLUMN (inv_columns->data))))
{
for (n = inv_columns->prev; n; n = n->prev)
if (n->data && VN_IS_COLUMN (n->data)
&& vn_column_get_editable ((VN_COLUMN (n->data))))
{
next_col = n->data;
break;
}
}
else
next_col = inv_columns->data;
if (current == 0 && gtk_tree_path_get_indices (path)[0] == 0) if (gtk_tree_path_get_indices (path)[0] >=
{ db_model_get_nrows (VN_GRID (obj)->model))
gtk_tree_path_free (path); {
return FALSE; if (db_model_get_update_flags (VN_GRID (obj)->model) &
} DB_MODEL_INSERT)
db_iterator_insert (VN_GRID (obj)->iterator);
else
leave = TRUE;
} }
}
break; if (leave)
{
gtk_tree_path_free (path);
return FALSE;
} }
} }
g_list_free (columns); g_list_free (columns);
gtk_tree_view_set_cursor (obj, path, next_col, TRUE); gtk_tree_view_set_cursor (obj, path, GTK_TREE_VIEW_COLUMN (next), TRUE);
gtk_tree_path_free (path); gtk_tree_path_free (path);
return TRUE; return TRUE;