Merge pull request #199 from PartialVolume/fix_exit_on_terminal_resize_after_wipe_complete

Fix window/panel resizing & display when terminal resized by user
This commit is contained in:
PartialVolume
2020-03-08 01:51:07 +00:00
committed by GitHub
6 changed files with 526 additions and 312 deletions

View File

@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([nwipe], [0.27], [git@brumit.nl])
AC_INIT([nwipe], [0.28-pre-release], [git@brumit.nl])
AM_INIT_AUTOMAKE(foreign subdir-objects)
AC_OUTPUT(Makefile src/Makefile man/Makefile)
AC_CONFIG_SRCDIR([src/nwipe.c])

View File

@@ -1,4 +1,4 @@
.TH NWIPE "4" "March 2020" "nwipe version 0.27" "User Commands"
.TH NWIPE "4" "March 2020" "nwipe version 0.28-pre-release" "User Commands"
.SH NAME
nwipe \- securely erase disks
.SH SYNOPSIS

815
src/gui.c

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,13 @@
void nwipe_gui_free( void ); // Stop the GUI.
void nwipe_gui_init( void ); // Start the GUI.
void nwipe_gui_create_main_window( void ); // Create the main window
void nwipe_gui_create_header_window( void ); // Create the header window
void nwipe_gui_create_footer_window( const char* ); // Create the footer window
void nwipe_gui_create_options_window( void ); // Create the options window
void nwipe_gui_create_stats_window( void ); // Create the stats window
void nwipe_gui_create_all_windows_on_terminal_resize(
const char* footer_text ); // If terminal is resized recreate all windows
void nwipe_gui_select( int count, nwipe_context_t** c ); // Select devices to wipe.
void* nwipe_gui_status( void* ptr ); // Update operation progress.
void nwipe_gui_method( void ); // Change the method option.

View File

@@ -442,15 +442,15 @@ int main( int argc, char** argv )
if( terminate_signal == 1 )
{
nwipe_log( NWIPE_LOG_INFO, "Program interrupted" );
printf( "Program interrupted" );
}
else
{
if( !nwipe_options.nowait )
{
/* Wait for the user to press enter to exit */
nocbreak();
getch();
do
{
sleep( 1 );
} while( terminate_signal != 1 );
}
}
nwipe_log( NWIPE_LOG_INFO, "Exit in progress" );

View File

@@ -4,7 +4,7 @@
* used by configure to dynamically assign those values
* to documentation files.
*/
const char* version_string = "0.27";
const char* version_string = "0.28-pre-release";
const char* program_name = "nwipe";
const char* author_name = "Martijn van Brummelen";
const char* email_address = "git@brumit.nl";
@@ -14,4 +14,4 @@ Modifications to original dwipe Copyright Andy Beverley <andy@andybev.com>\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\
FOR A PARTICULAR PURPOSE.\n";
const char* banner = "nwipe 0.27";
const char* banner = "nwipe 0.28-pre-release";