wslog: rename console open preference enum
This commit is contained in:
parent
f2fd5ab201
commit
16fad42ae4
|
@ -3043,7 +3043,7 @@ prefs_register_modules(void)
|
|||
prefs_register_enum_preference(gui_module, "console_open",
|
||||
"Open a console window",
|
||||
"Open a console window (Windows only)",
|
||||
&ws_log_console_open, gui_console_open_type, FALSE);
|
||||
(int *)&ws_log_console_open, gui_console_open_type, FALSE);
|
||||
|
||||
prefs_register_obsolete_preference(gui_module, "scrollbar_on_right");
|
||||
prefs_register_obsolete_preference(gui_module, "packet_list_sel_browse");
|
||||
|
@ -4376,7 +4376,7 @@ read_registry(void)
|
|||
|
||||
ret = RegQueryValueExA(hTestKey, LOG_HKCU_CONSOLE_OPEN, NULL, NULL, (LPBYTE)&data, &data_size);
|
||||
if (ret == ERROR_SUCCESS) {
|
||||
ws_log_console_open = (enum ws_log_console_pref)data;
|
||||
ws_log_console_open = (ws_log_console_open_pref)data;
|
||||
ws_noisy("Got "LOG_HKCU_CONSOLE_OPEN" from Windows registry: %d", ws_log_console_open);
|
||||
}
|
||||
else if (ret != ERROR_FILE_NOT_FOUND) {
|
||||
|
|
|
@ -130,7 +130,7 @@ static enum ws_log_level fatal_log_level = LOG_LEVEL_ERROR;
|
|||
|
||||
static bool init_complete = false;
|
||||
|
||||
int ws_log_console_open = LOG_CONSOLE_OPEN_NEVER;
|
||||
ws_log_console_open_pref ws_log_console_open = LOG_CONSOLE_OPEN_NEVER;
|
||||
|
||||
|
||||
static void print_err(void (*vcmdarg_err)(const char *, va_list ap),
|
||||
|
@ -808,7 +808,7 @@ static void load_registry()
|
|||
return;
|
||||
}
|
||||
|
||||
ws_log_console_open = (enum ws_log_console_pref)data;
|
||||
ws_log_console_open = (ws_log_console_open_pref)data;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -52,14 +52,14 @@ extern "C" {
|
|||
*/
|
||||
#define LOG_HKCU_CONSOLE_OPEN "ConsoleOpen"
|
||||
|
||||
enum ws_log_console_pref {
|
||||
typedef enum {
|
||||
LOG_CONSOLE_OPEN_NEVER,
|
||||
LOG_CONSOLE_OPEN_AUTO, /* On demand. */
|
||||
LOG_CONSOLE_OPEN_ALWAYS, /* Open during startup. */
|
||||
};
|
||||
} ws_log_console_open_pref;
|
||||
|
||||
WSUTIL_EXPORT
|
||||
int ws_log_console_open;
|
||||
ws_log_console_open_pref ws_log_console_open;
|
||||
|
||||
|
||||
/** Callback for registering a log writer. */
|
||||
|
|
Loading…
Reference in New Issue