]> git.lyx.org Git - features.git/commitdiff
make error dialog more comprehensible:
authorEdwin Leuven <e.leuven@gmail.com>
Tue, 21 Oct 2008 09:07:15 +0000 (09:07 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Tue, 21 Oct 2008 09:07:15 +0000 (09:07 +0000)
1. selects the 1st error so that the error message shows
2. adds labels to the listwidgets in the dialog
3. adds a tooltip to the error listwidget

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27007 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiErrorList.cpp
src/frontends/qt4/ui/ErrorListUi.ui

index 2b0834d0d49fb22444432569c15af49c38942a81..54eb83ebc6b0cb413f8a13426cbb674eb0a23caa 100644 (file)
@@ -51,7 +51,6 @@ GuiErrorList::GuiErrorList(GuiView & lv)
 
 void GuiErrorList::showEvent(QShowEvent * e)
 {
-       errorsLW->setCurrentRow(0);
        select();
        e->accept();
 }
@@ -78,6 +77,7 @@ void GuiErrorList::updateContents()
        ErrorList::const_iterator end = errorList().end();
        for (; it != end; ++it)
                errorsLW->addItem(toqstr(it->error));
+       errorsLW->setCurrentRow(0);
 }
 
 
index a731acdc0da676c67989f5844cfd97c65b9a044b..1f861a21d99d748ab59a8f3be143bf8dcb3213bf 100644 (file)
@@ -1,7 +1,4 @@
 <ui version="4.0" >
- <author></author>
- <comment></comment>
- <exportmacro></exportmacro>
  <class>ErrorListUi</class>
  <widget class="QDialog" name="ErrorListUi" >
   <property name="geometry" >
   <property name="sizeGripEnabled" >
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout" >
-   <property name="margin" >
-    <number>9</number>
-   </property>
-   <property name="spacing" >
-    <number>6</number>
-   </property>
+  <layout class="QGridLayout" name="gridLayout" >
+   <item row="0" column="0" >
+    <widget class="QLabel" name="errorsLabel" >
+     <property name="text" >
+      <string>&amp;Errors:</string>
+     </property>
+     <property name="buddy" >
+      <cstring>errorsLW</cstring>
+     </property>
+    </widget>
+   </item>
    <item row="1" column="0" colspan="2" >
+    <widget class="QListWidget" name="errorsLW" >
+     <property name="toolTip" >
+      <string>Selecting an error will show the error message in the panel below, 
+and jump the cursor to the location in the document where the error occured.</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" >
+    <widget class="QLabel" name="descriptionLabel" >
+     <property name="text" >
+      <string>Description:</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="2" >
     <widget class="QTextBrowser" name="descriptionTB" >
      <property name="sizePolicy" >
-      <sizepolicy>
-       <hsizetype>7</hsizetype>
-       <vsizetype>5</vsizetype>
+      <sizepolicy vsizetype="Preferred" hsizetype="Expanding" >
        <horstretch>0</horstretch>
        <verstretch>0</verstretch>
       </sizepolicy>
      </property>
     </widget>
    </item>
-   <item row="0" column="0" colspan="2" >
-    <widget class="QListWidget" name="errorsLW" />
-   </item>
-   <item row="2" column="0" >
+   <item row="4" column="0" >
     <spacer>
      <property name="orientation" >
       <enum>Qt::Horizontal</enum>
@@ -48,7 +59,7 @@
      <property name="sizeType" >
       <enum>QSizePolicy::Expanding</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint" stdset="0" >
       <size>
        <width>20</width>
        <height>20</height>
@@ -56,7 +67,7 @@
      </property>
     </spacer>
    </item>
-   <item row="2" column="1" >
+   <item row="4" column="1" >
     <widget class="QPushButton" name="closePB" >
      <property name="text" >
       <string>&amp;Close</string>
    </item>
   </layout>
  </widget>
- <pixmapfunction></pixmapfunction>
- <includes>
-  <include location="local" >qt_i18n.h</include>
- </includes>
  <tabstops>
   <tabstop>errorsLW</tabstop>
   <tabstop>descriptionTB</tabstop>
   <tabstop>closePB</tabstop>
  </tabstops>
+ <includes>
+  <include location="local" >qt_i18n.h</include>
+ </includes>
  <resources/>
  <connections/>
 </ui>