mirror of
https://github.com/davatorium/rofi.git
synced 2025-03-10 17:06:37 -04:00
Small cleanups, fix worker error dialog.
This commit is contained in:
parent
3918625804
commit
44481cdb40
2 changed files with 2 additions and 15 deletions
|
@ -158,18 +158,6 @@ static void teardown ( int pfd )
|
||||||
remove_pid_file ( 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 )
|
static void __run_switcher_internal ( ModeMode mode, char *input )
|
||||||
{
|
{
|
||||||
char *prompt = g_strdup_printf ( "%s:", mode_get_name ( modi[mode] ) );
|
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 ) {
|
if ( dmenu_mode == TRUE ) {
|
||||||
// force off sidebar mode:
|
// force off sidebar mode:
|
||||||
config.sidebar_mode = FALSE;
|
config.sidebar_mode = FALSE;
|
||||||
int retv = run_dmenu ();
|
int retv = dmenu_switcher_dialog ();
|
||||||
if ( retv ) {
|
if ( retv ) {
|
||||||
rofi_set_return_code ( EXIT_SUCCESS );
|
rofi_set_return_code ( EXIT_SUCCESS );
|
||||||
// Directly exit.
|
// Directly exit.
|
||||||
|
|
|
@ -1804,8 +1804,7 @@ void rofi_view_workers_initialize ( void )
|
||||||
}
|
}
|
||||||
// If error occured during setup of pool, tell user and exit.
|
// If error occured during setup of pool, tell user and exit.
|
||||||
if ( error != NULL ) {
|
if ( error != NULL ) {
|
||||||
char *msg = g_strdup_printf ( "Failed to setup thread pool: '%s'", error->message );
|
fprintf ( stderr, "Failed to setup thread pool: '%s'", error->message );
|
||||||
g_free ( msg );
|
|
||||||
g_error_free ( error );
|
g_error_free ( error );
|
||||||
exit ( EXIT_FAILURE );
|
exit ( EXIT_FAILURE );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue