summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-07-13 01:49:46 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-13 01:49:46 +0200
commit977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2 (patch)
treeb220bc01f231a1ba5182b30a9f59ca45359220b1 /gui
parent4c0dc51110603cbe0e98228c703e26402094a3cc (diff)
downloadMultiMC-977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2.tar
MultiMC-977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2.tar.gz
MultiMC-977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2.tar.lz
MultiMC-977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2.tar.xz
MultiMC-977cc1cfbb0b7ce3c2d69ca17dc4a6222d6794d2.zip
Mess around with log UI. Herp Derp.
Diffstat (limited to 'gui')
-rw-r--r--gui/pages/LogPage.ui86
-rw-r--r--gui/pages/OtherLogsPage.cpp16
-rw-r--r--gui/pages/OtherLogsPage.ui79
3 files changed, 101 insertions, 80 deletions
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 @@
<rect>
<x>0</x>
<y>0</y>
- <width>831</width>
- <height>596</height>
+ <width>825</width>
+ <height>782</height>
</rect>
</property>
<property name="windowTitle">
<string>Log</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin">
<number>0</number>
</property>
@@ -26,7 +26,34 @@
<property name="bottomMargin">
<number>0</number>
</property>
- <item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="lineEdit">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Search:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="pushButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="text">
+ <string>Find next</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="3">
<widget class="QPlainTextEdit" name="text">
<property name="undoRedoEnabled">
<bool>false</bool>
@@ -45,50 +72,63 @@
</property>
</widget>
</item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <item row="0" column="0" colspan="3">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QPushButton" name="btnPaste">
- <property name="toolTip">
- <string>Upload the log to paste.ee - it will stay online for a month</string>
+ <widget class="QCheckBox" name="checkBox">
+ <property name="enabled">
+ <bool>false</bool>
</property>
<property name="text">
- <string>Upload Log</string>
+ <string>Keep updating</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
</property>
</widget>
</item>
<item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QPushButton" name="btnCopy">
<property name="toolTip">
<string>Copy the whole log into the clipboard</string>
</property>
<property name="text">
- <string>&amp;Copy Log</string>
+ <string>&amp;Copy</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btnClear">
+ <widget class="QPushButton" name="btnPaste">
<property name="toolTip">
- <string>Clear the log</string>
+ <string>Upload the log to paste.ee - it will stay online for a month</string>
</property>
<property name="text">
- <string>Clear</string>
+ <string>Upload</string>
</property>
</widget>
</item>
<item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <widget class="QPushButton" name="btnClear">
+ <property name="toolTip">
+ <string>Clear the log</string>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
+ <property name="text">
+ <string>Clear</string>
</property>
- </spacer>
+ </widget>
</item>
</layout>
</item>
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 @@
<rect>
<x>0</x>
<y>0</y>
- <width>640</width>
- <height>480</height>
+ <width>657</width>
+ <height>538</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
+ <layout class="QVBoxLayout" name="verticalLayout">
<property name="leftMargin">
<number>0</number>
</property>
@@ -27,24 +27,14 @@
<number>0</number>
</property>
<item>
- <widget class="QPlainTextEdit" name="text">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QComboBox" name="selectLogBox">
- <property name="maximumSize">
- <size>
- <width>96</width>
- <height>16777215</height>
- </size>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
</widget>
</item>
@@ -56,29 +46,22 @@
</widget>
</item>
<item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnPaste">
+ <widget class="QPushButton" name="btnCopy">
<property name="toolTip">
- <string>Upload the log to paste.ee - it will stay online for a month</string>
+ <string>Copy the whole log into the clipboard</string>
</property>
<property name="text">
- <string>Upload Log</string>
+ <string>&amp;Copy</string>
</property>
</widget>
</item>
<item>
- <widget class="QPushButton" name="btnCopy">
+ <widget class="QPushButton" name="btnPaste">
<property name="toolTip">
- <string>Copy the whole log into the clipboard</string>
+ <string>Upload the log to paste.ee - it will stay online for a month</string>
</property>
<property name="text">
- <string>&amp;Copy Log</string>
+ <string>Upload</string>
</property>
</widget>
</item>
@@ -92,23 +75,29 @@
</property>
</widget>
</item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
</item>
+ <item>
+ <widget class="QPlainTextEdit" name="text">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOn</enum>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse|Qt::TextBrowserInteraction|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
+ <tabstops>
+ <tabstop>text</tabstop>
+ </tabstops>
<resources/>
<connections/>
</ui>