1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

wmaker: removed global variable "flags.nopolling"

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-12-30 19:09:54 +01:00
committed by Carlos R. Mafra
parent 94136ad29a
commit 7962bfa612
3 changed files with 8 additions and 9 deletions

View File

@@ -470,9 +470,6 @@ extern struct WPreferences {
unsigned int noupdates:1; /* don't require ~/GNUstep (-static) */ unsigned int noupdates:1; /* don't require ~/GNUstep (-static) */
unsigned int noautolaunch:1; /* don't autolaunch apps */ unsigned int noautolaunch:1; /* don't autolaunch apps */
unsigned int norestore:1; /* don't restore session */ 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; unsigned int restarting:2;
} flags; /* internal flags */ } flags; /* internal flags */

View File

@@ -679,12 +679,14 @@ static int real_main(int argc, char **argv)
wwarning(_("bad value for visualid: \"%s\""), argv[i]); wwarning(_("bad value for visualid: \"%s\""), argv[i]);
exit(0); exit(0);
} }
} else if (strcmp(argv[i], "-static") == 0 || strcmp(argv[i], "--static") == 0 } else if (strcmp(argv[i], "-static") == 0 || strcmp(argv[i], "--static") == 0) {
#ifndef HAVE_INOTIFY
|| strcmp(argv[i], "--no-polling") == 0
#endif
) {
wPreferences.flags.noupdates = 1; 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) { } else if (strcmp(argv[i], "--help") == 0) {
print_help(); print_help();
exit(0); exit(0);

View File

@@ -705,7 +705,7 @@ void StartUp(Bool defaultScreenOnly)
#ifndef HAVE_INOTIFY #ifndef HAVE_INOTIFY
/* setup defaults file polling */ /* setup defaults file polling */
if (!wPreferences.flags.nopolling && !wPreferences.flags.noupdates) if (!wPreferences.flags.noupdates)
WMAddTimerHandler(3000, wDefaultsCheckDomains, NULL); WMAddTimerHandler(3000, wDefaultsCheckDomains, NULL);
#endif #endif