From 3dfaf7cb61f4595fe28b84e5a2f1adee0b1630d5 Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Sun, 1 Mar 2015 14:11:00 +0900 Subject: [PATCH] bin/file_mgr: don't update msg if statusbar is disabled. --- src/bin/file_mgr.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/src/bin/file_mgr.c b/src/bin/file_mgr.c index b6d2663..230eec2 100644 --- a/src/bin/file_mgr.c +++ b/src/bin/file_mgr.c @@ -152,23 +152,15 @@ file_mgr_edc_save(void) char buf[PATH_MAX]; file_mgr_data *fmd = g_fmd; - if (enventor_object_save(fmd->enventor, config_edc_path_get())) - { - if (config_stats_bar_get()) - { - snprintf(buf, sizeof(buf), "File saved. \"%s\"", - config_edc_path_get()); - } - } - else - { - if (config_stats_bar_get()) - { - snprintf(buf, sizeof(buf), "Already saved. \"%s\"", - config_edc_path_get()); - } + Eina_Bool save_success = enventor_object_save(fmd->enventor, config_edc_path_get()); + + if (!config_stats_bar_get()) return; + + if (save_success) + snprintf(buf, sizeof(buf), "File saved. \"%s\"", config_edc_path_get()); + else + snprintf(buf, sizeof(buf), "Already saved. \"%s\"", config_edc_path_get()); - } stats_info_msg_update(buf); }