<column type="gchararray"/>
</columns>
</object>
- <object class="GtkDialog" id="diag_query_editor">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Query Editor</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="default_width">600</property>
- <property name="destroy_with_parent">True</property>
- <property name="type_hint">normal</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox1">
+ <object class="GtkWindow" id="w_query_editor">
+ <child>
+ <object class="GtkHPaned" id="hpaned_query_editor">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">4</property>
+ <property name="position">200</property>
+ <property name="position_set">True</property>
<child>
- <object class="GtkHPaned" id="hpaned1">
+ <object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="position">200</property>
- <property name="position_set">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">etched-in</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
+ <object class="GtkTreeView" id="treeview1">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
+ <property name="model">tstore_fields</property>
+ <property name="headers_clickable">False</property>
+ <property name="search_column">0</property>
+ <property name="tooltip_column">3</property>
<child>
- <object class="GtkTreeView" id="treeview1">
+ <object class="GtkTreeViewColumn" id="treeviewcolumn1">
+ <property name="title">Fields</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext1"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="resize">False</property>
+ <property name="shrink">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkVBox" id="vbox3">
+ <property name="no_show_all">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <child>
+ <object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">tstore_fields</property>
- <property name="tooltip_column">3</property>
+ <property name="orientation">vertical</property>
<child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn1">
- <property name="title">Fields</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext1"/>
- <attributes>
- <attribute name="text">2</attribute>
- </attributes>
- </child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkHButtonBox" id="hbuttonbox1">
+ <property name="visible">True</property>
+ <property name="spacing">5</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="button16">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button15">
+ <property name="label">gtk-save</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
</object>
<packing>
- <property name="resize">False</property>
- <property name="shrink">True</property>
+ <property name="expand">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
+ <property name="can_focus">True</property>
<child>
- <object class="GtkVBox" id="vbox3">
- <property name="orientation">vertical</property>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="border_width">5</property>
<property name="spacing">5</property>
<child>
- <object class="GtkVBox" id="vbox4">
+ <object class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">etched-in</property>
<child>
- <placeholder/>
+ <object class="GtkTreeView" id="treeview2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="model">lstore_show</property>
+ <property name="headers_clickable">False</property>
+ <property name="search_column">0</property>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn2">
+ <property name="title">Field</property>
+ <child>
+ <object class="GtkCellRendererText" id="cellrenderertext2"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
+ </child>
+ </object>
+ </child>
+ </object>
</child>
</object>
<packing>
</packing>
</child>
<child>
- <object class="GtkHButtonBox" id="hbuttonbox1">
+ <object class="GtkVButtonBox" id="vbuttonbox1">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">5</property>
- <property name="layout_style">end</property>
+ <property name="layout_style">start</property>
<child>
- <object class="GtkButton" id="button16">
- <property name="label">gtk-cancel</property>
+ <object class="GtkButton" id="button3">
+ <property name="label">gtk-add</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</packing>
</child>
<child>
- <object class="GtkButton" id="button15">
- <property name="label">gtk-save</property>
+ <object class="GtkButton" id="button4">
+ <property name="label">gtk-remove</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <object class="GtkButton" id="button5">
+ <property name="label">gtk-go-up</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button6">
+ <property name="label">gtk-go-down</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">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="button1">
+ <property name="label">gtk-clear</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </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="position">1</property>
</packing>
</child>
</object>
+ </child>
+ <child type="tab">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Show</property>
+ </object>
<packing>
- <property name="position">0</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
<child>
- <object class="GtkFrame" id="frame1">
+ <object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
+ <property name="border_width">5</property>
+ <property name="spacing">5</property>
<child>
- <object class="GtkAlignment" id="alignment1">
+ <object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">etched-in</property>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkTreeView" id="treeview3">
<property name="visible">True</property>
- <property name="spacing">5</property>
+ <property name="can_focus">True</property>
+ <property name="model">tstore_where</property>
+ <property name="headers_clickable">False</property>
+ <property name="search_column">0</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn5">
+ <property name="title">Field</property>
<child>
- <object class="GtkTreeView" id="treeview2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">lstore_show</property>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn2">
- <property name="title">Field</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext2"/>
- <attributes>
- <attribute name="text">2</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
+ <object class="GtkCellRendererText" id="cellrenderertext5"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
</child>
</object>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkVButtonBox" id="vbuttonbox1">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn9">
+ <property name="title">Not</property>
<child>
- <object class="GtkButton" id="button3">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
+ <object class="GtkCellRendererToggle" id="cellrenderertoggle1"/>
+ <attributes>
+ <attribute name="active">3</attribute>
+ </attributes>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn6">
+ <property name="title">Condition</property>
<child>
- <object class="GtkButton" id="button4">
- <property name="label">gtk-remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext6"/>
+ <attributes>
+ <attribute name="text">5</attribute>
+ </attributes>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn7">
+ <property name="title">From</property>
<child>
- <object class="GtkButton" id="button5">
- <property name="label">gtk-go-up</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext7"/>
+ <attributes>
+ <attribute name="text">6</attribute>
+ </attributes>
</child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn8">
+ <property name="title">To</property>
<child>
- <object class="GtkButton" id="button6">
- <property name="label">gtk-go-down</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext8"/>
+ <attributes>
+ <attribute name="text">7</attribute>
+ </attributes>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
</object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
- <child type="label">
- <object class="GtkLabel" id="label1">
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox2">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Show</b></property>
- <property name="use_markup">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="button7">
+ <property name="label">gtk-add</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button8">
+ <property name="label">gtk-remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button9">
+ <property name="label">gtk-go-up</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button10">
+ <property name="label">gtk-go-down</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">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="button2">
+ <property name="label">gtk-clear</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </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="position">1</property>
+ </packing>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
+ <child type="tab">
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Where</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ </packing>
+ </child>
<child>
- <object class="GtkFrame" id="frame2">
+ <object class="GtkHBox" id="hbox3">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
+ <property name="border_width">5</property>
+ <property name="spacing">5</property>
<child>
- <object class="GtkAlignment" id="alignment2">
+ <object class="GtkScrolledWindow" id="scrolledwindow4">
<property name="visible">True</property>
- <property name="left_padding">12</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">etched-in</property>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkTreeView" id="treeview4">
<property name="visible">True</property>
- <property name="spacing">5</property>
+ <property name="can_focus">True</property>
+ <property name="model">lstore_order</property>
+ <property name="headers_clickable">False</property>
+ <property name="search_column">0</property>
<child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn3">
+ <property name="title">Field</property>
<child>
- <object class="GtkTreeView" id="treeview3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">tstore_where</property>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn5">
- <property name="title">Field</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext5"/>
- <attributes>
- <attribute name="text">2</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn9">
- <property name="title">Not</property>
- <child>
- <object class="GtkCellRendererToggle" id="cellrenderertoggle1"/>
- <attributes>
- <attribute name="active">3</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn6">
- <property name="title">Condition</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext6"/>
- <attributes>
- <attribute name="text">5</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn7">
- <property name="title">From</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext7"/>
- <attributes>
- <attribute name="text">6</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn8">
- <property name="title">To</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext8"/>
- <attributes>
- <attribute name="text">7</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
+ <object class="GtkCellRendererText" id="cellrenderertext3"/>
+ <attributes>
+ <attribute name="text">2</attribute>
+ </attributes>
</child>
</object>
- <packing>
- <property name="position">0</property>
- </packing>
</child>
<child>
- <object class="GtkVButtonBox" id="vbuttonbox2">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
+ <object class="GtkTreeViewColumn" id="treeviewcolumn4">
+ <property name="title">Order</property>
<child>
- <object class="GtkButton" id="button7">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button8">
- <property name="label">gtk-remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button9">
- <property name="label">gtk-go-up</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button10">
- <property name="label">gtk-go-down</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
+ <object class="GtkCellRendererText" id="cellrenderertext4"/>
+ <attributes>
+ <attribute name="text">3</attribute>
+ </attributes>
</child>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
</child>
</object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
</child>
- <child type="label">
- <object class="GtkLabel" id="label2">
+ <child>
+ <object class="GtkVButtonBox" id="vbuttonbox3">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Where</b></property>
- <property name="use_markup">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">5</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="button11">
+ <property name="label">gtk-add</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button12">
+ <property name="label">gtk-remove</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button13">
+ <property name="label">gtk-go-up</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button14">
+ <property name="label">gtk-go-down</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">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="button17">
+ <property name="label">gtk-clear</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </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="position">1</property>
+ </packing>
</child>
</object>
<packing>
<property name="position">2</property>
</packing>
</child>
- <child>
- <object class="GtkFrame" id="frame3">
+ <child type="tab">
+ <object class="GtkLabel" id="label6">
<property name="visible">True</property>
- <property name="label_xalign">0</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
- <property name="shadow_type">etched-in</property>
- <child>
- <object class="GtkTreeView" id="treeview4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="model">lstore_order</property>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn3">
- <property name="title">Field</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext3"/>
- <attributes>
- <attribute name="text">2</attribute>
- </attributes>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkTreeViewColumn" id="treeviewcolumn4">
- <property name="title">Order</property>
- <child>
- <object class="GtkCellRendererText" id="cellrenderertext4"/>
- <attributes>
- <attribute name="text">3</attribute>
- </attributes>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkVButtonBox" id="vbuttonbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkButton" id="button11">
- <property name="label">gtk-add</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button12">
- <property name="label">gtk-remove</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button13">
- <property name="label">gtk-go-up</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button14">
- <property name="label">gtk-go-down</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Order</b></property>
- <property name="use_markup">True</property>
- </object>
- </child>
+ <property name="label" translatable="yes">Order</property>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">2</property>
+ <property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
- <property name="resize">True</property>
- <property name="shrink">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</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">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
+ <property name="resize">True</property>
+ <property name="shrink">True</property>
</packing>
</child>
</object>
</child>
- <action-widgets>
- <action-widget response="1">button1</action-widget>
- <action-widget response="2">button2</action-widget>
- </action-widgets>
</object>
</interface>
GdaExQueryEditorTable *table,
GtkTreeIter *iter_parent);
+static void gdaex_query_editor_refill_always_show (GdaExQueryEditor *qe);
+
static void gdaex_query_editor_store_remove_iter (GdaExQueryEditor *qe,
GtkTreeSelection *sel,
GObject *store);
gpointer user_data);
static void gdaex_query_editor_on_btn_show_down_clicked (GtkButton *button,
gpointer user_data);
+static void gdaex_query_editor_on_btn_show_clean_clicked (GtkButton *button,
+ gpointer user_data);
static void gdaex_query_editor_on_sel_show_changed (GtkTreeSelection *treeselection,
gpointer user_data);
gpointer user_data);
static void gdaex_query_editor_on_btn_where_down_clicked (GtkButton *button,
gpointer user_data);
+static void gdaex_query_editor_on_btn_where_clean_clicked (GtkButton *button,
+ gpointer user_data);
static void gdaex_query_editor_on_sel_where_changed (GtkTreeSelection *treeselection,
gpointer user_data);
gpointer user_data);
static void gdaex_query_editor_on_btn_order_down_clicked (GtkButton *button,
gpointer user_data);
+static void gdaex_query_editor_on_btn_order_clean_clicked (GtkButton *button,
+ gpointer user_data);
static void gdaex_query_editor_on_sel_order_changed (GtkTreeSelection *treeselection,
gpointer user_data);
GtkBuilder *gtkbuilder;
- GtkWidget *dialog;
GtkWidget *hpaned_main;
GtkWidget *vbx_values_container;
priv->tables = g_hash_table_new (g_str_hash, g_str_equal);
- priv->dialog = NULL;
priv->hpaned_main = NULL;
priv->relations = NULL;
"|lstore_show"
"|tstore_where"
"|lstore_order"
- "|diag_query_editor",
+ "|hpaned_query_editor",
"|", -1),
&error);
if (error != NULL)
G_CALLBACK (gdaex_query_editor_on_btn_show_up_clicked), (gpointer)gdaex_query_editor);
g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button6"), "clicked",
G_CALLBACK (gdaex_query_editor_on_btn_show_down_clicked), (gpointer)gdaex_query_editor);
+ g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button1"), "clicked",
+ G_CALLBACK (gdaex_query_editor_on_btn_show_clean_clicked), (gpointer)gdaex_query_editor);
g_signal_connect (priv->sel_show, "changed",
G_CALLBACK (gdaex_query_editor_on_sel_show_changed), (gpointer)gdaex_query_editor);
G_CALLBACK (gdaex_query_editor_on_btn_where_up_clicked), (gpointer)gdaex_query_editor);
g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button10"), "clicked",
G_CALLBACK (gdaex_query_editor_on_btn_where_down_clicked), (gpointer)gdaex_query_editor);
+ g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button2"), "clicked",
+ G_CALLBACK (gdaex_query_editor_on_btn_where_clean_clicked), (gpointer)gdaex_query_editor);
g_signal_connect (priv->sel_where, "changed",
G_CALLBACK (gdaex_query_editor_on_sel_where_changed), (gpointer)gdaex_query_editor);
G_CALLBACK (gdaex_query_editor_on_btn_order_up_clicked), (gpointer)gdaex_query_editor);
g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button14"), "clicked",
G_CALLBACK (gdaex_query_editor_on_btn_order_down_clicked), (gpointer)gdaex_query_editor);
+ g_signal_connect (gtk_builder_get_object (priv->gtkbuilder, "button17"), "clicked",
+ G_CALLBACK (gdaex_query_editor_on_btn_order_clean_clicked), (gpointer)gdaex_query_editor);
g_signal_connect (priv->sel_order, "changed",
G_CALLBACK (gdaex_query_editor_on_sel_order_changed), (gpointer)gdaex_query_editor);
return gdaex_query_editor;
}
-GtkWidget
-*gdaex_query_editor_get_dialog (GdaExQueryEditor *gdaex_query_editor)
-{
- GdaExQueryEditorPrivate *priv;
-
- g_return_if_fail (GDAEX_IS_QUERY_EDITOR (gdaex_query_editor));
-
- priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (gdaex_query_editor);
-
- if (priv->dialog == NULL)
- {
- priv->dialog = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "diag_query_editor"));
- }
-
- gdaex_query_editor_refresh_gui (gdaex_query_editor);
-
- return priv->dialog;
-}
-
GtkWidget
*gdaex_query_editor_get_widget (GdaExQueryEditor *gdaex_query_editor)
{
if (priv->hpaned_main == NULL)
{
- priv->hpaned_main = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "hpaned1"));
+ priv->hpaned_main = GTK_WIDGET (gtk_builder_get_object (priv->gtkbuilder, "hpaned_query_editor"));
}
gdaex_query_editor_refresh_gui (gdaex_query_editor);
return TRUE;
}
+void
+gdaex_query_editor_clean_choices (GdaExQueryEditor *qe)
+{
+ GdaExQueryEditorPrivate *priv;
+
+ g_return_if_fail (GDAEX_IS_QUERY_EDITOR (qe));
+
+ priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+
+ gtk_list_store_clear (priv->lstore_show);
+ gtk_tree_store_clear (priv->tstore_where);
+ gtk_list_store_clear (priv->lstore_order);
+
+ gdaex_query_editor_refill_always_show (qe);
+
+ gtk_button_clicked (GTK_BUTTON (gtk_builder_get_object (priv->gtkbuilder, "button16")));
+}
+
const gchar
*gdaex_query_editor_get_sql (GdaExQueryEditor *qe)
{
}
}
+static void
+gdaex_query_editor_refill_always_show (GdaExQueryEditor *qe)
+{
+ GdaExQueryEditorPrivate *priv;
+
+ GtkTreeIter iter_table;
+ GtkTreeIter iter;
+
+ gchar *table_name;
+ gchar *field_name;
+
+ GdaExQueryEditorTable *table;
+ GdaExQueryEditorField *field;
+
+ priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+
+ if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (priv->tstore_fields), &iter_table))
+ {
+ do
+ {
+ if (gtk_tree_model_iter_children (GTK_TREE_MODEL (priv->tstore_fields), &iter, &iter_table))
+ {
+ do
+ {
+ gtk_tree_model_get (GTK_TREE_MODEL (priv->tstore_fields), &iter,
+ COL_FIELDS_TABLE_NAME, &table_name,
+ COL_FIELDS_NAME, &field_name,
+ -1);
+ table = g_hash_table_lookup (priv->tables, table_name);
+ field = g_hash_table_lookup (table->fields, field_name);
+ if (field->always_showed)
+ {
+ gdaex_query_editor_show_add_iter (qe, &iter);
+ }
+ } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->tstore_fields), &iter));
+ }
+ } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (priv->tstore_fields), &iter_table));
+ }
+}
+
static void
gdaex_query_editor_store_remove_iter (GdaExQueryEditor *qe,
GtkTreeSelection *sel,
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
{
- /* TODO if get_widget dialog isn't valid */
- dialog = gtk_message_dialog_new (GTK_WINDOW (priv->dialog),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO,
}
else
{
- /* TODO if get_widget dialog isn't valid */
- dialog = gtk_message_dialog_new (GTK_WINDOW (priv->dialog),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
}
else
{
- /* TODO if get_widget dialog isn't valid */
- dialog = gtk_message_dialog_new (GTK_WINDOW (priv->dialog),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
guint where_type;
GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (priv->cb_where_type));
- gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->cb_where_type), &iter_val);
+ if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (priv->cb_where_type), &iter_val))
+ {
+ GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
+ GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "You must select a condition's type before.");
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ return;
+ }
+
gtk_tree_model_get (model, &iter_val,
0, &where_type,
-1);
}
else
{
- /* TODO if get_widget dialog isn't valid */
- dialog = gtk_message_dialog_new (GTK_WINDOW (priv->dialog),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
FALSE);
}
+static void
+gdaex_query_editor_on_btn_show_clean_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
+ GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+
+ gtk_list_store_clear (priv->lstore_show);
+ gdaex_query_editor_refill_always_show (qe);
+}
+
static void
gdaex_query_editor_on_sel_show_changed (GtkTreeSelection *treeselection,
gpointer user_data)
}
else
{
- /* TODO if get_widget dialog isn't valid */
- dialog = gtk_message_dialog_new (GTK_WINDOW (priv->dialog),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
FALSE);
}
+static void
+gdaex_query_editor_on_btn_where_clean_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
+ GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+
+ gtk_tree_store_clear (priv->tstore_where);
+
+ gtk_button_clicked (GTK_BUTTON (gtk_builder_get_object (priv->gtkbuilder, "button16")));
+}
+
static void
gdaex_query_editor_on_sel_where_changed (GtkTreeSelection *treeselection,
gpointer user_data)
gtk_box_pack_start (GTK_BOX (priv->vbx_values), priv->hbox, FALSE, FALSE, 0);
- gtk_widget_show_all (priv->vbx_values_container);
+ gtk_widget_show_all (priv->vbx_values);
+ gtk_widget_show (priv->vbx_values_container);
}
}
}
else
{
- /* TODO if get_widget dialog isn't valid */
- dialog = gtk_message_dialog_new (GTK_WINDOW (priv->dialog),
+ dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (priv->hpaned_main)),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_OK,
FALSE);
}
+static void
+gdaex_query_editor_on_btn_order_clean_clicked (GtkButton *button,
+ gpointer user_data)
+{
+ GdaExQueryEditor *qe = (GdaExQueryEditor *)user_data;
+ GdaExQueryEditorPrivate *priv = GDAEX_QUERY_EDITOR_GET_PRIVATE (qe);
+
+ gtk_list_store_clear (priv->lstore_order);
+
+ gtk_button_clicked (GTK_BUTTON (gtk_builder_get_object (priv->gtkbuilder, "button16")));
+}
+
static void
gdaex_query_editor_on_sel_order_changed (GtkTreeSelection *treeselection,
gpointer user_data)
gtk_box_pack_start (GTK_BOX (priv->vbx_values), priv->hbox, FALSE, FALSE, 0);
- gtk_widget_show_all (priv->vbx_values_container);
+ gtk_widget_show_all (priv->vbx_values);
+ gtk_widget_show (priv->vbx_values_container);
}
}