From 977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 13 Jul 2014 01:49:46 +0200 Subject: Mess around with log UI. Herp Derp. --- gui/pages/LogPage.ui | 86 +++++++++++++++++++++++++++++++++------------ gui/pages/OtherLogsPage.cpp | 16 +++------ gui/pages/OtherLogsPage.ui | 79 ++++++++++++++++++----------------------- 3 files changed, 101 insertions(+), 80 deletions(-) (limited to 'gui') diff --git a/gui/pages/LogPage.ui b/gui/pages/LogPage.ui index 924babdb..d6b0a0c0 100644 --- a/gui/pages/LogPage.ui +++ b/gui/pages/LogPage.ui @@ -6,14 +6,14 @@ 0 0 - 831 - 596 + 825 + 782 Log - + 0 @@ -26,7 +26,34 @@ 0 - + + + + false + + + + + + + false + + + Search: + + + + + + + false + + + Find next + + + + false @@ -45,50 +72,63 @@ - - + + - - - Upload the log to paste.ee - it will stay online for a month + + + false - Upload Log + Keep updating + + + true + + + + Qt::Horizontal + + + + 40 + 20 + + + + Copy the whole log into the clipboard - &Copy Log + &Copy - + - Clear the log + Upload the log to paste.ee - it will stay online for a month - Clear + Upload - - - Qt::Vertical + + + Clear the log - - - 20 - 40 - + + Clear - + diff --git a/gui/pages/OtherLogsPage.cpp b/gui/pages/OtherLogsPage.cpp index f20b9fef..555075e3 100644 --- a/gui/pages/OtherLogsPage.cpp +++ b/gui/pages/OtherLogsPage.cpp @@ -29,7 +29,7 @@ OtherLogsPage::OtherLogsPage(BaseInstance *instance, QWidget *parent) { ui->setupUi(this); - m_watcher->setFileExpression(".*\\.log$"); + m_watcher->setFileExpression("(.*\\.log(\\.[0-9]*)?$)|(crash-.*\\.txt)"); m_watcher->setRootDir(QDir::current().absoluteFilePath(m_instance->minecraftRoot())); connect(m_watcher, &RecursiveFileSystemWatcher::filesChanged, this, @@ -55,7 +55,6 @@ void OtherLogsPage::populateSelectLogBox() { ui->selectLogBox->clear(); ui->selectLogBox->addItems(m_watcher->files()); - ui->selectLogBox->addItem(tr("Other"), true); if (m_currentFile.isNull()) { ui->selectLogBox->setCurrentIndex(-1); @@ -63,7 +62,8 @@ void OtherLogsPage::populateSelectLogBox() else { const int index = ui->selectLogBox->findText(m_currentFile); - ui->selectLogBox->setCurrentIndex(index); + if(index != -1) + ui->selectLogBox->setCurrentIndex(index); } } @@ -72,15 +72,7 @@ void OtherLogsPage::on_selectLogBox_currentIndexChanged(const int index) QString file; if (index != -1) { - if (ui->selectLogBox->itemData(index).isValid()) - { - file = QFileDialog::getOpenFileName( - this, tr("Open log file"), m_instance->minecraftRoot(), tr("*.log;;*.txt;;*")); - } - else - { - file = ui->selectLogBox->itemText(index); - } + file = ui->selectLogBox->itemText(index); } if (file.isEmpty() || !QFile::exists(m_instance->minecraftRoot() + "/" + file)) diff --git a/gui/pages/OtherLogsPage.ui b/gui/pages/OtherLogsPage.ui index e6ce6397..1083ebcb 100644 --- a/gui/pages/OtherLogsPage.ui +++ b/gui/pages/OtherLogsPage.ui @@ -6,14 +6,14 @@ 0 0 - 640 - 480 + 657 + 538 Form - + 0 @@ -27,24 +27,14 @@ 0 - - - false - - - true - - - - - + - - - 96 - 16777215 - + + + 0 + 0 + @@ -56,29 +46,22 @@ - - - Qt::Horizontal - - - - - + - Upload the log to paste.ee - it will stay online for a month + Copy the whole log into the clipboard - Upload Log + &Copy - + - Copy the whole log into the clipboard + Upload the log to paste.ee - it will stay online for a month - &Copy Log + Upload @@ -92,23 +75,29 @@ - - - - Qt::Vertical - - - - 20 - 40 - - - - + + + + false + + + Qt::ScrollBarAlwaysOn + + + true + + + Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + text + -- cgit v1.2.3