From ae3d4d7f1734eafeb8a4e5b2bed539c1f6aa3fd8 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Thu, 16 Apr 2009 11:32:31 +0000 Subject: [PATCH] Replaced deprecated functions --- evoke/EvokeService.cpp | 6 ++++-- evoke/Splash.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/evoke/EvokeService.cpp b/evoke/EvokeService.cpp index e9c2d60..13f8e3b 100644 --- a/evoke/EvokeService.cpp +++ b/evoke/EvokeService.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -36,9 +37,10 @@ EDELIB_NS_USING(EdbusMessage) EDELIB_NS_USING(EdbusConnection) EDELIB_NS_USING(EDBUS_SESSION) EDELIB_NS_USING(RES_SYS_ONLY) -EDELIB_NS_USING(file_exists) EDELIB_NS_USING(file_remove) +EDELIB_NS_USING(file_test) EDELIB_NS_USING(str_trim) +EDELIB_NS_USING(FILE_TEST_IS_REGULAR) #ifdef USE_LOCAL_CONFIG #define CONFIG_GET_STRVAL(object, section, key, buff) object.get(section, key, buff, sizeof(buff)) @@ -94,7 +96,7 @@ EvokeService* EvokeService::instance(void) { } bool EvokeService::setup_lock(const char* name) { - if(file_exists(name)) + if(file_test(name, FILE_TEST_IS_REGULAR)) return false; FILE* f = fopen(name, "w"); diff --git a/evoke/Splash.cpp b/evoke/Splash.cpp index 0ee477d..3689e62 100644 --- a/evoke/Splash.cpp +++ b/evoke/Splash.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -28,9 +29,10 @@ EDELIB_NS_USING(String) EDELIB_NS_USING(Resource) EDELIB_NS_USING(build_filename) -EDELIB_NS_USING(dir_exists) +EDELIB_NS_USING(file_test) EDELIB_NS_USING(run_async) EDELIB_NS_USING(RES_SYS_ONLY) +EDELIB_NS_USING(FILE_TEST_IS_DIR) #ifndef EDEWM_HAVE_NET_SPLASH static Splash* global_splash = NULL; @@ -129,7 +131,7 @@ void Splash::run(void) { splash_theme_path += E_DIR_SEPARATOR; splash_theme_path += *splash_theme; - if(!dir_exists(splash_theme_path.c_str())) { + if(!file_test(splash_theme_path.c_str(), FILE_TEST_IS_DIR)) { E_WARNING(E_STRLOC ": Unable to locate '%s' in '%s' theme directory\n", splash_theme->c_str(), splash_theme_path.c_str()); return;