Skip to content

WINETRICKS_SUPER_QUIET doesn't suppress informational popups with --gui #2430

@Tulon

Description

@Tulon

If I run the following:

WINETRICKS_SUPER_QUIET=1 WINETRICKS_LATEST_VERSION_CHECK=disabled winetricks --gui

I still get a popup saying winetricks latest version check update disabled that I hoped I could avoid with WINETRICKS_SUPER_QUIET=1.

If we take a look at the implementation of the w_info function:

w_info()
{
    # If $WINETRICKS_SUPER_QUIET is set, w_info is a no-op:
    if [ -z "${WINETRICKS_SUPER_QUIET}" ] ; then
        printf '%s\n%b\n%s\n' "${W_TEXT_LINE}" "${@}" "${W_TEXT_LINE}" >&2
    fi

    # kdialog doesn't allow a timeout unless you use --passivepopup
    if test "${W_OPT_UNATTENDED}"; then
        case ${WINETRICKS_GUI} in
            zenity) ${WINETRICKS_GUI} --timeout 5 --info --width=400 --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
            kdialog) ${WINETRICKS_GUI} --passivepopup "$@" 5 --title winetricks;;
            none) ;;
        esac
    else
        case ${WINETRICKS_GUI} in
            zenity) ${WINETRICKS_GUI} --info --width=400 --title=winetricks --text="$(echo "$@" | sed 's,\\\\,\\\\\\\\,g')";;
            kdialog) ${WINETRICKS_GUI} --title winetricks --error "$@";;
            none) ;;
        esac
    fi
}

We can see that despite the comment of # If $WINETRICKS_SUPER_QUIET is set, w_info is a no-op:, having WINETRICKS_SUPER_QUIET set to a non-empty string merely suppresses a printf. It doesn't suppress the popups in --gui mode. I think it should do that as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions