Small cleanups, fix worker error dialog.

This commit is contained in:
Dave Davenport 2016-04-20 08:08:18 +02:00
parent 3918625804
commit 44481cdb40
2 changed files with 2 additions and 15 deletions

View File

@ -158,18 +158,6 @@ static void teardown ( int pfd )
remove_pid_file ( pfd );
}
/**
* Start dmenu mode.
*/
static int run_dmenu ()
{
int ret_state = EXIT_FAILURE;
// Dmenu modi has a return state.
ret_state = dmenu_switcher_dialog ();
return ret_state;
}
static void __run_switcher_internal ( ModeMode mode, char *input )
{
char *prompt = g_strdup_printf ( "%s:", mode_get_name ( modi[mode] ) );
@ -538,7 +526,7 @@ static gboolean startup ( G_GNUC_UNUSED gpointer data )
if ( dmenu_mode == TRUE ) {
// force off sidebar mode:
config.sidebar_mode = FALSE;
int retv = run_dmenu ();
int retv = dmenu_switcher_dialog ();
if ( retv ) {
rofi_set_return_code ( EXIT_SUCCESS );
// Directly exit.

View File

@ -1804,8 +1804,7 @@ void rofi_view_workers_initialize ( void )
}
// If error occured during setup of pool, tell user and exit.
if ( error != NULL ) {
char *msg = g_strdup_printf ( "Failed to setup thread pool: '%s'", error->message );
g_free ( msg );
fprintf ( stderr, "Failed to setup thread pool: '%s'", error->message );
g_error_free ( error );
exit ( EXIT_FAILURE );
}