From 99c4913b8c1c25376035dd451c419203472c7b25 Mon Sep 17 00:00:00 2001 From: Sanel Zukan Date: Fri, 27 Feb 2009 14:51:55 +0000 Subject: [PATCH] Update changes in run_* commands --- ede-conf/ede-conf.cpp | 2 +- ede-desktop/ede-desktop.cpp | 2 +- ede-screensaver-conf/XScreenSaver.cpp | 6 ++---- ede-timedate/ede-timedate.cpp | 4 ++-- evoke/Autostart.cpp | 4 ++-- evoke/Splash.cpp | 6 +++--- 6 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ede-conf/ede-conf.cpp b/ede-conf/ede-conf.cpp index d5c866f..9a4e1db 100644 --- a/ede-conf/ede-conf.cpp +++ b/ede-conf/ede-conf.cpp @@ -84,7 +84,7 @@ int ControlButton::handle(int event) { else if(!file_can_execute(exec.c_str())) edelib::alert(_("Unable to run program '%s'. Program not found"), exec.c_str()); else - edelib::run_program(exec.c_str(), false); + edelib::run_async(exec.c_str()); } return 1; diff --git a/ede-desktop/ede-desktop.cpp b/ede-desktop/ede-desktop.cpp index acd29ad..ac8017f 100644 --- a/ede-desktop/ede-desktop.cpp +++ b/ede-desktop/ede-desktop.cpp @@ -956,7 +956,7 @@ void Desktop::dir_watch(const char* dir, const char* changed, int flags) { void Desktop::execute(const char* cmd) { E_ASSERT(cmd != NULL); - edelib::run_program(cmd, false); + edelib::run_async(cmd); } int Desktop::handle(int event) { diff --git a/ede-screensaver-conf/XScreenSaver.cpp b/ede-screensaver-conf/XScreenSaver.cpp index b6cf337..dfd2069 100644 --- a/ede-screensaver-conf/XScreenSaver.cpp +++ b/ede-screensaver-conf/XScreenSaver.cpp @@ -40,7 +40,7 @@ EDELIB_NS_USING(String) EDELIB_NS_USING(file_path) EDELIB_NS_USING(file_remove) EDELIB_NS_USING(file_rename) -EDELIB_NS_USING(run_program) +EDELIB_NS_USING(run_async) EDELIB_NS_USING(dir_home) EDELIB_NS_USING(dir_exists) EDELIB_NS_USING(dir_empty) @@ -362,9 +362,7 @@ bool xscreensaver_run_daemon(Display *dpy) { return false; /* run 'xscreensaver -nosplash' */ - p += " -nosplash"; - run_program(p.c_str(), false); - + run_async("%s -nosplash", p.c_str()); usleep(250000); /* check again */ diff --git a/ede-timedate/ede-timedate.cpp b/ede-timedate/ede-timedate.cpp index 0e4cd7b..0d77e79 100644 --- a/ede-timedate/ede-timedate.cpp +++ b/ede-timedate/ede-timedate.cpp @@ -115,11 +115,11 @@ void fill_timezones(const char* current) { struct stat s; if(stat("/usr/share/zoneinfo/zone.tab",&s)==0) { - edelib::run_program("cat /usr/share/zoneinfo/zone.tab | grep -e ^[^#] | cut -f 3 |sort > /tmp/_tzone_.txt"); + edelib::run_sync("cat /usr/share/zoneinfo/zone.tab | grep -e ^[^#] | cut -f 3 |sort > /tmp/_tzone_.txt"); zonetab_dir = "/usr/share/zoneinfo/"; } else if(stat("/usr/local/share/zoneinfo/zone.tab",&s)==0) { - edelib::run_program("cat /usr/local/share/zoneinfo/zone.tab | grep -e ^[^#] | cut -f 3 | sort > /tmp/_tzone_.txt"); + edelib::run_sync("cat /usr/local/share/zoneinfo/zone.tab | grep -e ^[^#] | cut -f 3 | sort > /tmp/_tzone_.txt"); zonetab_dir = "/usr/local/share/zoneinfo/"; } else { timeZonesList->add(_("Zone information not found.")); diff --git a/evoke/Autostart.cpp b/evoke/Autostart.cpp index b2d1134..7912a67 100644 --- a/evoke/Autostart.cpp +++ b/evoke/Autostart.cpp @@ -39,12 +39,12 @@ EDELIB_NS_USING(dir_list) EDELIB_NS_USING(system_config_dirs) EDELIB_NS_USING(user_config_dir) EDELIB_NS_USING(str_ends) -EDELIB_NS_USING(run_program) +EDELIB_NS_USING(run_async) #ifdef DEBUG_AUTOSTART_RUN #define AUTOSTART_RUN(s) E_DEBUG("Executing %s\n", s) #else - #define AUTOSTART_RUN(s) run_program(s, false) + #define AUTOSTART_RUN(s) run_async(s) #endif struct DialogEntry { diff --git a/evoke/Splash.cpp b/evoke/Splash.cpp index aaabf32..0ee477d 100644 --- a/evoke/Splash.cpp +++ b/evoke/Splash.cpp @@ -29,7 +29,7 @@ EDELIB_NS_USING(String) EDELIB_NS_USING(Resource) EDELIB_NS_USING(build_filename) EDELIB_NS_USING(dir_exists) -EDELIB_NS_USING(run_program) +EDELIB_NS_USING(run_async) EDELIB_NS_USING(RES_SYS_ONLY) #ifndef EDEWM_HAVE_NET_SPLASH @@ -272,7 +272,7 @@ bool Splash::next_client(void) { /* run command */ if(!dryrun) - run_program(cmd, false); + run_async(cmd); ++slist_it; ++counter; @@ -303,7 +303,7 @@ bool Splash::next_client_nosplash(void) { /* run command */ if(!dryrun) - run_program(cmd, false); + run_async(cmd); ++slist_it; ++counter;