Gray close items until file is open

This fixes a double close SEGV
This commit is contained in:
Hans de Goede
2012-07-28 00:03:30 +02:00
committed by Nirgal Vourgère
parent e5e299ca3c
commit c83cdc1b9b
2 changed files with 6 additions and 4 deletions

View File

@@ -28,7 +28,7 @@ MdbHandle *mdb;
extern int main_show_debug;
extern GladeXML *mainwin_xml;
#define MAX_ACTIONITEMS 7
#define MAX_ACTIONITEMS 9
#define MAX_ICONVIEWS 6
typedef struct {
GtkWidget* actionitems[MAX_ACTIONITEMS];
@@ -156,7 +156,7 @@ gmdb_file_init (void) {
GtkWidget* w;
GtkListStore* store;
int i;
gchar* ainames[] = { "sql_menu", "debug_menu", "schema_menu", "info_menu", "sql_button", "schema_button", "info_button" };
gchar* ainames[] = { "sql_menu", "debug_menu", "schema_menu", "info_menu", "close_menu", "sql_button", "schema_button", "info_button", "close_button" };
gchar* swnames[] = { "sw_form", "sw_macro", "sw_module", "sw_query", "sw_report", "sw_table" };
if (gmdbwidgets) {

View File

@@ -48,8 +48,9 @@
</packing>
</child>
<child>
<widget class="GtkToolButton" id="button7">
<widget class="GtkToolButton" id="close_button">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="tooltip" translatable="yes">Close database file</property>
<property name="stock_id">gtk-close</property>
<signal name="clicked" handler="gmdb_file_close_cb"/>
@@ -136,9 +137,10 @@
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="close1">
<widget class="GtkImageMenuItem" id="close_menu">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="gmdb_file_close_cb"/>