Se ha quitado el formulario Queries y se han añadido archivos faltantes
This commit is contained in:
parent
a86ed98395
commit
f744cca3dc
|
@ -3,8 +3,6 @@ account_data_DATA = \
|
|||
account.xml \
|
||||
account.ui \
|
||||
users.glade \
|
||||
queries.glade \
|
||||
mail-alias.glade
|
||||
|
||||
|
||||
EXTRA_DIST = $(management_data_DATA)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<ui>
|
||||
<menubar name="MenuBar">
|
||||
<placeholder name="ModuleMenu">
|
||||
<menu name="AccountMenu" action="action-menu-account">
|
||||
<menuitem name="Users" action="open-users"/>
|
||||
<menuitem name="MailAlias" action="open-mail-alias"/>
|
||||
</menu>
|
||||
</placeholder>
|
||||
</menubar>
|
||||
</ui>
|
|
@ -0,0 +1,20 @@
|
|||
<module>
|
||||
<library translatable="yes" name="account">Accounts</library>
|
||||
<action-group>
|
||||
<action translatable="yes" name="action-menu-account">_Accounts</action>
|
||||
</action-group>
|
||||
<form-group>
|
||||
<form
|
||||
translatable="yes"
|
||||
name="users"
|
||||
icon="x-office-address-book"
|
||||
action-name="open-users"
|
||||
accel="F2">Users</form>
|
||||
<form
|
||||
translatable="yes"
|
||||
name="mail-alias"
|
||||
icon="mail-mark-unread"
|
||||
action-name="open-mail-alias"
|
||||
accel="F3">Mail Alias</form>
|
||||
</form-group>
|
||||
</module>
|
|
@ -4,13 +4,13 @@
|
|||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<object class="VnBatch" id="iterators">
|
||||
<child>
|
||||
<object class="VnIterator" id="child">
|
||||
<property name="model">model-child</property>
|
||||
<object class="VnIterator" id="alias">
|
||||
<property name="model">model-alias</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnIterator" id="alias">
|
||||
<property name="model">model-alias</property>
|
||||
<object class="VnIterator" id="child">
|
||||
<property name="model">model-child</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -19,35 +19,66 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkPaned" id="paned1">
|
||||
<object class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="top_padding">6</property>
|
||||
<property name="left_padding">6</property>
|
||||
<property name="right_padding">6</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">4</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="VnGrid" id="grid1">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="VnGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="iterator">alias</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="grid-selection"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnEntry" id="column-alias">
|
||||
<property name="title" translatable="yes">Alias</property>
|
||||
<property name="column_name">alias</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">alias</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="grid-selection"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnEntry" id="column-alias">
|
||||
<property name="title" translatable="yes">Alias</property>
|
||||
<property name="column_name">alias</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="show_flags">VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -57,83 +88,65 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler1">
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">alias</property>
|
||||
<property name="show_flags">VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="VnGrid" id="grid2">
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="iterator">child</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="grid-selection1"/>
|
||||
</child>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="VnColumnCombo" id="column-child">
|
||||
<property name="sizing">autosize</property>
|
||||
<property name="title" translatable="yes">Children</property>
|
||||
<property name="model">model-alias</property>
|
||||
<property name="column_name">child</property>
|
||||
<property name="editable">True</property>
|
||||
<object class="VnGrid" id="grid2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="iterator">child</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="grid-selection1"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnCombo" id="column-child">
|
||||
<property name="sizing">autosize</property>
|
||||
<property name="title" translatable="yes">Children</property>
|
||||
<property name="model">model-alias</property>
|
||||
<property name="column_name">child</property>
|
||||
<property name="editable">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">child</property>
|
||||
<property name="show_flags">VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">child</property>
|
||||
<property name="show_flags">VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
|
@ -144,15 +157,15 @@
|
|||
</child>
|
||||
</object>
|
||||
<object class="VnBatch" id="models">
|
||||
<child>
|
||||
<object class="DbModel" id="model-child">
|
||||
<property name="sql">SELECT parent, child FROM mail_alias_child WHERE #p</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="model-alias">
|
||||
<property name="sql">SELECT id, alias FROM mail_alias</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="DbModel" id="model-child">
|
||||
<property name="sql">SELECT parent, child FROM mail_alias_child WHERE #p</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
|
|
|
@ -1,232 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<!-- interface-requires vn 0.0 -->
|
||||
<!-- interface-local-resource-path ../image -->
|
||||
<object class="GtkActionGroup" id="actions">
|
||||
<child>
|
||||
<object class="GtkAction" id="send">
|
||||
<property name="label" translatable="yes">Send</property>
|
||||
<property name="short_label" translatable="yes">Send</property>
|
||||
<property name="tooltip" translatable="yes">Send the current query</property>
|
||||
<property name="icon_name">system-run</property>
|
||||
<signal name="activate" handler="vn_queries_send_clicked" swapped="no"/>
|
||||
</object>
|
||||
<accelerator key="s" modifiers="GDK_CONTROL_MASK"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkAction" id="clean">
|
||||
<property name="label" translatable="yes">Clean</property>
|
||||
<property name="short_label" translatable="yes">Clean</property>
|
||||
<property name="tooltip" translatable="yes">Clean the messages</property>
|
||||
<property name="icon_name">edit-clear</property>
|
||||
<signal name="activate" handler="vn_queries_clean_clicked" swapped="no"/>
|
||||
</object>
|
||||
<accelerator key="f" modifiers="GDK_CONTROL_MASK"/>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkListStore" id="model">
|
||||
<columns>
|
||||
<!-- column-name col -->
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkBox" id="main">
|
||||
<property name="height_request">300</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">8</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Query:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxText" id="query">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="has_entry">True</property>
|
||||
<property name="entry_text_column">0</property>
|
||||
<property name="id_column">1</property>
|
||||
<child internal-child="entry">
|
||||
<object class="GtkEntry" id="combo-entry">
|
||||
<property name="can_focus">True</property>
|
||||
<property name="activates_default">True</property>
|
||||
<property name="placeholder_text">Set on the code</property>
|
||||
<signal name="activate" handler="gtk_action_activate" object="send" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-send">
|
||||
<property name="related_action">send</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button-clean">
|
||||
<property name="related_action">clean</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="stop">
|
||||
<property name="label">gtk-stop</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="vn_queries_stop_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</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="GtkVPaned" id="paned">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="position">120</property>
|
||||
<property name="position_set">True</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="model">model</property>
|
||||
<property name="rules_hint">True</property>
|
||||
<property name="search_column">0</property>
|
||||
<property name="fixed_height_mode">True</property>
|
||||
<property name="rubber_banding">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">False</property>
|
||||
<property name="shrink">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<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="consulter">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeform-selection"/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="resize">True</property>
|
||||
<property name="shrink">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">8</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="mode">
|
||||
<property name="label" translatable="yes">Immediate changes</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="active">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="vn_queries_mode_toggled" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">start</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>
|
||||
<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">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
|
@ -0,0 +1,904 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.0 -->
|
||||
<!-- interface-requires vn 0.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>
|
||||
</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="users">
|
||||
<property name="model">users-model</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkBox" id="main">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</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">
|
||||
<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>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="grid-selection"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnEntry" id="column-id">
|
||||
<property name="title" translatable="yes">Identifier</property>
|
||||
<property name="column_name">id</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnEntry" id="column-name">
|
||||
<property name="title" translatable="yes">User</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="column_name">name</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnEntry" id="column-mysql-user">
|
||||
<property name="title" translatable="yes">MySQL User</property>
|
||||
<property name="column_name">user</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnCheck" id="column-check1">
|
||||
<property name="title" translatable="yes">Enabled</property>
|
||||
<property name="column_name">active</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">users</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>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="tab_pos">left</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</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="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="xalign">1</property>
|
||||
<property name="label" translatable="yes">Name:</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="GtkLabel" id="label4">
|
||||
<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">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">MySQL user:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnCheck" id="check1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">users</property>
|
||||
<property name="column_name">active</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Enabled:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="width_request">130</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Identifier:</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="VnSpin" id="spin1">
|
||||
<property name="width_request">170</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">users</property>
|
||||
<property name="column_name">id</property>
|
||||
<property name="editable">False</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="VnEntry" id="entry1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">users</property>
|
||||
<property name="column_name">name</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>
|
||||
<child>
|
||||
<object class="VnCombo" id="combo1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">user-combo-model</property>
|
||||
<property name="iterator">users</property>
|
||||
<property name="column_name">mysql_user_id</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">gtk-edit</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
<signal name="clicked" handler="vn_user_account_on_set_password_clicked" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</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">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label19">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">User</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</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="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="VnCombo" id="combo2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">account-combo-model</property>
|
||||
<property name="iterator">account</property>
|
||||
<property name="column_name">group_id</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>
|
||||
<child>
|
||||
<object class="VnSpin" id="spin2">
|
||||
<property name="width_request">170</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">account</property>
|
||||
<property name="column_name">uid</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="GtkLabel" id="label10">
|
||||
<property name="width_request">130</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">UID:</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="label11">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Main group:</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="VnDateChooser" id="date-chooser1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">account</property>
|
||||
<property name="column_name">last_change</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnDateChooser" id="date-chooser2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">account</property>
|
||||
<property name="column_name">expire</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label12">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Last change:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label13">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Expires:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</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">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">account</property>
|
||||
<property name="simple_record">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label20">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Account</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">15</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="height_request">160</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="VnGrid" id="grid5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_clickable">False</property>
|
||||
<property name="iterator">alias</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="grid-selection2"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnColumnCombo" id="column-combo1">
|
||||
<property name="title" translatable="yes">Alias</property>
|
||||
<property name="model">alias-combo-model</property>
|
||||
<property name="column_name">mail_alias_id</property>
|
||||
<property name="editable">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">alias</property>
|
||||
<property name="show_flags">VN_HANDLER_SHOW_SAVE | VN_HANDLER_SHOW_REMOVE | VN_HANDLER_SHOW_ADD</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Mail alias</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">2</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="border_width">15</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">20</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label15">
|
||||
<property name="width_request">130</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Extension:</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="label16">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Secret:</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="GtkLabel" id="label17">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Identifier:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label18">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="label" translatable="yes">Call group:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnEntry" id="entry4">
|
||||
<property name="width_request">170</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">sip</property>
|
||||
<property name="column_name">extension</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="VnEntry" id="entry5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">sip</property>
|
||||
<property name="column_name">secret</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>
|
||||
<child>
|
||||
<object class="VnEntry" id="entry6">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">sip</property>
|
||||
<property name="column_name">callerid</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnSpin" id="spin3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="iterator">sip</property>
|
||||
<property name="column_name">callgroup</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">3</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">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="VnHandler" id="handler3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<property name="iterator">sip</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child type="tab">
|
||||
<object class="GtkLabel" id="label21">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">SIP</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">3</property>
|
||||
<property name="tab_fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</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, callgroup
|
||||
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_user_account_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,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
|
||||
|
|
|
@ -2,5 +2,4 @@
|
|||
|
||||
src/account.c
|
||||
src/users.c
|
||||
src/queries.c
|
||||
src/mail-alias.c
|
||||
|
|
78
po/es.po
78
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 <atcolombini@verdnatura.es>\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"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
SELECT name, color, id FROM item;
|
|
@ -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)
|
||||
|
|
160
src/queries.vala
160
src/queries.vala
|
@ -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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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 ();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue