Entries y Spins modificados para usar una cadena de formato.
Es posible realizar selección (y eliminación) multiple en el VnGrid. Añadido VnLabel, campo de etiqueta no modificable.
This commit is contained in:
parent
ad032d2e74
commit
f5396702a7
|
@ -16,7 +16,7 @@ AC_PROG_CC
|
|||
|
||||
dnl Check for vala.
|
||||
dnl You should change the version manually to match with yours.
|
||||
AM_PROG_VALAC([0.20.0])
|
||||
AM_PROG_VALAC([0.22.0])
|
||||
[+IF (=(get "HaveI18n") "1")+]
|
||||
dnl Internationalization
|
||||
IT_PROG_INTLTOOL([0.35.0])
|
||||
|
|
|
@ -34,10 +34,7 @@
|
|||
-DGETTEXT_PACKAGE=\"hedera-[+Name+]\" [+ENDIF+] \
|
||||
$([+NameCUpper+]_CFLAGS)
|
||||
[+(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+]\
|
||||
$(VALAFLAGS)
|
||||
[+(prefix_if_missing "NameCLower" "lib")+]_la_VALAFLAGS = $(VALAFLAGS)
|
||||
|
||||
[+NameCLower+]_querydir = $(querydir)/[+NameHLower+]
|
||||
[+NameCLower+]_query_DATA =
|
||||
|
|
|
@ -58,7 +58,7 @@ if test x"$ENABLE_VALA" = x"yes" ; then
|
|||
GOBJECT_INTROSPECTION_CHECK([1.30.0])
|
||||
AC_SUBST([GIR_SCANNER_ARGS], [--warn-all])
|
||||
if $HAVE_INTROSPECTION; then
|
||||
AC_SUBST([VALA_VERSION], [0.20])
|
||||
AC_SUBST([VALA_VERSION], [0.22])
|
||||
AM_PROG_VALAC([$VALA_VERSION])
|
||||
AC_PATH_PROG(VAPIGEN, [vapigen], ["no"])
|
||||
fi
|
||||
|
|
14
db/db-iter.c
14
db/db-iter.c
|
@ -41,7 +41,12 @@ G_DEFINE_BOXED_TYPE (DbIter, db_iter, db_iter_copy, db_iter_free);
|
|||
**/
|
||||
gboolean db_iter_compare (DbIter * a, DbIter * b)
|
||||
{
|
||||
return (a->stamp == b->stamp && a->data == b->data);
|
||||
if (a && b)
|
||||
return (a->stamp == b->stamp && a->data == b->data);
|
||||
else if (!a && !b)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -65,8 +70,13 @@ DbIter * db_iter_copy (DbIter * obj)
|
|||
return dst;
|
||||
}
|
||||
|
||||
/**
|
||||
* db_iter_free:
|
||||
* @obj: (allow-none): a #DbIter
|
||||
*
|
||||
* Frees a #DbIter.
|
||||
**/
|
||||
void db_iter_free (DbIter * obj)
|
||||
{
|
||||
g_return_if_fail (obj);
|
||||
g_free (obj);
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ static void db_iterator_row_num_changed (DbIterator * obj)
|
|||
{
|
||||
if (obj->row_selected)
|
||||
obj->row = db_model_get_path (obj->model, &obj->iter);
|
||||
else if (!obj->remember_selection)
|
||||
else if (obj->selected || !obj->remember_selection)
|
||||
obj->row = -1;
|
||||
|
||||
g_signal_emit (obj, signals[ROW_NUM_CHANGED], 0);
|
||||
|
@ -91,6 +91,15 @@ static void db_iterator_iter_changed (DbIterator * obj)
|
|||
g_signal_emit (obj, signals[ITER_CHANGED], 0);
|
||||
}
|
||||
|
||||
static void db_iterator_unselect (DbIterator * obj)
|
||||
{
|
||||
if (obj->selected)
|
||||
{
|
||||
g_hash_table_destroy (obj->selected);
|
||||
obj->selected = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void db_iterator_set_iter (DbIterator * obj, DbIter * iter)
|
||||
{
|
||||
if (iter)
|
||||
|
@ -104,6 +113,8 @@ static void db_iterator_set_iter (DbIterator * obj, DbIter * iter)
|
|||
obj->row_selected = FALSE;
|
||||
db_iterator_iter_changed (obj);
|
||||
}
|
||||
|
||||
db_iterator_unselect (obj);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -144,7 +155,7 @@ static void db_iterator_on_model_line_deleted (DbModel * model, gint row, DbIter
|
|||
|
||||
static void db_iterator_on_model_line_deleted_after (DbModel * model, gint row, DbIterator * obj)
|
||||
{
|
||||
if (obj->row_selected)
|
||||
if (obj->row_selected || obj->selected)
|
||||
db_iterator_row_num_changed (obj);
|
||||
|
||||
g_signal_emit (obj, signals[DATA_CHANGED], 0);
|
||||
|
@ -156,7 +167,7 @@ static void db_iterator_on_model_line_deleted_after (DbModel * model, gint row,
|
|||
static void db_iterator_on_model_lines_reordered (DbModel * model,
|
||||
gint column, gint * new_order, DbIterator * obj)
|
||||
{
|
||||
if (obj->row_selected)
|
||||
if (obj->row_selected || obj->selected)
|
||||
db_iterator_row_num_changed (obj);
|
||||
}
|
||||
|
||||
|
@ -344,6 +355,36 @@ gboolean db_iterator_get_iter (DbIterator * obj, DbIter * iter)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* db_iterator_select_iter:
|
||||
* @obj: a #DbIterator
|
||||
* @iter: a #DbIter
|
||||
*
|
||||
* Adds a new #DbIter to the current selection.
|
||||
*/
|
||||
void db_iterator_select_iter (DbIterator * obj, DbIter * iter)
|
||||
{
|
||||
gint pos;
|
||||
|
||||
g_return_if_fail (DB_IS_ITERATOR (obj));
|
||||
g_return_if_fail (IS_READY (obj));
|
||||
|
||||
if (!iter)
|
||||
return;
|
||||
|
||||
if (!obj->selected)
|
||||
obj->selected = g_hash_table_new_full (g_int_hash, g_int_equal,
|
||||
NULL, (GDestroyNotify) db_iter_free);
|
||||
|
||||
obj->iter = *iter;
|
||||
obj->row_selected = FALSE;
|
||||
g_signal_emit (obj, signals[ROW_NUM_CHANGED], 0);
|
||||
pos = db_model_get_path (obj->model, iter);
|
||||
|
||||
if (!g_hash_table_contains (obj->selected, &pos))
|
||||
g_hash_table_insert (obj->selected, &pos, db_iter_copy (iter));
|
||||
}
|
||||
|
||||
/**
|
||||
* db_iterator_move_iter:
|
||||
* @obj: a #DbIterator
|
||||
|
@ -521,13 +562,25 @@ void db_iterator_delete (DbIterator * obj)
|
|||
{
|
||||
g_return_if_fail (DB_IS_ITERATOR (obj));
|
||||
|
||||
if (db_iterator_check_row_selected (obj))
|
||||
if (obj->row_selected)
|
||||
{
|
||||
db_model_delete (obj->model, &obj->iter);
|
||||
|
||||
if (obj->mode != DB_ITERATOR_MODE_ON_DEMAND)
|
||||
db_model_perform_operations (obj->model, FALSE);
|
||||
}
|
||||
else if (obj->selected)
|
||||
{
|
||||
GList * l, * list = g_hash_table_get_values (obj->selected);
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
db_model_delete (obj->model, l->data);
|
||||
|
||||
if (obj->mode != DB_ITERATOR_MODE_ON_DEMAND)
|
||||
db_model_perform_operations (obj->model, FALSE);
|
||||
|
||||
db_iterator_unselect (obj);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -541,8 +594,11 @@ void db_iterator_refresh (DbIterator * obj)
|
|||
g_return_if_fail (DB_IS_ITERATOR (obj));
|
||||
|
||||
if (obj->model)
|
||||
{
|
||||
db_model_refresh (obj->model);
|
||||
};
|
||||
db_iterator_unselect (obj);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* db_iterator_get_spec:
|
||||
|
@ -816,7 +872,7 @@ DbModelRowOp db_iterator_get_pending_operations (DbIterator * obj)
|
|||
{
|
||||
g_return_val_if_fail (DB_IS_ITERATOR (obj), 0);
|
||||
|
||||
if (obj->model && obj->row_selected)
|
||||
if (obj->model && (obj->row_selected || obj->selected))
|
||||
return db_model_get_row_operations (obj->model, &obj->iter);
|
||||
|
||||
return 0;
|
||||
|
@ -895,6 +951,7 @@ static void db_iterator_init (DbIterator * obj)
|
|||
obj->params = NULL;
|
||||
obj->row = 0;
|
||||
obj->row_selected = FALSE;
|
||||
obj->selected = NULL;
|
||||
}
|
||||
|
||||
static void db_iterator_finalize (DbIterator * obj)
|
||||
|
@ -906,6 +963,8 @@ static void db_iterator_finalize (DbIterator * obj)
|
|||
(GWeakNotify) db_iterator_unref_param, obj);
|
||||
|
||||
g_list_free (obj->params);
|
||||
|
||||
db_iterator_unselect (obj);
|
||||
|
||||
if (obj->model)
|
||||
{
|
||||
|
@ -935,7 +994,6 @@ static void db_iterator_class_init (DbIteratorClass * klass)
|
|||
/**
|
||||
* DbIterator::iter-changed:
|
||||
* @iterator: the object on which the signal is emitted
|
||||
* @iter: a #DbIter
|
||||
*
|
||||
* This signal is emitted when @iter moves over the @iterator model
|
||||
*/
|
||||
|
|
|
@ -78,6 +78,7 @@ struct _DbIterator
|
|||
GList * params;
|
||||
DbIteratorMode mode;
|
||||
DbIter iter;
|
||||
GHashTable * selected;
|
||||
gint row;
|
||||
gboolean row_selected;
|
||||
gboolean remember_selection;
|
||||
|
@ -98,6 +99,7 @@ DbIteratorMode db_iterator_get_mode (DbIterator * obj);
|
|||
void db_iterator_set_mode (DbIterator * obj, DbIteratorMode mode);
|
||||
gint db_iterator_get_row (DbIterator * obj);
|
||||
gboolean db_iterator_get_iter (DbIterator * obj, DbIter * iter);
|
||||
void db_iterator_select_iter (DbIterator * obj, DbIter * iter);
|
||||
void db_iterator_move_iter (DbIterator * obj, DbIter * iter);
|
||||
void db_iterator_move_first (DbIterator * obj);
|
||||
void db_iterator_move_last (DbIterator * obj);
|
||||
|
|
|
@ -12,7 +12,7 @@ usr/lib/glade/modules
|
|||
#usr/lib/girepository-1.0
|
||||
usr/share/gir-1.0
|
||||
usr/share/glade/catalogs
|
||||
usr/share/vala-0.20/vapi
|
||||
usr/share/vala-0.22/vapi
|
||||
usr/share/gtk-doc/html/hedera
|
||||
|
||||
usr/share/anjuta/templates
|
||||
|
|
|
@ -24,7 +24,7 @@ usr/lib/glade/modules/libgladevn.so
|
|||
#usr/lib/girepository-1.0/*
|
||||
usr/share/gir-1.0/*
|
||||
usr/share/glade/catalogs/*
|
||||
usr/share/vala-0.20/vapi/*
|
||||
usr/share/vala-0.22/vapi/*
|
||||
usr/share/gtk-doc/html/hedera/*
|
||||
|
||||
usr/share/anjuta/templates/*
|
||||
|
|
|
@ -15,12 +15,12 @@ libgladevn_la_LDFLAGS = -avoid-version
|
|||
libgladevn_la_SOURCES = \
|
||||
glade-vn.h \
|
||||
glade-vn.c \
|
||||
glade-db-iterator.c \
|
||||
glade-eprop-model.c \
|
||||
glade-vn-batch.c \
|
||||
glade-db-model.c \
|
||||
glade-db-model-editor.h \
|
||||
glade-db-model-editor.c
|
||||
glade-db-model-editor.c \
|
||||
glade-eprop-model.c \
|
||||
glade-db-iterator.c
|
||||
|
||||
gladevn_data_DATA = vn.xml
|
||||
|
||||
|
|
|
@ -302,9 +302,7 @@ void param_col_cell_data (GtkTreeViewColumn * view, GtkCellRenderer * cell,
|
|||
if (param)
|
||||
g_object_set (cell, "text", glade_widget_get_name (param), NULL);
|
||||
else
|
||||
{
|
||||
g_object_set (cell, "text", "", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
static void glade_eporp_links_on_param_col_editing_started (GtkCellRendererText * cell,
|
||||
|
|
25
glade/vn.xml
25
glade/vn.xml
|
@ -5,7 +5,6 @@
|
|||
<init-function>glade_vn_init</init-function>
|
||||
|
||||
<glade-widget-classes>
|
||||
|
||||
<glade-widget-class name="GvnParam" generic-name="param" title="Parameter" icon-name="widget-gtk-action">
|
||||
<properties>
|
||||
<property id="null" ignore="True"/>
|
||||
|
@ -21,18 +20,17 @@
|
|||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="VnModel" generic-name="model" title="Data Model" icon-name="widget-gtk-liststore">
|
||||
<glade-widget-class name="VnModel" generic-name="model" title="Data Model" icon-name="widget-gtk-liststore">
|
||||
<properties>
|
||||
<property id="conn" ignore="True" disabled="True"/>
|
||||
<property id="stmt" ignore="True" disabled="True"/>
|
||||
<property save="False" weight="1.2" id="use-file" ignore="True"/>
|
||||
<property save="False" weight="1.3" id="sql" ignore="True"/>
|
||||
<property save="False" ignore="True" id="links" name="Links" disabled="True">
|
||||
<property id="use-file" save="False" ignore="True" weight="1.2"/>
|
||||
<property id="sql" save="False" ignore="True" weight="1.3"/>
|
||||
<property id="links" save="False" ignore="True" disabled="True" name="Links">
|
||||
<parameter-spec>
|
||||
<type>GParamBoxed</type>
|
||||
<value-type>GladeDbList</value-type>
|
||||
</parameter-spec>
|
||||
<tooltip translatable="yes">List of parameters linked to the model</tooltip>
|
||||
</property>
|
||||
</properties>
|
||||
<create-editor-property-function>glade_db_model_create_eprop</create-editor-property-function>
|
||||
|
@ -56,12 +54,11 @@
|
|||
</property>
|
||||
</properties>
|
||||
<create-editor-property-function>glade_db_model_holder_create_eprop</create-editor-property-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>
|
||||
<add-child-verify-function>glade_db_iterator_add_verify</add-child-verify-function>
|
||||
<read-widget-function>glade_db_iterator_read_widget</read-widget-function>
|
||||
<action-activate-function>glade_db_iterator_action_activate</action-activate-function>
|
||||
<actions>
|
||||
|
@ -99,7 +96,7 @@
|
|||
<property id="digits" ignore="True"/>
|
||||
<property id="climb-rate" ignore="True"/>
|
||||
<property id="lower" ignore="True"/>
|
||||
<property id="uppder" ignore="True"/>
|
||||
<property id="upper" ignore="True" default="100.0"/>
|
||||
<property id="step-increment" ignore="True"/>
|
||||
</properties>
|
||||
</glade-widget-class>
|
||||
|
@ -132,6 +129,7 @@
|
|||
</properties>
|
||||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="VnField" title="Field"/>
|
||||
<glade-widget-class name="VnCombo" generic-name="combo" title="Combo Box Field" icon-name="widget-gtk-combobox">
|
||||
<properties>
|
||||
<property id="model" ignore="True">
|
||||
|
@ -173,6 +171,7 @@
|
|||
</glade-widget-class>
|
||||
|
||||
<glade-widget-class name="VnEntry" generic-name="entry" title="Text Field" icon-name="widget-gtk-entry"/>
|
||||
<glade-widget-class name="VnLabel" generic-name="label" title="Fixed text field" icon-name="widget-gtk-label"/>
|
||||
<glade-widget-class name="VnCheck" generic-name="check" title="Boolean Field" icon-name="widget-gtk-checkbutton"/>
|
||||
<glade-widget-class name="VnSpin" generic-name="spin" title="Numeric Field" icon-name="widget-gtk-spinbutton"/>
|
||||
<glade-widget-class name="VnImage" generic-name="image" title="Image Field" icon-name="widget-gtk-image"/>
|
||||
|
@ -180,13 +179,12 @@
|
|||
<glade-widget-class name="VnDateChooser" generic-name="date-chooser" title="Date Chooser" icon-name="widget-gtk-calendar"/>
|
||||
|
||||
<glade-widget-class name="VnBatch" generic-name="batch" toplevel="True" title="Group of objects" icon-name="widget-gtk-vbuttonbox">
|
||||
<add-child-verify-function>glade_vn_batch_add_verify</add-child-verify-function>
|
||||
<add-child-function>glade_vn_batch_add_child</add-child-function>
|
||||
<remove-child-function>glade_vn_batch_remove_child</remove-child-function>
|
||||
<replace-child-function>glade_vn_batch_replace_child</replace-child-function>
|
||||
<get-children-function>glade_vn_batch_get_children</get-children-function>
|
||||
<add-child-verify-function>glade_vn_batch_add_verify</add-child-verify-function>
|
||||
</glade-widget-class>
|
||||
|
||||
</glade-widget-classes>
|
||||
|
||||
<glade-widget-group name="db-toplevels" title="Data Handling">
|
||||
|
@ -198,7 +196,7 @@
|
|||
<glade-widget-class-ref name="DbFileLoader"/>
|
||||
</glade-widget-group>
|
||||
|
||||
<glade-widget-group name="vn-toplevels" title="Grid and Columns" weight="1000">
|
||||
<glade-widget-group name="vn-grid" title="Grid and Columns">
|
||||
<glade-widget-class-ref name="VnGrid"/>
|
||||
<glade-widget-class-ref name="VnColumnCheck"/>
|
||||
<glade-widget-class-ref name="VnColumnCombo"/>
|
||||
|
@ -207,10 +205,11 @@
|
|||
<glade-widget-class-ref name="VnColumnSpin"/>
|
||||
</glade-widget-group>
|
||||
|
||||
<glade-widget-group name="vn-toplevels" title="Data Widgets" weight="0">
|
||||
<glade-widget-group name="vn-toplevels" title="Data Widgets">
|
||||
<glade-widget-class-ref name="VnBatch"/>
|
||||
<glade-widget-class-ref name="VnHandler"/>
|
||||
<glade-widget-class-ref name="VnEntry"/>
|
||||
<glade-widget-class-ref name="VnLabel"/>
|
||||
<glade-widget-class-ref name="VnCheck"/>
|
||||
<glade-widget-class-ref name="VnCombo"/>
|
||||
<glade-widget-class-ref name="VnSpin"/>
|
||||
|
|
|
@ -23,15 +23,6 @@
|
|||
* @Short_description: Miscelaneous utility functions
|
||||
* @Title: Miscelaneous utility functions
|
||||
**/
|
||||
|
||||
const gchar * GVN_ABR_WDAY[] = {N_("Err"),
|
||||
N_("Mon"), N_("Tue"), N_("Wed"), N_("Thu"), N_("Fri"), N_("Sat"), N_("Sun")
|
||||
};
|
||||
|
||||
const gchar * GVN_ABR_MONTH[] = {N_("Err"),
|
||||
N_("Jan"), N_("Feb"), N_("Mar"), N_("Apr"), N_("May"), N_("Jun"),
|
||||
N_("Jul"), N_("Aug"), N_("Sep"), N_("Oct"), N_("Nov"), N_("Dec"),
|
||||
};
|
||||
|
||||
/**
|
||||
* GETTEXT_PACKAGE: (skip)
|
||||
|
|
|
@ -26,7 +26,4 @@ void gvn_key_file_save (GKeyFile * obj, const gchar * file);
|
|||
gchar * gvn_encode (const gchar * string);
|
||||
gchar * gvn_decode (const gchar * string);
|
||||
|
||||
extern const gchar * GVN_ABR_WDAY[];
|
||||
extern const gchar * GVN_ABR_MONTH[];
|
||||
|
||||
#endif
|
||||
|
|
147
gvn/gvn-value.c
147
gvn/gvn-value.c
|
@ -33,11 +33,11 @@
|
|||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Private
|
||||
|
||||
static void gvn_value_new_from_string_real (GValue * value, GType type, const gchar * string, gsize len)
|
||||
{
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case G_TYPE_BOOLEAN:
|
||||
g_value_set_boolean (value, atoi (string));
|
||||
g_value_set_boolean (value, atoi (string));
|
||||
break;
|
||||
case G_TYPE_CHAR:
|
||||
g_value_set_schar (value, atoi (string));
|
||||
|
@ -46,7 +46,7 @@ static void gvn_value_new_from_string_real (GValue * value, GType type, const gc
|
|||
g_value_set_int (value, atoi (string));
|
||||
break;
|
||||
case G_TYPE_UINT:
|
||||
g_value_set_int (value, (guint) atoi (string));
|
||||
g_value_set_uint (value, (guint) atoi (string));
|
||||
break;
|
||||
case G_TYPE_LONG:
|
||||
g_value_set_long (value, g_ascii_strtoll (string, NULL, 0));
|
||||
|
@ -67,37 +67,34 @@ static void gvn_value_new_from_string_real (GValue * value, GType type, const gc
|
|||
{
|
||||
if (len == -1)
|
||||
len = strlen (string);
|
||||
|
||||
|
||||
if (type == G_TYPE_DATE)
|
||||
{
|
||||
if (len >= 10)
|
||||
{
|
||||
GDate * date = g_date_new_dmy (
|
||||
atoi (string + 8)
|
||||
,atoi (string + 5)
|
||||
,atoi (string)
|
||||
);
|
||||
GDate * date = g_date_new ();
|
||||
g_date_set_parse (date, string);
|
||||
|
||||
if (g_date_valid (date))
|
||||
g_value_take_boxed (value, date);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("Gvn: Can't transform string to GDate");
|
||||
g_date_free (date);
|
||||
}
|
||||
}
|
||||
else if (type == G_TYPE_DATE_TIME)
|
||||
{
|
||||
if (len >= 19)
|
||||
{
|
||||
GDateTime * date_time = g_date_time_new_local (
|
||||
atoi (string)
|
||||
,atoi (string + 5)
|
||||
,atoi (string + 8)
|
||||
,atoi (string + 11)
|
||||
,atoi (string + 14)
|
||||
,atoi (string + 17)
|
||||
);
|
||||
g_value_take_boxed (value, date_time);
|
||||
}
|
||||
GDateTime * datetime;
|
||||
gchar ** dt = g_strsplit_set (string, " -:", 0);
|
||||
|
||||
if (g_strv_length (dt) >= 6)
|
||||
datetime = g_date_time_new_local
|
||||
(atoi (dt[0]), atoi (dt[1]), atoi (dt[2]),
|
||||
atoi (dt[3]), atoi (dt[4]), atoi (dt[5]));
|
||||
else
|
||||
g_warning ("Gvn: Can't transform string to GDateTime");
|
||||
|
||||
g_value_take_boxed (value, datetime);
|
||||
g_strfreev (dt);
|
||||
}
|
||||
else if (type == G_TYPE_BYTES)
|
||||
{
|
||||
|
@ -289,7 +286,7 @@ void gvn_value_new_with_content (GValue * value, GType type, gpointer content)
|
|||
g_value_set_string (value, (gchar *) content);
|
||||
break;
|
||||
default:
|
||||
if (type == G_TYPE_DATE
|
||||
if (type == G_TYPE_DATE || type == G_TYPE_DATE_TIME
|
||||
|| type == G_TYPE_BYTES)
|
||||
g_value_set_boxed (value, content);
|
||||
else if (G_TYPE_IS_OBJECT (type))
|
||||
|
@ -341,7 +338,7 @@ void gvn_value_get_valist (const GValue * value, va_list va)
|
|||
*va_arg (va, gchar**) = g_value_dup_string (value);
|
||||
break;
|
||||
default:
|
||||
if (type == G_TYPE_DATE
|
||||
if (type == G_TYPE_DATE || type == G_TYPE_DATE_TIME
|
||||
|| type == G_TYPE_BYTES)
|
||||
*va_arg (va, gpointer*) = g_value_dup_boxed (value);
|
||||
else if (G_TYPE_IS_OBJECT (type))
|
||||
|
@ -484,45 +481,115 @@ gboolean gvn_value_ccopy (const GValue * src, GValue * dst)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks the validity of @format attending to the valid specifier characters in
|
||||
* @specifiers, the other flags in the format string won't be checked.
|
||||
*/
|
||||
gboolean format_valid (const gchar * format, const gchar * specifiers)
|
||||
{
|
||||
gboolean started = FALSE;
|
||||
gint i, j;
|
||||
|
||||
if (format && specifiers)
|
||||
for (i = 0; format[i] != '\0'; i++)
|
||||
{
|
||||
if (format[i] == '%')
|
||||
{
|
||||
started = TRUE;
|
||||
continue;
|
||||
}
|
||||
else if (started && format[i] == ' ')
|
||||
break;
|
||||
|
||||
for (j = 0; specifiers[j] != '\0'; j++)
|
||||
if (started && format[i] == specifiers[j]
|
||||
&& (format[i+1] == ' ' || format[i+1] == '\0'))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gvn_value_to_format_string:
|
||||
* @src: source #GValue
|
||||
* @format: a format string
|
||||
* @dst: destination #GValue
|
||||
*
|
||||
* Sets the content of @dst to a string value depending on the type of @src and
|
||||
* according to @format. @format must be a valid format string as the used by
|
||||
* the printf() family of functions and, in the case of dates, the ones used by
|
||||
* strftime(). See g_ascii_formatd() and g_date_time_format(). The output may
|
||||
* vary depending on the locale.
|
||||
*
|
||||
* The accepted types are #gboolean, #guint, #gint, #gfloat, #gdouble, #guchar,
|
||||
* #gchar, #gchararray, #GDate and #GDateTime, any other types may have an
|
||||
* unexpected output.
|
||||
**/
|
||||
void gvn_value_to_format_string (const GValue * src, guint digits, GValue * dst)
|
||||
//void gvn_value_to_format_string (const GValue * src, const gchar * format, GValue * dst)
|
||||
void gvn_value_to_format_string (const GValue * src, const gchar * format, GValue * dst)
|
||||
{
|
||||
GType type = G_VALUE_TYPE (src);
|
||||
|
||||
g_value_init (dst, G_TYPE_STRING);
|
||||
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case G_TYPE_BOOLEAN:
|
||||
break;
|
||||
case G_TYPE_INT://y variantes
|
||||
break;
|
||||
{
|
||||
gboolean b = g_value_get_boolean (src);
|
||||
g_value_set_string (dst, b ? _("Yes") : _("No"));
|
||||
break;
|
||||
}
|
||||
case G_TYPE_INT:
|
||||
{
|
||||
gchar * str;
|
||||
gint i = g_value_get_int (src);
|
||||
str = g_strdup_printf (format_valid (format, "duoXxp") ? format : "%d", i);
|
||||
g_value_set_string (dst, str);
|
||||
g_free (str);
|
||||
break;
|
||||
}
|
||||
case G_TYPE_UINT:
|
||||
{
|
||||
gchar * str;
|
||||
guint u = g_value_get_uint (src);
|
||||
str = g_strdup_printf (format_valid (format, "udoXxp") ? format : "%u", u);
|
||||
g_value_set_string (dst, str);
|
||||
g_free (str);
|
||||
break;
|
||||
}
|
||||
case G_TYPE_FLOAT:
|
||||
case G_TYPE_DOUBLE:
|
||||
{
|
||||
gdouble dec;
|
||||
gchar * format;
|
||||
gchar buffer [G_ASCII_DTOSTR_BUF_SIZE];
|
||||
|
||||
|
||||
if (type == G_TYPE_FLOAT)
|
||||
dec = (gdouble) g_value_get_float (src);
|
||||
else
|
||||
dec = g_value_get_double (src);
|
||||
|
||||
format = g_strdup_printf ("%%.%df", digits);
|
||||
g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE, format, dec);
|
||||
|
||||
g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE,
|
||||
format_valid (format, "fFeEgGaA") ? format : "%.2f", dec);
|
||||
g_value_set_string (dst, buffer);
|
||||
g_free (format);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (type == G_TYPE_DATE)
|
||||
{}
|
||||
{
|
||||
gchar buffer[120];
|
||||
GDate * date = g_value_get_boxed (src);
|
||||
g_date_strftime (buffer, 120, format ? format : "%Y-%m-%d", date);
|
||||
g_value_set_string (dst, buffer);
|
||||
}
|
||||
else if (type == G_TYPE_DATE_TIME)
|
||||
{}
|
||||
{
|
||||
gchar * str;
|
||||
GDateTime * dt = g_value_get_boxed (src);
|
||||
str = g_date_time_format (dt, format ? format : "%Y-%m-%d %T");
|
||||
g_value_set_string (dst, str);
|
||||
g_free (str);
|
||||
}
|
||||
else if (!gvn_value_is_null (src))
|
||||
g_value_transform (src, dst);
|
||||
else
|
||||
|
|
|
@ -32,7 +32,7 @@ void gvn_value_get_valist (const GValue * value, va_list va);
|
|||
gint gvn_value_compare0 (const GValue * a, const GValue * b);
|
||||
void gvn_value_copy (const GValue * src, GValue * dst);
|
||||
gboolean gvn_value_ccopy (const GValue * src, GValue * dst);
|
||||
void gvn_value_to_format_string (const GValue * src, guint digits, GValue * dst);
|
||||
void gvn_value_to_format_string (const GValue * src, const gchar * format, GValue * dst);
|
||||
void gvn_type_init ();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -72,23 +72,38 @@ static void vn_consulter_model_status_changed (DbModel * model,
|
|||
VnColumn * column;
|
||||
GType col_type, type = db_model_get_column_type (model, i);
|
||||
gboolean image = FALSE;
|
||||
|
||||
if (type == G_TYPE_INT || type == G_TYPE_UINT
|
||||
|| type == G_TYPE_FLOAT || type == G_TYPE_DOUBLE)
|
||||
gchar * format = NULL;
|
||||
/*col_type = VN_TYPE_COLUMN_ENTRY;
|
||||
if (type == G_TYPE_INT)
|
||||
format = "%d";
|
||||
else if (type == G_TYPE_UINT)
|
||||
format = "%u";
|
||||
else*/
|
||||
if (type == G_TYPE_FLOAT || type == G_TYPE_DOUBLE
|
||||
|| type == G_TYPE_INT || type == G_TYPE_UINT)
|
||||
col_type = VN_TYPE_COLUMN_SPIN;
|
||||
//format = "%.2f";
|
||||
else if (type == G_TYPE_BYTES)
|
||||
col_type = VN_TYPE_COLUMN_IMAGE;
|
||||
else if (type == G_TYPE_BOOLEAN)
|
||||
col_type = VN_TYPE_COLUMN_CHECK;
|
||||
//format = "%b";
|
||||
else if (type == G_TYPE_STRING && !g_utf8_collate
|
||||
(g_utf8_casefold (db_model_get_column_name (model, i), -1),
|
||||
g_utf8_casefold ("image", -1)))
|
||||
(g_utf8_casefold (db_model_get_column_name (model, i), -1)
|
||||
,g_utf8_casefold ("image", -1)))
|
||||
{
|
||||
image = TRUE;
|
||||
col_type = VN_TYPE_COLUMN_IMAGE;
|
||||
}
|
||||
else
|
||||
/*else if (type == G_TYPE_DATE)
|
||||
format = "%Y-%m-%d";
|
||||
else if (type == G_TYPE_DATE_TIME)
|
||||
format = "%Y-%m-%d %T";
|
||||
*/ else
|
||||
{
|
||||
col_type = VN_TYPE_COLUMN_ENTRY;
|
||||
//format = "%s";
|
||||
}
|
||||
|
||||
column = vn_grid_append_column (obj->grid, i
|
||||
,db_model_get_column_name (model, i)
|
||||
|
@ -96,6 +111,9 @@ static void vn_consulter_model_status_changed (DbModel * model,
|
|||
,TRUE, FALSE
|
||||
);
|
||||
|
||||
if (format)
|
||||
g_object_set (column, "format", format, NULL);
|
||||
|
||||
if (type == G_TYPE_INT)
|
||||
g_object_set (column,
|
||||
"lower", (gdouble)G_MININT,
|
||||
|
@ -113,7 +131,8 @@ static void vn_consulter_model_status_changed (DbModel * model,
|
|||
"step-increment", 0.1,
|
||||
// "editable", FALSE,
|
||||
NULL);
|
||||
else if (image)
|
||||
else
|
||||
if (image)
|
||||
g_object_set (column,
|
||||
"host", "www.verdnatura.es",
|
||||
"path", "image/cache/catalog/icon",
|
||||
|
@ -201,7 +220,7 @@ static void vn_consulter_open (VnConsulter * obj)
|
|||
,obj->file
|
||||
,"/*pg*/ SELECT id1, id2, name, ok, date, number, floating, image "
|
||||
"FROM prueben"
|
||||
,"/*pg*/ SELECT id1, id2, floating FROM prueben LIMIT 1"
|
||||
,"/*pg*/ SELECT id1, number, floating FROM prueben LIMIT 1"
|
||||
,NULL
|
||||
};
|
||||
|
||||
|
|
|
@ -16,17 +16,43 @@
|
|||
*/
|
||||
|
||||
#include <libpq-fe.h>
|
||||
//#include <postgres_fe.h>
|
||||
|
||||
//#include <internal/postgres_fe.h>
|
||||
// Replaces postgres_fe.h until it gets fixed
|
||||
#ifndef FRONTEND
|
||||
#define FRONTEND 1
|
||||
#endif
|
||||
|
||||
#include "c.h"
|
||||
#include <internal/c.h>
|
||||
// end of the "fix"
|
||||
|
||||
//#include <catalog/pg_type.h>
|
||||
// catalog/pg_type.h has been removed from Debian, this fixes its lack
|
||||
#define BOOLOID 16
|
||||
#define INT8OID 20
|
||||
#define INT2OID 21
|
||||
#define INT4OID 23
|
||||
#define TIDOID 27
|
||||
#define OIDOID 26
|
||||
#define FLOAT4OID 700
|
||||
#define FLOAT8OID 701
|
||||
#define NUMERICOID 1700
|
||||
#define DATEOID 1082
|
||||
#define TIMESTAMPOID 1114
|
||||
#define TIMESTAMPTZOID 1184
|
||||
#define TIMEOID 1083
|
||||
#define TIMETZOID 1266
|
||||
#define BYTEAOID 17
|
||||
#define ABSTIMEOID 702
|
||||
#define RELTIMEOID 703
|
||||
#define TINTERVALOID 704
|
||||
#define CHAROID 18
|
||||
#define TEXTOID 25
|
||||
#define NAMEOID 19
|
||||
#define BPCHAROID 1042
|
||||
#define VARCHAROID 1043
|
||||
// end of the "fix"
|
||||
|
||||
#include <catalog/pg_type.h>
|
||||
// Macros to avoid redefinition warnings for constants
|
||||
#undef PACKAGE_BUGREPORT
|
||||
#undef PACKAGE_NAME
|
||||
|
@ -145,8 +171,8 @@ static GType db_pg_get_g_type (Oid type)
|
|||
case CHAROID:
|
||||
case TEXTOID:
|
||||
case NAMEOID:
|
||||
case XMLOID:
|
||||
case CSTRINGOID:
|
||||
// case XMLOID:
|
||||
// case CSTRINGOID:
|
||||
case BPCHAROID:
|
||||
case VARCHAROID:
|
||||
default:
|
||||
|
|
|
@ -34,6 +34,7 @@ vn/field/vn-completion.c
|
|||
vn/field/vn-date-chooser.c
|
||||
vn/field/vn-image.c
|
||||
vn/field/vn-http-image.c
|
||||
vn/field/vn-label.c
|
||||
vn/vn-column.c
|
||||
vn/column/vn-column-entry.c
|
||||
vn/column/vn-column-spin.c
|
||||
|
@ -44,6 +45,7 @@ vn/gui/login.glade
|
|||
vn/gui/main.glade
|
||||
vn/gui/child-window.glade
|
||||
vn/gui/actions.glade
|
||||
vn/gui/date-chooser.glade
|
||||
|
||||
glade/glade-db-model.c
|
||||
glade/glade-db-model-editor.c
|
||||
|
|
235
po/ca.po
235
po/ca.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: hedera 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-12 12:39+0100\n"
|
||||
"POT-Creation-Date: 2014-03-27 13:39+0100\n"
|
||||
"PO-Revision-Date: 2013-06-04 13:38+0200\n"
|
||||
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
|
||||
"Language-Team: Catalan\n"
|
||||
|
@ -16,91 +16,6 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#. *
|
||||
#. * SECTION: gvn-misc
|
||||
#. * @Short_description: Miscelaneous utility functions
|
||||
#. * @Title: Miscelaneous utility functions
|
||||
#. *
|
||||
#: ../gvn/gvn-misc.c:27 ../gvn/gvn-misc.c:31
|
||||
msgid "Err"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Mon"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Tue"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Wed"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Thu"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Fri"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Sat"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Sun"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Jan"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Feb"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Mar"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Apr"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "May"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Jun"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Jul"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Aug"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Sep"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Oct"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Nov"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Dec"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-param-spec.c:263
|
||||
#, c-format
|
||||
msgid "Param not editable"
|
||||
|
@ -132,7 +47,7 @@ msgstr ""
|
|||
msgid "The master GvnParam of this parameter"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:997
|
||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1055
|
||||
msgid "Mode"
|
||||
msgstr ""
|
||||
|
||||
|
@ -188,11 +103,19 @@ msgstr ""
|
|||
msgid "The default value"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-value.c:434
|
||||
#: ../gvn/gvn-value.c:431
|
||||
#, c-format
|
||||
msgid "Attempting to compare invalid types: %s\n"
|
||||
msgstr "S'ha intentat comparar tipus invàlids: %s\n"
|
||||
|
||||
#: ../gvn/gvn-value.c:540
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-value.c:540
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: ../sql/sql-render.c:413
|
||||
msgid "Delimiter"
|
||||
msgstr ""
|
||||
|
@ -201,7 +124,7 @@ msgstr ""
|
|||
msgid "The character used for delimite the name of fields, tables..."
|
||||
msgstr ""
|
||||
|
||||
#: ../sql/sql-value.c:228 ../glade/glade-db-model.c:497
|
||||
#: ../sql/sql-value.c:228 ../glade/glade-db-model.c:525
|
||||
msgid "Param"
|
||||
msgstr ""
|
||||
|
||||
|
@ -221,21 +144,21 @@ msgstr ""
|
|||
msgid "An arbitrary SQL string"
|
||||
msgstr ""
|
||||
|
||||
#: ../plugin/mysql/db-mysql.c:68 ../plugin/pg/db-pg.c:85
|
||||
#: ../plugin/mysql/db-mysql.c:68 ../plugin/pg/db-pg.c:111
|
||||
#, c-format
|
||||
msgid "Can't allocate the needed memory"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-iterator.c:998
|
||||
#: ../db/db-iterator.c:1056
|
||||
msgid "The mode in which the iterator is working"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-iterator.c:1005
|
||||
#: ../db/db-iterator.c:1063
|
||||
#, fuzzy
|
||||
msgid "Remember selection"
|
||||
msgstr "Recordar"
|
||||
|
||||
#: ../db/db-iterator.c:1006
|
||||
#: ../db/db-iterator.c:1064
|
||||
msgid "Wether to rememeber the selection when model is refreshed"
|
||||
msgstr ""
|
||||
|
||||
|
@ -334,7 +257,7 @@ msgstr ""
|
|||
msgid "The user provided data for the function"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:488
|
||||
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:516
|
||||
msgid "Column"
|
||||
msgstr ""
|
||||
|
||||
|
@ -342,7 +265,7 @@ msgstr ""
|
|||
msgid "A column to apply the operations over it"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-param.c:251 ../vn/vn-grid.c:491 ../vn/vn-field.c:532
|
||||
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532
|
||||
msgid "Iterator"
|
||||
msgstr ""
|
||||
|
||||
|
@ -556,12 +479,12 @@ msgstr ""
|
|||
msgid "The application handler for the entire program"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-grid.c:492
|
||||
#: ../vn/vn-grid.c:520
|
||||
msgid "The iterator used by VnGrid"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-handler.c:65
|
||||
msgid "Are you sure you want to delete the selected record?"
|
||||
msgid "Are you sure you want to delete the current selection?"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-handler.c:90
|
||||
|
@ -657,11 +580,11 @@ msgstr ""
|
|||
msgid "Bad connection settings, please check it."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-login.c:481
|
||||
#: ../vn/vn-login.c:493
|
||||
msgid "Application id"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-login.c:482
|
||||
#: ../vn/vn-login.c:494
|
||||
msgid "The application identifier"
|
||||
msgstr ""
|
||||
|
||||
|
@ -669,8 +592,8 @@ msgstr ""
|
|||
msgid "The current value of the field"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:95
|
||||
#: ../glade/glade-db-iterator.c:117
|
||||
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71
|
||||
#: ../glade/glade-db-iterator.c:116
|
||||
msgid "Parameter"
|
||||
msgstr ""
|
||||
|
||||
|
@ -694,29 +617,37 @@ msgstr ""
|
|||
msgid "Whether the field value can be of type GVN_TYPE_NULL"
|
||||
msgstr ""
|
||||
|
||||
#: ../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:226
|
||||
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:363
|
||||
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
|
||||
msgid "Format"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:115
|
||||
#: ../vn/column/vn-column-entry.c:123
|
||||
msgid "The format string describing the output of the entry."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:246
|
||||
msgid "Digits"
|
||||
msgstr ""
|
||||
|
||||
#: ../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:227
|
||||
#: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:247
|
||||
msgid "The number of decimal places to display."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:329
|
||||
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:333
|
||||
msgid "Index column"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:330
|
||||
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:334
|
||||
msgid "The column index of the model"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:336
|
||||
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:340
|
||||
msgid "Show column"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:337
|
||||
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:341
|
||||
msgid "The column of the model shown by combo"
|
||||
msgstr ""
|
||||
|
||||
|
@ -728,13 +659,35 @@ msgstr ""
|
|||
msgid "The name of the field used for the search"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:71
|
||||
#, c-format
|
||||
msgid "%s, %u %s %u"
|
||||
#: ../vn/field/vn-date-chooser.c:319
|
||||
msgid "Change date"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:280
|
||||
msgid "Change date"
|
||||
#: ../vn/field/vn-date-chooser.c:364
|
||||
msgid "The date format string describing the order of the elements."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:365
|
||||
msgctxt "Default date format string"
|
||||
msgid "%a, %d %b %Y"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:371
|
||||
msgid "Show time"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:372
|
||||
msgid ""
|
||||
"Whether to show the hour, minute and second fields to set the time of the "
|
||||
"day in the popup."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:380
|
||||
msgid "Show date"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:381
|
||||
msgid "Whether to show the calendar to set the date in the popup."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-image.c:133
|
||||
|
@ -795,43 +748,43 @@ msgstr ""
|
|||
msgid "Order in which the tab selects the columns for edition"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:218
|
||||
#: ../vn/column/vn-column-spin.c:238
|
||||
msgid "Climb rate"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:219
|
||||
#: ../vn/column/vn-column-spin.c:239
|
||||
msgid "The acceleration rate when you hold down a button."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:234
|
||||
#: ../vn/column/vn-column-spin.c:254
|
||||
msgid "Minimum value"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:235
|
||||
msgid "The minimum value of the adjustment."
|
||||
#: ../vn/column/vn-column-spin.c:255
|
||||
msgid "The minimum value of the internal adjustment."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:242
|
||||
#: ../vn/column/vn-column-spin.c:262
|
||||
msgid "Maximum value"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:243
|
||||
msgid "The maximum value of the adjustment."
|
||||
#: ../vn/column/vn-column-spin.c:263
|
||||
msgid "The maximum value of the internal adjustment."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:250
|
||||
#: ../vn/column/vn-column-spin.c:270
|
||||
msgid "Step Increment"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:251
|
||||
msgid "The step increment of the adjustment"
|
||||
#: ../vn/column/vn-column-spin.c:271
|
||||
msgid "The step increment of the internal adjustment"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-combo.c:343
|
||||
#: ../vn/column/vn-column-combo.c:347
|
||||
msgid "Sort column"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-combo.c:344
|
||||
#: ../vn/column/vn-column-combo.c:348
|
||||
msgid "The field number of the Grid model used to sort the column"
|
||||
msgstr ""
|
||||
|
||||
|
@ -903,6 +856,10 @@ msgid "Password:"
|
|||
msgstr "Contrasenya:"
|
||||
|
||||
#: ../vn/gui/login.glade.h:10
|
||||
msgid "Press here to see the password"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/gui/login.glade.h:11
|
||||
msgid "Remember"
|
||||
msgstr "Recordar"
|
||||
|
||||
|
@ -1002,6 +959,14 @@ msgctxt "View menu option"
|
|||
msgid "Tool_bar"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/gui/date-chooser.glade.h:1
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/gui/date-chooser.glade.h:2
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-model.c:37
|
||||
msgid "New SQL statement"
|
||||
msgstr ""
|
||||
|
@ -1026,7 +991,7 @@ msgstr ""
|
|||
msgid "You need to create at least one GvnParam or derived object"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-model.c:452
|
||||
#: ../glade/glade-db-model.c:480
|
||||
msgid "<b>Add or remove links</b>"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1058,24 +1023,24 @@ msgstr ""
|
|||
msgid "Edit Model"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:97
|
||||
#: ../glade/glade-db-iterator.c:73
|
||||
msgid "Properties"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:125
|
||||
#: ../glade/glade-db-iterator.c:124
|
||||
msgid "Iterator Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:133
|
||||
#: ../glade/glade-db-iterator.c:132
|
||||
msgid "The model must have \"SQL\" set and \"Use file\" set to 'No'."
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:144
|
||||
#: ../glade/glade-db-iterator.c:143
|
||||
#, c-format
|
||||
msgid "%s can't have children before automatic generation."
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:155
|
||||
#: ../glade/glade-db-iterator.c:154
|
||||
#, c-format
|
||||
msgid "%s must have \"Model\" set. %s"
|
||||
msgstr ""
|
||||
|
@ -1127,11 +1092,11 @@ msgstr ""
|
|||
msgid "Immediate changes"
|
||||
msgstr ""
|
||||
|
||||
#: ../module/src/vn-consulter.c:215
|
||||
#: ../module/src/vn-consulter.c:234
|
||||
msgid "Type or select a query"
|
||||
msgstr ""
|
||||
|
||||
#: ../module/src/vn-consulter.c:217
|
||||
#: ../module/src/vn-consulter.c:236
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
||||
|
|
309
po/es.po
309
po/es.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: hedera 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-12 12:39+0100\n"
|
||||
"POT-Creation-Date: 2014-03-27 13:39+0100\n"
|
||||
"PO-Revision-Date: 2013-06-04 13:36+0200\n"
|
||||
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
|
||||
"Language-Team: Spanish\n"
|
||||
|
@ -18,91 +18,6 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. *
|
||||
#. * SECTION: gvn-misc
|
||||
#. * @Short_description: Miscelaneous utility functions
|
||||
#. * @Title: Miscelaneous utility functions
|
||||
#. *
|
||||
#: ../gvn/gvn-misc.c:27 ../gvn/gvn-misc.c:31
|
||||
msgid "Err"
|
||||
msgstr "Err"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Mon"
|
||||
msgstr "Lun"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Tue"
|
||||
msgstr "Mar"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Wed"
|
||||
msgstr "Mie"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Thu"
|
||||
msgstr "Jue"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Fri"
|
||||
msgstr "Vie"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Sat"
|
||||
msgstr "Sa"
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Sun"
|
||||
msgstr "Dom"
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Jan"
|
||||
msgstr "Ene"
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Feb"
|
||||
msgstr "Feb"
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Mar"
|
||||
msgstr "Mar"
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Apr"
|
||||
msgstr "Abr"
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "May"
|
||||
msgstr "May"
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Jun"
|
||||
msgstr "Jun"
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Jul"
|
||||
msgstr "Jul"
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Aug"
|
||||
msgstr "Ago"
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Sep"
|
||||
msgstr "Sep"
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Oct"
|
||||
msgstr "Oct"
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Nov"
|
||||
msgstr "Nov"
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Dec"
|
||||
msgstr "Dic"
|
||||
|
||||
#: ../gvn/gvn-param-spec.c:263
|
||||
#, c-format
|
||||
msgid "Param not editable"
|
||||
|
@ -134,7 +49,7 @@ msgstr "Maestro"
|
|||
msgid "The master GvnParam of this parameter"
|
||||
msgstr "El GvnParam maestro de este parámetro"
|
||||
|
||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:997
|
||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1055
|
||||
msgid "Mode"
|
||||
msgstr "Modo"
|
||||
|
||||
|
@ -190,11 +105,19 @@ msgstr "Valor por defecto"
|
|||
msgid "The default value"
|
||||
msgstr "El valor por defecto"
|
||||
|
||||
#: ../gvn/gvn-value.c:434
|
||||
#: ../gvn/gvn-value.c:431
|
||||
#, c-format
|
||||
msgid "Attempting to compare invalid types: %s\n"
|
||||
msgstr "Se ha intentado comparar tipos incompatibles: %s\n"
|
||||
|
||||
#: ../gvn/gvn-value.c:540
|
||||
msgid "Yes"
|
||||
msgstr "Sí"
|
||||
|
||||
#: ../gvn/gvn-value.c:540
|
||||
msgid "No"
|
||||
msgstr "No"
|
||||
|
||||
#: ../sql/sql-render.c:413
|
||||
msgid "Delimiter"
|
||||
msgstr "Delimitador"
|
||||
|
@ -203,7 +126,7 @@ msgstr "Delimitador"
|
|||
msgid "The character used for delimite the name of fields, tables..."
|
||||
msgstr "El carácter usado para delimitar los nombres de campos, tablas..."
|
||||
|
||||
#: ../sql/sql-value.c:228 ../glade/glade-db-model.c:497
|
||||
#: ../sql/sql-value.c:228 ../glade/glade-db-model.c:525
|
||||
msgid "Param"
|
||||
msgstr "Parámetro"
|
||||
|
||||
|
@ -223,20 +146,20 @@ msgstr "SQL"
|
|||
msgid "An arbitrary SQL string"
|
||||
msgstr "Una cadena SQL arbitraria"
|
||||
|
||||
#: ../plugin/mysql/db-mysql.c:68 ../plugin/pg/db-pg.c:85
|
||||
#: ../plugin/mysql/db-mysql.c:68 ../plugin/pg/db-pg.c:111
|
||||
#, c-format
|
||||
msgid "Can't allocate the needed memory"
|
||||
msgstr "No es posible asignar la memoria necesaria"
|
||||
|
||||
#: ../db/db-iterator.c:998
|
||||
#: ../db/db-iterator.c:1056
|
||||
msgid "The mode in which the iterator is working"
|
||||
msgstr "El modo en el que está trabajando el Iterator"
|
||||
|
||||
#: ../db/db-iterator.c:1005
|
||||
#: ../db/db-iterator.c:1063
|
||||
msgid "Remember selection"
|
||||
msgstr "Recordar fila seleccionada"
|
||||
|
||||
#: ../db/db-iterator.c:1006
|
||||
#: ../db/db-iterator.c:1064
|
||||
msgid "Wether to rememeber the selection when model is refreshed"
|
||||
msgstr ""
|
||||
"Si se recordará o no la fila seleccionado cuando se refresque el modelo"
|
||||
|
@ -342,7 +265,7 @@ msgstr "Datos"
|
|||
msgid "The user provided data for the function"
|
||||
msgstr "Datos proporcionados por el usuario"
|
||||
|
||||
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:488
|
||||
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:516
|
||||
msgid "Column"
|
||||
msgstr "Columna"
|
||||
|
||||
|
@ -350,7 +273,7 @@ msgstr "Columna"
|
|||
msgid "A column to apply the operations over it"
|
||||
msgstr "Una columna sobre la que se aplicarán las operaciones"
|
||||
|
||||
#: ../db/db-param.c:251 ../vn/vn-grid.c:491 ../vn/vn-field.c:532
|
||||
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532
|
||||
msgid "Iterator"
|
||||
msgstr "Iterator"
|
||||
|
||||
|
@ -568,12 +491,12 @@ msgstr "Aplicación"
|
|||
msgid "The application handler for the entire program"
|
||||
msgstr "El manejador de la aplicación para todo el programa"
|
||||
|
||||
#: ../vn/vn-grid.c:492
|
||||
#: ../vn/vn-grid.c:520
|
||||
msgid "The iterator used by VnGrid"
|
||||
msgstr "El Iterator empleado por VnGrid"
|
||||
|
||||
#: ../vn/vn-handler.c:65
|
||||
msgid "Are you sure you want to delete the selected record?"
|
||||
msgid "Are you sure you want to delete the current selection?"
|
||||
msgstr "¿Estás seguro de que quieres eliminar los registros seleccionados?"
|
||||
|
||||
#: ../vn/vn-handler.c:90
|
||||
|
@ -669,11 +592,11 @@ msgstr "Error de acceso"
|
|||
msgid "Bad connection settings, please check it."
|
||||
msgstr "Los parámetros de la conexión son incorrectos, compruébelos por favor."
|
||||
|
||||
#: ../vn/vn-login.c:481
|
||||
#: ../vn/vn-login.c:493
|
||||
msgid "Application id"
|
||||
msgstr "Id de la aplicación"
|
||||
|
||||
#: ../vn/vn-login.c:482
|
||||
#: ../vn/vn-login.c:494
|
||||
msgid "The application identifier"
|
||||
msgstr "El identificador de la aplicación"
|
||||
|
||||
|
@ -681,8 +604,8 @@ msgstr "El identificador de la aplicación"
|
|||
msgid "The current value of the field"
|
||||
msgstr "El valor actual del campo"
|
||||
|
||||
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:95
|
||||
#: ../glade/glade-db-iterator.c:117
|
||||
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71
|
||||
#: ../glade/glade-db-iterator.c:116
|
||||
msgid "Parameter"
|
||||
msgstr "Parámetro"
|
||||
|
||||
|
@ -706,29 +629,37 @@ msgstr "Si el valor de campo puede ser editado por el usuario"
|
|||
msgid "Whether the field value can be of type 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/column/vn-column-entry.c:119 ../vn/column/vn-column-spin.c:226
|
||||
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:363
|
||||
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
|
||||
msgid "Format"
|
||||
msgstr "Formato"
|
||||
|
||||
#: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:115
|
||||
#: ../vn/column/vn-column-entry.c:123
|
||||
msgid "The format string describing the output of the entry."
|
||||
msgstr "La cadena de formato que describe la salida del campo de texto."
|
||||
|
||||
#: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:246
|
||||
msgid "Digits"
|
||||
msgstr "Dígitos"
|
||||
|
||||
#: ../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:227
|
||||
#: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:247
|
||||
msgid "The number of decimal places to display."
|
||||
msgstr "El número de posiciones decimales que se muestran"
|
||||
|
||||
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:329
|
||||
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:333
|
||||
msgid "Index column"
|
||||
msgstr "Columna índice"
|
||||
|
||||
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:330
|
||||
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:334
|
||||
msgid "The column index of the model"
|
||||
msgstr "La columna índice del modelo"
|
||||
|
||||
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:336
|
||||
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:340
|
||||
msgid "Show column"
|
||||
msgstr "Columna visible"
|
||||
|
||||
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:337
|
||||
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:341
|
||||
msgid "The column of the model shown by combo"
|
||||
msgstr "La columna del modelo que se mostrará en el combo"
|
||||
|
||||
|
@ -740,15 +671,40 @@ msgstr "Campo"
|
|||
msgid "The name of the field used for the search"
|
||||
msgstr "El nombre del campo usado para la búsqueda"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:71
|
||||
#, c-format
|
||||
msgid "%s, %u %s %u"
|
||||
msgstr "%s, %u %s %u"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:280
|
||||
#: ../vn/field/vn-date-chooser.c:319
|
||||
msgid "Change date"
|
||||
msgstr "Cambiar fecha"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:364
|
||||
msgid "The date format string describing the order of the elements."
|
||||
msgstr ""
|
||||
"La cadena de formato de fechas que describe la salida del campo de texto."
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:365
|
||||
msgctxt "Default date format string"
|
||||
msgid "%a, %d %b %Y"
|
||||
msgstr "%a, %d %b %Y"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:371
|
||||
msgid "Show time"
|
||||
msgstr "Mostrar tiempo"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:372
|
||||
msgid ""
|
||||
"Whether to show the hour, minute and second fields to set the time of the "
|
||||
"day in the popup."
|
||||
msgstr ""
|
||||
"Si se muestran los campos para hora, minuto y segundo para indicar el "
|
||||
"instante del día en el emergente"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:380
|
||||
msgid "Show date"
|
||||
msgstr "Mostrar fecha"
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:381
|
||||
msgid "Whether to show the calendar to set the date in the popup."
|
||||
msgstr "Si se debe mostrar el calendario para poner la fecha en el emergente."
|
||||
|
||||
#: ../vn/field/vn-image.c:133
|
||||
msgid "Select the image"
|
||||
msgstr "Selecciona la imagen"
|
||||
|
@ -807,43 +763,43 @@ msgstr "Tab index"
|
|||
msgid "Order in which the tab selects the columns for edition"
|
||||
msgstr "Orden en el cual el tabulador selecciona las columnas para editar"
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:218
|
||||
#: ../vn/column/vn-column-spin.c:238
|
||||
msgid "Climb rate"
|
||||
msgstr "Tasa de subida"
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:219
|
||||
#: ../vn/column/vn-column-spin.c:239
|
||||
msgid "The acceleration rate when you hold down a button."
|
||||
msgstr "La tasa de aceleración cuando se mantiene apretado el botón."
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:234
|
||||
#: ../vn/column/vn-column-spin.c:254
|
||||
msgid "Minimum value"
|
||||
msgstr "Valor mínimo"
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:235
|
||||
msgid "The minimum value of the adjustment."
|
||||
msgstr "Valor mínimo del ajuste."
|
||||
#: ../vn/column/vn-column-spin.c:255
|
||||
msgid "The minimum value of the internal adjustment."
|
||||
msgstr "Valor mínimo del ajuste interno."
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:242
|
||||
#: ../vn/column/vn-column-spin.c:262
|
||||
msgid "Maximum value"
|
||||
msgstr "Valor máximo"
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:243
|
||||
msgid "The maximum value of the adjustment."
|
||||
msgstr "Valor máximo del ajuste"
|
||||
#: ../vn/column/vn-column-spin.c:263
|
||||
msgid "The maximum value of the internal adjustment."
|
||||
msgstr "Valor máximo del ajuste interno."
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:250
|
||||
#: ../vn/column/vn-column-spin.c:270
|
||||
msgid "Step Increment"
|
||||
msgstr "Incremento del paso"
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:251
|
||||
msgid "The step increment of the adjustment"
|
||||
msgstr "El incremento del paso del ajuste"
|
||||
#: ../vn/column/vn-column-spin.c:271
|
||||
msgid "The step increment of the internal adjustment"
|
||||
msgstr "El incremento del paso del ajuste interno"
|
||||
|
||||
#: ../vn/column/vn-column-combo.c:343
|
||||
#: ../vn/column/vn-column-combo.c:347
|
||||
msgid "Sort column"
|
||||
msgstr "Columna de ordenación"
|
||||
|
||||
#: ../vn/column/vn-column-combo.c:344
|
||||
#: ../vn/column/vn-column-combo.c:348
|
||||
msgid "The field number of the Grid model used to sort the column"
|
||||
msgstr ""
|
||||
"El número de campo del modelo del Grid que se usa para ordenar la columna"
|
||||
|
@ -921,6 +877,10 @@ msgid "Password:"
|
|||
msgstr "Clave:"
|
||||
|
||||
#: ../vn/gui/login.glade.h:10
|
||||
msgid "Press here to see the password"
|
||||
msgstr "Presiona para ver la contraseña"
|
||||
|
||||
#: ../vn/gui/login.glade.h:11
|
||||
msgid "Remember"
|
||||
msgstr "Recordar"
|
||||
|
||||
|
@ -1034,6 +994,14 @@ msgctxt "View menu option"
|
|||
msgid "Tool_bar"
|
||||
msgstr "_Barra de herramientas"
|
||||
|
||||
#: ../vn/gui/date-chooser.glade.h:1
|
||||
msgid "Now"
|
||||
msgstr "Ahora"
|
||||
|
||||
#: ../vn/gui/date-chooser.glade.h:2
|
||||
msgid "Clear"
|
||||
msgstr "Limpiar"
|
||||
|
||||
#: ../glade/glade-db-model.c:37
|
||||
msgid "New SQL statement"
|
||||
msgstr "Nueva consulta SQL"
|
||||
|
@ -1058,7 +1026,7 @@ msgstr "Eligir un parametro de una lista"
|
|||
msgid "You need to create at least one GvnParam or derived object"
|
||||
msgstr "Necesitas crear por lo menos un GvnParam o algun objeto derivado"
|
||||
|
||||
#: ../glade/glade-db-model.c:452
|
||||
#: ../glade/glade-db-model.c:480
|
||||
msgid "<b>Add or remove links</b>"
|
||||
msgstr "<b>Añadir o quitar enlaces</b>"
|
||||
|
||||
|
@ -1090,24 +1058,24 @@ msgstr "Nuevo Modelo"
|
|||
msgid "Edit Model"
|
||||
msgstr "Editar Modelo"
|
||||
|
||||
#: ../glade/glade-db-iterator.c:97
|
||||
#: ../glade/glade-db-iterator.c:73
|
||||
msgid "Properties"
|
||||
msgstr "Propiedades"
|
||||
|
||||
#: ../glade/glade-db-iterator.c:125
|
||||
#: ../glade/glade-db-iterator.c:124
|
||||
msgid "Iterator Editor"
|
||||
msgstr "Editor del Iterator"
|
||||
|
||||
#: ../glade/glade-db-iterator.c:133
|
||||
#: ../glade/glade-db-iterator.c:132
|
||||
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:144
|
||||
#: ../glade/glade-db-iterator.c:143
|
||||
#, 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:155
|
||||
#: ../glade/glade-db-iterator.c:154
|
||||
#, c-format
|
||||
msgid "%s must have \"Model\" set. %s"
|
||||
msgstr "%s debe tener \"Modelo\" asignado. %s"
|
||||
|
@ -1162,10 +1130,73 @@ msgstr "Consulta:"
|
|||
msgid "Immediate changes"
|
||||
msgstr "Cambios inmediatos"
|
||||
|
||||
#: ../module/src/vn-consulter.c:215
|
||||
#: ../module/src/vn-consulter.c:234
|
||||
msgid "Type or select a query"
|
||||
msgstr "Escribe o elige una consulta"
|
||||
|
||||
#: ../module/src/vn-consulter.c:217
|
||||
#: ../module/src/vn-consulter.c:236
|
||||
msgid "Message"
|
||||
msgstr "Mensaje"
|
||||
|
||||
#~ msgid "Err"
|
||||
#~ msgstr "Err"
|
||||
|
||||
#~ msgid "Mon"
|
||||
#~ msgstr "Lun"
|
||||
|
||||
#~ msgid "Tue"
|
||||
#~ msgstr "Mar"
|
||||
|
||||
#~ msgid "Wed"
|
||||
#~ msgstr "Mie"
|
||||
|
||||
#~ msgid "Thu"
|
||||
#~ msgstr "Jue"
|
||||
|
||||
#~ msgid "Fri"
|
||||
#~ msgstr "Vie"
|
||||
|
||||
#~ msgid "Sat"
|
||||
#~ msgstr "Sa"
|
||||
|
||||
#~ msgid "Sun"
|
||||
#~ msgstr "Dom"
|
||||
|
||||
#~ msgid "Jan"
|
||||
#~ msgstr "Ene"
|
||||
|
||||
#~ msgid "Feb"
|
||||
#~ msgstr "Feb"
|
||||
|
||||
#~ msgid "Mar"
|
||||
#~ msgstr "Mar"
|
||||
|
||||
#~ msgid "Apr"
|
||||
#~ msgstr "Abr"
|
||||
|
||||
#~ msgid "May"
|
||||
#~ msgstr "May"
|
||||
|
||||
#~ msgid "Jun"
|
||||
#~ msgstr "Jun"
|
||||
|
||||
#~ msgid "Jul"
|
||||
#~ msgstr "Jul"
|
||||
|
||||
#~ msgid "Aug"
|
||||
#~ msgstr "Ago"
|
||||
|
||||
#~ msgid "Sep"
|
||||
#~ msgstr "Sep"
|
||||
|
||||
#~ msgid "Oct"
|
||||
#~ msgstr "Oct"
|
||||
|
||||
#~ msgid "Nov"
|
||||
#~ msgstr "Nov"
|
||||
|
||||
#~ msgid "Dec"
|
||||
#~ msgstr "Dic"
|
||||
|
||||
#~ msgid "%s, %u %s %u"
|
||||
#~ msgstr "%s, %u %s %u"
|
||||
|
|
235
po/nl.po
235
po/nl.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: hedera 1.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2014-02-12 12:39+0100\n"
|
||||
"POT-Creation-Date: 2014-03-27 13:39+0100\n"
|
||||
"PO-Revision-Date: 2012-10-09 11:38+0200\n"
|
||||
"Last-Translator: Alejandro T. Colombini Gómez <atcolombini@verdnatura.es>\n"
|
||||
"Language-Team: Dutch\n"
|
||||
|
@ -18,91 +18,6 @@ msgstr ""
|
|||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#. *
|
||||
#. * SECTION: gvn-misc
|
||||
#. * @Short_description: Miscelaneous utility functions
|
||||
#. * @Title: Miscelaneous utility functions
|
||||
#. *
|
||||
#: ../gvn/gvn-misc.c:27 ../gvn/gvn-misc.c:31
|
||||
msgid "Err"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Mon"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Tue"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Wed"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Thu"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Fri"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Sat"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:28
|
||||
msgid "Sun"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Jan"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Feb"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Mar"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Apr"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "May"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:32
|
||||
msgid "Jun"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Jul"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Aug"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Sep"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Oct"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Nov"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-misc.c:33
|
||||
msgid "Dec"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-param-spec.c:263
|
||||
#, c-format
|
||||
msgid "Param not editable"
|
||||
|
@ -134,7 +49,7 @@ msgstr ""
|
|||
msgid "The master GvnParam of this parameter"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:997
|
||||
#: ../gvn/gvn-param.c:457 ../db/db-iterator.c:1055
|
||||
msgid "Mode"
|
||||
msgstr ""
|
||||
|
||||
|
@ -190,11 +105,19 @@ msgstr ""
|
|||
msgid "The default value"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-value.c:434
|
||||
#: ../gvn/gvn-value.c:431
|
||||
#, c-format
|
||||
msgid "Attempting to compare invalid types: %s\n"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-value.c:540
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: ../gvn/gvn-value.c:540
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: ../sql/sql-render.c:413
|
||||
msgid "Delimiter"
|
||||
msgstr ""
|
||||
|
@ -203,7 +126,7 @@ msgstr ""
|
|||
msgid "The character used for delimite the name of fields, tables..."
|
||||
msgstr ""
|
||||
|
||||
#: ../sql/sql-value.c:228 ../glade/glade-db-model.c:497
|
||||
#: ../sql/sql-value.c:228 ../glade/glade-db-model.c:525
|
||||
msgid "Param"
|
||||
msgstr ""
|
||||
|
||||
|
@ -223,20 +146,20 @@ msgstr ""
|
|||
msgid "An arbitrary SQL string"
|
||||
msgstr ""
|
||||
|
||||
#: ../plugin/mysql/db-mysql.c:68 ../plugin/pg/db-pg.c:85
|
||||
#: ../plugin/mysql/db-mysql.c:68 ../plugin/pg/db-pg.c:111
|
||||
#, c-format
|
||||
msgid "Can't allocate the needed memory"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-iterator.c:998
|
||||
#: ../db/db-iterator.c:1056
|
||||
msgid "The mode in which the iterator is working"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-iterator.c:1005
|
||||
#: ../db/db-iterator.c:1063
|
||||
msgid "Remember selection"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-iterator.c:1006
|
||||
#: ../db/db-iterator.c:1064
|
||||
msgid "Wether to rememeber the selection when model is refreshed"
|
||||
msgstr ""
|
||||
|
||||
|
@ -335,7 +258,7 @@ msgstr ""
|
|||
msgid "The user provided data for the function"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:488
|
||||
#: ../db/db-calc.c:360 ../glade/glade-db-model.c:516
|
||||
msgid "Column"
|
||||
msgstr ""
|
||||
|
||||
|
@ -343,7 +266,7 @@ msgstr ""
|
|||
msgid "A column to apply the operations over it"
|
||||
msgstr ""
|
||||
|
||||
#: ../db/db-param.c:251 ../vn/vn-grid.c:491 ../vn/vn-field.c:532
|
||||
#: ../db/db-param.c:251 ../vn/vn-grid.c:519 ../vn/vn-field.c:532
|
||||
msgid "Iterator"
|
||||
msgstr ""
|
||||
|
||||
|
@ -557,12 +480,12 @@ msgstr ""
|
|||
msgid "The application handler for the entire program"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-grid.c:492
|
||||
#: ../vn/vn-grid.c:520
|
||||
msgid "The iterator used by VnGrid"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-handler.c:65
|
||||
msgid "Are you sure you want to delete the selected record?"
|
||||
msgid "Are you sure you want to delete the current selection?"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-handler.c:90
|
||||
|
@ -658,11 +581,11 @@ msgstr ""
|
|||
msgid "Bad connection settings, please check it."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-login.c:481
|
||||
#: ../vn/vn-login.c:493
|
||||
msgid "Application id"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-login.c:482
|
||||
#: ../vn/vn-login.c:494
|
||||
msgid "The application identifier"
|
||||
msgstr ""
|
||||
|
||||
|
@ -670,8 +593,8 @@ msgstr ""
|
|||
msgid "The current value of the field"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:95
|
||||
#: ../glade/glade-db-iterator.c:117
|
||||
#: ../vn/vn-field.c:525 ../glade/glade-db-iterator.c:71
|
||||
#: ../glade/glade-db-iterator.c:116
|
||||
msgid "Parameter"
|
||||
msgstr ""
|
||||
|
||||
|
@ -695,29 +618,37 @@ msgstr ""
|
|||
msgid "Whether the field value can be of type GVN_TYPE_NULL"
|
||||
msgstr ""
|
||||
|
||||
#: ../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:226
|
||||
#: ../vn/field/vn-entry.c:156 ../vn/field/vn-date-chooser.c:363
|
||||
#: ../vn/field/vn-label.c:114 ../vn/column/vn-column-entry.c:122
|
||||
msgid "Format"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-entry.c:157 ../vn/field/vn-label.c:115
|
||||
#: ../vn/column/vn-column-entry.c:123
|
||||
msgid "The format string describing the output of the entry."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-spin.c:171 ../vn/column/vn-column-spin.c:246
|
||||
msgid "Digits"
|
||||
msgstr ""
|
||||
|
||||
#: ../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:227
|
||||
#: ../vn/field/vn-spin.c:172 ../vn/column/vn-column-spin.c:247
|
||||
msgid "The number of decimal places to display."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:329
|
||||
#: ../vn/field/vn-combo.c:286 ../vn/column/vn-column-combo.c:333
|
||||
msgid "Index column"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:330
|
||||
#: ../vn/field/vn-combo.c:287 ../vn/column/vn-column-combo.c:334
|
||||
msgid "The column index of the model"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:336
|
||||
#: ../vn/field/vn-combo.c:293 ../vn/column/vn-column-combo.c:340
|
||||
msgid "Show column"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:337
|
||||
#: ../vn/field/vn-combo.c:294 ../vn/column/vn-column-combo.c:341
|
||||
msgid "The column of the model shown by combo"
|
||||
msgstr ""
|
||||
|
||||
|
@ -729,13 +660,35 @@ msgstr ""
|
|||
msgid "The name of the field used for the search"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:71
|
||||
#, c-format
|
||||
msgid "%s, %u %s %u"
|
||||
#: ../vn/field/vn-date-chooser.c:319
|
||||
msgid "Change date"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:280
|
||||
msgid "Change date"
|
||||
#: ../vn/field/vn-date-chooser.c:364
|
||||
msgid "The date format string describing the order of the elements."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:365
|
||||
msgctxt "Default date format string"
|
||||
msgid "%a, %d %b %Y"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:371
|
||||
msgid "Show time"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:372
|
||||
msgid ""
|
||||
"Whether to show the hour, minute and second fields to set the time of the "
|
||||
"day in the popup."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:380
|
||||
msgid "Show date"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-date-chooser.c:381
|
||||
msgid "Whether to show the calendar to set the date in the popup."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/field/vn-image.c:133
|
||||
|
@ -796,43 +749,43 @@ msgstr ""
|
|||
msgid "Order in which the tab selects the columns for edition"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:218
|
||||
#: ../vn/column/vn-column-spin.c:238
|
||||
msgid "Climb rate"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:219
|
||||
#: ../vn/column/vn-column-spin.c:239
|
||||
msgid "The acceleration rate when you hold down a button."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:234
|
||||
#: ../vn/column/vn-column-spin.c:254
|
||||
msgid "Minimum value"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:235
|
||||
msgid "The minimum value of the adjustment."
|
||||
#: ../vn/column/vn-column-spin.c:255
|
||||
msgid "The minimum value of the internal adjustment."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:242
|
||||
#: ../vn/column/vn-column-spin.c:262
|
||||
msgid "Maximum value"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:243
|
||||
msgid "The maximum value of the adjustment."
|
||||
#: ../vn/column/vn-column-spin.c:263
|
||||
msgid "The maximum value of the internal adjustment."
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:250
|
||||
#: ../vn/column/vn-column-spin.c:270
|
||||
msgid "Step Increment"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-spin.c:251
|
||||
msgid "The step increment of the adjustment"
|
||||
#: ../vn/column/vn-column-spin.c:271
|
||||
msgid "The step increment of the internal adjustment"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-combo.c:343
|
||||
#: ../vn/column/vn-column-combo.c:347
|
||||
msgid "Sort column"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/column/vn-column-combo.c:344
|
||||
#: ../vn/column/vn-column-combo.c:348
|
||||
msgid "The field number of the Grid model used to sort the column"
|
||||
msgstr ""
|
||||
|
||||
|
@ -903,6 +856,10 @@ msgid "Password:"
|
|||
msgstr ""
|
||||
|
||||
#: ../vn/gui/login.glade.h:10
|
||||
msgid "Press here to see the password"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/gui/login.glade.h:11
|
||||
msgid "Remember"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1002,6 +959,14 @@ msgctxt "View menu option"
|
|||
msgid "Tool_bar"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/gui/date-chooser.glade.h:1
|
||||
msgid "Now"
|
||||
msgstr ""
|
||||
|
||||
#: ../vn/gui/date-chooser.glade.h:2
|
||||
msgid "Clear"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-model.c:37
|
||||
msgid "New SQL statement"
|
||||
msgstr ""
|
||||
|
@ -1026,7 +991,7 @@ msgstr ""
|
|||
msgid "You need to create at least one GvnParam or derived object"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-model.c:452
|
||||
#: ../glade/glade-db-model.c:480
|
||||
msgid "<b>Add or remove links</b>"
|
||||
msgstr ""
|
||||
|
||||
|
@ -1058,24 +1023,24 @@ msgstr ""
|
|||
msgid "Edit Model"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:97
|
||||
#: ../glade/glade-db-iterator.c:73
|
||||
msgid "Properties"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:125
|
||||
#: ../glade/glade-db-iterator.c:124
|
||||
msgid "Iterator Editor"
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:133
|
||||
#: ../glade/glade-db-iterator.c:132
|
||||
msgid "The model must have \"SQL\" set and \"Use file\" set to 'No'."
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:144
|
||||
#: ../glade/glade-db-iterator.c:143
|
||||
#, c-format
|
||||
msgid "%s can't have children before automatic generation."
|
||||
msgstr ""
|
||||
|
||||
#: ../glade/glade-db-iterator.c:155
|
||||
#: ../glade/glade-db-iterator.c:154
|
||||
#, c-format
|
||||
msgid "%s must have \"Model\" set. %s"
|
||||
msgstr ""
|
||||
|
@ -1127,10 +1092,10 @@ msgstr ""
|
|||
msgid "Immediate changes"
|
||||
msgstr ""
|
||||
|
||||
#: ../module/src/vn-consulter.c:215
|
||||
#: ../module/src/vn-consulter.c:234
|
||||
msgid "Type or select a query"
|
||||
msgstr ""
|
||||
|
||||
#: ../module/src/vn-consulter.c:217
|
||||
#: ../module/src/vn-consulter.c:236
|
||||
msgid "Message"
|
||||
msgstr ""
|
||||
|
|
|
@ -266,16 +266,6 @@ SqlObject * sql_parser_parse (const gchar * sql, GError ** err)
|
|||
return object;
|
||||
}
|
||||
|
||||
/**
|
||||
* sql_parser_parse_field:
|
||||
* @field: a string containing a field name
|
||||
*
|
||||
* Parses a qualified or unqualified SQL field name to an #SqlField object. The
|
||||
* field can be specified using both ` or " as quotes. This object must be
|
||||
* unreferenced using g_object_unref().
|
||||
*
|
||||
* Return value: an #SqlField
|
||||
**/
|
||||
SqlField * sql_parser_parse_field (const gchar * field)
|
||||
{
|
||||
gchar ** split;
|
||||
|
|
|
@ -37,12 +37,14 @@ SqlObject * sql_parser_parse (const gchar * sql, GError ** err) G_GNUC_WARN_UNUS
|
|||
|
||||
/**
|
||||
* sql_parser_parse_field:
|
||||
* @field: a string containing a qualified (or not) SQL field
|
||||
* @field: a string containing a field name
|
||||
*
|
||||
* Parses a qualified SQL field and returns the corresponding @SqlField object.
|
||||
* Parses a qualified or unqualified SQL field name to an #SqlField object. The
|
||||
* field can be specified using both ` or " as quotes. This object must be
|
||||
* unreferenced using g_object_unref().
|
||||
*
|
||||
* Return value: (transfer full): an #SqlField
|
||||
*/
|
||||
**/
|
||||
SqlField * sql_parser_parse_field (const gchar * field);
|
||||
|
||||
#endif
|
|
@ -96,7 +96,7 @@ void sql_string_add_value (SqlString * obj, GType type, gconstpointer content)
|
|||
GValue value = G_VALUE_INIT;
|
||||
SqlExpr * expr;
|
||||
|
||||
gvn_value_new_with_content (&value, type, content);
|
||||
gvn_value_new_with_content (&value, type, (gpointer) content);
|
||||
expr = sql_value_new ();
|
||||
sql_value_set_value (SQL_VALUE (expr), &value);
|
||||
sql_object_list_add (SQL_OBJECT (obj), &obj->params, SQL_OBJECT (expr));
|
||||
|
|
|
@ -45,7 +45,7 @@ static void vn_column_combo_set_value (VnColumnCombo * obj, GtkTreeModel * model
|
|||
*/
|
||||
static void vn_column_combo_restore_focus (VnColumnCombo * obj)
|
||||
{
|
||||
gtk_widget_grab_focus
|
||||
gtk_widget_grab_focus
|
||||
(gtk_tree_view_column_get_tree_view (GTK_TREE_VIEW_COLUMN (obj)));
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,14 @@ static void vn_column_combo_on_editing_started (GtkCellRenderer * cell,
|
|||
|
||||
entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (cell_editable)));
|
||||
|
||||
// Each edition uses a new cell_editable.
|
||||
if (obj->cell_editable)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (obj->cell_editable,
|
||||
vn_column_combo_on_format_entry_text, obj);
|
||||
g_object_unref (obj->cell_editable);
|
||||
}
|
||||
|
||||
if (!obj->completion_ready)
|
||||
{
|
||||
gtk_entry_completion_set_model (obj->completion, obj->tree_model);
|
||||
|
@ -86,18 +94,14 @@ static void vn_column_combo_on_editing_started (GtkCellRenderer * cell,
|
|||
|
||||
g_signal_connect_swapped (cell_editable, "editing-done",
|
||||
G_CALLBACK (vn_column_combo_restore_focus), obj);
|
||||
obj->cell_editable = cell_editable;
|
||||
obj->cell_editable = g_object_ref (cell_editable);
|
||||
}
|
||||
|
||||
gtk_entry_set_completion (entry, obj->completion);
|
||||
|
||||
// Each edition uses a new cell_editable.
|
||||
if (obj->cell_editable)
|
||||
g_signal_handlers_disconnect_by_func (obj->cell_editable,
|
||||
vn_column_combo_on_format_entry_text, obj);
|
||||
|
||||
g_signal_connect (cell_editable, "format-entry-text",
|
||||
G_CALLBACK (vn_column_combo_on_format_entry_text), obj);
|
||||
obj->cell_editable = g_object_ref (cell_editable);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -25,7 +25,7 @@ static void vn_column_entry_cb_edited (GtkCellRendererText * cell,
|
|||
const gchar * path, gchar * text, VnColumnEntry * obj)
|
||||
{
|
||||
GValue value = G_VALUE_INIT;
|
||||
|
||||
|
||||
if (g_strcmp0 (text, ""))
|
||||
{
|
||||
g_value_init (&value, G_TYPE_STRING);
|
||||
|
@ -54,7 +54,7 @@ static void vn_column_entry_set_value (VnColumnEntry * obj, GtkTreeModel * model
|
|||
GtkTreeIter * iter, GObject * cell, const GValue * value)
|
||||
{
|
||||
GValue new_value = G_VALUE_INIT;
|
||||
gvn_value_to_format_string (value, obj->digits, &new_value);
|
||||
gvn_value_to_format_string (value, obj->format, &new_value);
|
||||
g_object_set_property (cell, "text", &new_value);
|
||||
g_value_unset (&new_value);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ static void vn_column_entry_set_value (VnColumnEntry * obj, GtkTreeModel * model
|
|||
|
||||
enum
|
||||
{
|
||||
PROP_DIGITS = 1
|
||||
PROP_FORMAT = 1
|
||||
};
|
||||
|
||||
static void vn_column_entry_set_property (VnColumnEntry * obj, guint id,
|
||||
|
@ -71,8 +71,9 @@ static void vn_column_entry_set_property (VnColumnEntry * obj, guint id,
|
|||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_DIGITS:
|
||||
obj->digits = g_value_get_uint (value);
|
||||
case PROP_FORMAT:
|
||||
g_free (obj->format);
|
||||
obj->format = g_value_dup_string (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
|
@ -84,8 +85,8 @@ static void vn_column_entry_get_property (VnColumnEntry * obj, guint id,
|
|||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_DIGITS:
|
||||
g_value_set_uint (value, obj->digits);
|
||||
case PROP_FORMAT:
|
||||
g_value_set_string (value, obj->format);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
|
@ -98,10 +99,12 @@ static void vn_column_entry_init (VnColumnEntry * obj)
|
|||
{
|
||||
GtkCellRenderer * cell = gtk_cell_renderer_text_new ();
|
||||
VN_COLUMN_GET_CLASS (obj)->set_renderer (VN_COLUMN (obj), cell);
|
||||
obj->format = NULL;
|
||||
}
|
||||
|
||||
static void vn_column_entry_finalize (VnColumnEntry * obj)
|
||||
{
|
||||
g_free (obj->format);
|
||||
G_OBJECT_CLASS (vn_column_entry_parent_class)->finalize (G_OBJECT (obj));
|
||||
}
|
||||
|
||||
|
@ -114,11 +117,11 @@ static void vn_column_entry_class_init (VnColumnEntryClass * klass)
|
|||
VN_COLUMN_CLASS (klass)->set_value = (VnColumnSetValueFunc) vn_column_entry_set_value;
|
||||
VN_COLUMN_CLASS (klass)->set_editable = (VnColumnSetEditableFunc) vn_column_entry_set_editable;
|
||||
|
||||
g_object_class_install_property (k, PROP_DIGITS,
|
||||
g_param_spec_uint ("digits"
|
||||
,_("Digits")
|
||||
,_("The number of decimal places to display.")
|
||||
,0 ,20 ,0
|
||||
g_object_class_install_property (k, PROP_FORMAT,
|
||||
g_param_spec_string ("format"
|
||||
,_("Format")
|
||||
,_("The format string describing the output of the entry.")
|
||||
,NULL
|
||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||
));
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ struct _VnColumnEntry
|
|||
{
|
||||
VnColumn parent;
|
||||
guint digits;
|
||||
gchar * format;
|
||||
};
|
||||
|
||||
struct _VnColumnEntryClass
|
||||
|
|
|
@ -32,18 +32,13 @@ static void vn_column_spin_on_edited (GtkCellRendererSpin * cell,
|
|||
if (g_strcmp0 (text, ""))
|
||||
{
|
||||
gchar * err;
|
||||
gdouble min, max;
|
||||
gdouble val = g_strtod (text, &err);
|
||||
|
||||
if (!err || *err == '\0')
|
||||
{
|
||||
g_object_get (obj->adjustment, "lower", &min, "upper", &max, NULL);
|
||||
gdouble val, min, max;
|
||||
|
||||
if (val < min)
|
||||
val = min;
|
||||
else if (val > max)
|
||||
val = max;
|
||||
|
||||
g_object_get (obj->adjustment, "lower", &min, "upper", &max, NULL);
|
||||
val = CLAMP (g_strtod (text, &err), min, max);
|
||||
g_value_init (&value, G_TYPE_DOUBLE);
|
||||
g_value_set_double (&value, val);
|
||||
g_object_set (obj->adjustment, "value", val, NULL);
|
||||
|
@ -73,19 +68,10 @@ void vn_column_spin_on_editing_started (GtkCellRenderer * renderer,
|
|||
|
||||
if (gtk_tree_model_get_iter_from_string (model, &iter, path))
|
||||
{
|
||||
gint i = 0;
|
||||
GList * columns, * n;
|
||||
GValue value;
|
||||
VnColumn * column = VN_COLUMN (obj);
|
||||
GValue value = G_VALUE_INIT;
|
||||
gint col = vn_column_get_column_index (VN_COLUMN (obj));
|
||||
|
||||
columns = gtk_tree_view_get_columns (tree);
|
||||
|
||||
for (n = columns; n; n = n->next, i++)
|
||||
if (n->data == column)
|
||||
break;
|
||||
|
||||
gtk_tree_model_get_value (model, &iter, i, &value);
|
||||
g_list_free (columns);
|
||||
gtk_tree_model_get_value (model, &iter, col, &value);
|
||||
|
||||
if (gvn_value_is_null (&value))
|
||||
gtk_entry_set_text (entry, "");
|
||||
|
@ -115,11 +101,38 @@ static void vn_column_spin_set_editable (VnColumn * obj, gboolean editable)
|
|||
static void vn_column_spin_set_value (VnColumnSpin * obj, GtkTreeModel * model,
|
||||
GtkTreeIter * iter, GObject * cell, const GValue * value)
|
||||
{
|
||||
gint digits;
|
||||
guint digits;
|
||||
GType type = G_VALUE_TYPE (value);
|
||||
GValue new_value = G_VALUE_INIT;
|
||||
|
||||
g_value_init (&new_value, G_TYPE_STRING);
|
||||
g_object_get (cell, "digits", &digits, NULL);
|
||||
gvn_value_to_format_string (value, digits, &new_value);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case G_TYPE_FLOAT:
|
||||
case G_TYPE_DOUBLE:
|
||||
{
|
||||
gdouble dec;
|
||||
gchar buffer [G_ASCII_DTOSTR_BUF_SIZE];
|
||||
|
||||
if (type == G_TYPE_FLOAT)
|
||||
dec = (gdouble) g_value_get_float (value);
|
||||
else
|
||||
dec = g_value_get_double (value);
|
||||
|
||||
g_ascii_formatd (buffer, G_ASCII_DTOSTR_BUF_SIZE, obj->format, dec);
|
||||
g_value_set_string (&new_value, buffer);
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
if (!gvn_value_is_null (value))
|
||||
g_value_transform (value, &new_value);
|
||||
else
|
||||
g_value_set_string (&new_value, "");
|
||||
}
|
||||
|
||||
g_object_set_property (cell, "text", &new_value);
|
||||
g_value_unset (&new_value);
|
||||
}
|
||||
|
@ -144,8 +157,13 @@ static void vn_column_spin_set_property (VnColumnSpin * obj, guint id,
|
|||
g_object_set (VN_COLUMN (obj)->cell, "climb-rate", g_value_get_double (value), NULL);
|
||||
break;
|
||||
case PROP_DIGITS:
|
||||
g_object_set (VN_COLUMN (obj)->cell, "digits", g_value_get_uint (value), NULL);
|
||||
{
|
||||
guint digits = g_value_get_uint (value);
|
||||
g_object_set (VN_COLUMN (obj)->cell, "digits", digits, NULL);
|
||||
g_free (obj->format);
|
||||
obj->format = g_strdup_printf ("%%.%df", digits);
|
||||
break;
|
||||
}
|
||||
case PROP_LOWER:
|
||||
g_object_set (obj->adjustment, "lower", g_value_get_double (value), NULL);
|
||||
break;
|
||||
|
@ -195,6 +213,8 @@ static void vn_column_spin_init (VnColumnSpin * obj)
|
|||
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);
|
||||
|
||||
obj->format = NULL;
|
||||
|
||||
VN_COLUMN_GET_CLASS (obj)->set_renderer (VN_COLUMN (obj), cell);
|
||||
}
|
||||
|
||||
|
@ -232,7 +252,7 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
|
|||
g_object_class_install_property (k, PROP_LOWER,
|
||||
g_param_spec_double ("lower"
|
||||
,_("Minimum value")
|
||||
,_("The minimum value of the adjustment.")
|
||||
,_("The minimum value of the internal adjustment.")
|
||||
,-G_MAXDOUBLE ,G_MAXDOUBLE ,0.0
|
||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||
));
|
||||
|
@ -240,15 +260,15 @@ static void vn_column_spin_class_init (VnColumnSpinClass * klass)
|
|||
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 , 0.0
|
||||
,_("The maximum value of the internal adjustment.")
|
||||
,-G_MAXDOUBLE ,G_MAXDOUBLE ,0.0
|
||||
,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")
|
||||
,_("The step increment of the internal adjustment")
|
||||
,0.00000000000000000001 ,10000000000.0 ,1.0
|
||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||
));
|
||||
|
|
|
@ -11,7 +11,8 @@ field_include_HEADERS = \
|
|||
vn-image.h \
|
||||
vn-completion.h \
|
||||
vn-date-chooser.h \
|
||||
vn-http-image.h
|
||||
vn-http-image.h \
|
||||
vn-label.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-D_IMAGE_DIR=\"$(vn_imagedir)\" \
|
||||
|
@ -28,4 +29,5 @@ libvnfield_la_SOURCES = \
|
|||
vn-image.c \
|
||||
vn-completion.c \
|
||||
vn-date-chooser.c \
|
||||
vn-http-image.c
|
||||
vn-http-image.c \
|
||||
vn-label.c
|
||||
|
|
|
@ -18,6 +18,8 @@
|
|||
#include "vn-date-chooser.h"
|
||||
#include <db/db.h>
|
||||
|
||||
#define DATE_SIZE 50
|
||||
|
||||
/**
|
||||
* SECTION:vn-date-chooser
|
||||
* @Short_description: an embedded popup date selector
|
||||
|
@ -61,21 +63,9 @@ static void vn_date_chooser_changed (VnDateChooser * obj)
|
|||
|
||||
if (g_date_valid (date))
|
||||
{
|
||||
gchar * str;
|
||||
GDateWeekday wday;
|
||||
GDateMonth month;
|
||||
|
||||
month = g_date_get_month (date);
|
||||
wday = g_date_get_weekday (date);
|
||||
|
||||
str = g_strdup_printf (_("%s, %u %s %u")
|
||||
,GVN_ABR_WDAY[wday]
|
||||
,g_date_get_day (date)
|
||||
,GVN_ABR_MONTH[month]
|
||||
,g_date_get_year (date)
|
||||
);
|
||||
gchar str[DATE_SIZE];
|
||||
g_date_strftime (str, DATE_SIZE, obj->format, date);
|
||||
gtk_label_set_text (obj->label, str);
|
||||
g_free (str);
|
||||
}
|
||||
else
|
||||
gtk_label_set_text (obj->label, "");
|
||||
|
@ -262,12 +252,61 @@ static void vn_date_chooser_on_toggled (GtkToggleButton * button, VnDateChooser
|
|||
vn_date_chooser_hide_popup (obj);
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Properties
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_FORMAT = 1
|
||||
,PROP_SHOW_TIME
|
||||
,PROP_SHOW_DATE
|
||||
};
|
||||
|
||||
static void vn_date_chooser_set_property (VnDateChooser * obj, guint id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_FORMAT:
|
||||
g_free (obj->format);
|
||||
obj->format = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_SHOW_TIME:
|
||||
obj->show_time = g_value_get_boolean (value);
|
||||
break;
|
||||
case PROP_SHOW_DATE:
|
||||
obj->show_date = g_value_get_boolean (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void vn_date_chooser_get_property (VnDateChooser * obj, guint id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_FORMAT:
|
||||
g_value_set_string (value, obj->format);
|
||||
break;
|
||||
case PROP_SHOW_TIME:
|
||||
g_value_set_boolean (value, obj->show_time);
|
||||
break;
|
||||
case PROP_SHOW_DATE:
|
||||
g_value_set_boolean (value, obj->show_date);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
||||
|
||||
static void vn_date_chooser_init (VnDateChooser * obj)
|
||||
{
|
||||
GtkWidget * image;
|
||||
|
||||
|
||||
obj->format = NULL;
|
||||
obj->popup = NULL;
|
||||
obj->device = NULL;
|
||||
g_date_clear (&obj->date, 1);
|
||||
|
@ -306,12 +345,41 @@ static void vn_date_chooser_init (VnDateChooser * obj)
|
|||
|
||||
static void vn_date_chooser_finalize (VnDateChooser * obj)
|
||||
{
|
||||
g_free (obj->format);
|
||||
gtk_widget_destroy (obj->popup);
|
||||
G_OBJECT_CLASS (vn_date_chooser_parent_class)->finalize (G_OBJECT (obj));
|
||||
}
|
||||
|
||||
static void vn_date_chooser_class_init (VnDateChooserClass * klass)
|
||||
{
|
||||
G_OBJECT_CLASS (klass)->finalize = (GObjectFinalizeFunc) vn_date_chooser_finalize;
|
||||
GObjectClass * k = G_OBJECT_CLASS (klass);
|
||||
k->finalize = (GObjectFinalizeFunc) vn_date_chooser_finalize;
|
||||
k->set_property = (GObjectSetPropertyFunc) vn_date_chooser_set_property;
|
||||
k->get_property = (GObjectGetPropertyFunc) vn_date_chooser_get_property;
|
||||
VN_FIELD_CLASS (klass)->set_value = (VnFieldSetValueFunc) vn_date_chooser_set_value;
|
||||
|
||||
g_object_class_install_property (k, PROP_FORMAT,
|
||||
g_param_spec_string ("format"
|
||||
,_("Format")
|
||||
,_("The date format string describing the order of the elements.")
|
||||
,C_("Default date format string", "%a, %d %b %Y")
|
||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||
));
|
||||
|
||||
g_object_class_install_property (k, PROP_SHOW_TIME,
|
||||
g_param_spec_boolean ("show-time"
|
||||
,_("Show time")
|
||||
,_("Whether to show the hour, minute and second fields to set"
|
||||
" the time of the day in the popup.")
|
||||
,FALSE
|
||||
,G_PARAM_READWRITE
|
||||
));
|
||||
|
||||
g_object_class_install_property (k, PROP_SHOW_DATE,
|
||||
g_param_spec_boolean ("show-date"
|
||||
,_("Show date")
|
||||
,_("Whether to show the calendar to set the date in the popup.")
|
||||
,TRUE
|
||||
,G_PARAM_READWRITE
|
||||
));
|
||||
}
|
||||
|
|
|
@ -33,6 +33,9 @@ typedef struct _VnDateChooserClass VnDateChooserClass;
|
|||
struct _VnDateChooser
|
||||
{
|
||||
VnField parent;
|
||||
gchar * format;
|
||||
gboolean show_time;
|
||||
gboolean show_date;
|
||||
GtkWidget * box;
|
||||
GtkLabel * label;
|
||||
GtkWidget * popup;
|
||||
|
|
|
@ -69,7 +69,7 @@ static gboolean vn_entry_cb_focus_out (GtkEntry * entry, GdkEvent * event, VnFie
|
|||
static void vn_entry_set_value (VnEntry * obj, const GValue * value)
|
||||
{
|
||||
GValue new_value = G_VALUE_INIT;
|
||||
gvn_value_to_format_string (value, obj->digits, &new_value);
|
||||
gvn_value_to_format_string (value, obj->format, &new_value);
|
||||
|
||||
g_signal_handlers_block_by_func (obj->entry,
|
||||
vn_entry_cb_editing_done, obj);
|
||||
|
@ -91,7 +91,7 @@ static void vn_entry_set_value (VnEntry * obj, const GValue * value)
|
|||
|
||||
enum
|
||||
{
|
||||
PROP_DIGITS = 1
|
||||
PROP_FORMAT = 1
|
||||
};
|
||||
|
||||
static void vn_entry_set_property (VnEntry * obj, guint id,
|
||||
|
@ -99,8 +99,9 @@ static void vn_entry_set_property (VnEntry * obj, guint id,
|
|||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_DIGITS:
|
||||
obj->digits = g_value_get_uint (value);
|
||||
case PROP_FORMAT:
|
||||
g_free (obj->format);
|
||||
obj->format = g_value_dup_string (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
|
@ -109,11 +110,11 @@ static void vn_entry_set_property (VnEntry * obj, guint id,
|
|||
|
||||
static void vn_entry_get_property (VnEntry * obj, guint id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_DIGITS:
|
||||
g_value_set_uint (value, obj->digits);
|
||||
case PROP_FORMAT:
|
||||
g_value_set_string (value, obj->format);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
|
@ -124,6 +125,7 @@ static void vn_entry_get_property (VnEntry * obj, guint id,
|
|||
|
||||
static void vn_entry_init (VnEntry * obj)
|
||||
{
|
||||
obj->format = NULL;
|
||||
obj->entry = GTK_ENTRY (gtk_entry_new ());
|
||||
g_object_connect (obj->entry
|
||||
,"signal::activate", vn_entry_cb_editing_done, obj
|
||||
|
@ -131,12 +133,13 @@ static void vn_entry_init (VnEntry * obj)
|
|||
,NULL
|
||||
);
|
||||
gtk_container_add (GTK_CONTAINER (obj), GTK_WIDGET (obj->entry));
|
||||
|
||||
|
||||
VN_FIELD (obj)->field = GTK_WIDGET (obj->entry);
|
||||
}
|
||||
|
||||
static void vn_entry_finalize (VnEntry * obj)
|
||||
{
|
||||
g_free (obj->format);
|
||||
G_OBJECT_CLASS (vn_entry_parent_class)->finalize (G_OBJECT (obj));
|
||||
}
|
||||
|
||||
|
@ -147,12 +150,12 @@ static void vn_entry_class_init (VnEntryClass * klass)
|
|||
k->get_property = (GObjectGetPropertyFunc) vn_entry_get_property;
|
||||
k->finalize = (GObjectFinalizeFunc) vn_entry_finalize;
|
||||
VN_FIELD_CLASS (klass)->set_value = (VnFieldSetValueFunc) vn_entry_set_value;
|
||||
|
||||
g_object_class_install_property (k, PROP_DIGITS,
|
||||
g_param_spec_uint ("digits"
|
||||
,_("Digits")
|
||||
,_("The number of decimal places to display.")
|
||||
,0 ,20 ,0
|
||||
|
||||
g_object_class_install_property (k, PROP_FORMAT,
|
||||
g_param_spec_string ("format"
|
||||
,_("Format")
|
||||
,_("The format string describing the output of the entry.")
|
||||
,NULL
|
||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||
));
|
||||
}
|
||||
|
|
|
@ -34,8 +34,7 @@ struct _VnEntry
|
|||
{
|
||||
VnField parent;
|
||||
GtkEntry * entry;
|
||||
guint digits;
|
||||
|
||||
gchar * format;
|
||||
};
|
||||
|
||||
struct _VnEntryClass
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* 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-label.h"
|
||||
|
||||
/**
|
||||
* SECTION:vn-label
|
||||
* @Short_description: a text label widget
|
||||
* @Title: VnLabel
|
||||
* @See_also: #VnField
|
||||
*
|
||||
* A label representing a generic value field.
|
||||
*/
|
||||
|
||||
G_DEFINE_TYPE (VnLabel, vn_label, VN_TYPE_FIELD);
|
||||
|
||||
/**
|
||||
* vn_label_new:
|
||||
*
|
||||
* Creates a new #VnLabel
|
||||
*
|
||||
* Return value:a #VnLabel
|
||||
**/
|
||||
VnField * vn_label_new ()
|
||||
{
|
||||
return g_object_new (VN_TYPE_LABEL, NULL);
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Private
|
||||
|
||||
static void vn_label_set_value (VnLabel * obj, const GValue * value)
|
||||
{
|
||||
GValue new_value = G_VALUE_INIT;
|
||||
gvn_value_to_format_string (value, obj->format, &new_value);
|
||||
gtk_label_set_text (obj->label, g_value_get_string (&new_value));
|
||||
g_value_unset (&new_value);
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Properties
|
||||
|
||||
enum
|
||||
{
|
||||
PROP_FORMAT = 1
|
||||
};
|
||||
|
||||
static void vn_label_set_property (VnLabel * obj, guint id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_FORMAT:
|
||||
g_free (obj->format);
|
||||
obj->format = g_value_dup_string (value);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void vn_label_get_property (VnLabel * obj, guint id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case PROP_FORMAT:
|
||||
g_value_set_string (value, obj->format);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Class
|
||||
|
||||
static void vn_label_init (VnLabel * obj)
|
||||
{
|
||||
obj->format = NULL;
|
||||
obj->label = GTK_LABEL (gtk_label_new (""));
|
||||
gtk_container_add (GTK_CONTAINER (obj), GTK_WIDGET (obj->label));
|
||||
|
||||
VN_FIELD (obj)->field = GTK_WIDGET (obj->label);
|
||||
}
|
||||
|
||||
static void vn_label_finalize (VnLabel * obj)
|
||||
{
|
||||
g_free (obj->format);
|
||||
G_OBJECT_CLASS (vn_label_parent_class)->finalize (G_OBJECT (obj));
|
||||
}
|
||||
|
||||
static void vn_label_class_init (VnLabelClass * klass)
|
||||
{
|
||||
GObjectClass * k = G_OBJECT_CLASS (klass);
|
||||
k->set_property = (GObjectSetPropertyFunc) vn_label_set_property;
|
||||
k->get_property = (GObjectGetPropertyFunc) vn_label_get_property;
|
||||
k->finalize = (GObjectFinalizeFunc) vn_label_finalize;
|
||||
VN_FIELD_CLASS (klass)->set_value = (VnFieldSetValueFunc) vn_label_set_value;
|
||||
|
||||
g_object_class_install_property (k, PROP_FORMAT,
|
||||
g_param_spec_string ("format"
|
||||
,_("Format")
|
||||
,_("The format string describing the output of the entry.")
|
||||
,NULL
|
||||
,G_PARAM_CONSTRUCT | G_PARAM_READWRITE
|
||||
));
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
* 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_LABEL_H
|
||||
#define VN_LABEL_H
|
||||
|
||||
#include <vn/vn-field.h>
|
||||
|
||||
#define VN_TYPE_LABEL (vn_label_get_type ())
|
||||
#define VN_LABEL(object) (G_TYPE_CHECK_INSTANCE_CAST (object, VN_TYPE_LABEL , VnLabel))
|
||||
#define VN_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, VN_TYPE_LABEL))
|
||||
#define VN_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST (klass, VN_TYPE_LABEL, VnLabelClass))
|
||||
#define VN_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE (klass, VN_TYPE_LABEL))
|
||||
#define VN_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, VN_TYPE_LABEL, VnLabelClass))
|
||||
|
||||
typedef struct _VnLabel VnLabel;
|
||||
typedef struct _VnLabelClass VnLabelClass;
|
||||
|
||||
struct _VnLabel
|
||||
{
|
||||
VnField parent;
|
||||
GtkLabel * label;
|
||||
gchar * format;
|
||||
};
|
||||
|
||||
struct _VnLabelClass
|
||||
{
|
||||
/* <private> */
|
||||
VnFieldClass parent;
|
||||
};
|
||||
|
||||
GType vn_label_get_type ();
|
||||
VnField * vn_label_new ();
|
||||
|
||||
#endif
|
|
@ -72,7 +72,7 @@ static gboolean vn_spin_on_output (GtkSpinButton * spin, VnField * obj)
|
|||
return vn_field_get_null (obj)
|
||||
&& (!text || !g_strcmp0 (text, ""))
|
||||
&& gtk_spin_button_get_value (spin) == 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
static void vn_spin_set_value (VnSpin * obj, const GValue * value)
|
||||
{
|
||||
|
@ -81,11 +81,10 @@ static void vn_spin_set_value (VnSpin * obj, const GValue * value)
|
|||
|
||||
if (!gvn_value_is_null (value))
|
||||
{
|
||||
GValue new_value = G_VALUE_INIT;
|
||||
GValue new_value = {0};
|
||||
g_value_init (&new_value, G_TYPE_DOUBLE);
|
||||
g_value_transform (value, &new_value);
|
||||
gtk_spin_button_set_value (obj->spin,
|
||||
g_value_get_double (&new_value));
|
||||
gtk_spin_button_set_value (obj->spin, g_value_get_double (&new_value));
|
||||
g_value_unset (&new_value);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -92,7 +92,7 @@ static const GMarkupParser vn_model_parser =
|
|||
vn_model_start_element
|
||||
,vn_model_end_element
|
||||
};
|
||||
|
||||
//FIXME: se pone la propiedad "sql" dos veces en el modelo (entre custom_tag_end y custom_finished)
|
||||
static gboolean vn_model_buildable_custom_tag_start (GtkBuildable *buildable,
|
||||
GtkBuilder * builder, GObject * child, const gchar * tag,
|
||||
GMarkupParser * parser, gpointer * data)
|
||||
|
|
|
@ -308,6 +308,12 @@
|
|||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
<property name="secondary_icon_stock">gtk-find</property>
|
||||
<property name="secondary_icon_activatable">True</property>
|
||||
<property name="secondary_icon_sensitive">True</property>
|
||||
<property name="secondary_icon_tooltip_text" translatable="yes">Press here to see the password</property>
|
||||
<signal name="icon-press" handler="vn_login_cb_pass_show" swapped="no"/>
|
||||
<signal name="icon-release" handler="vn_login_cb_pass_hide" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
|
|
|
@ -493,7 +493,7 @@ static void vn_field_finalize (VnField * obj)
|
|||
gvn_param_spec_free (obj->spec);
|
||||
gvn_param_spec_free (obj->user_spec);
|
||||
g_clear_object (&obj->iterator);
|
||||
g_clear_object (&obj->param);
|
||||
vn_field_set_param (obj, NULL);
|
||||
g_value_unset (obj->value);
|
||||
g_free (obj->value);
|
||||
g_free (obj->column_name);
|
||||
|
|
|
@ -17,9 +17,48 @@
|
|||
|
||||
#include "vn-grid-model.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gchar * detail;
|
||||
gpointer callback;
|
||||
}
|
||||
GvnSignalInfo;
|
||||
|
||||
void _gvn_object_link (gpointer obj, gpointer * prop, gpointer prop_value, GvnSignalInfo * info)
|
||||
{
|
||||
gint i;
|
||||
|
||||
if (*prop)
|
||||
{
|
||||
for (i = 0; info[i].detail; i++)
|
||||
g_signal_handlers_disconnect_by_func (*prop, info[i].callback, obj);
|
||||
|
||||
g_object_unref (*prop);
|
||||
}
|
||||
|
||||
if (prop_value)
|
||||
{
|
||||
for (i = 0; info[i].detail; i++)
|
||||
if (g_str_has_suffix (info[i].detail, ".after"))
|
||||
{
|
||||
gchar ** split = g_strsplit (info[i].detail, ".", 0);
|
||||
g_signal_connect_after (prop_value, split[0], info[i].callback, obj);
|
||||
g_strfreev (split);
|
||||
}
|
||||
else
|
||||
g_signal_connect (prop_value, info[i].detail, info[i].callback, obj);
|
||||
|
||||
*prop = g_object_ref_sink (prop_value);
|
||||
}
|
||||
else
|
||||
*prop = NULL;
|
||||
}
|
||||
|
||||
#define gvn_object_link(obj, prop, prop_value, info) (_gvn_object_link (obj, (void**) prop, prop_value, info))
|
||||
|
||||
static void vn_grid_model_tree_model_init (GtkTreeModelIface * iface);
|
||||
static void vn_grid_model_tree_sortable_init (GtkTreeSortableIface * iface);
|
||||
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (VnGridModel, vn_grid_model, G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL,
|
||||
vn_grid_model_tree_model_init)
|
||||
|
@ -91,12 +130,12 @@ void gtk_tree_iter_to_db_iter (const GtkTreeIter * src_iter, DbIter * dest_iter)
|
|||
**/
|
||||
gboolean vn_grid_model_iter_is_valid (GtkTreeIter * iter, GtkTreeModel * model)
|
||||
{
|
||||
DbIter db_iter;
|
||||
DbIter dbiter;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_TREE_MODEL (model), FALSE);
|
||||
|
||||
gtk_tree_iter_to_db_iter (iter, &db_iter);
|
||||
return db_model_iter_is_valid (&db_iter, VN_GRID_MODEL (model)->model);
|
||||
gtk_tree_iter_to_db_iter (iter, &dbiter);
|
||||
return db_model_iter_is_valid (&dbiter, VN_GRID_MODEL (model)->model);
|
||||
}
|
||||
|
||||
static gint vn_grid_model_get_nrows (GtkTreeModel * obj)
|
||||
|
@ -106,27 +145,27 @@ static gint vn_grid_model_get_nrows (GtkTreeModel * obj)
|
|||
|
||||
//++++ Broadcast of GtkTreeModel and GtkTreeSortable signals:
|
||||
|
||||
static void vn_grid_model_on_line_updated (DbModel * model, DbIter * db_iter, GtkTreeModel * obj)
|
||||
static void vn_grid_model_on_line_updated (DbModel * model, DbIter * dbiter, GtkTreeModel * obj)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gtk_tree_iter_from_db_iter (&iter, db_iter);
|
||||
gtk_tree_iter_from_db_iter (&iter, dbiter);
|
||||
|
||||
GtkTreePath * path = gtk_tree_path_new ();
|
||||
gtk_tree_path_append_index (path, db_model_get_path (model, db_iter));
|
||||
gtk_tree_path_append_index (path, db_model_get_path (model, dbiter));
|
||||
|
||||
gtk_tree_model_row_changed (obj, path, &iter);
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
static void vn_grid_model_on_line_inserted (DbModel * model, DbIter * db_iter, GtkTreeModel * obj)
|
||||
static void vn_grid_model_on_line_inserted (DbModel * model, DbIter * dbiter, GtkTreeModel * obj)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gtk_tree_iter_from_db_iter (&iter, db_iter);
|
||||
gtk_tree_iter_from_db_iter (&iter, dbiter);
|
||||
|
||||
GtkTreePath * path = gtk_tree_path_new ();
|
||||
gtk_tree_path_append_index (path,
|
||||
db_model_get_path (model, db_iter));
|
||||
db_model_get_path (model, dbiter));
|
||||
|
||||
gtk_tree_model_row_inserted (obj, path, &iter);
|
||||
|
||||
|
@ -176,13 +215,13 @@ static GType vn_grid_model_get_column_type (GtkTreeModel * obj, gint index_)
|
|||
static gboolean vn_grid_model_get_iter (GtkTreeModel * obj, GtkTreeIter * iter,
|
||||
GtkTreePath * path)
|
||||
{
|
||||
DbIter db_iter;
|
||||
DbIter dbiter;
|
||||
gint p = gtk_tree_path_get_indices (path)[0];
|
||||
|
||||
gboolean ret = db_model_get_iter (VN_GRID_MODEL (obj)->model, &db_iter, p);
|
||||
gboolean ret = db_model_get_iter (VN_GRID_MODEL (obj)->model, &dbiter, p);
|
||||
|
||||
if (ret)
|
||||
gtk_tree_iter_from_db_iter (iter, &db_iter);
|
||||
gtk_tree_iter_from_db_iter (iter, &dbiter);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -190,13 +229,13 @@ static gboolean vn_grid_model_get_iter (GtkTreeModel * obj, GtkTreeIter * iter,
|
|||
static GtkTreePath * vn_grid_model_get_path (GtkTreeModel * obj, GtkTreeIter * iter)
|
||||
{
|
||||
GtkTreePath * path;
|
||||
DbIter db_iter;
|
||||
DbIter dbiter;
|
||||
|
||||
gtk_tree_iter_to_db_iter (iter, &db_iter);
|
||||
gtk_tree_iter_to_db_iter (iter, &dbiter);
|
||||
|
||||
path = gtk_tree_path_new ();
|
||||
gtk_tree_path_append_index (path,
|
||||
db_model_get_path (VN_GRID_MODEL (obj)->model, &db_iter));
|
||||
db_model_get_path (VN_GRID_MODEL (obj)->model, &dbiter));
|
||||
|
||||
return path;
|
||||
}
|
||||
|
@ -205,11 +244,11 @@ static void vn_grid_model_get_value (GtkTreeModel * obj, GtkTreeIter * iter,
|
|||
gint column, GValue * value)
|
||||
{
|
||||
const GValue * v;
|
||||
DbIter db_iter;
|
||||
DbIter dbiter;
|
||||
|
||||
gtk_tree_iter_to_db_iter (iter, &db_iter);
|
||||
gtk_tree_iter_to_db_iter (iter, &dbiter);
|
||||
|
||||
v = db_model_get_value (VN_GRID_MODEL (obj)->model, &db_iter, column, NULL);
|
||||
v = db_model_get_value (VN_GRID_MODEL (obj)->model, &dbiter, column, NULL);
|
||||
|
||||
if (v)
|
||||
{
|
||||
|
@ -222,24 +261,24 @@ static void vn_grid_model_get_value (GtkTreeModel * obj, GtkTreeIter * iter,
|
|||
|
||||
static gboolean vn_grid_model_iter_next (GtkTreeModel * obj, GtkTreeIter * iter)
|
||||
{
|
||||
DbIter db_iter;
|
||||
gtk_tree_iter_to_db_iter (iter, &db_iter);
|
||||
DbIter dbiter;
|
||||
gtk_tree_iter_to_db_iter (iter, &dbiter);
|
||||
|
||||
gboolean ret_val = db_model_iter_next (VN_GRID_MODEL (obj)->model, &db_iter);
|
||||
gboolean ret_val = db_model_iter_next (VN_GRID_MODEL (obj)->model, &dbiter);
|
||||
|
||||
iter->user_data = db_iter.data;
|
||||
iter->user_data = dbiter.data;
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
static gboolean vn_grid_model_iter_previous (GtkTreeModel * obj, GtkTreeIter * iter)
|
||||
{
|
||||
DbIter db_iter;
|
||||
gtk_tree_iter_to_db_iter (iter, &db_iter);
|
||||
DbIter dbiter;
|
||||
gtk_tree_iter_to_db_iter (iter, &dbiter);
|
||||
|
||||
gboolean ret_val = db_model_iter_prev (VN_GRID_MODEL (obj)->model, &db_iter);
|
||||
gboolean ret_val = db_model_iter_prev (VN_GRID_MODEL (obj)->model, &dbiter);
|
||||
|
||||
iter->user_data = db_iter.data;
|
||||
iter->user_data = dbiter.data;
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
@ -249,13 +288,13 @@ static gboolean vn_grid_model_iter_children (GtkTreeModel * obj, GtkTreeIter * i
|
|||
{
|
||||
if (parent == NULL)
|
||||
{
|
||||
DbIter db_iter;
|
||||
DbIter dbiter;
|
||||
|
||||
gboolean ret_val = db_model_get_iter_first (VN_GRID_MODEL (obj)->model
|
||||
,&db_iter);
|
||||
,&dbiter);
|
||||
|
||||
if (ret_val)
|
||||
gtk_tree_iter_from_db_iter (iter, &db_iter);
|
||||
gtk_tree_iter_from_db_iter (iter, &dbiter);
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
@ -281,11 +320,11 @@ static gboolean vn_grid_model_iter_nth_child (GtkTreeModel * obj, GtkTreeIter *
|
|||
{
|
||||
if (parent == NULL)
|
||||
{
|
||||
DbIter db_iter;
|
||||
gboolean ret = db_model_get_iter (VN_GRID_MODEL (obj)->model, &db_iter, n);
|
||||
DbIter dbiter;
|
||||
gboolean ret = db_model_get_iter (VN_GRID_MODEL (obj)->model, &dbiter, n);
|
||||
|
||||
if (ret)
|
||||
gtk_tree_iter_from_db_iter (iter, &db_iter);
|
||||
gtk_tree_iter_from_db_iter (iter, &dbiter);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
@ -347,20 +386,30 @@ typedef enum
|
|||
}
|
||||
VnGridModelProp;
|
||||
|
||||
GvnSignalInfo signal_info[] =
|
||||
{
|
||||
{"line-updated.after", vn_grid_model_on_line_updated
|
||||
},{"line-inserted", vn_grid_model_on_line_inserted
|
||||
},{"line-deleted.after", vn_grid_model_on_line_deleted
|
||||
},{"lines-reordered", vn_grid_model_on_lines_reordered
|
||||
},{"sort-changed", vn_grid_model_on_sort_changed
|
||||
},{NULL}
|
||||
};
|
||||
|
||||
static void vn_grid_model_set_property (VnGridModel * obj, guint property_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (property_id)
|
||||
{
|
||||
case PROP_MODEL:
|
||||
obj->model = g_value_get_object (value);
|
||||
g_object_ref_sink (obj->model);
|
||||
gvn_object_link (obj, &obj->model, g_value_get_object (value), signal_info);
|
||||
/*g_object_ref_sink (obj->model);
|
||||
g_object_connect (obj->model
|
||||
,"signal-after::line-updated", vn_grid_model_on_line_updated, obj
|
||||
,"signal::line-inserted", vn_grid_model_on_line_inserted, obj
|
||||
,"signal-after::line-deleted", vn_grid_model_on_line_deleted, obj
|
||||
,"signal::lines-reordered", vn_grid_model_on_lines_reordered, obj
|
||||
,"signal::sort-changed", vn_grid_model_on_sort_changed, obj, NULL);
|
||||
,"signal::sort-changed", vn_grid_model_on_sort_changed, obj, NULL);*/
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, property_id, pspec);
|
||||
|
@ -384,6 +433,8 @@ static void vn_grid_model_get_property (VnGridModel * obj, guint property_id,
|
|||
|
||||
static void vn_grid_model_finalize (VnGridModel * obj)
|
||||
{
|
||||
gvn_object_link (obj, &obj->model, NULL, signal_info);
|
||||
/*
|
||||
g_object_disconnect (obj->model
|
||||
,"any_signal", vn_grid_model_on_line_updated, obj
|
||||
,"any_signal", vn_grid_model_on_line_inserted, obj
|
||||
|
@ -392,7 +443,7 @@ static void vn_grid_model_finalize (VnGridModel * obj)
|
|||
,"any_signal", vn_grid_model_on_sort_changed, obj, NULL);
|
||||
|
||||
g_object_unref (obj->model);
|
||||
|
||||
*/
|
||||
G_OBJECT_CLASS (vn_grid_model_parent_class)->finalize (G_OBJECT (obj));
|
||||
}
|
||||
|
||||
|
@ -409,7 +460,7 @@ static void vn_grid_model_class_init (VnGridModelClass * k)
|
|||
,"The #DbModel with the data used by the #VnGridModel"
|
||||
,DB_TYPE_MODEL
|
||||
,G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE
|
||||
));
|
||||
));
|
||||
}
|
||||
|
||||
static void vn_grid_model_tree_model_init (GtkTreeModelIface * iface)
|
||||
|
@ -442,4 +493,4 @@ static void vn_grid_model_tree_sortable_init (GtkTreeSortableIface * iface)
|
|||
static void vn_grid_model_init (VnGridModel * obj)
|
||||
{
|
||||
obj->model = NULL;
|
||||
}
|
||||
}
|
||||
|
|
68
vn/vn-grid.c
68
vn/vn-grid.c
|
@ -50,12 +50,38 @@ VnGrid * vn_grid_new_with_iterator (DbIterator * iterator)
|
|||
|
||||
static void vn_grid_on_iter_changed (DbIterator * iterator, GtkTreeView * obj);
|
||||
|
||||
static void vn_grid_on_selection_changed (GtkTreeSelection * selection, GtkTreeView * obj)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GList * l, * list;
|
||||
|
||||
if (gtk_tree_selection_count_selected_rows (selection) <= 1)
|
||||
return;
|
||||
|
||||
list = gtk_tree_selection_get_selected_rows (selection, NULL);
|
||||
|
||||
for (l = list; l; l = l->next)
|
||||
if (gtk_tree_model_get_iter (gtk_tree_view_get_model (obj), &iter, l->data))
|
||||
{
|
||||
DbIter dbiter;
|
||||
vn_gtk_tree_iter_to_db_iter (&iter, &dbiter);
|
||||
db_iterator_select_iter (VN_GRID (obj)->iterator, &dbiter);
|
||||
}
|
||||
|
||||
g_list_free_full (list, (GDestroyNotify) gtk_tree_path_free);
|
||||
}
|
||||
|
||||
static void vn_grid_on_cursor_changed (GtkTreeView * obj, DbIterator * iterator)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GtkTreeSelection * selection = gtk_tree_view_get_selection (obj);
|
||||
GtkTreePath * path;
|
||||
|
||||
if (selection && gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
if (gtk_tree_selection_count_selected_rows (gtk_tree_view_get_selection (obj)) > 1)
|
||||
return;
|
||||
|
||||
gtk_tree_view_get_cursor (obj, &path, NULL);
|
||||
|
||||
if (path && gtk_tree_model_get_iter (gtk_tree_view_get_model (obj), &iter, path))
|
||||
{
|
||||
DbIter dbiter;
|
||||
vn_gtk_tree_iter_to_db_iter (&iter, &dbiter);
|
||||
|
@ -64,6 +90,8 @@ static void vn_grid_on_cursor_changed (GtkTreeView * obj, DbIterator * iterator)
|
|||
db_iterator_move_iter (iterator, &dbiter);
|
||||
g_signal_handlers_unblock_by_func (iterator, vn_grid_on_iter_changed, obj);
|
||||
}
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
|
||||
static void vn_grid_on_iter_changed (DbIterator * iterator, GtkTreeView * obj)
|
||||
|
@ -71,20 +99,19 @@ static void vn_grid_on_iter_changed (DbIterator * iterator, GtkTreeView * obj)
|
|||
DbIter dbiter;
|
||||
GtkTreeSelection * selection = gtk_tree_view_get_selection (obj);
|
||||
|
||||
if (db_iterator_get_iter (iterator, &dbiter)
|
||||
&& gtk_tree_view_get_model (obj))
|
||||
if (db_iterator_get_iter (iterator, &dbiter) && gtk_tree_view_get_model (obj))
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
GtkTreePath * path;
|
||||
|
||||
vn_gtk_tree_iter_from_db_iter (&iter, &dbiter);
|
||||
path = gtk_tree_model_get_path (gtk_tree_view_get_model (obj), &iter);
|
||||
|
||||
g_signal_handlers_block_by_func (obj, vn_grid_on_cursor_changed, iterator);
|
||||
gtk_tree_selection_select_iter (selection, &iter);
|
||||
gtk_tree_view_set_cursor (obj, path, NULL, FALSE);
|
||||
g_signal_handlers_unblock_by_func (obj, vn_grid_on_cursor_changed, iterator);
|
||||
|
||||
path = gtk_tree_model_get_path (
|
||||
gtk_tree_view_get_model (obj), &iter);
|
||||
gtk_tree_view_scroll_to_cell (obj, path, NULL, FALSE, 0, 0);
|
||||
gtk_widget_grab_focus (GTK_WIDGET (obj));
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
else if (selection)
|
||||
|
@ -112,6 +139,7 @@ static void vn_grid_on_status_changed (DbIterator * iterator, gboolean ready, Vn
|
|||
GtkTreeModel * tree_model = GTK_TREE_MODEL (vn_grid_model_new (obj->model));
|
||||
gtk_tree_view_set_model (GTK_TREE_VIEW (obj), tree_model);
|
||||
vn_grid_on_iter_changed (obj->iterator, GTK_TREE_VIEW (obj));
|
||||
|
||||
g_object_unref (tree_model);
|
||||
}
|
||||
else
|
||||
|
@ -121,8 +149,7 @@ static void vn_grid_on_status_changed (DbIterator * iterator, gboolean ready, Vn
|
|||
static gboolean vn_grid_on_cursor_key_pressed (GtkTreeView * obj,
|
||||
GdkEventKey * event, gpointer data)
|
||||
{
|
||||
gboolean inverted;
|
||||
gboolean passed = FALSE;
|
||||
gboolean inverted, passed = FALSE;
|
||||
gint sel_tab_index;
|
||||
VnColumn * first = NULL;
|
||||
GList * n, * columns;
|
||||
|
@ -193,6 +220,8 @@ static gboolean vn_grid_on_cursor_key_pressed (GtkTreeView * obj,
|
|||
}
|
||||
}
|
||||
|
||||
g_list_free (columns);
|
||||
|
||||
if (!next)
|
||||
{
|
||||
gboolean leave = FALSE;
|
||||
|
@ -230,10 +259,8 @@ static gboolean vn_grid_on_cursor_key_pressed (GtkTreeView * obj,
|
|||
}
|
||||
}
|
||||
|
||||
g_list_free (columns);
|
||||
gtk_tree_view_set_cursor (obj, path, GTK_TREE_VIEW_COLUMN (next), TRUE);
|
||||
gtk_tree_path_free (path);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -276,7 +303,7 @@ void vn_grid_set_iterator (VnGrid * obj, DbIterator * iterator)
|
|||
{
|
||||
g_return_if_fail (VN_IS_GRID (obj));
|
||||
g_return_if_fail (DB_IS_ITERATOR (iterator) || !iterator);
|
||||
|
||||
|
||||
if (obj->iterator)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (obj,
|
||||
|
@ -288,6 +315,7 @@ void vn_grid_set_iterator (VnGrid * obj, DbIterator * iterator)
|
|||
,NULL
|
||||
);
|
||||
g_clear_object (&obj->iterator);
|
||||
|
||||
obj->model = NULL;
|
||||
}
|
||||
if (iterator)
|
||||
|
@ -301,7 +329,7 @@ void vn_grid_set_iterator (VnGrid * obj, DbIterator * iterator)
|
|||
|
||||
vn_grid_on_status_changed (iterator,
|
||||
db_iterator_is_ready (iterator), obj);
|
||||
|
||||
|
||||
g_signal_connect_after (obj, "cursor-changed",
|
||||
G_CALLBACK (vn_grid_on_cursor_changed), iterator);
|
||||
}
|
||||
|
@ -435,7 +463,7 @@ static void vn_grid_set_property (VnGrid * obj, guint id,
|
|||
case PROP_ITERATOR:
|
||||
vn_grid_set_iterator (obj, g_value_get_object (value));
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
}
|
||||
}
|
||||
|
@ -448,7 +476,7 @@ static void vn_grid_get_property (VnGrid * obj, guint id,
|
|||
case PROP_ITERATOR:
|
||||
g_value_set_object (value, obj->iterator);
|
||||
break;
|
||||
default:
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, id, pspec);
|
||||
}
|
||||
}
|
||||
|
@ -457,12 +485,12 @@ static void vn_grid_get_property (VnGrid * obj, guint id,
|
|||
|
||||
static void vn_grid_init (VnGrid * obj)
|
||||
{
|
||||
GtkTreeSelection * selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (obj));
|
||||
obj->iterator = NULL;
|
||||
obj->model = NULL;
|
||||
gtk_tree_selection_set_mode (
|
||||
gtk_tree_view_get_selection (GTK_TREE_VIEW (obj)),
|
||||
GTK_SELECTION_SINGLE
|
||||
);
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_MULTIPLE);
|
||||
g_signal_connect (selection, "changed",
|
||||
G_CALLBACK (vn_grid_on_selection_changed), obj);
|
||||
|
||||
g_signal_connect (obj, "notify::model",
|
||||
G_CALLBACK (vn_grid_on_model_changed), NULL);
|
||||
|
|
|
@ -62,7 +62,7 @@ static void vn_handler_on_remove_activated (GtkAction * action, VnHandler * obj)
|
|||
,GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT
|
||||
,GTK_MESSAGE_QUESTION
|
||||
,GTK_BUTTONS_OK_CANCEL
|
||||
,_("Are you sure you want to delete the selected record?")
|
||||
,_("Are you sure you want to delete the current selection?")
|
||||
);
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
|
||||
|
@ -167,11 +167,11 @@ static void vn_handler_on_row_num_changed (DbIterator * iterator, VnHandler * ob
|
|||
{
|
||||
gboolean sensitive =
|
||||
db_iterator_get_update_flags (iterator) & DB_MODEL_DELETE
|
||||
&& db_iterator_get_row (iterator) != -1;
|
||||
&& db_iterator_get_nrows (iterator) > 0;
|
||||
|
||||
gtk_action_set_sensitive (obj->remove, sensitive);
|
||||
}
|
||||
|
||||
|
||||
vn_handler_refresh_scroll_status (obj);
|
||||
}
|
||||
|
||||
|
|
|
@ -395,6 +395,18 @@ void vn_login_cb_destroyed (GtkWidget * window, VnLogin * obj)
|
|||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
void vn_login_cb_pass_show (GtkEntry * entry, GtkEntryIconPosition * pos,
|
||||
GdkEvent * event, VnLogin * obj)
|
||||
{
|
||||
gtk_entry_set_visibility (entry, TRUE);
|
||||
}
|
||||
|
||||
void vn_login_cb_pass_hide (GtkEntry * entry, GtkEntryIconPosition * pos,
|
||||
GdkEvent * event, VnLogin * obj)
|
||||
{
|
||||
gtk_entry_set_visibility (entry, FALSE);
|
||||
}
|
||||
|
||||
//+++++++++++++++++++++++++++++++++++++++++++++++++++ Public
|
||||
|
||||
/**
|
||||
|
|
Reference in New Issue