diff --git a/data/Makefile.am b/data/Makefile.am
index 4784e63..e74a7a8 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -3,8 +3,6 @@ account_data_DATA = \
account.xml \
account.ui \
users.glade \
- queries.glade \
mail-alias.glade
-
EXTRA_DIST = $(management_data_DATA)
diff --git a/data/account.ui b/data/account.ui
new file mode 100644
index 0000000..d26d8e8
--- /dev/null
+++ b/data/account.ui
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/data/account.xml b/data/account.xml
new file mode 100644
index 0000000..5e43ba7
--- /dev/null
+++ b/data/account.xml
@@ -0,0 +1,20 @@
+
+ Accounts
+
+ _Accounts
+
+
+
+
+
+
diff --git a/data/mail-alias.glade b/data/mail-alias.glade
index efa954e..fc59fa5 100644
--- a/data/mail-alias.glade
+++ b/data/mail-alias.glade
@@ -4,13 +4,13 @@
@@ -19,35 +19,66 @@
False
vertical
-
+
True
- True
+ False
+ 6
+ 6
+ 6
-
+
True
False
- vertical
+ 4
+ True
-
+
True
- True
- in
+ False
+ vertical
-
+
True
True
- False
+ in
+
+
+ True
+ True
+ False
+ alias
+
+
+
+
+
+ Alias
+ alias
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 6
+ end
alias
-
-
-
-
-
- Alias
- alias
-
-
+ VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
+
+ False
+ True
+ 1
+
@@ -57,83 +88,65 @@
-
+
True
False
- 6
- end
- alias
- VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
-
-
- False
- True
- 1
-
-
-
-
- False
- False
-
-
-
-
- True
- False
- vertical
-
-
- True
- True
- in
+ vertical
-
+
True
True
- False
- child
-
-
-
+ in
-
- autosize
- Children
- model-alias
- child
- True
+
+ True
+ True
+ False
+ child
+
+
+
+
+
+ autosize
+ Children
+ model-alias
+ child
+ True
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 6
+ end
+ child
+ VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
+
+
+ False
+ False
+ 1
+
True
True
- 0
-
-
-
-
- True
- False
- 6
- end
- child
- VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
-
-
- False
- False
1
-
- False
- False
-
@@ -144,15 +157,15 @@
-
-
- SELECT parent, child FROM mail_alias_child WHERE #p
-
-
SELECT id, alias FROM mail_alias
+
+
+ SELECT parent, child FROM mail_alias_child WHERE #p
+
+
diff --git a/data/queries.glade b/data/queries.glade
deleted file mode 100644
index 0baf12b..0000000
--- a/data/queries.glade
+++ /dev/null
@@ -1,232 +0,0 @@
-
-
-
-
-
-
-
-
- Send
- Send
- Send the current query
- system-run
-
-
-
-
-
-
- Clean
- Clean
- Clean the messages
- edit-clear
-
-
-
-
-
-
-
-
-
-
-
-
- 300
- True
- False
- 8
- vertical
- 8
-
-
- True
- False
- 8
-
-
- True
- False
- 1
- Query:
-
-
- False
- True
- 0
-
-
-
-
- True
- False
- True
- 0
- 1
-
-
- True
- True
- Set on the code
-
-
-
-
-
- True
- True
- 1
-
-
-
-
- send
- True
- True
- True
-
-
- False
- True
- 2
-
-
-
-
- clean
- True
- True
- True
-
-
- False
- False
- 3
-
-
-
-
- gtk-stop
- True
- True
- True
- True
-
-
-
- False
- False
- 4
-
-
-
-
- False
- True
- 0
-
-
-
-
- True
- True
- 120
- True
-
-
- True
- True
- never
- in
-
-
- True
- True
- model
- True
- 0
- True
- True
-
-
-
-
-
-
-
- False
- True
-
-
-
-
- True
- True
- in
-
-
- True
- True
-
-
-
-
-
-
-
- True
- True
-
-
-
-
- True
- True
- 1
-
-
-
-
- True
- False
- 8
-
-
- Immediate changes
- True
- False
- True
- False
- 0
- True
- True
-
-
-
- True
- True
- 0
-
-
-
-
- True
- False
- start
- VN_HANDLER_SHOW_REFRESH | VN_HANDLER_SHOW_UNDO | VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
-
-
- False
- True
- 1
-
-
-
-
- False
- True
- 2
-
-
-
-
diff --git a/data/users.glade b/data/users.glade
new file mode 100644
index 0000000..e381212
--- /dev/null
+++ b/data/users.glade
@@ -0,0 +1,904 @@
+
+
+
+
+
+
+
+ account-model
+ on-iter
+
+
+
+
+ alias-model
+
+
+
+
+ sip-model
+ on-iter
+
+
+
+
+ users-model
+
+
+
+
+ True
+ False
+ 6
+ vertical
+ 6
+
+
+ True
+ True
+ in
+
+
+ True
+ True
+ False
+ 1
+ users
+
+
+
+
+
+ Identifier
+ id
+
+
+
+
+ User
+ True
+ name
+
+
+
+
+ MySQL User
+ user
+
+
+
+
+ Enabled
+ active
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ end
+ users
+ VN_HANDLER_SHOW_REFRESH | VN_HANDLER_SHOW_UNDO | VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ start
+ left
+
+
+ True
+ False
+ 15
+ vertical
+ 20
+
+
+ True
+ False
+ 6
+ 6
+ True
+
+
+ True
+ False
+ 1
+ Name:
+
+
+ 0
+ 1
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Password:
+
+
+ 0
+ 2
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ MySQL user:
+
+
+ 0
+ 3
+ 1
+ 1
+
+
+
+
+ True
+ False
+ users
+ active
+
+
+ 1
+ 4
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Enabled:
+
+
+ 0
+ 4
+ 1
+ 1
+
+
+
+
+ 130
+ True
+ False
+ 1
+ Identifier:
+
+
+ 0
+ 0
+ 1
+ 1
+
+
+
+
+ 170
+ True
+ False
+ users
+ id
+ False
+
+
+ 1
+ 0
+ 1
+ 1
+
+
+
+
+ True
+ False
+ users
+ name
+
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+ True
+ False
+ user-combo-model
+ users
+ mysql_user_id
+
+
+ 1
+ 3
+ 1
+ 1
+
+
+
+
+ gtk-edit
+ True
+ True
+ True
+ True
+
+
+
+ 1
+ 2
+ 1
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+
+ 100
+ True
+ False
+ User
+
+
+ False
+
+
+
+
+ True
+ False
+ 15
+ vertical
+ 20
+
+
+ True
+ False
+ 6
+ 6
+ True
+
+
+ True
+ False
+ account-combo-model
+ account
+ group_id
+
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+ 170
+ True
+ False
+ account
+ uid
+
+
+ 1
+ 0
+ 1
+ 1
+
+
+
+
+ 130
+ True
+ False
+ 1
+ UID:
+
+
+ 0
+ 0
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Main group:
+
+
+ 0
+ 1
+ 1
+ 1
+
+
+
+
+ True
+ False
+ account
+ last_change
+
+
+ 1
+ 2
+ 1
+ 1
+
+
+
+
+ True
+ False
+ account
+ expire
+
+
+ 1
+ 3
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Last change:
+
+
+ 0
+ 2
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Expires:
+
+
+ 0
+ 3
+ 1
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ end
+ account
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ 1
+
+
+
+
+ 100
+ True
+ False
+ Account
+
+
+ 1
+ False
+
+
+
+
+ True
+ False
+ 15
+ vertical
+ 6
+
+
+ 160
+ True
+ True
+ in
+
+
+ True
+ True
+ False
+ alias
+
+
+
+
+
+ Alias
+ alias-combo-model
+ mail_alias_id
+ True
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 6
+ end
+ alias
+ VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD
+
+
+ False
+ True
+ 2
+
+
+
+
+ 2
+
+
+
+
+ 100
+ True
+ False
+ Mail alias
+
+
+ 2
+ False
+
+
+
+
+ True
+ False
+ 15
+ vertical
+ 20
+
+
+ True
+ False
+ start
+ 6
+ 6
+ True
+
+
+ 130
+ True
+ False
+ 1
+ Extension:
+
+
+ 0
+ 0
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Secret:
+
+
+ 0
+ 1
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Identifier:
+
+
+ 0
+ 2
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Call group:
+
+
+ 0
+ 3
+ 1
+ 1
+
+
+
+
+ 170
+ True
+ False
+ sip
+ extension
+
+
+ 1
+ 0
+ 1
+ 1
+
+
+
+
+ True
+ False
+ sip
+ secret
+
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+ True
+ False
+ sip
+ callerid
+
+
+ 1
+ 2
+ 1
+ 1
+
+
+
+
+ True
+ False
+ sip
+ callgroup
+
+
+ 1
+ 3
+ 1
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 6
+ end
+ sip
+
+
+ False
+ True
+ 1
+
+
+
+
+ 3
+
+
+
+
+ 100
+ True
+ False
+ SIP
+
+
+ 3
+ False
+
+
+
+
+ False
+ False
+ 3
+
+
+
+
+
+
+ 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
+
+
+
+
+ SELECT user_id, extension, secret, callerid, callgroup
+FROM account_sip
+WHERE #p
+
+
+
+
+ SELECT id, alias FROM mail_alias
+
+
+
+
+
+ SELECT id, user FROM mysql_user
+
+
+
+
+
+ SELECT mail_alias_id, user_id
+FROM mail_alias_account
+WHERE #p
+
+
+
+
+ SELECT user_id, group_id, uid, last_change, expire
+FROM account
+WHERE #p
+
+
+
+
+ SELECT id, name FROM `group`
+
+
+
+
+
+ False
+ 5
+ Change password
+ False
+ True
+ True
+ dialog
+
+
+
+
+ False
+ vertical
+ 2
+
+
+ True
+ False
+
+
+ False
+ 8
+ 8
+
+
+ True
+ False
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ False
+ 5
+ vertical
+ end
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 6
+ 6
+ 6
+
+
+ True
+ False
+ 1
+ Password:
+
+
+ 0
+ 0
+ 1
+ 1
+
+
+
+
+ True
+ False
+ 1
+ Repeat password:
+
+
+ 0
+ 1
+ 1
+ 1
+
+
+
+
+ True
+ True
+ False
+ ●
+ True
+
+
+ 1
+ 0
+ 1
+ 1
+
+
+
+
+ True
+ True
+ False
+ ●
+ True
+
+
+ 1
+ 1
+ 1
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ end
+
+
+
+
+
+
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+
+
+
diff --git a/po/POTFILES.in b/po/POTFILES.in
index da3614a..7abbfcd 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,10 +1,10 @@
# List of source files containing translatable strings.
src/account.vala
-src/users.vala
-src/queries.vala
-src/mail-alias.vala
-data/users.glade
-data/queries.glade
-data/mail-alias.glade
[type: gettext/glade]data/account.xml
+
+src/users.vala
+data/users.glade
+
+src/mail-alias.vala
+data/mail-alias.glade
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
index 7e40e08..e68b995 100644
--- a/po/POTFILES.skip
+++ b/po/POTFILES.skip
@@ -2,5 +2,4 @@
src/account.c
src/users.c
-src/queries.c
src/mail-alias.c
diff --git a/po/es.po b/po/es.po
index d2b2475..769048e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2013-12-16 16:30+0100\n"
+"POT-Creation-Date: 2013-12-18 10:54+0100\n"
"PO-Revision-Date: 2013-09-24 12:09+0200\n"
"Last-Translator: Alejandro T. Colombini \n"
"Language-Team: none\n"
@@ -18,6 +18,26 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#: ../data/account.xml.h:1
+msgid "Accounts"
+msgstr "Cuentas"
+
+#: ../data/account.xml.h:2
+msgid "_Accounts"
+msgstr "_Cuentas"
+
+#: ../data/account.xml.h:3
+msgid "Users"
+msgstr "Usuarios"
+
+#: ../data/account.xml.h:4
+msgid "Mail Alias"
+msgstr "Alias de correo"
+
+#: ../data/account.xml.h:5
+msgid "Queries"
+msgstr "Consultas"
+
#: ../src/users.vala:87
msgid "The password can't be empty."
msgstr "La contraseña no puede estar vacía."
@@ -30,18 +50,6 @@ msgstr "Las contraseñas no coinciden."
msgid "The password is too weak."
msgstr "La contraseña es demasiado débil."
-#: ../src/queries.vala:59
-msgid "Message"
-msgstr "Mensaje"
-
-#: ../src/queries.vala:62
-msgid "Type or select a query"
-msgstr "Escribe o selecciona una consulta"
-
-#: ../src/queries.vala:129
-msgid "Error"
-msgstr "Error"
-
#: ../data/users.glade.h:1
msgid "Identifier"
msgstr "Identificador"
@@ -130,50 +138,6 @@ msgstr "Cambiar contraseña"
msgid "Repeat password:"
msgstr "Repetir contraseña:"
-#: ../data/queries.glade.h:1
-msgid "Send"
-msgstr "Enviar"
-
-#: ../data/queries.glade.h:2
-msgid "Send the current query"
-msgstr "Enviar la consulta actual"
-
-#: ../data/queries.glade.h:3
-msgid "Clean"
-msgstr "Limpiar"
-
-#: ../data/queries.glade.h:4
-msgid "Clean the messages"
-msgstr "Limpiar los mensajes"
-
-#: ../data/queries.glade.h:5
-msgid "Query:"
-msgstr "Consulta:"
-
-#: ../data/queries.glade.h:6
-msgid "Immediate changes"
-msgstr "Cambios inmediatos"
-
#: ../data/mail-alias.glade.h:2
msgid "Children"
msgstr "Hijos"
-
-#: ../data/account.xml.h:1
-msgid "Accounts"
-msgstr "Cuentas"
-
-#: ../data/account.xml.h:2
-msgid "_Accounts"
-msgstr "_Cuentas"
-
-#: ../data/account.xml.h:3
-msgid "Users"
-msgstr "Usuarios"
-
-#: ../data/account.xml.h:4
-msgid "Mail Alias"
-msgstr "Alias de correo"
-
-#: ../data/account.xml.h:5
-msgid "Queries"
-msgstr "Consultas"
diff --git a/sql/account/queries.sql b/sql/account/queries.sql
deleted file mode 100644
index b217bda..0000000
--- a/sql/account/queries.sql
+++ /dev/null
@@ -1 +0,0 @@
-SELECT name, color, id FROM item;
\ No newline at end of file
diff --git a/src/Makefile.am b/src/Makefile.am
index 4c2e58a..db5d1c9 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,7 +7,6 @@ libaccount_la_SOURCES = \
config.vapi \
account.vala \
users.vala \
- queries.vala \
mail-alias.vala
libaccount_la_LIBADD = $(ACCOUNT_LIBS)
@@ -23,8 +22,8 @@ libaccount_la_CPPFLAGS = \
libaccount_la_CFLAGS = $(CFLAGS)
-account_querydir = $(querydir)/account
-account_query_DATA = $(top_srcdir)/sql/account/queries.sql
+#account_querydir = $(querydir)/account
+#account_query_DATA = $(top_srcdir)/sql/account/queries.sql
libaccount_la_VALAFLAGS = --pkg hedera \
$(VALAFLAGS)
diff --git a/src/queries.vala b/src/queries.vala
deleted file mode 100644
index 8e474c8..0000000
--- a/src/queries.vala
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * 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 .
- */
-
-using Gtk;
-
-public class Vn.Queries : Vn.Form
-{
- private ListStore model;
- private CheckButton mode;
- private ComboBoxText combo;
- private TreeView tv;
- private Vn.Grid grid;
- private Vn.Handler handler;
-
- private const string FILE_KW = "sql://";
-
- public override void open (Gtk.Builder builder)
- {
- string[] queries =
- {
-//MySQL (kk schema)
- "/*my*/SELECT id, name, item_id, item_id2, amount, item.price "+
- "FROM movement JOIN item USING (item_id, item_id2)"
- ,"/*my*/SELECT item_id,item_id2, i.name, m.id, m.amount, m.price "+
- "FROM item i LEFT JOIN movement m USING (item_id, item_id2)"
- ,"/*my*/SELECT item_id, item_id2, name, price FROM item"
-//PgSQL (test schema)
- ,"/*pg*/SELECT pg_sleep(120)"
- ,"/*pg*/SELECT i.id, i.name, i.color, m.id, m.amount "+
- "FROM item i LEFT JOIN movement m ON i.id = m.item_id"
- ,"/*pg*/SELECT m.id, amount, item_id, name, color "+
- "FROM movement m JOIN item ON m.item_id = item.id"
- ,FILE_KW + mod.name + "/" + name
- ,"/*pg*/ SELECT id1, id2, name, ok, date, number, floating, image "+
- "FROM prueben"
- };
-
- combo = get ("query") as ComboBoxText;
- model = get ("model") as ListStore;
- tv = get ("treeview") as TreeView;
- grid = get ("consulter") as Vn.Grid;
- handler = get ("handler") as Vn.Handler;
- mode = get ("mode") as CheckButton;
-
- tv.insert_column_with_attributes (-1, _("Message"),
- new Gtk.CellRendererText(), "text", 0);
-
- (combo.get_child () as Gtk.Entry).placeholder_text = _("Type or select a query");
- foreach (string s in queries)
- combo.prepend_text (s);
- }
-
- void set_message (string? msg)
- {
- Gtk.TreeIter iter;
- model.append (out iter);
- model.set (iter, 0, msg);
- Gtk.TreePath path = model.get_path (iter);
- tv.scroll_to_cell (path, null, false, 0, 0);
- }
-
-// Callbacks
-
- [CCode (instance_pos = -1)]
- public void send_clicked (Gtk.Button button)
- {
- Db.Model model;
- string sql = combo.get_active_text ();
-
- set_message (sql);
-
- if (sql.has_prefix (FILE_KW))
- model = new Db.Model.with_file (conn, sql.substring (FILE_KW.length, -1));
- else
- model = new Db.Model.with_sql (conn, sql);
-
- GLib.Signal.connect_after (model, "status-changed", (GLib.Callback) status_changed, this);
-
- handler.iterator = new Db.Iterator (model);
- handler.iterator.mode = Db.IteratorMode.ON_DEMAND;
- grid.iterator = handler.iterator;
- }
-
- [CCode (instance_pos = -1)]
- public void status_changed (Db.Model model, Db.ModelStatus status)
- {
- foreach (unowned Gtk.TreeViewColumn column in grid.get_columns ())
- grid.remove_column (column);
-
- switch (status)
- {
- case Db.ModelStatus.READY:
- {
- for (int i = 0; i < model.get_ncols (); i++)
- {
- GLib.Type col_type, type = model.get_column_type (i);
-
- if (type == typeof (GLib.Bytes))
- col_type = typeof (Vn.ColumnImage);
- else if (type == typeof (bool))
- col_type = typeof (Vn.ColumnCheck);
- else
- col_type = typeof (Vn.ColumnEntry);
-
- Vn.Column column = grid.append_column
- (i, model.get_column_name (i), col_type, true, false);
-
- if (type == typeof (float) || type == typeof (double))
- column.set ("digits", 3);
- }
- break;
- }
- case Db.ModelStatus.ERROR:
- {
- set_message (_("Error"));
- break;
- }
- default:
- break;
- }
-
- mode.sensitive = true;
- mode_toggled (mode);
- }
-
- [CCode (instance_pos = -1)]
- public void mode_toggled (Gtk.ToggleButton mode)
- {
- handler.iterator.mode = mode.active ?
- Db.IteratorMode.ON_CHANGE :
- Db.IteratorMode.ON_DEMAND;
- }
-
- [CCode (instance_pos = -1)]
- public void clean_clicked (Gtk.Button button)
- {
- model.clear ();
- }
-
- [CCode (instance_pos = -1)]
- public void stop_clicked (Gtk.Button button)
- {
- conn.kill_query ();
- }
-}
-