Fixed an issue, which let the build menu item insensitive once a new file w/o template was opened.

Replaced "/" by G_DIR_SEPARATOR_S.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@429 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-06-11 11:13:14 +00:00
parent 89993492c3
commit 43bc6843bb
2 changed files with 5 additions and 2 deletions

View File

@ -349,7 +349,7 @@ static void styleset_c_init(void)
// load global tags file for C autocompletion // load global tags file for C autocompletion
if (! app->ignore_global_tags && ! global_c_tags_loaded) if (! app->ignore_global_tags && ! global_c_tags_loaded)
{ {
tm_workspace_load_global_tags(GEANY_DATA_DIR "/global.tags"); tm_workspace_load_global_tags(GEANY_DATA_DIR G_DIR_SEPARATOR_S "global.tags");
global_c_tags_loaded = TRUE; global_c_tags_loaded = TRUE;
} }
} }
@ -479,7 +479,7 @@ static void styleset_cpp_init(void)
// load global tags file for C autocompletion // load global tags file for C autocompletion
if (! app->ignore_global_tags && ! global_c_tags_loaded) if (! app->ignore_global_tags && ! global_c_tags_loaded)
{ {
tm_workspace_load_global_tags(GEANY_DATA_DIR "/global.tags"); tm_workspace_load_global_tags(GEANY_DATA_DIR G_DIR_SEPARATOR_S "global.tags");
global_c_tags_loaded = TRUE; global_c_tags_loaded = TRUE;
} }
} }

View File

@ -1257,10 +1257,13 @@ void utils_build_show_hide(gint idx)
if (idx == -1 || doc_list[idx].file_type == NULL) if (idx == -1 || doc_list[idx].file_type == NULL)
{ {
gtk_widget_set_sensitive(lookup_widget(app->window, "menu_build1"), FALSE); gtk_widget_set_sensitive(lookup_widget(app->window, "menu_build1"), FALSE);
gtk_menu_item_remove_submenu(GTK_MENU_ITEM(lookup_widget(app->window, "menu_build1")));
gtk_widget_set_sensitive(app->compile_button, FALSE); gtk_widget_set_sensitive(app->compile_button, FALSE);
gtk_widget_set_sensitive(app->run_button, FALSE); gtk_widget_set_sensitive(app->run_button, FALSE);
return; return;
} }
else
gtk_widget_set_sensitive(lookup_widget(app->window, "menu_build1"), TRUE);
ft = doc_list[idx].file_type; ft = doc_list[idx].file_type;