From 7962bfa612958abb6d10421c6fa235c714b7f8cf Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Tue, 30 Dec 2014 19:09:54 +0100 Subject: [PATCH] wmaker: removed global variable "flags.nopolling" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As found by Rodolfo García Peñas, this flag is never given a value; further investigations in the history of the project show that this flag have never been implemented because its action is totally redundant with the flag "noupdate". As the later flag's name is more clear about what the behaviour for the user is, as opposed to what is being done under the hood, its name is kept and the "nopolling" flag is removed. Signed-off-by: Christophe CURIS --- src/WindowMaker.h | 3 --- src/main.c | 12 +++++++----- src/startup.c | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 2d9ed1af..e954ee83 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -470,9 +470,6 @@ extern struct WPreferences { unsigned int noupdates:1; /* don't require ~/GNUstep (-static) */ unsigned int noautolaunch:1; /* don't autolaunch apps */ unsigned int norestore:1; /* don't restore session */ -#ifndef HAVE_INOTIFY - unsigned int nopolling:1; /* don't poll the defaults database for changes */ -#endif unsigned int restarting:2; } flags; /* internal flags */ diff --git a/src/main.c b/src/main.c index b9f16d59..9024aca5 100644 --- a/src/main.c +++ b/src/main.c @@ -679,12 +679,14 @@ static int real_main(int argc, char **argv) wwarning(_("bad value for visualid: \"%s\""), argv[i]); exit(0); } - } else if (strcmp(argv[i], "-static") == 0 || strcmp(argv[i], "--static") == 0 -#ifndef HAVE_INOTIFY - || strcmp(argv[i], "--no-polling") == 0 -#endif - ) { + } else if (strcmp(argv[i], "-static") == 0 || strcmp(argv[i], "--static") == 0) { wPreferences.flags.noupdates = 1; + } else if (strcmp(argv[i], "--no-polling") == 0) { +#ifndef HAVE_INOTIFY + wPreferences.flags.noupdates = 1; +#else + wmessage(_("your version of Window Maker was compiler with INotify support, so \"--no-polling\" has no effect")); +#endif } else if (strcmp(argv[i], "--help") == 0) { print_help(); exit(0); diff --git a/src/startup.c b/src/startup.c index 2122d48e..c369dba3 100644 --- a/src/startup.c +++ b/src/startup.c @@ -705,7 +705,7 @@ void StartUp(Bool defaultScreenOnly) #ifndef HAVE_INOTIFY /* setup defaults file polling */ - if (!wPreferences.flags.nopolling && !wPreferences.flags.noupdates) + if (!wPreferences.flags.noupdates) WMAddTimerHandler(3000, wDefaultsCheckDomains, NULL); #endif