From dc92af62939da79cb1f13cc8e8555c52c2709e22 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Sun, 6 Mar 2022 10:25:25 -0500 Subject: [PATCH] Some UI fixes; support USBMS for Nia and Libra devices --- bookinfodialog.cpp | 1 - reader.cpp | 1 + usbms_splash.cpp | 10 ++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/bookinfodialog.cpp b/bookinfodialog.cpp index ab72eba..2083f7d 100644 --- a/bookinfodialog.cpp +++ b/bookinfodialog.cpp @@ -9,7 +9,6 @@ bookInfoDialog::bookInfoDialog(QWidget *parent) : ui(new Ui::bookInfoDialog) { ui->setupUi(this); - bookInfoDialog::setFont(QFont("u001")); // Stylesheet QFile stylesheetFile(":/resources/eink.qss"); diff --git a/reader.cpp b/reader.cpp index 69be8cb..cb9362d 100644 --- a/reader.cpp +++ b/reader.cpp @@ -43,6 +43,7 @@ reader::reader(QWidget *parent) : ui->sizeValueLabel->setFont(QFont("u001")); ui->alignmentLabel->setFont(QFont("u001")); ui->fontChooser->setFont(QFont("u001")); + ui->definitionStatusLabel->setFont(QFont("u001")); ui->pageProgressBar->setFont(QFont("u001")); ui->previousBtn->setProperty("type", "borderless"); diff --git a/usbms_splash.cpp b/usbms_splash.cpp index b8513a5..e2a7200 100644 --- a/usbms_splash.cpp +++ b/usbms_splash.cpp @@ -98,6 +98,16 @@ void usbms_splash::usbms_launch() proc_1->waitForFinished(); proc_1->deleteLater(); + if(readFile("/opt/inkbox_device") == "n306\n" or readFile("/opt/inkbox_device") == "n873\n") { + QString functionInsmodProg("insmod"); + QStringList functionInsmodArgs; + functionInsmodArgs << "/external_root/modules/drivers/usb/gadget/function/usb_f_mass_storage.ko"; + QProcess * functionInsmodProc = new QProcess(); + functionInsmodProc->start(); + functionInsmodProc->waitForFinished(); + functionInsmodProc->deleteLater(); + } + bool exitUsbMsDone = false; QTimer *usbms_t = new QTimer(this); usbms_t->setInterval(1000);