Ticket #12: 00-mythcontext-protocoldialogs.patch

File 00-mythcontext-protocoldialogs.patch, 2.3 KB (added by Matthew Wire <devel@…>, 11 years ago)

Convert protocol and library mismatch dialogs to mythui

  • mythtv/libs/libmyth/mythcontext.cpp

     
    18921902                                    "backend=%2)\n")
    18931903                                    .arg(MYTH_PROTO_VERSION).arg(strlist[1]));
    18941904
    1895         if (d->mainWindow && d->m_ui && d->m_ui->IsScreenSetup())
     1905        if(d->m_gui)
    18961906        {
    1897             MythPopupBox::showOkPopup(
    1898                 d->mainWindow,
    1899                 "Connection failure",
    1900                 tr("The server uses network protocol version %1, "
    1901                    "but this client only understands version %2.  "
    1902                    "Make sure you are running compatible versions of "
    1903                    "the backend and frontend.")
    1904                 .arg(strlist[1]).arg(MYTH_PROTO_VERSION));
     1907            QString message = tr("The server uses network protocol version %1, "
     1908              "but this client only understands version %2.  "
     1909              "Make sure you are running compatible versions of "
     1910              "the backend and frontend.")
     1911              .arg(strlist[1]).arg(MYTH_PROTO_VERSION);
     1912
     1913            MythConfirmationDialog *protocolPopup;
     1914            protocolPopup = ShowOkPopup(message, this);
    19051915        }
    19061916        return false;
    19071917    }
     
    19791989    if (libversion == pluginversion)
    19801990        return true;
    19811991
    1982     QString err = tr("Plugin %1 is not compatible with the installed MythTV "
    1983                      "libraries. Please recompile the plugin after a make "
    1984                      "distclean");
    1985 
    19861992    VERBOSE(VB_GENERAL, QString("Plugin %1 (%2) binary version does not "
    19871993                                "match libraries (%3)")
    19881994                                .arg(name).arg(pluginversion).arg(libversion));
    19891995
    1990     if (GetMainWindow() && !d->disablelibrarypopup)
    1991         ShowOkPopup(err.arg(name));
    1992 
     1996    if(d->m_gui && !d->disablelibrarypopup)
     1997    {
     1998        QString err = tr("Plugin %1 is not compatible with the installed MythTV "
     1999                     "libraries. Please recompile the plugin after a make "
     2000                     "distclean").arg(name);
     2001        MythConfirmationDialog *libMismatchPopup;
     2002        libMismatchPopup = ShowOkPopup(err, this);
     2003    }
    19932004    return false;
    19942005}
    19952006