Cambios para adaptar formularios a la librería y solucionar algunos bugs

This commit is contained in:
Alejandro T. Colombini Gómez 2014-10-16 08:51:18 +02:00
parent c7e99e03d1
commit 1d545953b0
7 changed files with 197 additions and 222 deletions

View File

@ -1,16 +0,0 @@
<interface>
<requires lib="gtk+" version="3.0"/>
<menu id='menu'>
<item>
<attribute name='label' translatable='yes'>Users</attribute>
<attribute name='action'>win.open-users</attribute>
<attribute name='accel'>F2</attribute>
</item>
<item>
<attribute name='label' translatable='yes'>EMail</attribute>
<attribute name='action'>win.open-email</attribute>
<attribute name='accel'>F3</attribute>
</item>
</menu>
</interface>

18
data/account-menu.xml Normal file
View File

@ -0,0 +1,18 @@
<interface>
<requires lib="gtk+" version="3.0"/>
<menu id="menu">
<item>
<attribute name="label" translatable="yes">Users</attribute>
<attribute name="action">win.open-form</attribute>
<attribute name="target">users</attribute>
<attribute name="accel">F2</attribute>
</item>
<item>
<attribute name="label" translatable="yes">EMail</attribute>
<attribute name="action">win.open-form</attribute>
<attribute name="target">email</attribute>
<attribute name="accel">F3</attribute>
</item>
</menu>
</interface>

View File

@ -16,3 +16,4 @@
</form>
</form-group>
</module>

View File

@ -4,6 +4,12 @@
<requires lib="gtk+" version="3.12"/>
<requires lib="vn" version="1.0"/>
<object class="VnSet" id="models">
<child>
<object class="VnModel" id="model-alias">
<property name="sql">SELECT id, alias FROM mail_alias</property>
<property name="update_flags">DB_MODEL_INSERT | DB_MODEL_DELETE | DB_MODEL_UPDATE</property>
</object>
</child>
<child>
<object class="VnModel" id="model-child">
<property name="sql">SELECT parent, child FROM mail_alias_child WHERE #link</property>
@ -13,29 +19,6 @@
</links>
</object>
</child>
<child>
<object class="VnModel" id="model-alias">
<property name="sql">SELECT id, alias FROM mail_alias</property>
<property name="update_flags">DB_MODEL_INSERT | DB_MODEL_DELETE | DB_MODEL_UPDATE</property>
</object>
</child>
</object>
<object class="VnSet" id="iterators">
<child>
<object class="VnIterator" id="child">
<property name="model">model-child</property>
</object>
</child>
<child>
<object class="VnIterator" id="alias">
<property name="model">model-alias</property>
<child>
<object class="DbParam" id="id">
<property name="column_name">id</property>
</object>
</child>
</object>
</child>
</object>
<object class="GtkBox" id="main">
<property name="visible">True</property>
@ -45,31 +28,33 @@
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="top_padding">6</property>
<property name="top_padding">8</property>
<property name="bottom_padding">8</property>
<property name="left_padding">6</property>
<property name="right_padding">6</property>
<child>
<object class="GtkBox" id="box3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<property name="spacing">5</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="VnGrid" id="grid1">
<object class="VnGrid" id="grid-alias">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_clickable">False</property>
<property name="iterator">alias</property>
<property name="data_model">model-alias</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="grid-selection"/>
</child>
@ -96,7 +81,7 @@
<object class="VnHandler" id="handler1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">alias</property>
<property name="iterator">grid-alias</property>
<property name="show_flags">VN_HANDLER_SHOW_REFRESH | VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
</object>
<packing>
@ -117,17 +102,18 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">8</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="VnGrid" id="grid2">
<object class="VnGrid" id="grid-child">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_clickable">False</property>
<property name="iterator">child</property>
<property name="data_model">model-child</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="grid-selection1"/>
</child>
@ -137,7 +123,7 @@
<property name="title" translatable="yes">Children</property>
<property name="column_name">child</property>
<property name="editable">True</property>
<property name="model">model-alias</property>
<property name="data_model">model-alias</property>
<child internal-child="cell">
<object class="GtkCellRendererCombo" id="column-combo-cell1"/>
</child>
@ -156,7 +142,7 @@
<object class="VnHandler" id="handler2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">child</property>
<property name="iterator">grid-child</property>
<property name="show_flags">VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
</object>
<packing>
@ -182,4 +168,12 @@
</packing>
</child>
</object>
<object class="VnSet" id="params">
<child>
<object class="DbParam" id="id">
<property name="iterator">grid-alias</property>
<property name="column_name">id</property>
</object>
</child>
</object>
</interface>

View File

@ -5,40 +5,11 @@
<requires lib="vn" version="1.0"/>
<object class="VnSet" id="models">
<child>
<object class="VnModel" id="account-combo-model">
<property name="sql">SELECT id, name FROM `group`</property>
</object>
</child>
<child>
<object class="VnModel" id="account-model">
<property name="sql">SELECT user_id, group_id, uid, last_change, expire
FROM account
WHERE #link</property>
<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>
<property name="update_flags">DB_MODEL_INSERT | DB_MODEL_DELETE | DB_MODEL_UPDATE</property>
<links>
<link field="account.user_id" param="id" linked="True"/>
</links>
</object>
</child>
<child>
<object class="VnModel" id="alias-model">
<property name="sql">SELECT mail_alias_id, user_id
FROM mail_alias_account
WHERE #link</property>
<property name="update_flags">DB_MODEL_INSERT | DB_MODEL_DELETE | DB_MODEL_UPDATE</property>
<links>
<link field="mail_alias_account.user_id" param="user-id" linked="True"/>
</links>
</object>
</child>
<child>
<object class="VnModel" id="user-combo-model">
<property name="sql">SELECT id, user FROM mysql_user</property>
</object>
</child>
<child>
<object class="VnModel" id="alias-combo-model">
<property name="sql">SELECT id, alias FROM mail_alias</property>
</object>
</child>
<child>
@ -53,39 +24,47 @@ WHERE #link</property>
</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 class="VnModel" id="alias-combo-model">
<property name="sql">SELECT id, alias FROM mail_alias</property>
</object>
</child>
<child>
<object class="VnModel" id="user-combo-model">
<property name="sql">SELECT id, user FROM mysql_user</property>
</object>
</child>
<child>
<object class="VnModel" id="alias-model">
<property name="sql">SELECT mail_alias_id, user_id
FROM mail_alias_account
WHERE #link</property>
<property name="update_flags">DB_MODEL_INSERT | DB_MODEL_DELETE | DB_MODEL_UPDATE</property>
<links>
<link field="mail_alias_account.user_id" param="user-id" linked="True"/>
</links>
</object>
</child>
<child>
<object class="VnModel" id="account-model">
<property name="sql">SELECT user_id, group_id, uid, last_change, expire
FROM account
WHERE #link</property>
<property name="update_flags">DB_MODEL_INSERT | DB_MODEL_DELETE | DB_MODEL_UPDATE</property>
<links>
<link field="account.user_id" param="id" linked="True"/>
</links>
</object>
</child>
<child>
<object class="VnModel" id="account-combo-model">
<property name="sql">SELECT id, name FROM `group`</property>
</object>
</child>
</object>
<object class="VnSet" id="iterators">
<child>
<object class="VnIterator" id="users">
<property name="model">users-model</property>
<child>
<object class="DbParam" id="id">
<property name="column_name">id</property>
</object>
</child>
</object>
</child>
<child>
<object class="VnIterator" id="sip">
<property name="model">sip-model</property>
<property name="mode">on-iter</property>
</object>
</child>
<child>
<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="data_model">account-model</property>
<property name="mode">on-iter</property>
<child>
<object class="DbParam" id="user-id">
@ -94,10 +73,16 @@ FROM `user` u
</child>
</object>
</child>
<child>
<object class="VnIterator" id="sip">
<property name="data_model">sip-model</property>
<property name="mode">on-iter</property>
</object>
</child>
</object>
<object class="GtkBox" id="main">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">6</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@ -107,12 +92,12 @@ FROM `user` u
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="VnGrid" id="grid">
<object class="VnGrid" id="users-grid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_clickable">False</property>
<property name="search_column">1</property>
<property name="iterator">users</property>
<property name="data_model">users-model</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="grid-selection"/>
</child>
@ -163,10 +148,10 @@ FROM `user` u
</packing>
</child>
<child>
<object class="VnHandler" id="handler1">
<object class="VnHandler" id="users-handler">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">users</property>
<property name="can_focus">True</property>
<property name="iterator">users-grid</property>
<property name="show_flags">VN_HANDLER_SHOW_REFRESH | VN_HANDLER_SHOW_UNDO | VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
</object>
<packing>
@ -182,23 +167,23 @@ FROM `user` u
<property name="valign">start</property>
<property name="tab_pos">left</property>
<child>
<object class="GtkBox" id="box4">
<object class="GtkBox" id="user-tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">15</property>
<property name="orientation">vertical</property>
<property name="spacing">20</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<property name="row_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Name:</property>
</object>
@ -210,7 +195,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Password:</property>
</object>
@ -222,7 +207,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">MySQL user:</property>
</object>
@ -234,7 +219,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Enabled:</property>
</object>
@ -247,7 +232,7 @@ FROM `user` u
<object class="GtkLabel" id="label7">
<property name="width_request">130</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Identifier:</property>
</object>
@ -261,7 +246,7 @@ FROM `user` u
<property name="width_request">170</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">users</property>
<property name="iterator">users-grid</property>
<property name="column_name">id</property>
<property name="editable">False</property>
<child internal-child="widget">
@ -279,11 +264,11 @@ FROM `user` u
<object class="VnEntry" id="entry1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">users</property>
<property name="iterator">users-grid</property>
<property name="column_name">name</property>
<child internal-child="widget">
<object class="GtkEntry" id="entry-widget1">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
@ -295,10 +280,15 @@ FROM `user` u
<child>
<object class="VnCombo" id="combo1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">users</property>
<property name="can_focus">True</property>
<property name="iterator">users-grid</property>
<property name="column_name">mysql_user_id</property>
<property name="model">user-combo-model</property>
<property name="data_model">user-combo-model</property>
<child internal-child="widget">
<object class="GtkComboBox" id="combo-widget1">
<property name="can_focus">False</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
@ -323,7 +313,7 @@ FROM `user` u
<object class="VnCheck" id="check1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">users</property>
<property name="iterator">users-grid</property>
<property name="column_name">active</property>
<child internal-child="widget">
<object class="GtkCheckButton" id="check-widget1">
@ -351,10 +341,10 @@ FROM `user` u
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label19">
<object class="GtkLabel" id="user-tab-label">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">User</property>
</object>
<packing>
@ -362,16 +352,16 @@ FROM `user` u
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<object class="GtkBox" id="account-tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">15</property>
<property name="orientation">vertical</property>
<property name="spacing">20</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
<property name="row_homogeneous">True</property>
@ -381,7 +371,7 @@ FROM `user` u
<property name="can_focus">False</property>
<property name="iterator">account</property>
<property name="column_name">group_id</property>
<property name="model">account-combo-model</property>
<property name="data_model">account-combo-model</property>
<child internal-child="widget">
<object class="GtkComboBox" id="combo-widget2">
<property name="can_focus">False</property>
@ -402,7 +392,7 @@ FROM `user` u
<property name="column_name">uid</property>
<child internal-child="widget">
<object class="GtkSpinButton" id="spin-widget2">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
@ -415,7 +405,7 @@ FROM `user` u
<object class="GtkLabel" id="label10">
<property name="width_request">130</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">UID:</property>
</object>
@ -427,7 +417,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Main group:</property>
</object>
@ -439,12 +429,12 @@ FROM `user` u
<child>
<object class="VnDateChooser" id="date-chooser1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="iterator">account</property>
<property name="column_name">last_change</property>
<child internal-child="widget">
<object class="GtkToggleButton" id="date-chooser-widget1">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
</object>
</child>
@ -462,7 +452,7 @@ FROM `user` u
<property name="column_name">expire</property>
<child internal-child="widget">
<object class="GtkToggleButton" id="date-chooser-widget2">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
</object>
</child>
@ -475,7 +465,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label12">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Last change:</property>
</object>
@ -487,7 +477,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Expires:</property>
</object>
@ -504,9 +494,9 @@ FROM `user` u
</packing>
</child>
<child>
<object class="VnHandler" id="handler2">
<object class="VnHandler" id="account-handler">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="iterator">account</property>
<property name="simple_record">True</property>
</object>
@ -522,10 +512,10 @@ FROM `user` u
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label20">
<object class="GtkLabel" id="account-tab-label">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Account</property>
</object>
<packing>
@ -534,9 +524,9 @@ FROM `user` u
</packing>
</child>
<child>
<object class="GtkBox" id="box6">
<object class="GtkBox" id="alias-tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">15</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
@ -547,11 +537,11 @@ FROM `user` u
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="VnGrid" id="grid5">
<object class="VnGrid" id="alias-grid">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_clickable">False</property>
<property name="iterator">alias</property>
<property name="data_model">alias-model</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="grid-selection2"/>
</child>
@ -560,7 +550,7 @@ FROM `user` u
<property name="title" translatable="yes">Alias</property>
<property name="column_name">mail_alias_id</property>
<property name="editable">True</property>
<property name="model">alias-combo-model</property>
<property name="data_model">alias-combo-model</property>
<child internal-child="cell">
<object class="GtkCellRendererCombo" id="column-combo-cell1"/>
</child>
@ -576,10 +566,10 @@ FROM `user` u
</packing>
</child>
<child>
<object class="VnHandler" id="handler4">
<object class="VnHandler" id="alias-handler">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="iterator">alias</property>
<property name="can_focus">True</property>
<property name="iterator">alias-grid</property>
<property name="show_flags">VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
</object>
<packing>
@ -594,10 +584,10 @@ FROM `user` u
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label8">
<object class="GtkLabel" id="alias-tab-label">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Mail alias</property>
</object>
<packing>
@ -606,16 +596,16 @@ FROM `user` u
</packing>
</child>
<child>
<object class="GtkBox" id="box3">
<object class="GtkBox" id="sip-tab">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">15</property>
<property name="orientation">vertical</property>
<property name="spacing">58</property>
<child>
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="valign">start</property>
<property name="row_spacing">6</property>
<property name="column_spacing">6</property>
@ -624,7 +614,7 @@ FROM `user` u
<object class="GtkLabel" id="label15">
<property name="width_request">130</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Extension:</property>
</object>
@ -636,7 +626,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Secret:</property>
</object>
@ -648,7 +638,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label17">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Identifier:</property>
</object>
@ -666,7 +656,7 @@ FROM `user` u
<property name="column_name">extension</property>
<child internal-child="widget">
<object class="GtkEntry" id="entry-widget2">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
@ -683,7 +673,7 @@ FROM `user` u
<property name="column_name">secret</property>
<child internal-child="widget">
<object class="GtkEntry" id="entry-widget3">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
@ -700,7 +690,7 @@ FROM `user` u
<property name="column_name">callerid</property>
<child internal-child="widget">
<object class="GtkEntry" id="entry-widget4">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
</object>
</child>
</object>
@ -717,9 +707,9 @@ FROM `user` u
</packing>
</child>
<child>
<object class="VnHandler" id="handler3">
<object class="VnHandler" id="sip-handler">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="iterator">sip</property>
<property name="simple_record">True</property>
</object>
@ -735,10 +725,10 @@ FROM `user` u
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label21">
<object class="GtkLabel" id="sip-tab-label">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">SIP</property>
</object>
<packing>
@ -754,14 +744,22 @@ FROM `user` u
</packing>
</child>
</object>
<object class="VnSet" id="params">
<child>
<object class="DbParam" id="id">
<property name="iterator">users-grid</property>
<property name="column_name">id</property>
</object>
</child>
</object>
<object class="VnBatch" id="password-batch">
<items>
<item id="user" param="user-id"/>
<item id="user" param="id"/>
<item id="pass" param="password-entry"/>
</items>
</object>
<object class="GtkDialog" id="password-dialog">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Change password</property>
<property name="resizable">False</property>
@ -772,16 +770,34 @@ FROM `user` u
<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="can_focus">True</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
<property name="can_focus">True</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>
<child>
<object class="GtkInfoBar" id="password-infobar">
<property name="app_paintable">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="infobar-action_area1">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="border_width">5</property>
<property name="orientation">vertical</property>
<property name="layout_style">end</property>
@ -797,13 +813,13 @@ FROM `user` u
</child>
<child internal-child="content_area">
<object class="GtkBox" id="infobar-content_area1">
<property name="can_focus">False</property>
<property name="can_focus">True</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>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
@ -828,14 +844,14 @@ FROM `user` u
<child>
<object class="GtkGrid" id="grid6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</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="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Password:</property>
</object>
@ -847,7 +863,7 @@ FROM `user` u
<child>
<object class="GtkLabel" id="label22">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="xalign">1</property>
<property name="label" translatable="yes">Repeat password:</property>
</object>
@ -859,10 +875,10 @@ FROM `user` u
<child>
<object class="VnEntry" id="password-entry">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<child internal-child="widget">
<object class="GtkEntry" id="entry-widget5">
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
</object>
@ -876,10 +892,11 @@ FROM `user` u
<child>
<object class="VnEntry" id="repeat-password">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<child internal-child="widget">
<object class="GtkEntry" id="entry-widget">
<property name="can_focus">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
</object>
@ -897,24 +914,6 @@ FROM `user` u
<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>

View File

@ -26,23 +26,4 @@ public class Vn.Management : Vn.Mod
public override void activate ()
{
}
// Actions
const GLib.ActionEntry[] actions =
{
{"open-form", open_form}
,{"test-set-action", test_set_action}
};
void open_form (GLib.SimpleAction a, GLib.Variant? p)
{}
void test_set_action (GLib.SimpleAction a, GLib.Variant? p)
{}
public override unowned GLib.ActionEntry[] get_actions ()
{
return actions;
}
}

View File

@ -18,14 +18,12 @@
public class Vn.Users : Vn.Form
{
private unowned Gvn.Param user_id;
private unowned Gtk.Dialog password_dialog;
private unowned Vn.Entry password_entry;
private unowned Vn.Entry repeat_password;
public override void open ()
{
user_id = get ("user-id") as Gvn.Param;
password_entry = get ("password-entry") as Vn.Entry;
repeat_password = get ("repeat-password") as Vn.Entry;
password_dialog = get ("password-dialog") as Gtk.Dialog;