Se ha mejorado el plugin de glade y se ha añadido al proyecto la plantilla de los módulos para anjuta
This commit is contained in:
parent
65d9412b43
commit
f6a57e87b6
|
@ -14,7 +14,8 @@ SUBDIRS = \
|
||||||
po \
|
po \
|
||||||
vapi \
|
vapi \
|
||||||
glade \
|
glade \
|
||||||
docs
|
docs \
|
||||||
|
anjuta
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
autogen.sh \
|
autogen.sh \
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
|
||||||
|
anjutadir = $(datadir)/anjuta/templates
|
||||||
|
anjuta_DATA = \
|
||||||
|
hedera.wiz \
|
||||||
|
hedera-logo.png
|
||||||
|
|
||||||
|
templatedir = $(anjutadir)/hedera
|
||||||
|
template_DATA = \
|
||||||
|
hedera/anjuta.session.tpl \
|
||||||
|
hedera/AUTHORS.tpl \
|
||||||
|
hedera/configure.ac.tpl \
|
||||||
|
hedera/Makefile.am.tpl \
|
||||||
|
hedera/translation
|
||||||
|
|
||||||
|
anjuta_srcdir = $(templatedir)/src
|
||||||
|
anjuta_src_DATA = \
|
||||||
|
hedera/src/config.vapi \
|
||||||
|
hedera/src/form.vala \
|
||||||
|
hedera/src/Makefile.am.tpl \
|
||||||
|
hedera/src/mod.vala
|
||||||
|
|
||||||
|
anjuta_datadir = $(templatedir)/data
|
||||||
|
anjuta_data_DATA = \
|
||||||
|
hedera/data/Makefile.am.tpl \
|
||||||
|
hedera/data/mod.glade \
|
||||||
|
hedera/data/mod.ui.tpl \
|
||||||
|
hedera/data/mod.xml.tpl
|
||||||
|
|
||||||
|
anjuta_sqldir = $(templatedir)/sql/mod
|
||||||
|
anjuta_sql_DATA = hedera/sql/mod/query.sql.tpl
|
||||||
|
|
||||||
|
anjuta_m4dir = $(templatedir)/build/m4
|
||||||
|
anjuta_m4_DATA = hedera/build/m4/pkg.m4
|
||||||
|
|
||||||
|
anjuta_podir = $(templatedir)/po
|
||||||
|
anjuta_po_DATA = \
|
||||||
|
hedera/po/POTFILES.in.tpl \
|
||||||
|
hedera/po/POTFILES.skip.tpl
|
||||||
|
|
||||||
|
anjuta_debiandir = $(templatedir)/debian
|
||||||
|
anjuta_debian_DATA = \
|
||||||
|
hedera/debian/changelog.tpl \
|
||||||
|
hedera/debian/compat \
|
||||||
|
hedera/debian/control.tpl \
|
||||||
|
hedera/debian/copyright.tpl \
|
||||||
|
hedera/debian/docs \
|
||||||
|
hedera/debian/rules
|
||||||
|
|
||||||
|
anjuta_debian_sourcedir = $(anjuta_debiandir)/source
|
||||||
|
anjuta_debian_source_DATA = hedera/debian/source/format
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,134 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project-template>
|
||||||
|
<project-wizard>
|
||||||
|
<name>Hedera Module</name>
|
||||||
|
<description>Basic project for an Hedera Module.</description>
|
||||||
|
<icon>hedera-logo.png</icon>
|
||||||
|
<category>Vala</category>
|
||||||
|
<required-program>automake</required-program>
|
||||||
|
<required-program>autoconf</required-program>
|
||||||
|
<required-program>make</required-program>
|
||||||
|
<required-program>valac</required-program>
|
||||||
|
<required-program>hedera</required-program>
|
||||||
|
<required-package>hedera</required-package>
|
||||||
|
</project-wizard>
|
||||||
|
|
||||||
|
<page name="basic" label="Basic information" description="General Project Information">
|
||||||
|
<property type="string" summary="yes" restriction="filename" name="Name" mandatory="yes" default="module" label="Module Name:" description="Module name"></property>
|
||||||
|
<property type="string" summary="yes" restriction="filename" name="FormName" mandatory="yes" default="example" label="Form Name:" description="Form name"></property>
|
||||||
|
<property type="string" name="Author" mandatory="yes" default="[+UserName+]" label="Author:" description="The author or team full name"></property>
|
||||||
|
<property type="string" name="Email" mandatory="no" default="[+EmailAddress+]" label="Email address:" description="Author or team e-mail address"></property>
|
||||||
|
<property type="string" name="Version" mandatory="yes" default="0.1" label="Version:" description= "The actual version of the module"></property>
|
||||||
|
</page>
|
||||||
|
|
||||||
|
<page name="options" label="Project options" description="Options for project build system">
|
||||||
|
<property type="directory" summary="yes" name="Destination" mandatory="yes" exist="no" default='[+AnjutaProjectDirectory+]/[+(string-downcase (get "Name"))+]' label="Destination:" description="The directory where the project will be stored once created"></property>
|
||||||
|
<property type="directory" summary="yes" name="Destination" mandatory="yes" exist="no" default='[+AnjutaProjectDirectory+]/[+(string-downcase (get "Name"))+]' label="Destino:" description="El directorio donde se guadará el proyecto una vez creado" xml:lang="es"></property>
|
||||||
|
[+INCLUDE "licenses.tpl"+]
|
||||||
|
<property type="boolean" name="DebianPackage" default="1" label="Make a Debian package:" description="Generate the files needed to build a .deb package"></property>
|
||||||
|
<property type="boolean" name="DebianPackage" default="1" label="Crear paquete Debian:" description="Generar los ficheros necesarios para construir un paquete .deb" xml:lang="es"></property>
|
||||||
|
<property type="hidden" name="NameUpper" default='[+(string-upcase (get "Name"))+]'/>
|
||||||
|
<property type="hidden" name="NameLower" default='[+(string-downcase (get "Name"))+]'/>
|
||||||
|
<property type="hidden" name="NameCUpper" default='[+(string->c-name! (string-substitute (string-upcase (get "Name")) " " "_"))+]'/>
|
||||||
|
<property type="hidden" name="NameCLower" default='[+(string->c-name! (string-substitute (string-downcase (get "Name")) " " "_"))+]'/>
|
||||||
|
<property type="hidden" name="NameHLower" default='[+(string-substitute (string->c-name! (string-downcase (get "Name"))) " " "-")+]'/>
|
||||||
|
<property type="hidden" name="ClassName" default='[+(string->camelcase (get "Name"))+]'/>
|
||||||
|
<property type="hidden" name="FormClassName" default='[+(string->camelcase (get "FormName"))+]'/>
|
||||||
|
<property type="hidden" name="HavePackage" default="1"/>
|
||||||
|
<property type="hidden" name="PackageModule1" default="hedera"/>
|
||||||
|
<property type="boolean" name="HaveI18n" default="0" label="Add internationalization:" description="Adds support for internationalization so that your project can have translations in different languages" default="1"></property>
|
||||||
|
<property type="boolean" name="HavePackageExtra" default="0" label="Configure external packages:" description="Add library support from other packages (GLib, Gtk+ and Hedera are already added)"></property>
|
||||||
|
<property type="boolean" name="HavePackageExtra" default="0" label="Configurar paquetes externos:" description="Añade soporte para otros paquetes (GLib, Gtk+ y Hedera ya están añadidos)"xml:lang="es"></property>
|
||||||
|
<!-- <property type="boolean" name="HaveGtkDoc" default="0" label="Use Gtk-Doc for documentation:" description="Use Gtk-Doc to help you generate the documentation"></property>
|
||||||
|
<property type="boolean" name="HaveGtkDoc" default="0" label="Usar Gtk-Doc para documentación:" description="Emplear Gtk-Doc para facilitar la generación de documentación" xml:lang="es"></property>
|
||||||
|
-->
|
||||||
|
</page>
|
||||||
|
|
||||||
|
[+IF (=(get "HavePackageExtra") "1")+]
|
||||||
|
<page name="packages" label="Configure external packages" description="Configure external packages">
|
||||||
|
<property type="package" name="PackageModule2" mandatory="yes" label="Require Package:" description="Select the name of the requiered external packages."></property>
|
||||||
|
</page>
|
||||||
|
[+ENDIF+]
|
||||||
|
|
||||||
|
<content>
|
||||||
|
<directory source="minimal" destination="[+Destination+]">
|
||||||
|
<file source="autogen.sh" executable="yes"/>
|
||||||
|
</directory>
|
||||||
|
<directory source="terminal" destination="[+Destination+]">
|
||||||
|
<file source="ChangeLog"/>
|
||||||
|
<file source="NEWS"/>
|
||||||
|
<file source="README"/>
|
||||||
|
<file source="project.anjuta" destination="[+NameHLower+].anjuta"/>
|
||||||
|
<directory source="po">
|
||||||
|
<file source="ChangeLog"/>
|
||||||
|
<file source="LINGUAS"/>
|
||||||
|
</directory>
|
||||||
|
</directory>
|
||||||
|
<directory source="licenses" destination="[+Destination+]">
|
||||||
|
<file source="[+License+].txt" destination="COPYING"/>
|
||||||
|
</directory>
|
||||||
|
<directory source="hedera" destination="[+Destination+]">
|
||||||
|
<file source="AUTHORS.tpl" destination="AUTHORS"/>
|
||||||
|
<file source="Makefile.am.tpl" destination="Makefile.am"/>
|
||||||
|
<file source="configure.ac.tpl" destination="configure.ac"/>
|
||||||
|
<directory source="src">
|
||||||
|
<file source="mod.vala" destination="[+Name+].vala"/>
|
||||||
|
<file source="form.vala" destination="[+FormName+].vala"/>
|
||||||
|
<file source="config.vapi" destination="config.vapi"/>
|
||||||
|
<file source="Makefile.am.tpl" destination="Makefile.am"/>
|
||||||
|
</directory>
|
||||||
|
<directory source="data">
|
||||||
|
<file source="mod.glade" destination="[+FormName+].glade"/>
|
||||||
|
<file source="mod.xml.tpl" destination="[+Name+].xml"/>
|
||||||
|
<file source="mod.ui.tpl" destination="[+Name+].ui"/>
|
||||||
|
<file source="Makefile.am.tpl" destination="Makefile.am"/>
|
||||||
|
</directory>
|
||||||
|
<directory source="sql">
|
||||||
|
<directory source="mod" destination="[+Name+]">
|
||||||
|
<file source="query.sql.tpl" destination="[+FormName+].sql"/>
|
||||||
|
</directory>
|
||||||
|
</directory>
|
||||||
|
[+IF (=(get "DebianPackage") "1")+]
|
||||||
|
<directory source="debian">
|
||||||
|
<file source="changelog.tpl" destination="changelog"/>
|
||||||
|
<file source="compat"/>
|
||||||
|
<file source="control.tpl" destination="control"/>
|
||||||
|
<file source="copyright.tpl" destination="copyright"/>
|
||||||
|
<file source="docs"/>
|
||||||
|
<file source="rules" executable="yes"/>
|
||||||
|
<directory source="source">
|
||||||
|
<file source="format"/>
|
||||||
|
</directory>
|
||||||
|
</directory>
|
||||||
|
<directory source="build">
|
||||||
|
<directory source="m4">
|
||||||
|
<file source="pkg.m4"/>
|
||||||
|
</directory>
|
||||||
|
</directory>
|
||||||
|
[+ENDIF+]
|
||||||
|
[+IF (=(get "HaveI18n") "1") +]
|
||||||
|
<file source="translation" executable="yes"/>
|
||||||
|
<directory source="po">
|
||||||
|
<file source="POTFILES.in.tpl" destination="POTFILES.in"/>
|
||||||
|
<file source="POTFILES.skip.tpl" destination="POTFILES.skip"/>
|
||||||
|
</directory>
|
||||||
|
[+ENDIF+]
|
||||||
|
<directory source="." destination=".anjuta">
|
||||||
|
<directory source="." destination="session">
|
||||||
|
<file source="anjuta.session.tpl" destination="anjuta.session"/>
|
||||||
|
</directory>
|
||||||
|
</directory>
|
||||||
|
</directory>
|
||||||
|
</content>
|
||||||
|
|
||||||
|
<action>
|
||||||
|
[+IF (=(get "HaveI18n") "1") +]
|
||||||
|
<run command="bash -c " cd [+Destination+]/po
|
||||||
|
&& intltool-update -p
|
||||||
|
&& msginit --no-translator -i *.pot -o es.po -l es_ES.utf8
|
||||||
|
&& echo es >> LINGUAS
|
||||||
|
""/>
|
||||||
|
[+ENDIF+]
|
||||||
|
<open file="[+Destination+]/[+NameHLower+].anjuta"/>
|
||||||
|
</action>
|
||||||
|
</project-template>
|
|
@ -0,0 +1,2 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[+Author+] <[+Email+]>
|
|
@ -0,0 +1,42 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[+
|
||||||
|
(define prefix_if_missing
|
||||||
|
(lambda
|
||||||
|
(name prefix)
|
||||||
|
(string-append
|
||||||
|
(if
|
||||||
|
(==* (get name) prefix)
|
||||||
|
""
|
||||||
|
prefix
|
||||||
|
)
|
||||||
|
(get name)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
+]## Process this file with automake to produce Makefile.in
|
||||||
|
## Created by Anjuta
|
||||||
|
|
||||||
|
ACLOCAL_AMFLAGS = -I build/m4
|
||||||
|
|
||||||
|
SUBDIRS = \
|
||||||
|
src \
|
||||||
|
data[+IF (=(get "HaveI18n") "1")+] \
|
||||||
|
po
|
||||||
|
|
||||||
|
translationsdir =
|
||||||
|
translations_DATA = \
|
||||||
|
po/es.po
|
||||||
|
[+ENDIF+]
|
||||||
|
EXTRA_DIST = \
|
||||||
|
README \
|
||||||
|
COPYING \
|
||||||
|
AUTHORS \
|
||||||
|
ChangeLog \
|
||||||
|
INSTALL \
|
||||||
|
NEWS \
|
||||||
|
Makefile.decl
|
||||||
|
|
||||||
|
install-exec-hook:
|
||||||
|
rm -f $(DESTDIR)$(libdir)/hedera/module/[+(prefix_if_missing "Name" "lib")+].la
|
||||||
|
rm -f $(DESTDIR)$(libdir)/hedera/module/[+(prefix_if_missing "Name" "lib")+].a
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[Anjuta]
|
||||||
|
Maximized=1
|
||||||
|
Geometry=1920x1021+0+27
|
||||||
|
|
||||||
|
[Project Manager]
|
||||||
|
Expand=[+Name+]%%%[+Name+]//data%%%[+Name+]//src
|
||||||
|
|
||||||
|
[File Loader]
|
||||||
|
Files=../../src/[+FormName+].vala#30
|
||||||
|
|
||||||
|
[Document Manager]
|
||||||
|
bookmarks=<?xml version="1.0" encoding="UTF-8"?>\n<bookmarks/>\n
|
||||||
|
|
||||||
|
[Execution]
|
||||||
|
Program arguments=-u
|
||||||
|
Program uri=file:///usr/bin/hedera-bin
|
||||||
|
Run in terminal=2
|
||||||
|
Working directories=../../../[+Name+]%%%../../build
|
||||||
|
Environment variables=VN_MODULE_LIB_PATH=./build/src/.libs%%%VN_MODULE_DATA_PATH=./data%%%VN_MODULE_QUERY_PATH=./sql
|
||||||
|
|
||||||
|
[Build]
|
||||||
|
Configuration list=1:Default:build%%%1:Debug:build%%%1:Install:build%%%1:Optimized:build%%%1:Profiling:build
|
||||||
|
Selected Configuration=Debug
|
||||||
|
BuildArgs/Default=
|
||||||
|
BuildArgs/Debug=--enable-debug
|
||||||
|
BuildArgs/Install=--prefix=
|
||||||
|
BuildArgs/Optimized=
|
||||||
|
BuildArgs/Profiling=
|
||||||
|
|
||||||
|
[Debugger]
|
||||||
|
Stop at beginning=2
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Retrieves the value of the pkg-config variable for the given module.
|
||||||
|
# Will be removed when pkg-config gets to version 0.28, where this belongs.
|
||||||
|
|
||||||
|
# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
|
||||||
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
||||||
|
# -------------------------------------------
|
||||||
|
AC_DEFUN([PKG_CHECK_VAR],
|
||||||
|
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
|
||||||
|
AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
|
||||||
|
|
||||||
|
_PKG_CONFIG([$1], [variable="][$3]["], [$2])
|
||||||
|
AS_VAR_COPY([$1], [pkg_cv_][$1])
|
||||||
|
|
||||||
|
AS_VAR_IF([$1], [""], [$5], [$4])dnl
|
||||||
|
])# PKG_CHECK_VAR
|
|
@ -0,0 +1,80 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
|
dnl Created by Anjuta application wizard.
|
||||||
|
|
||||||
|
AC_INIT([+Name+], [+Version+])
|
||||||
|
|
||||||
|
AC_CONFIG_AUX_DIR([build])
|
||||||
|
AC_CONFIG_MACRO_DIR([build/m4])
|
||||||
|
AC_CONFIG_HEADERS([build/config.h])
|
||||||
|
|
||||||
|
AM_INIT_AUTOMAKE([-Wno-portability])
|
||||||
|
|
||||||
|
AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
|
AC_PROG_CC
|
||||||
|
|
||||||
|
dnl Check for vala.
|
||||||
|
dnl You should change the version shown here manually to match with yours.
|
||||||
|
AM_PROG_VALAC([0.20.0])
|
||||||
|
[+IF (=(get "HaveI18n") "1")+]
|
||||||
|
dnl Internationalization
|
||||||
|
IT_PROG_INTLTOOL([0.35.0])
|
||||||
|
|
||||||
|
GETTEXT_PACKAGE=hedera-[+Name+]
|
||||||
|
AC_SUBST(GETTEXT_PACKAGE)
|
||||||
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
|
||||||
|
AM_GLIB_GNU_GETTEXT
|
||||||
|
AM_XGETTEXT_OPTION([-k_ -kQ_:1g -kN_ -kC_:1c,2 -kNC_:1c,2])
|
||||||
|
[+ENDIF+]
|
||||||
|
dnl Check for debug mode.
|
||||||
|
AC_MSG_CHECKING([whether to build with debug information...])
|
||||||
|
AC_ARG_ENABLE([debug],
|
||||||
|
[AS_HELP_STRING([--enable-debug],
|
||||||
|
[Enable debug data generation (def=no)])],
|
||||||
|
[ENABLE_DEBUG="$enableval"],
|
||||||
|
[ENABLE_DEBUG=no])
|
||||||
|
AC_MSG_RESULT([$ENABLE_DEBUG])
|
||||||
|
|
||||||
|
if test x"$ENABLE_DEBUG" = x"yes"; then
|
||||||
|
CFLAGS=" -ggdb -O0 "
|
||||||
|
VALAFLAGS=" -g --save-temps "
|
||||||
|
else
|
||||||
|
CFLAGS=" -O2 "
|
||||||
|
VALAFLAGS=
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl Check if the C warnings must be shown
|
||||||
|
AC_MSG_CHECKING([whether C warnings will be shown...])
|
||||||
|
AC_ARG_ENABLE([c-warnings],
|
||||||
|
[AS_HELP_STRING([--enable-c-warnings],
|
||||||
|
[Enable C warnings to be shown (def=no)])],
|
||||||
|
[C_WARNINGS="$enableval"],
|
||||||
|
[C_WARNINGS=no])
|
||||||
|
AC_MSG_RESULT([$C_WARNINGS])
|
||||||
|
|
||||||
|
if test x"$C_WARNINGS" = x"yes"; then
|
||||||
|
CFLAGS+=" -Wall "
|
||||||
|
else
|
||||||
|
CFLAGS+=" -w "
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_SUBST([CFLAGS])
|
||||||
|
AC_SUBST([VALAFLAGS])
|
||||||
|
AC_SUBST([[+NameCLower+]_datadir], ['$(datadir)/hedera/module'])
|
||||||
|
|
||||||
|
LT_INIT
|
||||||
|
[+IF (=(get "HavePackage") "1")+]
|
||||||
|
PKG_CHECK_VAR([[+NameCLower+]_libdir], [[+PackageModule1+]], [modulelibdir])
|
||||||
|
PKG_CHECK_VAR([[+NameCLower+]_datadir], [[+PackageModule1+]], [moduledatadir])
|
||||||
|
PKG_CHECK_VAR([querydir], [[+PackageModule1+]], [modulequerydir])
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([+NameCUpper+], [[+PackageModule1+] [+PackageModule2+]])
|
||||||
|
# Check if vala bindigns are installed and usable
|
||||||
|
VALA_CHECK_PACKAGES([[+PackageModule1+] [+PackageModule2+]])[+ENDIF+]
|
||||||
|
[+IF (=(get "HaveGtkDoc") "1")+]GTK_DOC_CHECK([1.0])[+ENDIF+]
|
||||||
|
AC_OUTPUT([
|
||||||
|
Makefile
|
||||||
|
src/Makefile
|
||||||
|
data/Makefile
|
||||||
|
[+IF (=(get "HaveI18n") "1")+] po/Makefile.in[+ENDIF+]])
|
|
@ -0,0 +1,11 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
## Created by Anjuta
|
||||||
|
|
||||||
|
[+NameCLower+]_data_DATA = \
|
||||||
|
[+Name+].xml \
|
||||||
|
[+Name+].ui \
|
||||||
|
[+FormName+].glade
|
||||||
|
|
||||||
|
|
||||||
|
EXTRA_DIST = $([+NameCLower+]_data_DATA)
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
|
<object class="GtkBox" id="main">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</interface>
|
|
@ -0,0 +1,10 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
<ui>
|
||||||
|
<menubar name="MenuBar">
|
||||||
|
<placeholder name="ModuleMenu">
|
||||||
|
<menu name="[+ClassName+]Menu" action="action-menu-[+Name+]">
|
||||||
|
<menuitem name="[+FormClassName+]" action="open-[+FormName+]"/>
|
||||||
|
</menu>
|
||||||
|
</placeholder>
|
||||||
|
</menubar>
|
||||||
|
</ui>
|
|
@ -0,0 +1,20 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
<module>
|
||||||
|
<library translatable="yes" name="[+Name+]">[+ClassName+]</library>
|
||||||
|
<action-group>
|
||||||
|
<action translatable="yes" name="action-menu-[+Name+]">
|
||||||
|
[+ClassName+]
|
||||||
|
</action>
|
||||||
|
</action-group>
|
||||||
|
<form-group>
|
||||||
|
<form
|
||||||
|
translatable="yes"
|
||||||
|
name="[+FormName+]"
|
||||||
|
icon="gtk-find-and-replace"
|
||||||
|
action-name="open-[+FormName+]"
|
||||||
|
accel="">
|
||||||
|
[+FormClassName+]
|
||||||
|
</form>
|
||||||
|
</form-group>
|
||||||
|
</module>
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[+Name+] ([+Version+]) UNRELEASED; urgency=low
|
||||||
|
|
||||||
|
* Initial Release.
|
||||||
|
|
||||||
|
-- [+Author+] <[+Email+]> [+(shell "date -R")+]
|
|
@ -0,0 +1 @@
|
||||||
|
8
|
|
@ -0,0 +1,14 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
Source: [+Name+]
|
||||||
|
Section: gnome
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: [+Author+] <[+Email+]>
|
||||||
|
Build-Depends: debhelper (>= 8.0.0), autotools-dev, libhedera-dev
|
||||||
|
Standards-Version: 3.9.3
|
||||||
|
|
||||||
|
Package: hedera-[+Name+]
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, hedera
|
||||||
|
Description: Modules for Hedera
|
||||||
|
Description of the included modules will
|
||||||
|
be put here.
|
|
@ -0,0 +1,29 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: [+Name+]
|
||||||
|
Source: http://www.verdnatura.es/
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: [+(shell "date +%Y")+] [+Author+] <[+Email+]>
|
||||||
|
License: GPL-3.0+
|
||||||
|
|
||||||
|
Files: debian/*
|
||||||
|
Copyright: [+(shell "date +%Y")+] [+Author+] <[+Email+]>
|
||||||
|
License: GPL-3.0+
|
||||||
|
|
||||||
|
License: GPL-3.0+
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
.
|
||||||
|
This package is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
.
|
||||||
|
On Debian systems, the complete text of the GNU General
|
||||||
|
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
|
@ -0,0 +1,2 @@
|
||||||
|
NEWS
|
||||||
|
README
|
|
@ -0,0 +1,20 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
#!/usr/bin/make -f
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
#export DH_VERBOSE=1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with autotools-dev --builddirectory=debian/build
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
dh_auto_configure -- $(shell dpkg-buildflags --export=configure)
|
||||||
|
|
||||||
|
.PHONY: override_dh_shlibdeps
|
||||||
|
override_dh_shlibdeps:
|
||||||
|
dh_shlibdeps -O--builddirectory=debian/build \
|
||||||
|
-l/usr/lib/x86_64-linux-gnu/hedera
|
||||||
|
|
||||||
|
.PHONY: override_dh_makeshlibs
|
||||||
|
override_dh_makeshlibs:
|
||||||
|
dh_makeshlibs --noscripts
|
|
@ -0,0 +1 @@
|
||||||
|
3.0 (native)
|
|
@ -0,0 +1,7 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
# List of source files containing translatable strings.
|
||||||
|
|
||||||
|
src/[+Name+].vala
|
||||||
|
src/[+FormName+].vala
|
||||||
|
data/[+FormName+].glade
|
||||||
|
[type: gettext/glade]data/[+Name+].xml
|
|
@ -0,0 +1,5 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
# List of source files to skip from translation.
|
||||||
|
|
||||||
|
src/[+Name+].c
|
||||||
|
src/[+FormName+].c
|
|
@ -0,0 +1,48 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[+
|
||||||
|
(define prefix_if_missing
|
||||||
|
(lambda
|
||||||
|
(name prefix)
|
||||||
|
(string-append
|
||||||
|
(if
|
||||||
|
(==* (get name) prefix)
|
||||||
|
""
|
||||||
|
prefix
|
||||||
|
)
|
||||||
|
(get name)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
+]## Process this file with automake to produce Makefile.in
|
||||||
|
## Created by Anjuta
|
||||||
|
|
||||||
|
[+NameCLower+]_lib_LTLIBRARIES = [+(prefix_if_missing "Name" "lib")+].la
|
||||||
|
|
||||||
|
[+(prefix_if_missing "NameCLower" "lib")+]_la_SOURCES = \
|
||||||
|
config.vapi \
|
||||||
|
[+Name+].vala \
|
||||||
|
[+FormName+].vala
|
||||||
|
|
||||||
|
[+(prefix_if_missing "NameCLower" "lib")+]_la_LIBADD = $([+NameCUpper+]_LIBS)
|
||||||
|
[+(prefix_if_missing "NameCLower" "lib")+]_la_LDFLAGS = \
|
||||||
|
-avoid-version \
|
||||||
|
-Wl,--export-dynamic
|
||||||
|
|
||||||
|
[+(prefix_if_missing "NameCLower" "lib")+]_la_CPPFLAGS = \
|
||||||
|
-DPACKAGE_DATA_DIR=\"$([+NameCLower+]_datadir)\"[+IF (=(get "HaveI18n") "1")+] \
|
||||||
|
-DPACKAGE_LOCALE_DIR=\"$(datadir)/locale\"[+ELSE+] \
|
||||||
|
-DGETTEXT_PACKAGE=\"hedera-[+Name+]\"[+ENDIF+][+IF (=(get "HavePackage") "1")+] \
|
||||||
|
$([+NameCUpper+]_CFLAGS)[+ENDIF+]
|
||||||
|
[+(prefix_if_missing "NameCLower" "lib")+]_la_CFLAGS = $(CFLAGS)
|
||||||
|
|
||||||
|
[+(prefix_if_missing "NameCLower" "lib")+]_la_VALAFLAGS = [+IF (not (= (get "PackageModule2") ""))+]\
|
||||||
|
--pkg [+(string-substitute (get "PackageModule2") " " " --pkg ")+] \
|
||||||
|
[+ENDIF+]--pkg [+PackageModule1+] \
|
||||||
|
$(VALAFLAGS)
|
||||||
|
|
||||||
|
[+NameCLower+]_querydir = $(querydir)/[+NameHLower+]
|
||||||
|
[+NameCLower+]_query_DATA =
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
rm -f $(DESTDIR)$(libdir)/hedera/module/[+(prefix_if_missing "Name" "lib")+].so
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
|
||||||
|
namespace Config
|
||||||
|
{
|
||||||
|
public const string GETTEXT_PACKAGE;
|
||||||
|
public const string SPRITE_DIR;
|
||||||
|
public const string BACKGROUND_DIR;
|
||||||
|
public const string PACKAGE_DATA_DIR;
|
||||||
|
public const string PACKAGE_LOCALE_DIR;
|
||||||
|
public const string PACKAGE_NAME;
|
||||||
|
public const string PACKAGE_VERSION;
|
||||||
|
public const string VERSION;
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[+INCLUDE (string-append "licenses/" (get "License") ".tpl") \+]
|
||||||
|
/* -*- Mode: vala; tab-width: 4; intend-tabs-mode: t -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (C) [+(shell "date +%Y")+] [+Author+] <[+Email+]>
|
||||||
|
*
|
||||||
|
[+INVOKE LICENSE-DESCRIPTION PFX=" * " PROGRAM=(get "Name") OWNER=(get "Author") \+]
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Vn.[+FormClassName+] : Vn.Form
|
||||||
|
{
|
||||||
|
public [+FormClassName+] ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Main routine of the [+FormClassName+] Form.
|
||||||
|
public override void open (Gtk.Builder builder)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
[+ autogen5 template +]
|
||||||
|
[+INCLUDE (string-append "licenses/" (get "License") ".tpl") \+]
|
||||||
|
/* -*- Mode: vala; tab-width: 4; intend-tabs-mode: t -*- */
|
||||||
|
/*
|
||||||
|
* Copyright (C) [+(shell "date +%Y")+] [+Author+] <[+Email+]>
|
||||||
|
*
|
||||||
|
[+INVOKE LICENSE-DESCRIPTION PFX=" * " PROGRAM=(get "Name") OWNER=(get "Author") \+]
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Vn.[+ClassName+] : Vn.Mod
|
||||||
|
{
|
||||||
|
public [+ClassName+] ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Main routine of the [+ClassName+] Module.
|
||||||
|
public override void activate ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
getopt -Q \
|
||||||
|
-o "hua:" \
|
||||||
|
-l "help,update,add:" \
|
||||||
|
-n "./translation" \
|
||||||
|
-- $@
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
-u|--update|'')
|
||||||
|
cd ./po
|
||||||
|
intltool-update -r
|
||||||
|
cd ..
|
||||||
|
;;
|
||||||
|
|
||||||
|
-a|--add)
|
||||||
|
arg=$2
|
||||||
|
|
||||||
|
if [ -z $arg ]; then
|
||||||
|
exit 1;
|
||||||
|
elif [ ${#arg} -lt 2 ]; then
|
||||||
|
echo "./translation: language codes are at least two characters long." > /dev/stderr
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
msginit -i po/*.pot -o po/$arg.po -l $arg.utf8
|
||||||
|
echo $arg >> po/LINGUAS
|
||||||
|
#sort po/LINGUAS -o po/LINGUAS
|
||||||
|
;;
|
||||||
|
|
||||||
|
-h|--help)
|
||||||
|
echo -e \
|
||||||
|
"Translation helper script.
|
||||||
|
Note that only the first option is used. If no option is
|
||||||
|
passed the '\033[1m-u\033[0m' option is used by default.
|
||||||
|
Options:
|
||||||
|
\033[1m-u, --update\033[0m
|
||||||
|
Update the currently existing translations and
|
||||||
|
the translations template. Also reports the current
|
||||||
|
status of the translations.
|
||||||
|
\033[1m-a, --add\033[0m \033[4mlang\033[0m
|
||||||
|
Add a new translation for the \033[4mlang\033[0m language
|
||||||
|
(using the gettext language and country codes), the
|
||||||
|
charset will automatically be set to UTF-8. You will
|
||||||
|
be asked to select your e-mail from a list.
|
||||||
|
\033[1m-h, --help\033[0m
|
||||||
|
Print this help text and exit."
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -102,6 +102,7 @@ AC_CONFIG_FILES([
|
||||||
docs/reference/Makefile
|
docs/reference/Makefile
|
||||||
docs/reference/hedera/Makefile
|
docs/reference/hedera/Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
|
anjuta/Makefile
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_SUBST([uVERSION], [${VERSION//./_}])
|
AC_SUBST([uVERSION], [${VERSION//./_}])
|
||||||
|
|
|
@ -9,9 +9,9 @@ db_include_HEADERS = \
|
||||||
db-param.h \
|
db-param.h \
|
||||||
db-request.h \
|
db-request.h \
|
||||||
db-conn.h \
|
db-conn.h \
|
||||||
db-row.h \
|
|
||||||
db-result.h \
|
db-result.h \
|
||||||
db-result-set.h \
|
db-result-set.h \
|
||||||
|
db-row.h \
|
||||||
db-model.h \
|
db-model.h \
|
||||||
db-model-holder.h \
|
db-model-holder.h \
|
||||||
db-file-loader.h \
|
db-file-loader.h \
|
||||||
|
|
|
@ -637,7 +637,7 @@ void db_iterator_add_param (DbIterator * obj, DbParam * param)
|
||||||
* Return value: (transfer none): a #GvnParam
|
* Return value: (transfer none): a #GvnParam
|
||||||
**/
|
**/
|
||||||
GvnParam * db_iterator_get_param (DbIterator * obj, const gchar * column)
|
GvnParam * db_iterator_get_param (DbIterator * obj, const gchar * column)
|
||||||
{
|
{
|
||||||
GList * n;
|
GList * n;
|
||||||
GvnParam * param;
|
GvnParam * param;
|
||||||
|
|
||||||
|
@ -669,6 +669,8 @@ GvnParam * db_iterator_get_param (DbIterator * obj, const gchar * column)
|
||||||
**/
|
**/
|
||||||
GList * db_iterator_get_params (DbIterator * obj)
|
GList * db_iterator_get_params (DbIterator * obj)
|
||||||
{
|
{
|
||||||
|
g_return_val_if_fail (DB_IS_ITERATOR (obj), NULL);
|
||||||
|
|
||||||
return g_list_copy (obj->params);
|
return g_list_copy (obj->params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <gvn/gvn.h>
|
|
||||||
#include "db-model.h"
|
#include "db-model.h"
|
||||||
#include "db-row.h"
|
#include "db-row.h"
|
||||||
|
|
||||||
|
@ -928,7 +927,8 @@ static void db_model_post_process_query (DbModel * obj)
|
||||||
// TODO When parser gets fully functional, these 3 lines won't be needed,
|
// TODO When parser gets fully functional, these 3 lines won't be needed,
|
||||||
// because obj>priv->stmt will be a parsed stmt:
|
// because obj>priv->stmt will be a parsed stmt:
|
||||||
gchar * rend = db_conn_render (obj->priv->conn, obj->priv->stmt, NULL);
|
gchar * rend = db_conn_render (obj->priv->conn, obj->priv->stmt, NULL);
|
||||||
SqlObject * stmt = sql_parser_parse (rend);
|
SqlObject * stmt = sql_parser_parse (rend, NULL);
|
||||||
|
//Uncomment to print de resulting stmt rendered:
|
||||||
/*gchar * rend2 = NULL;
|
/*gchar * rend2 = NULL;
|
||||||
if (stmt && (rend2 = db_conn_render (obj->priv->conn, stmt, NULL)))
|
if (stmt && (rend2 = db_conn_render (obj->priv->conn, stmt, NULL)))
|
||||||
g_message ("SQL + Parser + Render =\n %s", rend2);
|
g_message ("SQL + Parser + Render =\n %s", rend2);
|
||||||
|
@ -1999,7 +1999,8 @@ const GValue * db_model_get_value (DbModel * obj, DbIter * iter, gint col, GErro
|
||||||
* @iter: a #DbIter pointing to the row to be set
|
* @iter: a #DbIter pointing to the row to be set
|
||||||
* @col: the column of the field to be set
|
* @col: the column of the field to be set
|
||||||
* @value: new value for the field pointed to by @iter and @col
|
* @value: new value for the field pointed to by @iter and @col
|
||||||
* @err: (out) (allow-none): a #GError or %NULL to ignore errors
|
* @err: (out) (allow-none): a return location for a #GError or %NULL to ignore
|
||||||
|
* errors
|
||||||
*
|
*
|
||||||
* Sets the value of a single field to @value on @obj as well as on the database.
|
* Sets the value of a single field to @value on @obj as well as on the database.
|
||||||
* If the database update fails, the model is not updated and err is set
|
* If the database update fails, the model is not updated and err is set
|
||||||
|
|
|
@ -14,3 +14,15 @@ usr/share/gir-1.0
|
||||||
usr/share/glade/catalogs
|
usr/share/glade/catalogs
|
||||||
usr/share/vala-0.20/vapi
|
usr/share/vala-0.20/vapi
|
||||||
usr/share/gtk-doc/html/hedera
|
usr/share/gtk-doc/html/hedera
|
||||||
|
|
||||||
|
usr/share/anjuta/templates
|
||||||
|
usr/share/anjuta/templates/hedera
|
||||||
|
usr/share/anjuta/templates/hedera/build/
|
||||||
|
usr/share/anjuta/templates/hedera/build/m4
|
||||||
|
usr/share/anjuta/templates/hedera/data
|
||||||
|
usr/share/anjuta/templates/hedera/debian
|
||||||
|
usr/share/anjuta/templates/hedera/debian/source
|
||||||
|
usr/share/anjuta/templates/hedera/po
|
||||||
|
usr/share/anjuta/templates/hedera/sql
|
||||||
|
usr/share/anjuta/templates/hedera/sql/mod
|
||||||
|
usr/share/anjuta/templates/hedera/src
|
||||||
|
|
|
@ -26,3 +26,13 @@ usr/share/gir-1.0/*
|
||||||
usr/share/glade/catalogs/*
|
usr/share/glade/catalogs/*
|
||||||
usr/share/vala-0.20/vapi/*
|
usr/share/vala-0.20/vapi/*
|
||||||
usr/share/gtk-doc/html/hedera/*
|
usr/share/gtk-doc/html/hedera/*
|
||||||
|
|
||||||
|
usr/share/anjuta/templates/*
|
||||||
|
usr/share/anjuta/templates/hedera/*
|
||||||
|
usr/share/anjuta/templates/hedera/build/m4/*
|
||||||
|
usr/share/anjuta/templates/hedera/data/*
|
||||||
|
usr/share/anjuta/templates/hedera/debian/*
|
||||||
|
usr/share/anjuta/templates/hedera/debian/source/*
|
||||||
|
usr/share/anjuta/templates/hedera/po/*
|
||||||
|
usr/share/anjuta/templates/hedera/sql/mod/*
|
||||||
|
usr/share/anjuta/templates/hedera/src/*
|
||||||
|
|
|
@ -4,24 +4,55 @@
|
||||||
]>
|
]>
|
||||||
<refentry id="first-tutorial">
|
<refentry id="first-tutorial">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>First Tutorial</refentrytitle>
|
<refentrytitle>First form</refentrytitle>
|
||||||
<manvolnum>0</manvolnum>
|
<manvolnum>0</manvolnum>
|
||||||
<refmiscinfo>Hedera Library</refmiscinfo>
|
<refmiscinfo>Hedera Library</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>First simple tutorial</refname>
|
<refname>First form</refname>
|
||||||
<refpurpose>
|
<refpurpose>
|
||||||
A simple tutorial to get started
|
In this first tutorial you will learn how to create a simple
|
||||||
|
form
|
||||||
</refpurpose>
|
</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
<refsection id="defining-form">
|
||||||
<refsection id="first-tutorial-intro">
|
<title>Defining a form</title>
|
||||||
<title>The first tutorial</title>
|
|
||||||
<para>
|
<para>
|
||||||
In this first tutorial you will learn how to create a simple
|
<!-- FIXME: add description of the XML DEFINITION of a form in the module file -->
|
||||||
module with just one form using the Hedera library.
|
|
||||||
</para>
|
</para>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
<refsection id="form-files">
|
||||||
|
<title>Files needed to create a form</title>
|
||||||
|
<para>
|
||||||
|
The most basic form is made up of a class that inherits from Vn.Form
|
||||||
|
and a Gtk.Builder file, which defines the UI of the form. This UI
|
||||||
|
file is expected to use the ".galde" extension and named after the
|
||||||
|
form that will use it. This .glade file must
|
||||||
|
contain a toplevel Gtk.Box with the name "main", that will be
|
||||||
|
recognized by the library as the content of the Gtk.Notebook used by
|
||||||
|
the runtime and will be autamtically inserted in a page of that
|
||||||
|
notebook while opening the form, integrating as a part of the
|
||||||
|
application.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The .glade file for a form may also contain a Vn.Batch named
|
||||||
|
"models" which the library will recognize as a group of models used
|
||||||
|
by the form, and will set the application connection to these
|
||||||
|
automatically.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
Additionally, the form can add menus to the main application
|
||||||
|
by adding a Gtk.ActionGroup named "actions" in the .glade file, and
|
||||||
|
using another file named also after the form, with the extension
|
||||||
|
".ui". This file will be used to define the strcuture of the menus
|
||||||
|
and will link the options to the actions defined in the previously
|
||||||
|
mentioned "actions" Gtk.ActionGroup.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
There is also the possibility to define SQL files, to set and edit
|
||||||
|
the SQL queries apart from the other parts of the module.
|
||||||
|
</para>
|
||||||
|
<!-- FIXME: add sections to explain how these things are done -->
|
||||||
|
</refsection>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
|
@ -71,4 +71,7 @@
|
||||||
do some things that will be described here but are not written yet.
|
do some things that will be described here but are not written yet.
|
||||||
</para>
|
</para>
|
||||||
</refsection>
|
</refsection>
|
||||||
|
<refsection>
|
||||||
|
<!--FIXME add sections to explain the definition XML file and the .ui file -->
|
||||||
|
</refsection>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
|
@ -17,7 +17,8 @@ libgladevn_la_SOURCES = \
|
||||||
glade-vn.c \
|
glade-vn.c \
|
||||||
glade-vn-batch.c \
|
glade-vn-batch.c \
|
||||||
glade-db-sql.c \
|
glade-db-sql.c \
|
||||||
glade-db-model.c
|
glade-db-model.c \
|
||||||
|
glade-db-iterator.c
|
||||||
|
|
||||||
gladevn_data_DATA = vn.xml
|
gladevn_data_DATA = vn.xml
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,279 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2013 - Juan Ferrer Toribio
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "glade-vn.h"
|
||||||
|
#include <vn/glade/vn-iterator.h>
|
||||||
|
|
||||||
|
static void glade_db_iterator_on_name_changed (GladeProject * project,
|
||||||
|
GladeWidget * widget)
|
||||||
|
{
|
||||||
|
const gchar * new_name;
|
||||||
|
gchar * prefix, * old_name;
|
||||||
|
GList * n, * list;
|
||||||
|
|
||||||
|
if (G_OBJECT_TYPE (glade_widget_get_object (widget)) != VN_TYPE_ITERATOR)
|
||||||
|
return;
|
||||||
|
|
||||||
|
old_name = g_object_get_data (G_OBJECT (widget), "old-name");
|
||||||
|
prefix = g_strconcat (old_name, "-", NULL);
|
||||||
|
new_name = glade_widget_get_name (widget);
|
||||||
|
g_object_set_data_full (G_OBJECT (widget), "old-name",
|
||||||
|
g_strdup (new_name), (GDestroyNotify) g_free);
|
||||||
|
|
||||||
|
list = db_iterator_get_params (DB_ITERATOR (glade_widget_get_object (widget)));
|
||||||
|
|
||||||
|
for (n = list; n; n = n->next)
|
||||||
|
{
|
||||||
|
GladeWidget * param = glade_widget_get_from_gobject (G_OBJECT (n->data));
|
||||||
|
const gchar * child_name = glade_widget_get_name (param);
|
||||||
|
|
||||||
|
if (g_str_has_prefix (child_name, prefix))
|
||||||
|
{
|
||||||
|
glong offset = g_utf8_strlen (prefix, -1);
|
||||||
|
gchar * new_child_name = g_strconcat (new_name, "-", child_name + offset, NULL);
|
||||||
|
glade_project_set_widget_name (project, param, new_child_name);
|
||||||
|
g_free (new_child_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
g_list_free (list);
|
||||||
|
g_free (prefix);
|
||||||
|
}
|
||||||
|
|
||||||
|
void glade_db_iterator_post_create (GladeWidgetAdaptor * adaptor,
|
||||||
|
DbIterator * iterator, GladeCreateReason * reason)
|
||||||
|
{
|
||||||
|
static gboolean connected = FALSE;
|
||||||
|
GladeWidget * widget = glade_widget_get_from_gobject (G_OBJECT (iterator));
|
||||||
|
GladeProject * project = glade_widget_get_project (widget);
|
||||||
|
|
||||||
|
g_object_set_data_full (G_OBJECT (widget), "old-name",
|
||||||
|
g_strdup (glade_widget_get_name (widget)), (GDestroyNotify) g_free);
|
||||||
|
|
||||||
|
if (!connected)
|
||||||
|
{
|
||||||
|
g_signal_connect (project, "widget-name-changed",
|
||||||
|
G_CALLBACK (glade_db_iterator_on_name_changed), NULL);
|
||||||
|
connected = TRUE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void glade_db_iterator_on_column_name_changed (GladeProperty * property,
|
||||||
|
GValue * old, GValue * new, GladeWidget * param)
|
||||||
|
{
|
||||||
|
const gchar * parent_name;
|
||||||
|
gchar * prefix;
|
||||||
|
GladeWidget * parent = glade_widget_get_parent (param);
|
||||||
|
|
||||||
|
if (!parent
|
||||||
|
|| G_OBJECT_TYPE (glade_widget_get_object (parent)) != VN_TYPE_ITERATOR)
|
||||||
|
return;
|
||||||
|
|
||||||
|
parent_name = glade_widget_get_name (parent);
|
||||||
|
prefix = g_strconcat (parent_name, "-", NULL);
|
||||||
|
|
||||||
|
if (g_str_has_prefix (glade_widget_get_name (param), prefix))
|
||||||
|
{
|
||||||
|
GladeProject * project = glade_widget_get_project (param);
|
||||||
|
gchar * new_name = g_strconcat (prefix, g_value_get_string (new), NULL);
|
||||||
|
glade_project_set_widget_name (project, param, new_name);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (prefix);
|
||||||
|
}
|
||||||
|
|
||||||
|
void glade_db_iterator_add_child (GladeWidgetAdaptor * adaptor,
|
||||||
|
DbIterator * parent, DbParam * child)
|
||||||
|
{
|
||||||
|
gchar * new_name;
|
||||||
|
const gchar * param_name, * parent_name;
|
||||||
|
GladeWidget * param = glade_widget_get_from_gobject (G_OBJECT (child));
|
||||||
|
GladeProperty * name_prop = glade_widget_get_property (param, "column-name");
|
||||||
|
|
||||||
|
param_name = glade_widget_get_name (param);
|
||||||
|
parent_name = glade_widget_get_name (glade_widget_get_from_gobject (G_OBJECT (parent)));
|
||||||
|
new_name = g_strconcat (parent_name, "-",param_name, NULL);
|
||||||
|
glade_project_set_widget_name (glade_widget_get_project (param), param, new_name);
|
||||||
|
g_free (new_name);
|
||||||
|
|
||||||
|
g_signal_connect (name_prop, "value-changed",
|
||||||
|
G_CALLBACK (glade_db_iterator_on_column_name_changed), param);
|
||||||
|
|
||||||
|
db_iterator_add_param (parent, child);
|
||||||
|
}
|
||||||
|
|
||||||
|
void glade_db_iterator_remove_child (GladeWidgetAdaptor * adaptor,
|
||||||
|
DbIterator * parent, DbParam * child)
|
||||||
|
{
|
||||||
|
// db_iterator_remove_param (parent, child);
|
||||||
|
}
|
||||||
|
|
||||||
|
void glade_db_iterator_replace_child (GladeWidgetAdaptor * adaptor,
|
||||||
|
DbIterator * container, DbParam * current, DbParam * new)
|
||||||
|
{
|
||||||
|
glade_db_iterator_remove_child (adaptor, container, current);
|
||||||
|
glade_db_iterator_add_child (adaptor, container, new);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean glade_db_iterator_add_verify (GladeWidgetAdaptor * adaptor,
|
||||||
|
DbIterator * container, DbParam * child, gboolean user_feedback)
|
||||||
|
{
|
||||||
|
if (DB_IS_PARAM (child))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
if (user_feedback)
|
||||||
|
{
|
||||||
|
GladeWidgetAdaptor * object_adaptor =
|
||||||
|
glade_widget_adaptor_get_by_type (DB_TYPE_PARAM);
|
||||||
|
|
||||||
|
glade_util_ui_message (glade_app_get_window ()
|
||||||
|
,GLADE_UI_INFO
|
||||||
|
,NULL
|
||||||
|
,"Only objects of type %s can be added to objects of type %s."
|
||||||
|
,glade_widget_adaptor_get_title (object_adaptor)
|
||||||
|
,glade_widget_adaptor_get_title (adaptor)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
GList * glade_db_iterator_get_children (GladeWidgetAdaptor * adaptor,
|
||||||
|
DbIterator * parent)
|
||||||
|
{
|
||||||
|
return db_iterator_get_params (parent);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void glade_db_iterator_child_selected (GladeBaseEditor * editor,
|
||||||
|
GladeWidget * child, gpointer data)
|
||||||
|
{
|
||||||
|
glade_base_editor_add_label (editor, _("Parameter"));
|
||||||
|
glade_base_editor_add_default_properties (editor, child);
|
||||||
|
glade_base_editor_add_label (editor, _("Properties"));
|
||||||
|
glade_base_editor_add_editable (editor, child, GLADE_PAGE_GENERAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean glade_db_iterator_move_child (GladeBaseEditor * editor,
|
||||||
|
GladeWidget * parent, GladeWidget * child, gpointer data)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void glade_db_iterator_launch_editor (GObject * iterator)
|
||||||
|
{
|
||||||
|
GladeBaseEditor * editor;
|
||||||
|
GladeEditable * param_editor;
|
||||||
|
GtkWidget * window;
|
||||||
|
GladeWidget * widget = glade_widget_get_from_gobject (iterator);
|
||||||
|
GladeWidgetAdaptor * adaptor = glade_widget_get_adaptor (widget);
|
||||||
|
|
||||||
|
widget = glade_widget_get_toplevel (widget);
|
||||||
|
param_editor = glade_widget_adaptor_create_editable (adaptor, GLADE_PAGE_GENERAL);
|
||||||
|
editor = glade_base_editor_new (glade_widget_get_object (widget),
|
||||||
|
param_editor, _("Parameter"), DB_TYPE_PARAM, NULL);
|
||||||
|
|
||||||
|
g_signal_connect (editor, "child-selected", G_CALLBACK (glade_db_iterator_child_selected), NULL);
|
||||||
|
g_signal_connect (editor, "move-child", G_CALLBACK (glade_db_iterator_move_child), NULL);
|
||||||
|
|
||||||
|
gtk_widget_show (GTK_WIDGET (editor));
|
||||||
|
window = glade_base_editor_pack_new_window (editor, _("Iterator Editor"), NULL);
|
||||||
|
gtk_widget_show (window);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void glade_db_iterator_generate_params (GladeWidget * iterator)
|
||||||
|
{
|
||||||
|
gboolean use_file = TRUE;
|
||||||
|
gchar * sql = NULL;
|
||||||
|
gchar * message = _("The model must have \"SQL\" set and \"Use file\" set to 'No'.");
|
||||||
|
const gchar * name = glade_widget_get_name (iterator);
|
||||||
|
SqlSelect * select;
|
||||||
|
GladeWidget * model_w;
|
||||||
|
DbModel * model = NULL;
|
||||||
|
|
||||||
|
GList * params = db_iterator_get_params (DB_ITERATOR (glade_widget_get_object (iterator)));
|
||||||
|
|
||||||
|
if (params)
|
||||||
|
{
|
||||||
|
glade_util_ui_message (glade_app_get_window (), GLADE_UI_INFO, NULL,
|
||||||
|
_("%s can't have children before automatic generation."), name);
|
||||||
|
g_list_free (params);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
g_list_free (params);
|
||||||
|
|
||||||
|
glade_widget_property_get (iterator, "model", &model, NULL);
|
||||||
|
|
||||||
|
if (!model)
|
||||||
|
{
|
||||||
|
glade_util_ui_message (glade_app_get_window (), GLADE_UI_INFO, NULL,
|
||||||
|
_("%s must have \"Model\" set. %s"), name, message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
model_w = glade_widget_get_from_gobject (model);
|
||||||
|
glade_widget_property_get (model_w, "use-file", &use_file);
|
||||||
|
glade_widget_property_get (model_w, "sql", &sql);
|
||||||
|
|
||||||
|
if (use_file || !sql)
|
||||||
|
{
|
||||||
|
glade_util_ui_message (glade_app_get_window (), GLADE_UI_INFO, NULL, message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
select = SQL_SELECT (sql_parser_parse (sql, NULL));
|
||||||
|
|
||||||
|
if (select && SQL_IS_SELECT (select))
|
||||||
|
{
|
||||||
|
//TODO Cambios cuando se use g_object_get (select, "fields", &fields, NULL)
|
||||||
|
GSList * l, * fields = select->expr;
|
||||||
|
GladeProject * project = glade_widget_get_project (iterator);
|
||||||
|
|
||||||
|
for (l = fields; l; l = l->next)
|
||||||
|
{
|
||||||
|
gchar * column_name;
|
||||||
|
gchar * param_name, * param_new_name = NULL;
|
||||||
|
GladeWidget * param;
|
||||||
|
|
||||||
|
param = glade_command_create (glade_widget_adaptor_get_by_type (DB_TYPE_PARAM),
|
||||||
|
iterator, NULL, project);
|
||||||
|
|
||||||
|
column_name = sql_select_get_column_name (select, SQL_EXPR (l->data));
|
||||||
|
param_name = g_strconcat (name, "-"
|
||||||
|
,column_name ? column_name : "param"
|
||||||
|
,NULL);
|
||||||
|
|
||||||
|
if (!glade_project_available_widget_name (project, param, param_name))
|
||||||
|
param_new_name = glade_project_new_widget_name (project, param, param_name);
|
||||||
|
|
||||||
|
glade_project_set_widget_name (project, param, param_new_name ? param_new_name : param_name);
|
||||||
|
glade_widget_property_set (param, "column-name", column_name);
|
||||||
|
|
||||||
|
g_free (column_name);
|
||||||
|
g_free (param_new_name);
|
||||||
|
g_free (param_name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void glade_db_iterator_action_activate (GladeWidgetAdaptor * adaptor,
|
||||||
|
GObject * object, const gchar * action_path)
|
||||||
|
{
|
||||||
|
if (!g_strcmp0 (action_path, "launch-editor"))
|
||||||
|
glade_db_iterator_launch_editor (object);
|
||||||
|
else if (!g_strcmp0 (action_path, "generate-params"))
|
||||||
|
glade_db_iterator_generate_params (glade_widget_get_from_gobject (object));
|
||||||
|
}
|
|
@ -41,11 +41,8 @@ GLADE_MAKE_EPROP (GladeEPropModel, glade_eprop_model)
|
||||||
static void glade_eprop_model_name_changed (GladeProject * project,
|
static void glade_eprop_model_name_changed (GladeProject * project,
|
||||||
GladeWidget * widget, GladeEPropModel * obj)
|
GladeWidget * widget, GladeEPropModel * obj)
|
||||||
{
|
{
|
||||||
if (widget && obj->widget)
|
if (widget == obj->widget)
|
||||||
{
|
gtk_entry_set_text (GTK_ENTRY (obj->entry), glade_widget_get_name (widget));
|
||||||
gtk_entry_set_text (GTK_ENTRY (obj->entry),
|
|
||||||
glade_widget_get_name (widget));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static GladeWidget * glade_model_create (GladeProperty * prop)
|
static GladeWidget * glade_model_create (GladeProperty * prop)
|
||||||
|
@ -74,8 +71,13 @@ static GladeWidget * glade_model_create (GladeProperty * prop)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!use)
|
if (!use)
|
||||||
|
{
|
||||||
batch_w = glade_command_create
|
batch_w = glade_command_create
|
||||||
(glade_widget_adaptor_get_by_type (VN_TYPE_BATCH), NULL, NULL, project);
|
(glade_widget_adaptor_get_by_type (VN_TYPE_BATCH), NULL, NULL, project);
|
||||||
|
glade_widget_set_name (batch_w,
|
||||||
|
glade_project_new_widget_name (project, batch_w, "models"));
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
batch_w = glade_widget_get_from_gobject (batch);
|
batch_w = glade_widget_get_from_gobject (batch);
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ gboolean glade_vn_batch_add_verify (GladeWidgetAdaptor * adaptor,
|
||||||
,GLADE_UI_INFO
|
,GLADE_UI_INFO
|
||||||
,NULL
|
,NULL
|
||||||
,"Only objects of type %s can be added to objects of type %s."
|
,"Only objects of type %s can be added to objects of type %s."
|
||||||
,glade_widget_adaptor_get_title (object_adaptor)
|
,glade_widget_adaptor_get_name (object_adaptor)
|
||||||
,glade_widget_adaptor_get_title (adaptor)
|
,glade_widget_adaptor_get_name (adaptor)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
37
glade/vn.xml
37
glade/vn.xml
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<glade-widget-classes>
|
<glade-widget-classes>
|
||||||
|
|
||||||
<glade-widget-class name="GvnParam" generic-name="param" toplevel="True" title="Parameter" icon-name="widget-gtk-action">
|
<glade-widget-class name="GvnParam" generic-name="param" title="Parameter" icon-name="widget-gtk-action">
|
||||||
<properties>
|
<properties>
|
||||||
<property id="null" ignore="True"/>
|
<property id="null" ignore="True"/>
|
||||||
<property id="editable" ignore="True"/>
|
<property id="editable" ignore="True"/>
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
<property save="False" weight="1.3" id="sql" ignore="True"/>
|
<property save="False" weight="1.3" id="sql" ignore="True"/>
|
||||||
</properties>
|
</properties>
|
||||||
<actions>
|
<actions>
|
||||||
<action stock="gtk-edit" important="True" id="launch_editor" name="Edit…"/>
|
<action important="True" id="launch_editor" name="Edit…" stock="gtk-edit"/>
|
||||||
</actions>
|
</actions>
|
||||||
<action-activate-function>glade_db_model_action_activate</action-activate-function>
|
<action-activate-function>glade_db_model_action_activate</action-activate-function>
|
||||||
<create-editor-property-function>glade_db_sql_create_eprop</create-editor-property-function>
|
<create-editor-property-function>glade_db_sql_create_eprop</create-editor-property-function>
|
||||||
<write-widget-function>glade_db_model_write_widget</write-widget-function>
|
<write-widget-function>glade_db_model_write_widget</write-widget-function>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="DbIterator" generic-name="iterator" title="Iterator" icon-name="widget-gtk-texttagtable">
|
<glade-widget-class name="VnIterator" generic-name="iterator" title="Iterator" icon-name="widget-gtk-texttagtable">
|
||||||
<properties>
|
<properties>
|
||||||
<property id="model" ignore="True">
|
<property id="model" ignore="True">
|
||||||
<parameter-spec>
|
<parameter-spec>
|
||||||
|
@ -38,12 +38,24 @@
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
<create-editor-property-function>glade_db_model_holder_create_eprop</create-editor-property-function>
|
<create-editor-property-function>glade_db_model_holder_create_eprop</create-editor-property-function>
|
||||||
|
<actions>
|
||||||
|
<action important="True" id="launch-editor" name="Edit…" stock="gtk-edit"/>
|
||||||
|
<action important="True" id="generate-params" name="Generate params" icon-name="system-run"/>
|
||||||
|
</actions>
|
||||||
|
<action-activate-function>glade_db_iterator_action_activate</action-activate-function>
|
||||||
|
<post-create-function>glade_db_iterator_post_create</post-create-function>
|
||||||
|
<add-child-verify-function>glade_db_iterator_add_verify</add-child-verify-function>
|
||||||
|
<add-child-function>glade_db_iterator_add_child</add-child-function>
|
||||||
|
<remove-child-function>glade_db_iterator_remove_child</remove-child-function>
|
||||||
|
<replace-child-function>glade_db_iterator_replace_child</replace-child-function>
|
||||||
|
<get-children-function>glade_db_iterator_get_children</get-children-function>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class name="DbParam" generic-name="param" toplevel="True" title="Iterator Parameter" icon-name="widget-gtk-texttag">
|
<glade-widget-class name="DbParam" generic-name="param" title="Iterator Parameter" icon-name="widget-gtk-texttag">
|
||||||
<properties>
|
<properties>
|
||||||
<property id="iterator" ignore="True"/>
|
<property id="iterator" disabled="True"/>
|
||||||
<property id="column" ignore="True"/>
|
<property id="column-name" ignore="True"/>
|
||||||
|
<property id="column-index" ignore="True"/>
|
||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
|
@ -63,10 +75,13 @@
|
||||||
<glade-widget-class name="VnColumnCheck" generic-name="column-check" title="Column Check" icon-name="widget-gtk-cellrenderertoggle"/>
|
<glade-widget-class name="VnColumnCheck" generic-name="column-check" title="Column Check" icon-name="widget-gtk-cellrenderertoggle"/>
|
||||||
<glade-widget-class name="VnColumnEntry" generic-name="column-entry" title="Column Entry" icon-name="widget-gtk-cellrenderertext"/>
|
<glade-widget-class name="VnColumnEntry" generic-name="column-entry" title="Column Entry" icon-name="widget-gtk-cellrenderertext"/>
|
||||||
|
|
||||||
<glade-widget-class name="VnColumnSpin" generic-name="column-Spin" title="Column Spin" icon-name="widget-gtk-cellrendererspin">
|
<glade-widget-class name="VnColumnSpin" generic-name="column-spin" title="Column Spin" icon-name="widget-gtk-cellrendererspin">
|
||||||
<properties>
|
<properties>
|
||||||
<property id="digits" ignore="True" disabled="True"/>
|
<property id="digits" ignore="True"/>
|
||||||
<property id="climb-rate" ignore="True" disabled="True"/>
|
<property id="climb-rate" ignore="True"/>
|
||||||
|
<property id="lower" ignore="True"/>
|
||||||
|
<property id="uppder" ignore="True"/>
|
||||||
|
<property id="step-increment" ignore="True"/>
|
||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
|
@ -144,8 +159,8 @@
|
||||||
<add-child-verify-function>glade_vn_batch_add_verify</add-child-verify-function>
|
<add-child-verify-function>glade_vn_batch_add_verify</add-child-verify-function>
|
||||||
<add-child-function>glade_vn_batch_add_child</add-child-function>
|
<add-child-function>glade_vn_batch_add_child</add-child-function>
|
||||||
<remove-child-function>glade_vn_batch_remove_child</remove-child-function>
|
<remove-child-function>glade_vn_batch_remove_child</remove-child-function>
|
||||||
<get-children-function>glade_vn_batch_get_children</get-children-function>
|
|
||||||
<replace-child-function>glade_vn_batch_replace_child</replace-child-function>
|
<replace-child-function>glade_vn_batch_replace_child</replace-child-function>
|
||||||
|
<get-children-function>glade_vn_batch_get_children</get-children-function>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
</glade-widget-classes>
|
</glade-widget-classes>
|
||||||
|
@ -153,7 +168,7 @@
|
||||||
<glade-widget-group name="db-toplevels" title="Data Handling">
|
<glade-widget-group name="db-toplevels" title="Data Handling">
|
||||||
<glade-widget-class-ref name="GvnParam"/>
|
<glade-widget-class-ref name="GvnParam"/>
|
||||||
<glade-widget-class-ref name="DbModel"/>
|
<glade-widget-class-ref name="DbModel"/>
|
||||||
<glade-widget-class-ref name="DbIterator"/>
|
<glade-widget-class-ref name="VnIterator"/>
|
||||||
<glade-widget-class-ref name="DbParam"/>
|
<glade-widget-class-ref name="DbParam"/>
|
||||||
<glade-widget-class-ref name="DbFileLoader"/>
|
<glade-widget-class-ref name="DbFileLoader"/>
|
||||||
</glade-widget-group>
|
</glade-widget-group>
|
||||||
|
|
|
@ -3,12 +3,8 @@
|
||||||
<!-- interface-requires vn 0.0 -->
|
<!-- interface-requires vn 0.0 -->
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
<!-- interface-local-resource-path ../image -->
|
<!-- interface-local-resource-path ../image -->
|
||||||
<object class="DbIterator" id="homes">
|
<object class="DbIterator" id="homes"/>
|
||||||
<property name="sql">SELECT id, street, pc, city, province, ok FROM user_address WHERE #p ORDER BY id</property>
|
<object class="DbIterator" id="info"/>
|
||||||
</object>
|
|
||||||
<object class="DbIterator" id="info">
|
|
||||||
<property name="sql">SELECT id, name, credit, active, born, photo, object_id FROM "user" ORDER BY id</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkBox" id="main">
|
<object class="GtkBox" id="main">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
@ -56,7 +52,6 @@
|
||||||
<object class="VnCompletion" id="searcher">
|
<object class="VnCompletion" id="searcher">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="sql">SELECT id, #p FROM article WHERE #p</property>
|
|
||||||
<property name="field">name</property>
|
<property name="field">name</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -170,7 +165,6 @@
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="iterator">info</property>
|
<property name="iterator">info</property>
|
||||||
<property name="column_name">object_id</property>
|
<property name="column_name">object_id</property>
|
||||||
<property name="sql">SELECT id, object FROM object</property>
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
|
|
|
@ -113,32 +113,54 @@ static void vn_consulter_model_status_changed (DbModel * model,
|
||||||
{
|
{
|
||||||
VnColumn * column;
|
VnColumn * column;
|
||||||
GType col_type, type = db_model_get_column_type (model, i);
|
GType col_type, type = db_model_get_column_type (model, i);
|
||||||
|
gboolean image = FALSE;
|
||||||
|
|
||||||
if (type == G_TYPE_BYTES)
|
if (type == G_TYPE_INT || type == G_TYPE_UINT
|
||||||
|
|| type == G_TYPE_FLOAT || type == G_TYPE_DOUBLE)
|
||||||
|
col_type = VN_TYPE_COLUMN_SPIN;
|
||||||
|
else if (type == G_TYPE_BYTES)
|
||||||
col_type = VN_TYPE_COLUMN_IMAGE;
|
col_type = VN_TYPE_COLUMN_IMAGE;
|
||||||
else if (type == G_TYPE_BOOLEAN)
|
else if (type == G_TYPE_BOOLEAN)
|
||||||
col_type = VN_TYPE_COLUMN_CHECK;
|
col_type = VN_TYPE_COLUMN_CHECK;
|
||||||
else
|
else
|
||||||
|
if (type == G_TYPE_STRING
|
||||||
|
&& !g_strcmp0 (db_model_get_column_name (model, i), "image"))
|
||||||
|
{
|
||||||
|
image = TRUE;
|
||||||
|
col_type = VN_TYPE_COLUMN_IMAGE;
|
||||||
|
}
|
||||||
|
else
|
||||||
col_type = VN_TYPE_COLUMN_ENTRY;
|
col_type = VN_TYPE_COLUMN_ENTRY;
|
||||||
|
|
||||||
if (i == 7)
|
|
||||||
col_type = VN_TYPE_COLUMN_IMAGE;
|
|
||||||
|
|
||||||
column = vn_grid_append_column (obj->grid, i
|
column = vn_grid_append_column (obj->grid, i
|
||||||
,db_model_get_column_name (model, i)
|
,db_model_get_column_name (model, i)
|
||||||
,col_type
|
,col_type
|
||||||
,TRUE, FALSE
|
,TRUE, FALSE
|
||||||
);
|
);
|
||||||
|
|
||||||
if (i == 7)
|
if (type == G_TYPE_INT)
|
||||||
g_object_set (column,
|
g_object_set (column,
|
||||||
|
"lower", (gdouble)G_MININT,
|
||||||
|
"upper", (gdouble)G_MAXINT,
|
||||||
|
NULL);
|
||||||
|
else if (type == G_TYPE_UINT)
|
||||||
|
g_object_set (column,
|
||||||
|
"upper", (gdouble)G_MAXUINT,
|
||||||
|
NULL);
|
||||||
|
else if (type == G_TYPE_FLOAT || type == G_TYPE_DOUBLE)
|
||||||
|
g_object_set (column,
|
||||||
|
"digits", 2,
|
||||||
|
"lower", 0.0,
|
||||||
|
"upper", 1000.0,
|
||||||
|
"step-increment", 0.1,
|
||||||
|
// "editable", FALSE,
|
||||||
|
NULL);
|
||||||
|
else if (image)
|
||||||
|
g_object_set (column,
|
||||||
"host", "www.verdnatura.es",
|
"host", "www.verdnatura.es",
|
||||||
"path", "image/cache/catalog/icon",
|
"path", "image/cache/catalog/icon",
|
||||||
"tooltip-path", "../full",
|
"tooltip-path", "../full",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
if (type == G_TYPE_FLOAT || type == G_TYPE_DOUBLE)
|
|
||||||
g_object_set (column, "digits", 3, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -167,7 +189,7 @@ void vn_consulter_mode_toggled (GtkToggleButton * mode, VnConsulter * obj)
|
||||||
void vn_consulter_send (GtkButton * button, VnConsulter * obj)
|
void vn_consulter_send (GtkButton * button, VnConsulter * obj)
|
||||||
{
|
{
|
||||||
DbIterator * iterator;
|
DbIterator * iterator;
|
||||||
DbModel * model;
|
DbModel * model;
|
||||||
gchar * sql;
|
gchar * sql;
|
||||||
|
|
||||||
sql = gtk_combo_box_text_get_active_text (obj->combo);
|
sql = gtk_combo_box_text_get_active_text (obj->combo);
|
||||||
|
@ -221,6 +243,8 @@ static void vn_consulter_open (VnConsulter * obj)
|
||||||
,obj->file
|
,obj->file
|
||||||
,"/*pg*/ SELECT id1, id2, name, ok, date, number, floating, image "
|
,"/*pg*/ SELECT id1, id2, name, ok, date, number, floating, image "
|
||||||
"FROM prueben"
|
"FROM prueben"
|
||||||
|
,"/*pg*/ SELECT id1, id2, floating "
|
||||||
|
"FROM prueben"
|
||||||
,NULL
|
,NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -233,11 +257,24 @@ static void vn_consulter_open (VnConsulter * obj)
|
||||||
gtk_entry_set_placeholder_text (vn_form_get (form, "combo-entry"),
|
gtk_entry_set_placeholder_text (vn_form_get (form, "combo-entry"),
|
||||||
_("Type or select a query"));
|
_("Type or select a query"));
|
||||||
|
|
||||||
gtk_tree_view_insert_column_with_attributes (obj->tv, -1, "Mensaje",
|
gtk_tree_view_insert_column_with_attributes (obj->tv, -1, _("Message"),
|
||||||
gtk_cell_renderer_text_new (), "text", 0, NULL);
|
gtk_cell_renderer_text_new (), "text", 0, NULL);
|
||||||
|
|
||||||
for (i = 0; i < g_strv_length (queries); i++)
|
for (i = 0; i < g_strv_length (queries); i++)
|
||||||
gtk_combo_box_text_prepend_text (obj->combo, queries[i]);
|
gtk_combo_box_text_prepend_text (obj->combo, queries[i]);
|
||||||
|
|
||||||
|
// XXX+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TEST VnIterator
|
||||||
|
/*
|
||||||
|
DbIterator * test_iterator = vn_form_get (form, "test-iterator");
|
||||||
|
GList * n, * params = db_iterator_get_params (test_iterator);
|
||||||
|
g_message ("DbIterator at %p",test_iterator);
|
||||||
|
for (n = params; n; n = n->next)
|
||||||
|
{
|
||||||
|
gpointer ptr;
|
||||||
|
g_object_get (n->data, "iterator", &ptr, NULL);
|
||||||
|
g_message ("DbParam %s from DbIterator at %p.",db_param_get_column_name (DB_PARAM (n->data)), ptr);
|
||||||
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
||||||
|
|
|
@ -45,8 +45,9 @@ vn/gui/main.glade
|
||||||
vn/gui/child-window.glade
|
vn/gui/child-window.glade
|
||||||
vn/gui/actions.glade
|
vn/gui/actions.glade
|
||||||
|
|
||||||
glade/glade-db-model.c
|
|
||||||
glade/glade-db-sql.c
|
glade/glade-db-sql.c
|
||||||
|
glade/glade-db-model.c
|
||||||
|
glade/glade-db-iterator.c
|
||||||
|
|
||||||
[type: gettext/glade]module/data/example.xml
|
[type: gettext/glade]module/data/example.xml
|
||||||
module/data/users.glade
|
module/data/users.glade
|
||||||
|
|
219
po/ca.po
219
po/ca.po
|
@ -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-11-18 16:11+0100\n"
|
"POT-Creation-Date: 2013-12-13 10:07+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"
|
||||||
|
@ -132,7 +132,7 @@ msgstr ""
|
||||||
msgid "The master GvnParam of this parameter"
|
msgid "The master GvnParam of this parameter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:985
|
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:987
|
||||||
msgid "Mode"
|
msgid "Mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ msgstr ""
|
||||||
msgid "The value"
|
msgid "The value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../sql/sql-string.c:198 ../db/db-model.c:3455 ../db/db-request.c:461
|
#: ../sql/sql-string.c:198 ../db/db-model.c:3456 ../db/db-request.c:461
|
||||||
msgid "SQL"
|
msgid "SQL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -226,73 +226,73 @@ msgstr ""
|
||||||
msgid "Can't allocate the needed memory"
|
msgid "Can't allocate the needed memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-iterator.c:986
|
#: ../db/db-iterator.c:988
|
||||||
msgid "The mode in which the iterator is working"
|
msgid "The mode in which the iterator is working"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-iterator.c:993
|
#: ../db/db-iterator.c:995
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "Remember selection"
|
msgid "Remember selection"
|
||||||
msgstr "Recordar"
|
msgstr "Recordar"
|
||||||
|
|
||||||
#: ../db/db-iterator.c:994
|
#: ../db/db-iterator.c:996
|
||||||
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:1554
|
#: ../db/db-model.c:3430 ../db/db-request.c:454 ../vn/vn-gui.c:1564
|
||||||
#: ../vn/vn-form.c:244
|
#: ../vn/vn-form.c:244
|
||||||
msgid "Connection"
|
msgid "Connection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3430
|
#: ../db/db-model.c:3431
|
||||||
msgid "The DbConn that manages the connection to the database"
|
msgid "The DbConn that manages the connection to the database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3437 ../db/db-request.c:468
|
#: ../db/db-model.c:3438 ../db/db-request.c:468
|
||||||
msgid "Statement"
|
msgid "Statement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3438
|
#: ../db/db-model.c:3439
|
||||||
msgid "The statement which retrieves the data"
|
msgid "The statement which retrieves the data"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3445
|
#: ../db/db-model.c:3446
|
||||||
msgid "Use file"
|
msgid "Use file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3446
|
#: ../db/db-model.c:3447
|
||||||
msgid ""
|
msgid ""
|
||||||
"If this is set to TRUE, the \"sql\" property will hold the name of a file "
|
"If this is set to TRUE, the \"sql\" property will hold the name of a file "
|
||||||
"containing a query, if set to FALSE, \"sql\" is used as an SQL string"
|
"containing a query, if set to FALSE, \"sql\" is used as an SQL string"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3456
|
#: ../db/db-model.c:3457
|
||||||
msgid ""
|
msgid ""
|
||||||
"Depending on the \"use-file\" property this will be the path to a file with "
|
"Depending on the \"use-file\" property this will be the path to a file with "
|
||||||
"queries for the model or a SQL string"
|
"queries for the model or a SQL string"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3465
|
#: ../db/db-model.c:3466
|
||||||
msgid "Main Table"
|
msgid "Main Table"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3466
|
#: ../db/db-model.c:3467
|
||||||
msgid "The main table of the model"
|
msgid "The main table of the model"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3473
|
#: ../db/db-model.c:3474
|
||||||
msgid "Update flags"
|
msgid "Update flags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3474
|
#: ../db/db-model.c:3475
|
||||||
msgid "The flags that indicate how a model can be modified"
|
msgid "The flags that indicate how a model can be modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3482
|
#: ../db/db-model.c:3483
|
||||||
msgid "Result position"
|
msgid "Result position"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3483
|
#: ../db/db-model.c:3484
|
||||||
msgid ""
|
msgid ""
|
||||||
"The position where the query that will fill the model will be placed in a "
|
"The position where the query that will fill the model will be placed in a "
|
||||||
"multi-query"
|
"multi-query"
|
||||||
|
@ -386,44 +386,44 @@ msgstr ""
|
||||||
msgid "The query is empty."
|
msgid "The query is empty."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1037
|
#: ../db/db-conn.c:1041
|
||||||
msgid "Plugin"
|
msgid "Plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1038
|
#: ../db/db-conn.c:1042
|
||||||
msgid "The name of the plugin"
|
msgid "The name of the plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1044
|
#: ../db/db-conn.c:1048
|
||||||
msgid "Query path"
|
msgid "Query path"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1045
|
#: ../db/db-conn.c:1049
|
||||||
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:715
|
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:715
|
||||||
#: ../vn/column/vn-column-image.c:493
|
#: ../vn/column/vn-column-image.c:493
|
||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1052
|
#: ../db/db-conn.c:1056
|
||||||
msgid "The host name to connect to"
|
msgid "The host name to connect to"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1058 ../module/data/users.glade.h:2
|
#: ../db/db-conn.c:1062 ../module/data/users.glade.h:2
|
||||||
msgid "User"
|
msgid "User"
|
||||||
msgstr "Usuari"
|
msgstr "Usuari"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1059
|
#: ../db/db-conn.c:1063
|
||||||
msgid "The user name"
|
msgid "The user name"
|
||||||
msgstr "Nom d'usuari"
|
msgstr "Nom d'usuari"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1065
|
#: ../db/db-conn.c:1069
|
||||||
msgid "DB name"
|
msgid "DB name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1066
|
#: ../db/db-conn.c:1070
|
||||||
msgid "The default schema"
|
msgid "The default schema"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -500,59 +500,59 @@ msgstr ""
|
||||||
msgid "The maximal size for the contents of the cache directory"
|
msgid "The maximal size for the contents of the cache directory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:643
|
#: ../vn/vn-gui.c:642
|
||||||
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:650
|
#: ../vn/vn-gui.c:649
|
||||||
msgid "An error occurred in the connection."
|
msgid "An error occurred in the connection."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:653
|
#: ../vn/vn-gui.c:652
|
||||||
msgid "Database error"
|
msgid "Database error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:660
|
#: ../vn/vn-gui.c:659
|
||||||
msgid "Unknown error"
|
msgid "Unknown error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1000
|
#: ../vn/vn-gui.c:999
|
||||||
msgid "Closing connection"
|
msgid "Closing connection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1002
|
#: ../vn/vn-gui.c:1001
|
||||||
msgid "Transaction started"
|
msgid "Transaction started"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1004
|
#: ../vn/vn-gui.c:1003
|
||||||
msgid "Connecting"
|
msgid "Connecting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1006
|
#: ../vn/vn-gui.c:1005
|
||||||
msgid "Connection lost"
|
msgid "Connection lost"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1008
|
#: ../vn/vn-gui.c:1007
|
||||||
msgid "Connection closed"
|
msgid "Connection closed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1010 ../vn/field/vn-http-image.c:116
|
#: ../vn/vn-gui.c:1009 ../vn/field/vn-http-image.c:116
|
||||||
msgid "Loading"
|
msgid "Loading"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1012 ../vn/gui/main.glade.h:19
|
#: ../vn/vn-gui.c:1011 ../vn/gui/main.glade.h:19
|
||||||
msgid "Ready"
|
msgid "Ready"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1555
|
#: ../vn/vn-gui.c:1565
|
||||||
msgid "The connection used by Gui"
|
msgid "The connection used by Gui"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1561
|
#: ../vn/vn-gui.c:1571
|
||||||
msgid "Application"
|
msgid "Application"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1562
|
#: ../vn/vn-gui.c:1572
|
||||||
msgid "The application handler for the entire program"
|
msgid "The application handler for the entire program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -679,7 +679,8 @@ msgstr ""
|
||||||
msgid "The current value of the field"
|
msgid "The current value of the field"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-field.c:525
|
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:164
|
||||||
|
#: ../glade/glade-db-iterator.c:187
|
||||||
msgid "Parameter"
|
msgid "Parameter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -704,12 +705,12 @@ msgid "Whether the field value can be of type GVN_TYPE_NULL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/field/vn-entry.c:153 ../vn/field/vn-spin.c:172
|
#: ../vn/field/vn-entry.c:153 ../vn/field/vn-spin.c:172
|
||||||
#: ../vn/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:138
|
#: ../vn/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:179
|
||||||
msgid "Digits"
|
msgid "Digits"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/field/vn-entry.c:154 ../vn/field/vn-spin.c:173
|
#: ../vn/field/vn-entry.c:154 ../vn/field/vn-spin.c:173
|
||||||
#: ../vn/column/vn-column-entry.c:120 ../vn/column/vn-column-spin.c:139
|
#: ../vn/column/vn-column-entry.c:120 ../vn/column/vn-column-spin.c:180
|
||||||
msgid "The number of decimal places to display."
|
msgid "The number of decimal places to display."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -804,14 +805,38 @@ msgstr ""
|
||||||
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/column/vn-column-spin.c:130
|
#: ../vn/column/vn-column-spin.c:171
|
||||||
msgid "Climb rate"
|
msgid "Climb rate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/column/vn-column-spin.c:131
|
#: ../vn/column/vn-column-spin.c:172
|
||||||
msgid "The acceleration rate when you hold down a button."
|
msgid "The acceleration rate when you hold down a button."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:187
|
||||||
|
msgid "Minimum value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:188
|
||||||
|
msgid "The minimum value of the adjustment."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:195
|
||||||
|
msgid "Maximum value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:196
|
||||||
|
msgid "The maximum value of the adjustment."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:203
|
||||||
|
msgid "Step Increment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:204
|
||||||
|
msgid "The step increment of the adjustment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/column/vn-column-combo.c:340
|
#: ../vn/column/vn-column-combo.c:340
|
||||||
msgid "Sort column"
|
msgid "Sort column"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -942,71 +967,51 @@ msgid "_Quit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:4
|
#: ../vn/gui/actions.glade.h:4
|
||||||
msgid "_About"
|
msgid "Quit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:5
|
#: ../vn/gui/actions.glade.h:5
|
||||||
msgid "_File"
|
msgid "_About"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:6
|
#: ../vn/gui/actions.glade.h:6
|
||||||
msgid "_Help"
|
msgid "_File"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:7
|
#: ../vn/gui/actions.glade.h:7
|
||||||
msgid "_Reconnect"
|
msgid "_Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:8
|
#: ../vn/gui/actions.glade.h:8
|
||||||
msgid "Reconnect"
|
msgid "_Reconnect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:9
|
#: ../vn/gui/actions.glade.h:9
|
||||||
msgid "_Close"
|
msgid "Reconnect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:10
|
#: ../vn/gui/actions.glade.h:10
|
||||||
msgid "_View"
|
msgid "_Close"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:11
|
#: ../vn/gui/actions.glade.h:11
|
||||||
|
msgid "_View"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/gui/actions.glade.h:12
|
||||||
msgctxt "View menu option"
|
msgctxt "View menu option"
|
||||||
msgid "Dynamic _Tabs"
|
msgid "Dynamic _Tabs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:12
|
#: ../vn/gui/actions.glade.h:13
|
||||||
msgid "Don't show tabs if there is only one tab open"
|
msgid "Don't show tabs if there is only one tab open"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:13
|
#: ../vn/gui/actions.glade.h:14
|
||||||
msgctxt "View menu option"
|
msgctxt "View menu option"
|
||||||
msgid "Tool_bar"
|
msgid "Tool_bar"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:121
|
|
||||||
msgid "Create and set a model for a DbModelHolder"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:153
|
|
||||||
msgid "Model configuration"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:153
|
|
||||||
msgid "DbModel properties configuration"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:238
|
|
||||||
msgid "Select a DbModel for the property"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:259 ../glade/glade-db-model.c:306
|
|
||||||
msgid "New Model"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:301
|
|
||||||
msgid "Edit Model"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-sql.c:27
|
#: ../glade/glade-db-sql.c:27
|
||||||
msgid "New SQL statement"
|
msgid "New SQL statement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1019,6 +1024,52 @@ msgstr ""
|
||||||
msgid "Open the SQL Editor"
|
msgid "Open the SQL Editor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:123
|
||||||
|
msgid "Create and set a model for a DbModelHolder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:155
|
||||||
|
msgid "Model configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:155
|
||||||
|
msgid "DbModel properties configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:240
|
||||||
|
msgid "Select a DbModel for the property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:261 ../glade/glade-db-model.c:308
|
||||||
|
msgid "New Model"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:303
|
||||||
|
msgid "Edit Model"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:166
|
||||||
|
msgid "Properties"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:193
|
||||||
|
msgid "Iterator Editor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:201
|
||||||
|
msgid "The model must have \"SQL\" set and \"Use file\" set to 'No'."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:212
|
||||||
|
#, c-format
|
||||||
|
msgid "%s can't have children before automatic generation."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:223
|
||||||
|
#, c-format
|
||||||
|
msgid "%s must have \"Model\" set. %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ../module/data/example.xml.h:1
|
#: ../module/data/example.xml.h:1
|
||||||
msgid "Example"
|
msgid "Example"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1188,10 +1239,14 @@ msgstr ""
|
||||||
msgid "∞"
|
msgid "∞"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../module/src/vn-consulter.c:234
|
#: ../module/src/vn-consulter.c:258
|
||||||
msgid "Type or select a query"
|
msgid "Type or select a query"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../module/src/vn-consulter.c:260
|
||||||
|
msgid "Message"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
#~ msgid "User name:"
|
#~ msgid "User name:"
|
||||||
#~ msgstr "Nom d'usuari"
|
#~ msgstr "Nom d'usuari"
|
||||||
|
|
222
po/es.po
222
po/es.po
|
@ -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-11-18 16:11+0100\n"
|
"POT-Creation-Date: 2013-12-13 10:07+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"
|
||||||
|
@ -134,7 +134,7 @@ msgstr "Maestro"
|
||||||
msgid "The master GvnParam of this parameter"
|
msgid "The master GvnParam of this parameter"
|
||||||
msgstr "El GvnParam maestro de este parámetro"
|
msgstr "El GvnParam maestro de este parámetro"
|
||||||
|
|
||||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:985
|
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:987
|
||||||
msgid "Mode"
|
msgid "Mode"
|
||||||
msgstr "Modo"
|
msgstr "Modo"
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ msgstr "El parametro al cual está vinculado"
|
||||||
msgid "The value"
|
msgid "The value"
|
||||||
msgstr "Valor"
|
msgstr "Valor"
|
||||||
|
|
||||||
#: ../sql/sql-string.c:198 ../db/db-model.c:3455 ../db/db-request.c:461
|
#: ../sql/sql-string.c:198 ../db/db-model.c:3456 ../db/db-request.c:461
|
||||||
msgid "SQL"
|
msgid "SQL"
|
||||||
msgstr "SQL"
|
msgstr "SQL"
|
||||||
|
|
||||||
|
@ -228,41 +228,41 @@ msgstr "Una cadena SQL arbitraria"
|
||||||
msgid "Can't allocate the needed memory"
|
msgid "Can't allocate the needed memory"
|
||||||
msgstr "No es posible asignar la memoria necesaria"
|
msgstr "No es posible asignar la memoria necesaria"
|
||||||
|
|
||||||
#: ../db/db-iterator.c:986
|
#: ../db/db-iterator.c:988
|
||||||
msgid "The mode in which the iterator is working"
|
msgid "The mode in which the iterator is working"
|
||||||
msgstr "El modo en el que está trabajando el Iterator"
|
msgstr "El modo en el que está trabajando el Iterator"
|
||||||
|
|
||||||
#: ../db/db-iterator.c:993
|
#: ../db/db-iterator.c:995
|
||||||
msgid "Remember selection"
|
msgid "Remember selection"
|
||||||
msgstr "Recordar fila seleccionada"
|
msgstr "Recordar fila seleccionada"
|
||||||
|
|
||||||
#: ../db/db-iterator.c:994
|
#: ../db/db-iterator.c:996
|
||||||
msgid "Wether to rememeber the selection when model is refreshed"
|
msgid "Wether to rememeber the selection when model is refreshed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Si se recordará o no la fila seleccionado cuando se refresque el modelo"
|
"Si se recordará o no la fila seleccionado cuando se refresque el modelo"
|
||||||
|
|
||||||
#: ../db/db-model.c:3429 ../db/db-request.c:454 ../vn/vn-gui.c:1554
|
#: ../db/db-model.c:3430 ../db/db-request.c:454 ../vn/vn-gui.c:1564
|
||||||
#: ../vn/vn-form.c:244
|
#: ../vn/vn-form.c:244
|
||||||
msgid "Connection"
|
msgid "Connection"
|
||||||
msgstr "Conexión"
|
msgstr "Conexión"
|
||||||
|
|
||||||
#: ../db/db-model.c:3430
|
#: ../db/db-model.c:3431
|
||||||
msgid "The DbConn that manages the connection to the database"
|
msgid "The DbConn that manages the connection to the database"
|
||||||
msgstr "La DbConn que controla la conexión a la base de datos"
|
msgstr "La DbConn que controla la conexión a la base de datos"
|
||||||
|
|
||||||
#: ../db/db-model.c:3437 ../db/db-request.c:468
|
#: ../db/db-model.c:3438 ../db/db-request.c:468
|
||||||
msgid "Statement"
|
msgid "Statement"
|
||||||
msgstr "Consulta"
|
msgstr "Consulta"
|
||||||
|
|
||||||
#: ../db/db-model.c:3438
|
#: ../db/db-model.c:3439
|
||||||
msgid "The statement which retrieves the data"
|
msgid "The statement which retrieves the data"
|
||||||
msgstr "La consulta que recupera los datos"
|
msgstr "La consulta que recupera los datos"
|
||||||
|
|
||||||
#: ../db/db-model.c:3445
|
#: ../db/db-model.c:3446
|
||||||
msgid "Use file"
|
msgid "Use file"
|
||||||
msgstr "Usa fichero"
|
msgstr "Usa fichero"
|
||||||
|
|
||||||
#: ../db/db-model.c:3446
|
#: ../db/db-model.c:3447
|
||||||
msgid ""
|
msgid ""
|
||||||
"If this is set to TRUE, the \"sql\" property will hold the name of a file "
|
"If this is set to TRUE, the \"sql\" property will hold the name of a file "
|
||||||
"containing a query, if set to FALSE, \"sql\" is used as an SQL string"
|
"containing a query, if set to FALSE, \"sql\" is used as an SQL string"
|
||||||
|
@ -270,7 +270,7 @@ msgstr ""
|
||||||
"Si es TRUE, la propiedad \"sql\" contiene el nombre de un archivo, si es "
|
"Si es TRUE, la propiedad \"sql\" contiene el nombre de un archivo, si es "
|
||||||
"falso, \"sql\" se usa como una cadena SQL"
|
"falso, \"sql\" se usa como una cadena SQL"
|
||||||
|
|
||||||
#: ../db/db-model.c:3456
|
#: ../db/db-model.c:3457
|
||||||
msgid ""
|
msgid ""
|
||||||
"Depending on the \"use-file\" property this will be the path to a file with "
|
"Depending on the \"use-file\" property this will be the path to a file with "
|
||||||
"queries for the model or a SQL string"
|
"queries for the model or a SQL string"
|
||||||
|
@ -278,27 +278,27 @@ msgstr ""
|
||||||
"Dependiendo de la propiedad \"use-file\", esta propiedad será la ruta a un "
|
"Dependiendo de la propiedad \"use-file\", esta propiedad será la ruta a un "
|
||||||
"fichero con consultas para el modelo o una cadena SQL"
|
"fichero con consultas para el modelo o una cadena SQL"
|
||||||
|
|
||||||
#: ../db/db-model.c:3465
|
#: ../db/db-model.c:3466
|
||||||
msgid "Main Table"
|
msgid "Main Table"
|
||||||
msgstr "Tabla principal"
|
msgstr "Tabla principal"
|
||||||
|
|
||||||
#: ../db/db-model.c:3466
|
#: ../db/db-model.c:3467
|
||||||
msgid "The main table of the model"
|
msgid "The main table of the model"
|
||||||
msgstr "La tabla principal del modelo"
|
msgstr "La tabla principal del modelo"
|
||||||
|
|
||||||
#: ../db/db-model.c:3473
|
#: ../db/db-model.c:3474
|
||||||
msgid "Update flags"
|
msgid "Update flags"
|
||||||
msgstr "Flags de actualización"
|
msgstr "Flags de actualización"
|
||||||
|
|
||||||
#: ../db/db-model.c:3474
|
#: ../db/db-model.c:3475
|
||||||
msgid "The flags that indicate how a model can be modified"
|
msgid "The flags that indicate how a model can be modified"
|
||||||
msgstr "Indican como se puede modificar el modelo"
|
msgstr "Indican como se puede modificar el modelo"
|
||||||
|
|
||||||
#: ../db/db-model.c:3482
|
#: ../db/db-model.c:3483
|
||||||
msgid "Result position"
|
msgid "Result position"
|
||||||
msgstr "Posición del resultado"
|
msgstr "Posición del resultado"
|
||||||
|
|
||||||
#: ../db/db-model.c:3483
|
#: ../db/db-model.c:3484
|
||||||
msgid ""
|
msgid ""
|
||||||
"The position where the query that will fill the model will be placed in a "
|
"The position where the query that will fill the model will be placed in a "
|
||||||
"multi-query"
|
"multi-query"
|
||||||
|
@ -396,44 +396,44 @@ msgstr "No se puede abrir una nueva conexión, ya está abierta"
|
||||||
msgid "The query is empty."
|
msgid "The query is empty."
|
||||||
msgstr "La consulta está vacía."
|
msgstr "La consulta está vacía."
|
||||||
|
|
||||||
#: ../db/db-conn.c:1037
|
#: ../db/db-conn.c:1041
|
||||||
msgid "Plugin"
|
msgid "Plugin"
|
||||||
msgstr "Plugin"
|
msgstr "Plugin"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1038
|
#: ../db/db-conn.c:1042
|
||||||
msgid "The name of the plugin"
|
msgid "The name of the plugin"
|
||||||
msgstr "El nombre del plugin"
|
msgstr "El nombre del plugin"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1044
|
#: ../db/db-conn.c:1048
|
||||||
msgid "Query path"
|
msgid "Query path"
|
||||||
msgstr "Ruta de consultas"
|
msgstr "Ruta de consultas"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1045
|
#: ../db/db-conn.c:1049
|
||||||
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:715
|
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:715
|
||||||
#: ../vn/column/vn-column-image.c:493
|
#: ../vn/column/vn-column-image.c:493
|
||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr "Host"
|
msgstr "Host"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1052
|
#: ../db/db-conn.c:1056
|
||||||
msgid "The host name to connect to"
|
msgid "The host name to connect to"
|
||||||
msgstr "El nombre del host al que se conectará"
|
msgstr "El nombre del host al que se conectará"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1058 ../module/data/users.glade.h:2
|
#: ../db/db-conn.c:1062 ../module/data/users.glade.h:2
|
||||||
msgid "User"
|
msgid "User"
|
||||||
msgstr "Usuario"
|
msgstr "Usuario"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1059
|
#: ../db/db-conn.c:1063
|
||||||
msgid "The user name"
|
msgid "The user name"
|
||||||
msgstr "El nombre de usuario"
|
msgstr "El nombre de usuario"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1065
|
#: ../db/db-conn.c:1069
|
||||||
msgid "DB name"
|
msgid "DB name"
|
||||||
msgstr "Nombre de la BD"
|
msgstr "Nombre de la BD"
|
||||||
|
|
||||||
#: ../db/db-conn.c:1066
|
#: ../db/db-conn.c:1070
|
||||||
msgid "The default schema"
|
msgid "The default schema"
|
||||||
msgstr "El esquema por defecto"
|
msgstr "El esquema por defecto"
|
||||||
|
|
||||||
|
@ -512,59 +512,59 @@ msgstr "Tamaño máximo de la caché"
|
||||||
msgid "The maximal size for the contents of the cache directory"
|
msgid "The maximal size for the contents of the cache directory"
|
||||||
msgstr "El tamaño máximo para los contenidos del directorio de caché"
|
msgstr "El tamaño máximo para los contenidos del directorio de caché"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:643
|
#: ../vn/vn-gui.c:642
|
||||||
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:650
|
#: ../vn/vn-gui.c:649
|
||||||
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:653
|
#: ../vn/vn-gui.c:652
|
||||||
msgid "Database error"
|
msgid "Database error"
|
||||||
msgstr "Error en la base de datos"
|
msgstr "Error en la base de datos"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:660
|
#: ../vn/vn-gui.c:659
|
||||||
msgid "Unknown error"
|
msgid "Unknown error"
|
||||||
msgstr "Error desconocido"
|
msgstr "Error desconocido"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1000
|
#: ../vn/vn-gui.c:999
|
||||||
msgid "Closing connection"
|
msgid "Closing connection"
|
||||||
msgstr "Cerrando conexión"
|
msgstr "Cerrando conexión"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1002
|
#: ../vn/vn-gui.c:1001
|
||||||
msgid "Transaction started"
|
msgid "Transaction started"
|
||||||
msgstr "Transacción iniciada"
|
msgstr "Transacción iniciada"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1004
|
#: ../vn/vn-gui.c:1003
|
||||||
msgid "Connecting"
|
msgid "Connecting"
|
||||||
msgstr "Conectando"
|
msgstr "Conectando"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1006
|
#: ../vn/vn-gui.c:1005
|
||||||
msgid "Connection lost"
|
msgid "Connection lost"
|
||||||
msgstr "Conexión perdida"
|
msgstr "Conexión perdida"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1008
|
#: ../vn/vn-gui.c:1007
|
||||||
msgid "Connection closed"
|
msgid "Connection closed"
|
||||||
msgstr "Conexión cerrada"
|
msgstr "Conexión cerrada"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1010 ../vn/field/vn-http-image.c:116
|
#: ../vn/vn-gui.c:1009 ../vn/field/vn-http-image.c:116
|
||||||
msgid "Loading"
|
msgid "Loading"
|
||||||
msgstr "Cargando"
|
msgstr "Cargando"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1012 ../vn/gui/main.glade.h:19
|
#: ../vn/vn-gui.c:1011 ../vn/gui/main.glade.h:19
|
||||||
msgid "Ready"
|
msgid "Ready"
|
||||||
msgstr "Listo"
|
msgstr "Listo"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1555
|
#: ../vn/vn-gui.c:1565
|
||||||
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:1561
|
#: ../vn/vn-gui.c:1571
|
||||||
msgid "Application"
|
msgid "Application"
|
||||||
msgstr "Aplicación"
|
msgstr "Aplicación"
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1562
|
#: ../vn/vn-gui.c:1572
|
||||||
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"
|
||||||
|
|
||||||
|
@ -691,7 +691,8 @@ msgstr "El identificador de la aplicación"
|
||||||
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
|
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:164
|
||||||
|
#: ../glade/glade-db-iterator.c:187
|
||||||
msgid "Parameter"
|
msgid "Parameter"
|
||||||
msgstr "Parámetro"
|
msgstr "Parámetro"
|
||||||
|
|
||||||
|
@ -716,12 +717,12 @@ 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/field/vn-entry.c:153 ../vn/field/vn-spin.c:172
|
#: ../vn/field/vn-entry.c:153 ../vn/field/vn-spin.c:172
|
||||||
#: ../vn/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:138
|
#: ../vn/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:179
|
||||||
msgid "Digits"
|
msgid "Digits"
|
||||||
msgstr "Dígitos"
|
msgstr "Dígitos"
|
||||||
|
|
||||||
#: ../vn/field/vn-entry.c:154 ../vn/field/vn-spin.c:173
|
#: ../vn/field/vn-entry.c:154 ../vn/field/vn-spin.c:173
|
||||||
#: ../vn/column/vn-column-entry.c:120 ../vn/column/vn-column-spin.c:139
|
#: ../vn/column/vn-column-entry.c:120 ../vn/column/vn-column-spin.c:180
|
||||||
msgid "The number of decimal places to display."
|
msgid "The number of decimal places to display."
|
||||||
msgstr "El número de posiciones decimales que se muestran"
|
msgstr "El número de posiciones decimales que se muestran"
|
||||||
|
|
||||||
|
@ -816,14 +817,38 @@ msgstr "Tab index"
|
||||||
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/column/vn-column-spin.c:130
|
#: ../vn/column/vn-column-spin.c:171
|
||||||
msgid "Climb rate"
|
msgid "Climb rate"
|
||||||
msgstr "Tasa de subida"
|
msgstr "Tasa de subida"
|
||||||
|
|
||||||
#: ../vn/column/vn-column-spin.c:131
|
#: ../vn/column/vn-column-spin.c:172
|
||||||
msgid "The acceleration rate when you hold down a button."
|
msgid "The acceleration rate when you hold down a button."
|
||||||
msgstr "La tasa de aceleración cuando se mantiene apretado el botón."
|
msgstr "La tasa de aceleración cuando se mantiene apretado el botón."
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:187
|
||||||
|
msgid "Minimum value"
|
||||||
|
msgstr "Valor mínimo"
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:188
|
||||||
|
msgid "The minimum value of the adjustment."
|
||||||
|
msgstr "Valor mínimo del ajuste."
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:195
|
||||||
|
msgid "Maximum value"
|
||||||
|
msgstr "Valor máximo"
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:196
|
||||||
|
msgid "The maximum value of the adjustment."
|
||||||
|
msgstr "Valor máximo del ajuste"
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:203
|
||||||
|
msgid "Step Increment"
|
||||||
|
msgstr "Incremento del paso"
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:204
|
||||||
|
msgid "The step increment of the adjustment"
|
||||||
|
msgstr "El incremento del paso del ajuste"
|
||||||
|
|
||||||
#: ../vn/column/vn-column-combo.c:340
|
#: ../vn/column/vn-column-combo.c:340
|
||||||
msgid "Sort column"
|
msgid "Sort column"
|
||||||
msgstr "Columna de ordenación"
|
msgstr "Columna de ordenación"
|
||||||
|
@ -974,71 +999,51 @@ msgid "_Quit"
|
||||||
msgstr "_Salir"
|
msgstr "_Salir"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:4
|
#: ../vn/gui/actions.glade.h:4
|
||||||
|
msgid "Quit"
|
||||||
|
msgstr "Salir"
|
||||||
|
|
||||||
|
#: ../vn/gui/actions.glade.h:5
|
||||||
msgid "_About"
|
msgid "_About"
|
||||||
msgstr "_Acerca de"
|
msgstr "_Acerca de"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:5
|
#: ../vn/gui/actions.glade.h:6
|
||||||
msgid "_File"
|
msgid "_File"
|
||||||
msgstr "_Archivo"
|
msgstr "_Archivo"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:6
|
#: ../vn/gui/actions.glade.h:7
|
||||||
msgid "_Help"
|
msgid "_Help"
|
||||||
msgstr "Ay_uda"
|
msgstr "Ay_uda"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:7
|
#: ../vn/gui/actions.glade.h:8
|
||||||
msgid "_Reconnect"
|
msgid "_Reconnect"
|
||||||
msgstr "_Reconectar"
|
msgstr "_Reconectar"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:8
|
#: ../vn/gui/actions.glade.h:9
|
||||||
msgid "Reconnect"
|
msgid "Reconnect"
|
||||||
msgstr "Reconectar"
|
msgstr "Reconectar"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:9
|
#: ../vn/gui/actions.glade.h:10
|
||||||
msgid "_Close"
|
msgid "_Close"
|
||||||
msgstr "_Cerrar"
|
msgstr "_Cerrar"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:10
|
#: ../vn/gui/actions.glade.h:11
|
||||||
msgid "_View"
|
msgid "_View"
|
||||||
msgstr "_Ver"
|
msgstr "_Ver"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:11
|
#: ../vn/gui/actions.glade.h:12
|
||||||
msgctxt "View menu option"
|
msgctxt "View menu option"
|
||||||
msgid "Dynamic _Tabs"
|
msgid "Dynamic _Tabs"
|
||||||
msgstr "_Pestañas dinámicas"
|
msgstr "_Pestañas dinámicas"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:12
|
#: ../vn/gui/actions.glade.h:13
|
||||||
msgid "Don't show tabs if there is only one tab open"
|
msgid "Don't show tabs if there is only one tab open"
|
||||||
msgstr "No mostrar las pestañas si solo hay una abierta"
|
msgstr "No mostrar las pestañas si solo hay una abierta"
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:13
|
#: ../vn/gui/actions.glade.h:14
|
||||||
msgctxt "View menu option"
|
msgctxt "View menu option"
|
||||||
msgid "Tool_bar"
|
msgid "Tool_bar"
|
||||||
msgstr "_Barra de herramientas"
|
msgstr "_Barra de herramientas"
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:121
|
|
||||||
msgid "Create and set a model for a DbModelHolder"
|
|
||||||
msgstr "Crear y configurar un modelo para un DbModelHolder"
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:153
|
|
||||||
msgid "Model configuration"
|
|
||||||
msgstr "Configuración del Model"
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:153
|
|
||||||
msgid "DbModel properties configuration"
|
|
||||||
msgstr "Configuración de propiedades de DbModelo"
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:238
|
|
||||||
msgid "Select a DbModel for the property"
|
|
||||||
msgstr "Selecciona un DbModel para la propiedad"
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:259 ../glade/glade-db-model.c:306
|
|
||||||
msgid "New Model"
|
|
||||||
msgstr "Nuevo Modelo"
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:301
|
|
||||||
msgid "Edit Model"
|
|
||||||
msgstr "Editar Modelo"
|
|
||||||
|
|
||||||
#: ../glade/glade-db-sql.c:27
|
#: ../glade/glade-db-sql.c:27
|
||||||
msgid "New SQL statement"
|
msgid "New SQL statement"
|
||||||
msgstr "Nueva consulta SQL"
|
msgstr "Nueva consulta SQL"
|
||||||
|
@ -1051,6 +1056,52 @@ msgstr "Editor SQL"
|
||||||
msgid "Open the SQL Editor"
|
msgid "Open the SQL Editor"
|
||||||
msgstr "Abrir el Editor SQL"
|
msgstr "Abrir el Editor SQL"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:123
|
||||||
|
msgid "Create and set a model for a DbModelHolder"
|
||||||
|
msgstr "Crear y configurar un modelo para un DbModelHolder"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:155
|
||||||
|
msgid "Model configuration"
|
||||||
|
msgstr "Configuración del Model"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:155
|
||||||
|
msgid "DbModel properties configuration"
|
||||||
|
msgstr "Configuración de propiedades de DbModelo"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:240
|
||||||
|
msgid "Select a DbModel for the property"
|
||||||
|
msgstr "Selecciona un DbModel para la propiedad"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:261 ../glade/glade-db-model.c:308
|
||||||
|
msgid "New Model"
|
||||||
|
msgstr "Nuevo Modelo"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:303
|
||||||
|
msgid "Edit Model"
|
||||||
|
msgstr "Editar Modelo"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:166
|
||||||
|
msgid "Properties"
|
||||||
|
msgstr "Propiedades"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:193
|
||||||
|
msgid "Iterator Editor"
|
||||||
|
msgstr "Editor del Iterator"
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:201
|
||||||
|
msgid "The model must have \"SQL\" set and \"Use file\" set to 'No'."
|
||||||
|
msgstr "El modelo debe tener \"SQL\" asignado y \"Usa fichero\" puesto a 'No'."
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:212
|
||||||
|
#, c-format
|
||||||
|
msgid "%s can't have children before automatic generation."
|
||||||
|
msgstr "%s no puede tener hijos antes de la generación automatica."
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:223
|
||||||
|
#, c-format
|
||||||
|
msgid "%s must have \"Model\" set. %s"
|
||||||
|
msgstr "%s debe tener \"Modelo\" asignado. %s"
|
||||||
|
|
||||||
#: ../module/data/example.xml.h:1
|
#: ../module/data/example.xml.h:1
|
||||||
msgid "Example"
|
msgid "Example"
|
||||||
msgstr "Ejemplo"
|
msgstr "Ejemplo"
|
||||||
|
@ -1231,6 +1282,13 @@ msgstr "Deshacer"
|
||||||
msgid "∞"
|
msgid "∞"
|
||||||
msgstr "∞"
|
msgstr "∞"
|
||||||
|
|
||||||
#: ../module/src/vn-consulter.c:234
|
#: ../module/src/vn-consulter.c:258
|
||||||
msgid "Type or select a query"
|
msgid "Type or select a query"
|
||||||
msgstr "Escribe o selecciona la consulta"
|
msgstr "Escribe o selecciona la consulta"
|
||||||
|
|
||||||
|
#: ../module/src/vn-consulter.c:260
|
||||||
|
msgid "Message"
|
||||||
|
msgstr "Mensaje"
|
||||||
|
|
||||||
|
#~ msgid "Generate params for %s"
|
||||||
|
#~ msgstr "Generar params para %s"
|
||||||
|
|
219
po/nl.po
219
po/nl.po
|
@ -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-11-18 16:11+0100\n"
|
"POT-Creation-Date: 2013-12-13 10:07+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"
|
||||||
|
@ -134,7 +134,7 @@ msgstr ""
|
||||||
msgid "The master GvnParam of this parameter"
|
msgid "The master GvnParam of this parameter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:985
|
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:987
|
||||||
msgid "Mode"
|
msgid "Mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ msgstr ""
|
||||||
msgid "The value"
|
msgid "The value"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../sql/sql-string.c:198 ../db/db-model.c:3455 ../db/db-request.c:461
|
#: ../sql/sql-string.c:198 ../db/db-model.c:3456 ../db/db-request.c:461
|
||||||
msgid "SQL"
|
msgid "SQL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -228,72 +228,72 @@ msgstr ""
|
||||||
msgid "Can't allocate the needed memory"
|
msgid "Can't allocate the needed memory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-iterator.c:986
|
#: ../db/db-iterator.c:988
|
||||||
msgid "The mode in which the iterator is working"
|
msgid "The mode in which the iterator is working"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-iterator.c:993
|
#: ../db/db-iterator.c:995
|
||||||
msgid "Remember selection"
|
msgid "Remember selection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-iterator.c:994
|
#: ../db/db-iterator.c:996
|
||||||
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:1554
|
#: ../db/db-model.c:3430 ../db/db-request.c:454 ../vn/vn-gui.c:1564
|
||||||
#: ../vn/vn-form.c:244
|
#: ../vn/vn-form.c:244
|
||||||
msgid "Connection"
|
msgid "Connection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3430
|
#: ../db/db-model.c:3431
|
||||||
msgid "The DbConn that manages the connection to the database"
|
msgid "The DbConn that manages the connection to the database"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3437 ../db/db-request.c:468
|
#: ../db/db-model.c:3438 ../db/db-request.c:468
|
||||||
msgid "Statement"
|
msgid "Statement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3438
|
#: ../db/db-model.c:3439
|
||||||
msgid "The statement which retrieves the data"
|
msgid "The statement which retrieves the data"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3445
|
#: ../db/db-model.c:3446
|
||||||
msgid "Use file"
|
msgid "Use file"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3446
|
#: ../db/db-model.c:3447
|
||||||
msgid ""
|
msgid ""
|
||||||
"If this is set to TRUE, the \"sql\" property will hold the name of a file "
|
"If this is set to TRUE, the \"sql\" property will hold the name of a file "
|
||||||
"containing a query, if set to FALSE, \"sql\" is used as an SQL string"
|
"containing a query, if set to FALSE, \"sql\" is used as an SQL string"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3456
|
#: ../db/db-model.c:3457
|
||||||
msgid ""
|
msgid ""
|
||||||
"Depending on the \"use-file\" property this will be the path to a file with "
|
"Depending on the \"use-file\" property this will be the path to a file with "
|
||||||
"queries for the model or a SQL string"
|
"queries for the model or a SQL string"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3465
|
#: ../db/db-model.c:3466
|
||||||
msgid "Main Table"
|
msgid "Main Table"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3466
|
#: ../db/db-model.c:3467
|
||||||
msgid "The main table of the model"
|
msgid "The main table of the model"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3473
|
#: ../db/db-model.c:3474
|
||||||
msgid "Update flags"
|
msgid "Update flags"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3474
|
#: ../db/db-model.c:3475
|
||||||
msgid "The flags that indicate how a model can be modified"
|
msgid "The flags that indicate how a model can be modified"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3482
|
#: ../db/db-model.c:3483
|
||||||
msgid "Result position"
|
msgid "Result position"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-model.c:3483
|
#: ../db/db-model.c:3484
|
||||||
msgid ""
|
msgid ""
|
||||||
"The position where the query that will fill the model will be placed in a "
|
"The position where the query that will fill the model will be placed in a "
|
||||||
"multi-query"
|
"multi-query"
|
||||||
|
@ -387,44 +387,44 @@ msgstr ""
|
||||||
msgid "The query is empty."
|
msgid "The query is empty."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1037
|
#: ../db/db-conn.c:1041
|
||||||
msgid "Plugin"
|
msgid "Plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1038
|
#: ../db/db-conn.c:1042
|
||||||
msgid "The name of the plugin"
|
msgid "The name of the plugin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1044
|
#: ../db/db-conn.c:1048
|
||||||
msgid "Query path"
|
msgid "Query path"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1045
|
#: ../db/db-conn.c:1049
|
||||||
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:715
|
#: ../db/db-conn.c:1055 ../db/db-file-loader.c:715
|
||||||
#: ../vn/column/vn-column-image.c:493
|
#: ../vn/column/vn-column-image.c:493
|
||||||
msgid "Host"
|
msgid "Host"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1052
|
#: ../db/db-conn.c:1056
|
||||||
msgid "The host name to connect to"
|
msgid "The host name to connect to"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1058 ../module/data/users.glade.h:2
|
#: ../db/db-conn.c:1062 ../module/data/users.glade.h:2
|
||||||
msgid "User"
|
msgid "User"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1059
|
#: ../db/db-conn.c:1063
|
||||||
msgid "The user name"
|
msgid "The user name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1065
|
#: ../db/db-conn.c:1069
|
||||||
msgid "DB name"
|
msgid "DB name"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../db/db-conn.c:1066
|
#: ../db/db-conn.c:1070
|
||||||
msgid "The default schema"
|
msgid "The default schema"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -501,59 +501,59 @@ msgstr ""
|
||||||
msgid "The maximal size for the contents of the cache directory"
|
msgid "The maximal size for the contents of the cache directory"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:643
|
#: ../vn/vn-gui.c:642
|
||||||
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:650
|
#: ../vn/vn-gui.c:649
|
||||||
msgid "An error occurred in the connection."
|
msgid "An error occurred in the connection."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:653
|
#: ../vn/vn-gui.c:652
|
||||||
msgid "Database error"
|
msgid "Database error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:660
|
#: ../vn/vn-gui.c:659
|
||||||
msgid "Unknown error"
|
msgid "Unknown error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1000
|
#: ../vn/vn-gui.c:999
|
||||||
msgid "Closing connection"
|
msgid "Closing connection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1002
|
#: ../vn/vn-gui.c:1001
|
||||||
msgid "Transaction started"
|
msgid "Transaction started"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1004
|
#: ../vn/vn-gui.c:1003
|
||||||
msgid "Connecting"
|
msgid "Connecting"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1006
|
#: ../vn/vn-gui.c:1005
|
||||||
msgid "Connection lost"
|
msgid "Connection lost"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1008
|
#: ../vn/vn-gui.c:1007
|
||||||
msgid "Connection closed"
|
msgid "Connection closed"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1010 ../vn/field/vn-http-image.c:116
|
#: ../vn/vn-gui.c:1009 ../vn/field/vn-http-image.c:116
|
||||||
msgid "Loading"
|
msgid "Loading"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1012 ../vn/gui/main.glade.h:19
|
#: ../vn/vn-gui.c:1011 ../vn/gui/main.glade.h:19
|
||||||
msgid "Ready"
|
msgid "Ready"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1555
|
#: ../vn/vn-gui.c:1565
|
||||||
msgid "The connection used by Gui"
|
msgid "The connection used by Gui"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1561
|
#: ../vn/vn-gui.c:1571
|
||||||
msgid "Application"
|
msgid "Application"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-gui.c:1562
|
#: ../vn/vn-gui.c:1572
|
||||||
msgid "The application handler for the entire program"
|
msgid "The application handler for the entire program"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -680,7 +680,8 @@ msgstr ""
|
||||||
msgid "The current value of the field"
|
msgid "The current value of the field"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/vn-field.c:525
|
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:164
|
||||||
|
#: ../glade/glade-db-iterator.c:187
|
||||||
msgid "Parameter"
|
msgid "Parameter"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -705,12 +706,12 @@ msgid "Whether the field value can be of type GVN_TYPE_NULL"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/field/vn-entry.c:153 ../vn/field/vn-spin.c:172
|
#: ../vn/field/vn-entry.c:153 ../vn/field/vn-spin.c:172
|
||||||
#: ../vn/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:138
|
#: ../vn/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:179
|
||||||
msgid "Digits"
|
msgid "Digits"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/field/vn-entry.c:154 ../vn/field/vn-spin.c:173
|
#: ../vn/field/vn-entry.c:154 ../vn/field/vn-spin.c:173
|
||||||
#: ../vn/column/vn-column-entry.c:120 ../vn/column/vn-column-spin.c:139
|
#: ../vn/column/vn-column-entry.c:120 ../vn/column/vn-column-spin.c:180
|
||||||
msgid "The number of decimal places to display."
|
msgid "The number of decimal places to display."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -805,14 +806,38 @@ msgstr ""
|
||||||
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/column/vn-column-spin.c:130
|
#: ../vn/column/vn-column-spin.c:171
|
||||||
msgid "Climb rate"
|
msgid "Climb rate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/column/vn-column-spin.c:131
|
#: ../vn/column/vn-column-spin.c:172
|
||||||
msgid "The acceleration rate when you hold down a button."
|
msgid "The acceleration rate when you hold down a button."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:187
|
||||||
|
msgid "Minimum value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:188
|
||||||
|
msgid "The minimum value of the adjustment."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:195
|
||||||
|
msgid "Maximum value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:196
|
||||||
|
msgid "The maximum value of the adjustment."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:203
|
||||||
|
msgid "Step Increment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/column/vn-column-spin.c:204
|
||||||
|
msgid "The step increment of the adjustment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/column/vn-column-combo.c:340
|
#: ../vn/column/vn-column-combo.c:340
|
||||||
msgid "Sort column"
|
msgid "Sort column"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -942,71 +967,51 @@ msgid "_Quit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:4
|
#: ../vn/gui/actions.glade.h:4
|
||||||
msgid "_About"
|
msgid "Quit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:5
|
#: ../vn/gui/actions.glade.h:5
|
||||||
msgid "_File"
|
msgid "_About"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:6
|
#: ../vn/gui/actions.glade.h:6
|
||||||
msgid "_Help"
|
msgid "_File"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:7
|
#: ../vn/gui/actions.glade.h:7
|
||||||
msgid "_Reconnect"
|
msgid "_Help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:8
|
#: ../vn/gui/actions.glade.h:8
|
||||||
msgid "Reconnect"
|
msgid "_Reconnect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:9
|
#: ../vn/gui/actions.glade.h:9
|
||||||
msgid "_Close"
|
msgid "Reconnect"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:10
|
#: ../vn/gui/actions.glade.h:10
|
||||||
msgid "_View"
|
msgid "_Close"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:11
|
#: ../vn/gui/actions.glade.h:11
|
||||||
|
msgid "_View"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../vn/gui/actions.glade.h:12
|
||||||
msgctxt "View menu option"
|
msgctxt "View menu option"
|
||||||
msgid "Dynamic _Tabs"
|
msgid "Dynamic _Tabs"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:12
|
#: ../vn/gui/actions.glade.h:13
|
||||||
msgid "Don't show tabs if there is only one tab open"
|
msgid "Don't show tabs if there is only one tab open"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../vn/gui/actions.glade.h:13
|
#: ../vn/gui/actions.glade.h:14
|
||||||
msgctxt "View menu option"
|
msgctxt "View menu option"
|
||||||
msgid "Tool_bar"
|
msgid "Tool_bar"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:121
|
|
||||||
msgid "Create and set a model for a DbModelHolder"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:153
|
|
||||||
msgid "Model configuration"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:153
|
|
||||||
msgid "DbModel properties configuration"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:238
|
|
||||||
msgid "Select a DbModel for the property"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:259 ../glade/glade-db-model.c:306
|
|
||||||
msgid "New Model"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-model.c:301
|
|
||||||
msgid "Edit Model"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
#: ../glade/glade-db-sql.c:27
|
#: ../glade/glade-db-sql.c:27
|
||||||
msgid "New SQL statement"
|
msgid "New SQL statement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1019,6 +1024,52 @@ msgstr ""
|
||||||
msgid "Open the SQL Editor"
|
msgid "Open the SQL Editor"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:123
|
||||||
|
msgid "Create and set a model for a DbModelHolder"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:155
|
||||||
|
msgid "Model configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:155
|
||||||
|
msgid "DbModel properties configuration"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:240
|
||||||
|
msgid "Select a DbModel for the property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:261 ../glade/glade-db-model.c:308
|
||||||
|
msgid "New Model"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-model.c:303
|
||||||
|
msgid "Edit Model"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:166
|
||||||
|
msgid "Properties"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:193
|
||||||
|
msgid "Iterator Editor"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:201
|
||||||
|
msgid "The model must have \"SQL\" set and \"Use file\" set to 'No'."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:212
|
||||||
|
#, c-format
|
||||||
|
msgid "%s can't have children before automatic generation."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../glade/glade-db-iterator.c:223
|
||||||
|
#, c-format
|
||||||
|
msgid "%s must have \"Model\" set. %s"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ../module/data/example.xml.h:1
|
#: ../module/data/example.xml.h:1
|
||||||
msgid "Example"
|
msgid "Example"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -1187,6 +1238,10 @@ msgstr ""
|
||||||
msgid "∞"
|
msgid "∞"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../module/src/vn-consulter.c:234
|
#: ../module/src/vn-consulter.c:258
|
||||||
msgid "Type or select a query"
|
msgid "Type or select a query"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../module/src/vn-consulter.c:260
|
||||||
|
msgid "Message"
|
||||||
|
msgstr ""
|
||||||
|
|
|
@ -27,9 +27,18 @@ typedef struct
|
||||||
SqlObject * object;
|
SqlObject * object;
|
||||||
gchar * string;
|
gchar * string;
|
||||||
gchar * current;
|
gchar * current;
|
||||||
gboolean error;
|
gboolean failed;
|
||||||
|
GError ** error;
|
||||||
}
|
}
|
||||||
ParseState;
|
ParseState;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
SQL_PARSER_ERROR_EMPTY_QUERY = 1 << 0,
|
||||||
|
SQL_PARSER_ERROR_PARSING = 1 << 1,
|
||||||
|
SQL_PARSER_ERROR_STACK_OVERFLOW = 1 << 2,
|
||||||
|
}
|
||||||
|
SqlParserError;
|
||||||
}
|
}
|
||||||
|
|
||||||
%token_type { gchar * }
|
%token_type { gchar * }
|
||||||
|
@ -51,17 +60,16 @@ ParseState;
|
||||||
pref = err_str == state->string ? " near: " : " near: [...]";
|
pref = err_str == state->string ? " near: " : " near: [...]";
|
||||||
}
|
}
|
||||||
|
|
||||||
g_log (g_quark_to_string (SQL_PARSER_LOG_DOMAIN), G_LOG_LEVEL_WARNING,
|
g_set_error (state->error, SQL_PARSER_LOG_DOMAIN, SQL_PARSER_ERROR_PARSING,
|
||||||
"Parsing error%s%s", pref, err_str);
|
"Parsing error%s%s", pref, err_str);
|
||||||
|
state->failed = TRUE;
|
||||||
state->error = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
%stack_overflow
|
%stack_overflow
|
||||||
{
|
{
|
||||||
g_log (g_quark_to_string (SQL_PARSER_LOG_DOMAIN)
|
g_set_error (state->error, SQL_PARSER_LOG_DOMAIN, SQL_PARSER_ERROR_STACK_OVERFLOW,
|
||||||
,G_LOG_LEVEL_WARNING
|
"Parser stack overflow. Parsing terminated.\n");
|
||||||
,"Parser stack overflow. Parsing terminated.\n");
|
state->failed = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
%parse_accept {}
|
%parse_accept {}
|
||||||
|
|
|
@ -218,25 +218,28 @@ static gchar * get_token (const gchar * ts, const gchar * te)
|
||||||
}%%
|
}%%
|
||||||
%% write data;
|
%% write data;
|
||||||
|
|
||||||
SqlObject * sql_parser_parse (gchar * sql)
|
SqlObject * sql_parser_parse (const gchar * sql, GError ** err)
|
||||||
{
|
{
|
||||||
gint cs, act;
|
gint cs, act;
|
||||||
gchar * p, * pe, * ts, * te;
|
gchar * p, * pe, * ts, * te;
|
||||||
gpointer eof, parser;
|
gpointer eof, parser;
|
||||||
ParseState * state;
|
ParseState * state;
|
||||||
SqlObject * object;
|
SqlObject * object;
|
||||||
|
gchar * query;
|
||||||
|
|
||||||
if (!sql)
|
if (!sql)
|
||||||
{
|
{
|
||||||
g_log (g_quark_to_string (SQL_PARSER_LOG_DOMAIN)
|
g_set_error (err, SQL_PARSER_LOG_DOMAIN,
|
||||||
,G_LOG_LEVEL_WARNING ,"Empty query!\n");
|
SQL_PARSER_ERROR_EMPTY_QUERY, "Empty query!\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query = g_strdup (sql);
|
||||||
|
|
||||||
state = g_new (ParseState, 1);
|
state = g_new (ParseState, 1);
|
||||||
state->object = NULL;
|
state->object = NULL;
|
||||||
state->error = FALSE;
|
state->error = err;
|
||||||
state->string = state->current = p = sql;
|
state->string = state->current = p = query;
|
||||||
pe = p + strlen (p) + 1;
|
pe = p + strlen (p) + 1;
|
||||||
eof = pe;
|
eof = pe;
|
||||||
|
|
||||||
|
@ -248,7 +251,7 @@ SqlObject * sql_parser_parse (gchar * sql)
|
||||||
Parse (parser, 0, 0, state);
|
Parse (parser, 0, 0, state);
|
||||||
ParseFree (parser, g_free);
|
ParseFree (parser, g_free);
|
||||||
|
|
||||||
if (state->error)
|
if (state->failed)
|
||||||
{
|
{
|
||||||
if (state->object && G_IS_OBJECT (state->object))
|
if (state->object && G_IS_OBJECT (state->object))
|
||||||
g_object_unref (state->object);
|
g_object_unref (state->object);
|
||||||
|
@ -258,6 +261,7 @@ SqlObject * sql_parser_parse (gchar * sql)
|
||||||
object = g_object_ref_sink (state->object);
|
object = g_object_ref_sink (state->object);
|
||||||
|
|
||||||
g_free (state);
|
g_free (state);
|
||||||
|
g_free (query);
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,14 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sql_parser_parse:
|
* sql_parser_parse:
|
||||||
* @sql: An string containing an SQL query.
|
* @sql: An string containing an SQL query
|
||||||
|
* @err: (out) (allow-none): a return location of a #GError or %NULL to ignore
|
||||||
|
* errors
|
||||||
*
|
*
|
||||||
* Parses @sql and makes an #SqlObject from the query on it.
|
* Parses @sql and makes an #SqlObject from the query on it.
|
||||||
*
|
*
|
||||||
* Return value: (transfer full): an #SqlObject.
|
* Return value: (transfer full): an #SqlObject
|
||||||
*/
|
*/
|
||||||
SqlObject * sql_parser_parse (gchar * sql) G_GNUC_WARN_UNUSED_RESULT;
|
SqlObject * sql_parser_parse (const gchar * sql, GError ** err) G_GNUC_WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -16,6 +16,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "sql-select.h"
|
#include "sql-select.h"
|
||||||
|
#include "sql-field.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION: sql-select
|
* SECTION: sql-select
|
||||||
|
@ -150,6 +151,44 @@ void sql_select_set_alias (SqlSelect * obj, SqlExpr * expr, const gchar * alias)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return the alias of a field and if it's an unaliased SqlField, its name,
|
||||||
|
* otherwise returns NULL (uses include of sql-field.h)
|
||||||
|
*/
|
||||||
|
gchar * sql_select_get_column_name (SqlSelect * obj, SqlExpr * expr)
|
||||||
|
{
|
||||||
|
gboolean listed = FALSE;
|
||||||
|
GSList * n;
|
||||||
|
|
||||||
|
g_return_val_if_fail (SQL_IS_SELECT (obj), NULL);
|
||||||
|
g_return_val_if_fail (SQL_IS_EXPR (expr), NULL);
|
||||||
|
|
||||||
|
for (n = obj->expr; n; n = n->next)
|
||||||
|
if (expr == n->data)
|
||||||
|
{
|
||||||
|
listed = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listed)
|
||||||
|
for (n = obj->alias; n; n = n->next)
|
||||||
|
{
|
||||||
|
SqlSelectAlias * as = n->data;
|
||||||
|
|
||||||
|
if (expr == as->expr)
|
||||||
|
return g_strdup (as->alias);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SQL_IS_FIELD (expr))
|
||||||
|
{
|
||||||
|
gchar * name;
|
||||||
|
g_object_get (expr, "name", &name, NULL);
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void sql_select_add_group (SqlSelect * obj, SqlExpr * expr)
|
void sql_select_add_group (SqlSelect * obj, SqlExpr * expr)
|
||||||
{
|
{
|
||||||
g_return_if_fail (SQL_IS_SELECT (obj));
|
g_return_if_fail (SQL_IS_SELECT (obj));
|
||||||
|
|
|
@ -83,6 +83,7 @@ SqlSelect * sql_select_new ();
|
||||||
void sql_select_set_distinct (SqlSelect * obj, gboolean distinct);
|
void sql_select_set_distinct (SqlSelect * obj, gboolean distinct);
|
||||||
void sql_select_add_expr (SqlSelect * obj, SqlExpr * expr);
|
void sql_select_add_expr (SqlSelect * obj, SqlExpr * expr);
|
||||||
void sql_select_set_alias (SqlSelect * obj, SqlExpr * expr, const gchar * alias);
|
void sql_select_set_alias (SqlSelect * obj, SqlExpr * expr, const gchar * alias);
|
||||||
|
gchar * sql_select_get_column_name (SqlSelect * obj, SqlExpr * expr);
|
||||||
void sql_select_add_group (SqlSelect * obj, SqlExpr * expr);
|
void sql_select_add_group (SqlSelect * obj, SqlExpr * expr);
|
||||||
void sql_select_set_having (SqlSelect * obj, SqlExpr * expr);
|
void sql_select_set_having (SqlSelect * obj, SqlExpr * expr);
|
||||||
void sql_select_add_order (SqlSelect * obj, SqlExpr * expr, SqlOrderWay way);
|
void sql_select_add_order (SqlSelect * obj, SqlExpr * expr, SqlOrderWay way);
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
exec_prefix=@exec_prefix@
|
exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@/hedera
|
libdir=@libdir@/@PACKAGE@
|
||||||
includedir=@includedir@/hedera
|
includedir=@includedir@/@PACKAGE@
|
||||||
|
|
||||||
Name: Sql
|
Name: Sql
|
||||||
Description: Sql Classes Module for Hedera Library
|
Description: Sql Classes Module for Hedera Library
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Requires: gvn glib-2.0 gobject-2.0
|
Requires: gvn
|
||||||
Libs: -L${libdir} -lsql
|
Libs: -lsql
|
||||||
Cflags: -I${includedir}/sql
|
|
||||||
|
|
|
@ -42,7 +42,9 @@ libvn_la_SOURCES = \
|
||||||
vn-model.c \
|
vn-model.c \
|
||||||
vn-grid.c \
|
vn-grid.c \
|
||||||
vn-handler.c \
|
vn-handler.c \
|
||||||
vn-batch.c
|
vn-batch.c \
|
||||||
|
$(top_srcdir)/vn/glade/vn-iterator.h \
|
||||||
|
$(top_srcdir)/vn/glade/vn-iterator.c
|
||||||
|
|
||||||
pkgconfig_DATA = vn.pc
|
pkgconfig_DATA = vn.pc
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,32 @@
|
||||||
|
|
||||||
G_DEFINE_TYPE (VnColumnSpin, vn_column_spin, VN_TYPE_COLUMN);
|
G_DEFINE_TYPE (VnColumnSpin, vn_column_spin, VN_TYPE_COLUMN);
|
||||||
|
|
||||||
static void vn_column_entry_cb_edited (GtkCellRendererText * cell,
|
static void vn_column_spin_on_edited (GtkCellRendererSpin * cell,
|
||||||
const gchar * path, gchar * text, VnColumnSpin * obj)
|
const gchar * path, gchar * text, VnColumnSpin * obj)
|
||||||
{
|
{
|
||||||
GValue value = {0};
|
GValue value = {0};
|
||||||
|
|
||||||
if (g_strcmp0 (text, ""))
|
if (g_strcmp0 (text, ""))
|
||||||
{
|
{
|
||||||
g_value_init (&value, G_TYPE_STRING);
|
gchar * err;
|
||||||
g_value_set_string (&value, text);
|
gdouble min, max;
|
||||||
|
gdouble val = g_strtod (text, &err);
|
||||||
|
|
||||||
|
if (!err || *err == '\0')
|
||||||
|
{
|
||||||
|
g_object_get (obj->adjustment, "lower", &min, "upper", &max, NULL);
|
||||||
|
|
||||||
|
if (val < min)
|
||||||
|
val = min;
|
||||||
|
else if (val > max)
|
||||||
|
val = max;
|
||||||
|
|
||||||
|
g_value_init (&value, G_TYPE_DOUBLE);
|
||||||
|
g_value_set_double (&value, val);
|
||||||
|
g_object_set (obj->adjustment, "value", val, NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
g_value_init (&value, GVN_TYPE_NULL);
|
g_value_init (&value, GVN_TYPE_NULL);
|
||||||
|
@ -42,15 +59,22 @@ static void vn_column_spin_set_editable (VnColumn * obj, gboolean editable)
|
||||||
|
|
||||||
if (editable)
|
if (editable)
|
||||||
g_signal_connect (obj->cell, "edited",
|
g_signal_connect (obj->cell, "edited",
|
||||||
G_CALLBACK (vn_column_entry_cb_edited), obj);
|
G_CALLBACK (vn_column_spin_on_edited), obj);
|
||||||
else
|
else
|
||||||
g_signal_handlers_disconnect_by_func (obj->cell,
|
g_signal_handlers_disconnect_by_func (obj->cell,
|
||||||
vn_column_entry_cb_edited, obj);
|
vn_column_spin_on_edited, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vn_column_spin_set_value (VnColumnSpin * obj, GtkTreeModel * model,
|
static void vn_column_spin_set_value (VnColumnSpin * obj, GtkTreeModel * model,
|
||||||
GtkTreeIter * iter, GtkCellRenderer * cell, const GValue * value)
|
GtkTreeIter * iter, GObject * cell, const GValue * value)
|
||||||
{
|
{
|
||||||
|
gint digits;
|
||||||
|
GValue new_value = {0};
|
||||||
|
|
||||||
|
g_object_get (cell, "digits", &digits, NULL);
|
||||||
|
gvn_value_to_format_string (value, digits, &new_value);
|
||||||
|
g_object_set_property (cell, "text", &new_value);
|
||||||
|
g_value_unset (&new_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
||||||
|
@ -59,7 +83,9 @@ enum
|
||||||
{
|
{
|
||||||
PROP_CLIMB_RATE = 1
|
PROP_CLIMB_RATE = 1
|
||||||
,PROP_DIGITS
|
,PROP_DIGITS
|
||||||
,PROP_VALUE_TYPE
|
,PROP_LOWER
|
||||||
|
,PROP_UPPER
|
||||||
|
,PROP_STEP
|
||||||
};
|
};
|
||||||
|
|
||||||
static void vn_column_spin_set_property (VnColumnSpin * obj, guint id,
|
static void vn_column_spin_set_property (VnColumnSpin * obj, guint id,
|
||||||
|
@ -68,37 +94,49 @@ static void vn_column_spin_set_property (VnColumnSpin * obj, guint id,
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case PROP_CLIMB_RATE:
|
case PROP_CLIMB_RATE:
|
||||||
g_object_set (VN_COLUMN (obj)->cell,
|
g_object_set (VN_COLUMN (obj)->cell, "climb-rate", g_value_get_double (value), NULL);
|
||||||
"climb-rate", g_value_get_double (value), NULL);
|
|
||||||
break;
|
break;
|
||||||
case PROP_DIGITS:
|
case PROP_DIGITS:
|
||||||
g_object_set (VN_COLUMN (obj)->cell,
|
g_object_set (VN_COLUMN (obj)->cell, "digits", g_value_get_uint (value), NULL);
|
||||||
"digits", g_value_get_uint (value), NULL);
|
break;
|
||||||
|
case PROP_LOWER:
|
||||||
|
g_object_set (obj->adjustment, "lower", g_value_get_double (value), NULL);
|
||||||
|
break;
|
||||||
|
case PROP_UPPER:
|
||||||
|
g_object_set (obj->adjustment, "upper", g_value_get_double (value), NULL);
|
||||||
|
break;
|
||||||
|
case PROP_STEP:
|
||||||
|
g_object_set (obj->adjustment,
|
||||||
|
"step-increment", g_value_get_double (value),
|
||||||
|
"page-increment", g_value_get_double (value) * 10,
|
||||||
|
NULL);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vn_column_spin_get_property (VnColumnSpin * obj, guint id,
|
static void vn_column_spin_get_property (VnColumnSpin * obj, guint id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
switch (id)
|
switch (id)
|
||||||
{
|
{
|
||||||
case PROP_CLIMB_RATE:
|
case PROP_CLIMB_RATE:
|
||||||
{
|
g_object_get_property (G_OBJECT (VN_COLUMN (obj)->cell), "climb-rate", value);
|
||||||
gdouble climb_rate;
|
|
||||||
g_object_get (value, "climb-rate", &climb_rate, NULL);
|
|
||||||
g_value_set_double (value, climb_rate);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case PROP_DIGITS:
|
case PROP_DIGITS:
|
||||||
{
|
g_object_get_property (G_OBJECT (VN_COLUMN (obj)->cell), "digits", value);
|
||||||
guint digits;
|
|
||||||
g_object_get (VN_COLUMN (obj)->cell, "digits", &digits, NULL);
|
|
||||||
g_value_set_uint (value, digits);
|
|
||||||
break;
|
break;
|
||||||
}
|
case PROP_LOWER:
|
||||||
default:
|
g_object_get_property (G_OBJECT (obj->adjustment), "lower", value);
|
||||||
|
break;
|
||||||
|
case PROP_UPPER:
|
||||||
|
g_object_get_property (G_OBJECT (obj->adjustment), "upper", value);
|
||||||
|
break;
|
||||||
|
case PROP_STEP:
|
||||||
|
g_object_get_property (G_OBJECT (obj->adjustment), "step-increment", value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,8 +144,11 @@ static void vn_column_spin_get_property (VnColumnSpin * obj, guint id,
|
||||||
static void vn_column_spin_init (VnColumnSpin * obj)
|
static void vn_column_spin_init (VnColumnSpin * obj)
|
||||||
{
|
{
|
||||||
GtkCellRenderer * cell = gtk_cell_renderer_spin_new ();
|
GtkCellRenderer * cell = gtk_cell_renderer_spin_new ();
|
||||||
VN_COLUMN_GET_CLASS (obj)->set_renderer (VN_COLUMN (obj), cell);
|
|
||||||
//??g_object_bind_property (obj, "digits", VN_COLUMN (obj)->cell, "digits");
|
obj->adjustment = gtk_adjustment_new (0.0, G_MININT, G_MAXINT, 0.0, 1.0, 0.0);
|
||||||
|
g_object_set (cell, "adjustment", obj->adjustment, NULL);
|
||||||
|
|
||||||
|
VN_COLUMN_GET_CLASS (obj)->set_renderer (VN_COLUMN (obj), cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void vn_column_spin_finalize (VnColumnSpin * obj)
|
static void vn_column_spin_finalize (VnColumnSpin * obj)
|
||||||
|
@ -129,7 +170,7 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
|
||||||
g_param_spec_double ("climb-rate"
|
g_param_spec_double ("climb-rate"
|
||||||
,_("Climb rate")
|
,_("Climb rate")
|
||||||
,_("The acceleration rate when you hold down a button.")
|
,_("The acceleration rate when you hold down a button.")
|
||||||
,0 ,0 ,0
|
,0.0 ,G_MAXDOUBLE ,0.0
|
||||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||||
));
|
));
|
||||||
|
|
||||||
|
@ -140,4 +181,28 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
|
||||||
,0 ,20 ,0
|
,0 ,20 ,0
|
||||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||||
));
|
));
|
||||||
|
|
||||||
|
g_object_class_install_property (k, PROP_LOWER,
|
||||||
|
g_param_spec_double ("lower"
|
||||||
|
,_("Minimum value")
|
||||||
|
,_("The minimum value of the adjustment.")
|
||||||
|
,-G_MAXDOUBLE ,G_MAXDOUBLE ,0.0
|
||||||
|
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||||
|
));
|
||||||
|
|
||||||
|
g_object_class_install_property (k, PROP_UPPER,
|
||||||
|
g_param_spec_double ("upper"
|
||||||
|
,_("Maximum value")
|
||||||
|
,_("The maximum value of the adjustment.")
|
||||||
|
,-G_MAXDOUBLE ,G_MAXDOUBLE , G_MAXDOUBLE
|
||||||
|
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||||
|
));
|
||||||
|
|
||||||
|
g_object_class_install_property (k, PROP_STEP,
|
||||||
|
g_param_spec_double ("step-increment"
|
||||||
|
,_("Step Increment")
|
||||||
|
,_("The step increment of the adjustment")
|
||||||
|
,0.00000000000000000001 ,10000000000.0 ,1.0
|
||||||
|
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ typedef struct _VnColumnSpinClass VnColumnSpinClass;
|
||||||
struct _VnColumnSpin
|
struct _VnColumnSpin
|
||||||
{
|
{
|
||||||
VnColumn parent;
|
VnColumn parent;
|
||||||
|
GtkAdjustment * adjustment;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _VnColumnSpinClass
|
struct _VnColumnSpinClass
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012 - Juan Ferrer Toribio
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "vn-iterator.h"
|
||||||
|
|
||||||
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++ GtkBuildable
|
||||||
|
|
||||||
|
static void vn_iterator_buildable_add_child (GtkBuildable * obj,
|
||||||
|
GtkBuilder * builder, GObject * child, const gchar * type)
|
||||||
|
{
|
||||||
|
db_iterator_add_param (DB_ITERATOR (obj), DB_PARAM (child));
|
||||||
|
}
|
||||||
|
|
||||||
|
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
||||||
|
|
||||||
|
static void vn_iterator_finalize (VnIterator * obj)
|
||||||
|
{
|
||||||
|
GObjectClass * parent = g_type_class_peek_parent (VN_ITERATOR_GET_CLASS (obj));
|
||||||
|
parent->finalize (G_OBJECT (obj));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vn_iterator_class_init (VnIteratorClass * klass)
|
||||||
|
{
|
||||||
|
GObjectClass * k = G_OBJECT_CLASS (klass);
|
||||||
|
k->finalize = (GObjectFinalizeFunc) vn_iterator_finalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vn_iterator_buildable_interface_init (GtkBuildableIface * iface)
|
||||||
|
{
|
||||||
|
iface->add_child = vn_iterator_buildable_add_child;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vn_iterator_init (VnIterator * obj)
|
||||||
|
{}
|
||||||
|
|
||||||
|
G_DEFINE_TYPE_WITH_CODE (VnIterator, vn_iterator, DB_TYPE_ITERATOR,
|
||||||
|
G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
|
||||||
|
vn_iterator_buildable_interface_init)
|
||||||
|
);
|
|
@ -0,0 +1,46 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2012 - Juan Ferrer Toribio
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VN_ITERATOR_H
|
||||||
|
#define VN_ITERATOR_H
|
||||||
|
|
||||||
|
#include <db/db.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#define VN_TYPE_ITERATOR (vn_iterator_get_type ())
|
||||||
|
#define VN_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, VN_TYPE_ITERATOR, VnIterator))
|
||||||
|
#define VN_IS_ITERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, VN_TYPE_ITERATOR))
|
||||||
|
#define VN_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, VN_TYPE_ITERATOR, VnIteratorClass))
|
||||||
|
#define VN_IS_ITERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE (klass, VN_TYPE_ITERATOR))
|
||||||
|
#define VN_ITERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, VN_TYPE_ITERATOR, VnIteratorClass))
|
||||||
|
|
||||||
|
typedef struct _VnIterator VnIterator;
|
||||||
|
typedef struct _VnIteratorClass VnIteratorClass;
|
||||||
|
|
||||||
|
struct _VnIterator
|
||||||
|
{
|
||||||
|
DbIterator iterator;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _VnIteratorClass
|
||||||
|
{
|
||||||
|
DbIteratorClass parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
GType vn_iterator_get_type ();
|
||||||
|
|
||||||
|
#endif
|
|
@ -15,7 +15,8 @@
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkAction" id="exit">
|
<object class="GtkAction" id="exit">
|
||||||
<property name="label" translatable="yes">_Quit</property>
|
<property name="label" translatable="yes">_Quit</property>
|
||||||
<property name="icon_name">application-exit</property>
|
<property name="tooltip" translatable="yes">Quit</property>
|
||||||
|
<property name="icon_name">window-close</property>
|
||||||
<signal name="activate" handler="vn_gui_on_exit_activated" swapped="no"/>
|
<signal name="activate" handler="vn_gui_on_exit_activated" swapped="no"/>
|
||||||
</object>
|
</object>
|
||||||
<accelerator key="q" modifiers="GDK_CONTROL_MASK"/>
|
<accelerator key="q" modifiers="GDK_CONTROL_MASK"/>
|
||||||
|
|
|
@ -24,5 +24,9 @@
|
||||||
<toolitem name="Logout" action="logout"/>
|
<toolitem name="Logout" action="logout"/>
|
||||||
<separator/>
|
<separator/>
|
||||||
<placeholder name="ModuleTools"/>
|
<placeholder name="ModuleTools"/>
|
||||||
|
<!--
|
||||||
|
<separator expand="true"/>
|
||||||
|
<toolitem name="Close" action="close-tab"/>
|
||||||
|
-->
|
||||||
</toolbar>
|
</toolbar>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
|
@ -62,7 +62,9 @@ void vn_batch_remove (VnBatch * obj, GObject * child)
|
||||||
* vn_batch_get_objects_list:
|
* vn_batch_get_objects_list:
|
||||||
* @obj: a #VnBatch
|
* @obj: a #VnBatch
|
||||||
*
|
*
|
||||||
* Returns all the #GObject<!-- -->s in @obj, copying the list.
|
* Returns all the #GObject<!-- -->s in @obj, copying the list. This method is
|
||||||
|
* mainly for internal use, use vn_batch_get_objects() instead if you don't need
|
||||||
|
* to do further use of the list of objects.
|
||||||
*
|
*
|
||||||
* Return value: (transfer container) (element-type GObject): a #GList with all
|
* Return value: (transfer container) (element-type GObject): a #GList with all
|
||||||
* the objects, that must be freed with #g_list_free
|
* the objects, that must be freed with #g_list_free
|
||||||
|
@ -121,8 +123,7 @@ static void vn_batch_init (VnBatch * obj)
|
||||||
|
|
||||||
static void vn_batch_finalize (VnBatch * obj)
|
static void vn_batch_finalize (VnBatch * obj)
|
||||||
{
|
{
|
||||||
GObjectClass * parent;
|
GObjectClass * parent = g_type_class_peek_parent (VN_BATCH_GET_CLASS (obj));
|
||||||
parent = g_type_class_peek_parent (VN_BATCH_GET_CLASS (obj));
|
|
||||||
|
|
||||||
g_list_free (obj->objects);
|
g_list_free (obj->objects);
|
||||||
|
|
||||||
|
|
23
vn/vn-gui.c
23
vn/vn-gui.c
|
@ -53,6 +53,7 @@ struct _VnWindow
|
||||||
GtkToggleAction * dynamic_tabs;
|
GtkToggleAction * dynamic_tabs;
|
||||||
GtkToggleAction * view_toolbar;
|
GtkToggleAction * view_toolbar;
|
||||||
guint merge_id;
|
guint merge_id;
|
||||||
|
gboolean maximized;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -234,6 +235,7 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
|
||||||
{
|
{
|
||||||
gint n;
|
gint n;
|
||||||
gchar * mod_title_strip, * mod_name;
|
gchar * mod_title_strip, * mod_name;
|
||||||
|
const gchar * text_dom = NULL;
|
||||||
GModule * module = NULL;
|
GModule * module = NULL;
|
||||||
VnMod * mod = NULL;
|
VnMod * mod = NULL;
|
||||||
GdomeException e;
|
GdomeException e;
|
||||||
|
@ -340,7 +342,6 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
|
||||||
GdomeDOMString * accel;
|
GdomeDOMString * accel;
|
||||||
GdomeDOMString * title;
|
GdomeDOMString * title;
|
||||||
gchar * symbol_name;
|
gchar * symbol_name;
|
||||||
const gchar * text_dom;
|
|
||||||
GtkTreeIter parent_iter;
|
GtkTreeIter parent_iter;
|
||||||
GtkTreeIter * iter;
|
GtkTreeIter * iter;
|
||||||
VnFormGetTypeFunc mod_get_type_func;
|
VnFormGetTypeFunc mod_get_type_func;
|
||||||
|
@ -460,7 +461,7 @@ static void vn_gui_load_module (VnGui * obj, const gchar * dir, const gchar * fi
|
||||||
|
|
||||||
node = gdome_el_firstChild (el, &e);
|
node = gdome_el_firstChild (el, &e);
|
||||||
title = gdome_n_nodeValue (node, &e);
|
title = gdome_n_nodeValue (node, &e);
|
||||||
title_strip = g_strstrip (g_strdup (title->str));
|
title_strip = g_strstrip (g_strdup (g_dgettext (text_dom, title->str)));
|
||||||
|
|
||||||
gdome_el_unref (el, &e);
|
gdome_el_unref (el, &e);
|
||||||
gdome_n_unref (node, &e);
|
gdome_n_unref (node, &e);
|
||||||
|
@ -532,7 +533,6 @@ static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNoteboo
|
||||||
|
|
||||||
obj->windows = g_slist_prepend (obj->windows, window);
|
obj->windows = g_slist_prepend (obj->windows, window);
|
||||||
gtk_application_add_window (obj->app, widget);
|
gtk_application_add_window (obj->app, widget);
|
||||||
|
|
||||||
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)));
|
||||||
|
|
||||||
|
@ -572,7 +572,6 @@ static VnWindow * vn_gui_add_window (VnGui * obj, GtkWindow * widget, GtkNoteboo
|
||||||
GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
|
GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
|
||||||
gtk_window_add_accel_group (widget,
|
gtk_window_add_accel_group (widget,
|
||||||
gtk_ui_manager_get_accel_group (window->manager));
|
gtk_ui_manager_get_accel_group (window->manager));
|
||||||
|
|
||||||
window->toolbar = toolbar;
|
window->toolbar = toolbar;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -704,7 +703,7 @@ static gboolean vn_gui_reconnect_idle (GuiData * gui_data)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Thread function that tryes to reopen the connection asynchronously.
|
* Thread function that tries to reopen the connection asynchronously.
|
||||||
*/
|
*/
|
||||||
static void vn_gui_reconnect_thread (GuiData * gui_data)
|
static void vn_gui_reconnect_thread (GuiData * gui_data)
|
||||||
{
|
{
|
||||||
|
@ -1076,6 +1075,7 @@ void vn_gui_open (VnGui * obj)
|
||||||
gsize len;
|
gsize len;
|
||||||
gint x, y;
|
gint x, y;
|
||||||
gint width, height;
|
gint width, height;
|
||||||
|
gboolean maximized;
|
||||||
gchar ** windows;
|
gchar ** windows;
|
||||||
gchar ** forms;
|
gchar ** forms;
|
||||||
VnWindow * window;
|
VnWindow * window;
|
||||||
|
@ -1088,6 +1088,7 @@ void vn_gui_open (VnGui * obj)
|
||||||
y = g_key_file_get_integer (config, windows[m], "y", NULL);
|
y = g_key_file_get_integer (config, windows[m], "y", NULL);
|
||||||
width = g_key_file_get_integer (config, windows[m], "width", NULL);
|
width = g_key_file_get_integer (config, windows[m], "width", NULL);
|
||||||
height = g_key_file_get_integer (config, windows[m], "height", NULL);
|
height = g_key_file_get_integer (config, windows[m], "height", NULL);
|
||||||
|
maximized = g_key_file_get_boolean (config, windows[m], "maximized", NULL);
|
||||||
|
|
||||||
if (g_key_file_get_boolean (config, windows[m], "main", NULL))
|
if (g_key_file_get_boolean (config, windows[m], "main", NULL))
|
||||||
{
|
{
|
||||||
|
@ -1098,7 +1099,10 @@ void vn_gui_open (VnGui * obj)
|
||||||
window = vn_gui_create_window (obj, x, y);
|
window = vn_gui_create_window (obj, x, y);
|
||||||
|
|
||||||
gtk_window_resize (window->widget, width, height);
|
gtk_window_resize (window->widget, width, height);
|
||||||
|
|
||||||
|
if (maximized)
|
||||||
|
gtk_window_maximize (window->widget);
|
||||||
|
|
||||||
forms = g_key_file_get_string_list (config,
|
forms = g_key_file_get_string_list (config,
|
||||||
windows[m], "forms", NULL, NULL);
|
windows[m], "forms", NULL, NULL);
|
||||||
|
|
||||||
|
@ -1145,6 +1149,8 @@ void vn_gui_save (VnGui * obj)
|
||||||
GList * nb_pages, * n;
|
GList * nb_pages, * n;
|
||||||
VnWindow * window;
|
VnWindow * window;
|
||||||
gint x, y, width, height;
|
gint x, y, width, height;
|
||||||
|
GdkWindow * win;
|
||||||
|
gboolean maximized;
|
||||||
GKeyFile * config;
|
GKeyFile * config;
|
||||||
|
|
||||||
g_return_if_fail (VN_IS_GUI (obj));
|
g_return_if_fail (VN_IS_GUI (obj));
|
||||||
|
@ -1169,6 +1175,11 @@ void vn_gui_save (VnGui * obj)
|
||||||
g_key_file_set_integer (config, group, "width", width);
|
g_key_file_set_integer (config, group, "width", width);
|
||||||
g_key_file_set_integer (config, group, "height", height);
|
g_key_file_set_integer (config, group, "height", height);
|
||||||
|
|
||||||
|
g_object_get (window->widget, "window", &win, NULL);
|
||||||
|
maximized = (gdk_window_get_state (win) & GDK_WINDOW_STATE_MAXIMIZED);
|
||||||
|
g_object_unref (win);
|
||||||
|
g_key_file_set_boolean (config, group, "maximized", maximized);
|
||||||
|
|
||||||
// Saving the forms opened at window
|
// Saving the forms opened at window
|
||||||
|
|
||||||
if (window == obj->main_window)
|
if (window == obj->main_window)
|
||||||
|
|
|
@ -98,7 +98,13 @@ static void vn_mod_set_property (VnMod * obj, guint id,
|
||||||
{
|
{
|
||||||
case PROP_NAME:
|
case PROP_NAME:
|
||||||
obj->priv->name = g_value_dup_string (value);
|
obj->priv->name = g_value_dup_string (value);
|
||||||
obj->priv->text_domain = g_strdup_printf ("hedera-%s", obj->priv->name);
|
|
||||||
|
//XXX Remove when the "example" mod gets removed from the project
|
||||||
|
if (g_strcmp0 (obj->priv->name, "example"))
|
||||||
|
obj->priv->text_domain = g_strdup_printf ("%s-%s", GETTEXT_PACKAGE, obj->priv->name);
|
||||||
|
else
|
||||||
|
obj->priv->text_domain = g_strdup (GETTEXT_PACKAGE);
|
||||||
|
|
||||||
bindtextdomain (obj->priv->text_domain, _HEDERA_LOCALE_DIR);
|
bindtextdomain (obj->priv->text_domain, _HEDERA_LOCALE_DIR);
|
||||||
break;
|
break;
|
||||||
case PROP_DATA_DIR:
|
case PROP_DATA_DIR:
|
||||||
|
|
Reference in New Issue