From 44481cdb406db72f4550c0718c96ffb248dd77d0 Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Wed, 20 Apr 2016 08:08:18 +0200 Subject: [PATCH] Small cleanups, fix worker error dialog. --- source/rofi.c | 14 +------------- source/view.c | 3 +-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index 34af48d1..b1684d21 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -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. diff --git a/source/view.c b/source/view.c index 23104656..a4d9a444 100644 --- a/source/view.c +++ b/source/view.c @@ -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 ); }