Ui: Use only one method for exit

Replace the redundant main_window_quit with the
more specialized exit_application and return 0
as a state
This commit is contained in:
Roland Knall 2022-06-29 10:44:30 +02:00
parent 799a033080
commit 94c439f603
4 changed files with 2 additions and 24 deletions

View File

@ -259,7 +259,7 @@ capture_input_read_all(capture_session *cap_session, gboolean is_tempfile,
case CF_READ_ABORTED:
/* User wants to quit program. Exit by leaving the main loop,
so that any quit functions we registered get called. */
main_window_quit();
exit_application(0);
return FALSE;
}
@ -733,7 +733,7 @@ capture_input_closed(capture_session *cap_session, gchar *msg)
case CF_READ_ABORTED:
/* Exit by leaving the main loop, so that any quit functions
we registered get called. */
main_window_quit();
exit_application(0);
break;
}
} else {

View File

@ -121,16 +121,6 @@ void main_window_update(void)
LogwolfApplication::processEvents();
}
#ifdef HAVE_LIBPCAP
/* quit the main window */
void main_window_quit(void)
{
lwApp->quit();
}
#endif /* HAVE_LIBPCAP */
void exit_application(int status) {
if (lwApp) {
lwApp->quit();

View File

@ -123,16 +123,6 @@ void main_window_update(void)
WiresharkApplication::processEvents();
}
#ifdef HAVE_LIBPCAP
/* quit the main window */
void main_window_quit(void)
{
wsApp->quit();
}
#endif /* HAVE_LIBPCAP */
void exit_application(int status) {
if (wsApp) {
wsApp->quit();

View File

@ -41,8 +41,6 @@ typedef struct window_geometry_s {
/* update the main window */
extern void main_window_update(void);
/* quit the main window */
extern void main_window_quit(void);
/* Exit routine provided by UI-specific code. */
extern void exit_application(int status);