Los parametros se enlazan con Glade en lugar de con código.
Versión de debian aumentada.
This commit is contained in:
parent
8955b3a212
commit
bbb5db4288
18
configure.ac
18
configure.ac
|
@ -61,21 +61,13 @@ AC_SUBST([VALAFLAGS])
|
|||
|
||||
LT_INIT
|
||||
|
||||
dnl Path to the directory of the unsinstalled hedera project.
|
||||
AC_ARG_VAR([UNINSTALLED_DIR], [the directory of the uninstalled hedera project])
|
||||
dnl This requires the user to specify the UNINSTALLED_DIR variable, with the
|
||||
dnl path to the directory of the unsinstalled hedera project.
|
||||
AC_MSG_CHECKING([use uninstalled Hedera])
|
||||
AC_ARG_ENABLE([uninstalled],
|
||||
[AS_HELP_STRING([--enable-uninstalled],
|
||||
[Enable the use of uninstalled Hedera located in the UNINSTALLED_DIR
|
||||
directory, which must be defined [default = no]])],
|
||||
[UNINSTALLED="$enableval"],
|
||||
[UNINSTALLED=no])
|
||||
AC_MSG_RESULT([$UNINSTALLED])
|
||||
: ${UNINSTALLED_DIR=''}
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
|
||||
if test x"$UNINSTALLED" = x"yes"; then
|
||||
if test $UNINSTALLED_DIR; then
|
||||
PKG_CHECK_MODULES(ACCOUNT, [gtk+-3.0])
|
||||
ACCOUNT_CFLAGS+=-I$UNINSTALLED_DIR
|
||||
ACCOUNT_LIBS+=$UNINSTALLED_DIR/build/main/libhedera.la
|
||||
|
@ -87,11 +79,11 @@ if test x"$UNINSTALLED" = x"yes"; then
|
|||
|
||||
AC_SUBST(account_libdir, $libdir/hedera/module)
|
||||
AC_SUBST(account_datadir, $datadir/hedera/module)
|
||||
AC_SUBST(querydir,$account_datadir/sql)
|
||||
AC_SUBST(querydir, $account_datadir/sql)
|
||||
else
|
||||
PKG_CHECK_MODULES(ACCOUNT, [hedera])
|
||||
|
||||
VALA_CHECK_PACKAGES([hedera ])
|
||||
VALA_CHECK_PACKAGES([hedera])
|
||||
VALAFLAGS+='--pkg hedera '
|
||||
|
||||
PKG_CHECK_VAR([account_libdir], [hedera], [modulelibdir])
|
||||
|
|
|
@ -11,6 +11,11 @@
|
|||
<child>
|
||||
<object class="VnIterator" id="alias">
|
||||
<property name="model">model-alias</property>
|
||||
<child>
|
||||
<object class="DbParam" id="alias-id">
|
||||
<property name="column_name">id</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -159,12 +164,15 @@
|
|||
</object>
|
||||
<object class="VnBatch" id="models">
|
||||
<child>
|
||||
<object class="DbModel" id="model-child">
|
||||
<object class="VnModel" id="model-child">
|
||||
<property name="sql">SELECT parent, child FROM mail_alias_child WHERE #p</property>
|
||||
<links>
|
||||
<link field="parent" param="alias-id"/>
|
||||
</links>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="model-alias">
|
||||
<object class="VnModel" id="model-alias">
|
||||
<property name="sql">SELECT id, alias FROM mail_alias</property>
|
||||
</object>
|
||||
</child>
|
||||
|
|
453
data/users.glade
453
data/users.glade
|
@ -4,14 +4,13 @@
|
|||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="VnBatch" id="iterators">
|
||||
<child>
|
||||
<object class="VnIterator" id="account">
|
||||
<property name="model">account-model</property>
|
||||
<property name="mode">on-iter</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnIterator" id="alias">
|
||||
<property name="model">alias-model</property>
|
||||
<object class="VnIterator" id="users">
|
||||
<property name="model">users-model</property>
|
||||
<child>
|
||||
<object class="DbParam" id="users-id">
|
||||
<property name="column_name">id</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -21,11 +20,238 @@
|
|||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnIterator" id="users">
|
||||
<property name="model">users-model</property>
|
||||
<object class="VnIterator" id="alias">
|
||||
<property name="model">alias-model</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnIterator" id="account">
|
||||
<property name="model">account-model</property>
|
||||
<property name="mode">on-iter</property>
|
||||
<child>
|
||||
<object class="DbParam" id="account-user_id">
|
||||
<property name="column_name">user_id</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="VnBatch" id="models">
|
||||
<child>
|
||||
<object class="VnModel" id="account-combo-model">
|
||||
<property name="sql">SELECT id, name FROM `group`</property>
|
||||
<property name="update_flags"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnModel" id="account-model">
|
||||
<property name="sql">SELECT user_id, group_id, uid, last_change, expire
|
||||
FROM account
|
||||
WHERE #p</property>
|
||||
<links>
|
||||
<link field="user_id" param="users-id"/>
|
||||
</links>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnModel" id="alias-model">
|
||||
<property name="sql">SELECT mail_alias_id, user_id
|
||||
FROM mail_alias_account
|
||||
WHERE #p</property>
|
||||
<links>
|
||||
<link field="user_id" param="account-user_id"/>
|
||||
</links>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnModel" id="user-combo-model">
|
||||
<property name="sql">SELECT id, user FROM mysql_user</property>
|
||||
<property name="update_flags"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnModel" id="alias-combo-model">
|
||||
<property name="sql">SELECT id, alias FROM mail_alias</property>
|
||||
<property name="update_flags"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnModel" id="sip-model">
|
||||
<property name="sql">SELECT user_id, extension, secret, callerid
|
||||
FROM account_sip
|
||||
WHERE #p</property>
|
||||
<links>
|
||||
<link field="user_id" param="account-user_id"/>
|
||||
</links>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnModel" id="users-model">
|
||||
<property name="sql">SELECT u.id, u.name, u.mysql_user_id, m.user, u.active
|
||||
FROM `user` u
|
||||
JOIN mysql_user m ON u.mysql_user_id = m.id</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkDialog" id="password-dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Change password</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="gtk_true" swapped="no"/>
|
||||
<signal name="response" handler="vn_users_on_dialog_response" swapped="no"/>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox2">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="password-infobar">
|
||||
<property name="app_paintable">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="infobar-content_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">8</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="password-error">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="infobar-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label23">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Password:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label22">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Repeat password:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="password-entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="repeat-password">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area2">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="DbParam" id="search-user"/>
|
||||
<object class="GtkBox" id="main">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
@ -666,211 +892,4 @@
|
|||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="VnBatch" id="models">
|
||||
<child>
|
||||
<object class="DbModel" id="users-model">
|
||||
<property name="sql">SELECT u.id, u.name, u.mysql_user_id, m.user, u.active
|
||||
FROM `user` u
|
||||
JOIN mysql_user m ON u.mysql_user_id = m.id</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="sip-model">
|
||||
<property name="sql">SELECT user_id, extension, secret, callerid
|
||||
FROM account_sip
|
||||
WHERE #p</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="alias-combo-model">
|
||||
<property name="sql">SELECT id, alias FROM mail_alias</property>
|
||||
<property name="update_flags"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="user-combo-model">
|
||||
<property name="sql">SELECT id, user FROM mysql_user</property>
|
||||
<property name="update_flags"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="alias-model">
|
||||
<property name="sql">SELECT mail_alias_id, user_id
|
||||
FROM mail_alias_account
|
||||
WHERE #p</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="account-model">
|
||||
<property name="sql">SELECT user_id, group_id, uid, last_change, expire
|
||||
FROM account
|
||||
WHERE #p</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="account-combo-model">
|
||||
<property name="sql">SELECT id, name FROM `group`</property>
|
||||
<property name="update_flags"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkDialog" id="password-dialog">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="title" translatable="yes">Change password</property>
|
||||
<property name="resizable">False</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<signal name="delete-event" handler="gtk_true" swapped="no"/>
|
||||
<signal name="response" handler="vn_users_on_dialog_response" swapped="no"/>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="dialog-vbox2">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkInfoBar" id="password-infobar">
|
||||
<property name="app_paintable">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox" id="infobar-content_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">8</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="password-error">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="infobar-action_area1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label23">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Password:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label22">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Repeat password:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="password-entry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="repeat-password">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="visibility">False</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="invisible_char_set">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox" id="dialog-action_area2">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="DbParam" id="search-user"/>
|
||||
</interface>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
hedera-account (1.0-1) UNRELEASED; urgency=low
|
||||
hedera-account (1.0-3) UNRELEASED; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2012 - Juan Ferrer Toribio
|
||||
* Copyright (C) 2013 - Juan Ferrer Toribio
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -21,9 +21,5 @@ public class Vn.EMail : Vn.Form
|
|||
{
|
||||
public override void open (Gtk.Builder builder)
|
||||
{
|
||||
var child = get ("child") as Db.Iterator;
|
||||
var alias = get ("alias") as Db.Iterator;
|
||||
|
||||
child.link ("parent", alias, "id");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,37 +19,20 @@
|
|||
public class Vn.Users : Vn.Form
|
||||
{
|
||||
private unowned Gvn.Param user_id;
|
||||
private unowned Db.Iterator account;
|
||||
private unowned Db.Iterator alias;
|
||||
private unowned Db.Iterator sip;
|
||||
private unowned Gtk.Dialog password_dialog;
|
||||
private unowned Gtk.Entry password_entry;
|
||||
private unowned Gtk.Entry repeat_password;
|
||||
|
||||
public override void open (Gtk.Builder builder)
|
||||
{
|
||||
Db.Iterator users;
|
||||
|
||||
password_entry = get ("password-entry") as Gtk.Entry;
|
||||
repeat_password = get ("repeat-password") as Gtk.Entry;
|
||||
|
||||
password_dialog = get ("password-dialog") as Gtk.Dialog;
|
||||
password_dialog.add_button (Gtk.Stock.CANCEL, Gtk.ResponseType.CANCEL);
|
||||
password_dialog.add_button (Gtk.Stock.APPLY, Gtk.ResponseType.ACCEPT);
|
||||
|
||||
users = get ("users") as Db.Iterator;
|
||||
user_id = users.get_param ("id");
|
||||
|
||||
account = get ("account") as Db.Iterator;
|
||||
account.link_with_param ("user_id", user_id);
|
||||
|
||||
alias = get ("alias") as Db.Iterator;
|
||||
alias.link ("user_id", account, "user_id");
|
||||
|
||||
sip = get ("sip") as Db.Iterator;
|
||||
sip.link ("user_id", account, "user_id");
|
||||
}
|
||||
|
||||
|
||||
public void reset_dialog (string? error)
|
||||
{
|
||||
var infobar = get ("password-infobar") as Gtk.Widget;
|
||||
|
|
Reference in New Issue