<signal name="activate" handler="on_mnu_file_open_audit_ds_activate"/>
</object>
</child>
+ <child>
+ <object class="GtkImageMenuItem" id="menuitem2">
+ <property name="label">gtk-close</property>
+ <property name="visible">True</property>
+ <property name="use_underline">True</property>
+ <property name="use_stock">True</property>
+ <signal name="activate" handler="on_mnu_file_close_activate"/>
+ </object>
+ </child>
<child>
<object class="GtkSeparatorMenuItem" id="separatormenuitem1">
<property name="visible">True</property>
</object>
</child>
</object>
+ <object class="GtkTreeStore" id="tstore_tables_fields">
+ <columns>
+ <!-- column-name id_table -->
+ <column type="guint"/>
+ <!-- column-name name_table -->
+ <column type="gchararray"/>
+ <!-- column-name id_field -->
+ <column type="guint"/>
+ <!-- column-name name_field -->
+ <column type="gchararray"/>
+ <!-- column-name choosen -->
+ <column type="gboolean"/>
+ </columns>
+ </object>
+ <object class="GtkTreeStore" id="tstore_ds_tables_fields">
+ <columns>
+ <!-- column-name id_ds -->
+ <column type="guint"/>
+ <!-- column-name name_ds -->
+ <column type="gchararray"/>
+ <!-- column-name cncstring_ds -->
+ <column type="gchararray"/>
+ <!-- column-name id_table -->
+ <column type="guint"/>
+ <!-- column-name name_table -->
+ <column type="gchararray"/>
+ <!-- column-name id_field -->
+ <column type="guint"/>
+ <!-- column-name name_field -->
+ <column type="gchararray"/>
+ <!-- column-name choosen -->
+ <column type="gboolean"/>
+ <!-- column-name choosen_visible -->
+ <column type="gboolean"/>
+ </columns>
+ </object>
<object class="GtkWindow" id="w_table">
<property name="title" translatable="yes">Table - Audit GUI</property>
<property name="modal">True</property>
</object>
</child>
</object>
- <object class="GtkTreeStore" id="tstore_tables_fields">
- <columns>
- <!-- column-name id_table -->
- <column type="guint"/>
- <!-- column-name name_table -->
- <column type="gchararray"/>
- <!-- column-name id_field -->
- <column type="guint"/>
- <!-- column-name name_field -->
- <column type="gchararray"/>
- <!-- column-name choosen -->
- <column type="gboolean"/>
- </columns>
- </object>
- <object class="GtkTreeStore" id="tstore_ds_tables_fields">
- <columns>
- <!-- column-name id_ds -->
- <column type="guint"/>
- <!-- column-name name_ds -->
- <column type="gchararray"/>
- <!-- column-name cncstring_ds -->
- <column type="gchararray"/>
- <!-- column-name id_table -->
- <column type="guint"/>
- <!-- column-name name_table -->
- <column type="gchararray"/>
- <!-- column-name id_field -->
- <column type="guint"/>
- <!-- column-name name_field -->
- <column type="gchararray"/>
- <!-- column-name choosen -->
- <column type="gboolean"/>
- <!-- column-name choosen_visible -->
- <column type="gboolean"/>
- </columns>
- </object>
<object class="GtkWindow" id="w_datasources">
<property name="title" translatable="yes">Datasources - Audit GUI</property>
<property name="modal">True</property>
#include "datasources.h"
#include "openauditds.h"
+G_MODULE_EXPORT void on_mnu_file_close_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
+
static Commons *commons;
static GtkWidget *w;
vbx = datasources_get_widget (m);
main_set_vbx_body_child (vbx);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "menuitem2")), TRUE);
}
G_MODULE_EXPORT void
{
GtkWidget *vbx;
+ if (vbx_body_child != NULL)
+ {
+ on_mnu_file_close_activate (NULL, user_data);
+ }
+
OpenAuditDS *m = open_audit_ds_new (commons);
vbx = open_audit_ds_get_widget (m);
gtk_widget_show_all (vbx);
}
+G_MODULE_EXPORT void
+on_mnu_file_close_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ gtk_widget_destroy (vbx_body_child);
+ vbx_body_child = NULL;
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "menuitem2")), FALSE);
+}
+
G_MODULE_EXPORT void
on_mnu_help_about_activate (GtkMenuItem *menuitem,
gpointer user_data)
gtk_widget_show (w);
+ gtk_widget_set_sensitive (GTK_WIDGET (gtk_builder_get_object (commons->gtkbuilder, "menuitem2")), FALSE);
+
if (argc > 0)
{
/* try to user the first argument of command line as a cnc_string */