View Issue Details

IDProjectCategoryView StatusLast Update
0016524ScribusUser Interfacepublic2021-03-21 15:01
Reporterbubu Assigned Tojghali  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.5.7.svn 
Fixed in Version1.5.7.svn 
Summary0016524: Cleanup, pretty code for .ui files
DescriptionI propose to remove unnecessary whitespaces from outstanding .ui files like:
<property name="spacing" >
<property name="spacing">

This is the last such fix. Please see the attached patch. Thanks.
TagsNo tags attached.
PatchNo

Activities

bubu

2021-03-20 00:34

reporter  

0001-Clenup-pretty-code-for-.ui-files.patch (30,978 bytes)   
From 51c218f983f680cd115cd30738af16ce139ecc42 Mon Sep 17 00:00:00 2001
Message-Id: <51c218f983f680cd115cd30738af16ce139ecc42.1616199818.git.bubu@ujevangelizacio.hu>
From: =?UTF-8?q?Gyuris=20Gell=C3=A9rt?= <bubu@ujevangelizacio.hu>
Date: Sat, 20 Mar 2021 01:23:07 +0100
Subject: [PATCH] Clenup, pretty code for .ui files

---
 scribus/plugins/scripter/python/excepthook.ui |  47 ++++----
 scribus/plugins/scripter/python/permitdlg.ui  |  81 ++++++-------
 scribus/plugins/scriptplugin/pconsole.ui      | 105 ++++++++---------
 scribus/plugins/scriptplugin_py2x/pconsole.ui | 107 +++++++++---------
 scribus/ui/aboutplugins.ui                    |  39 +++----
 scribus/ui/helpbrowser.ui                     |  63 ++++++-----
 scribus/ui/shortcutwidget.ui                  |  55 ++++-----
 7 files changed, 252 insertions(+), 245 deletions(-)

diff --git a/scribus/plugins/scripter/python/excepthook.ui b/scribus/plugins/scripter/python/excepthook.ui
index 13ce54a43..adfd5496f 100644
--- a/scribus/plugins/scripter/python/excepthook.ui
+++ b/scribus/plugins/scripter/python/excepthook.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>ExceptHookDialog</class>
- <widget class="QDialog" name="ExceptHookDialog" >
-  <property name="geometry" >
+ <widget class="QDialog" name="ExceptHookDialog">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,54 +10,54 @@
     <height>290</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Script error</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout" >
+  <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <layout class="QGridLayout" name="gridLayout" >
-     <property name="spacing" >
+    <layout class="QGridLayout" name="gridLayout">
+     <property name="spacing">
       <number>10</number>
      </property>
-     <item row="0" column="0" >
-      <widget class="QLabel" name="label" >
-       <property name="text" >
+     <item row="0" column="0">
+      <widget class="QLabel" name="label">
+       <property name="text">
         <string>An exception occured while running the script.</string>
        </property>
       </widget>
      </item>
-     <item row="0" column="1" >
-      <widget class="QPushButton" name="closeButton" >
-       <property name="text" >
+     <item row="0" column="1">
+      <widget class="QPushButton" name="closeButton">
+       <property name="text">
         <string>&amp;Close</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="0" >
-      <widget class="QLabel" name="exceptionLabel" >
-       <property name="font" >
+     <item row="1" column="0">
+      <widget class="QLabel" name="exceptionLabel">
+       <property name="font">
         <font>
          <weight>75</weight>
          <bold>true</bold>
         </font>
        </property>
-       <property name="text" >
+       <property name="text">
         <string>Exception</string>
        </property>
       </widget>
      </item>
-     <item row="1" column="1" >
-      <widget class="QPushButton" name="detailsButton" >
-       <property name="text" >
-        <string>&amp;Details >></string>
+     <item row="1" column="1">
+      <widget class="QPushButton" name="detailsButton">
+       <property name="text">
+        <string>&amp;Details &gt;&gt;</string>
        </property>
       </widget>
      </item>
     </layout>
    </item>
    <item>
-    <widget class="QTextBrowser" name="tracebackBrowser" >
-     <property name="minimumSize" >
+    <widget class="QTextBrowser" name="tracebackBrowser">
+     <property name="minimumSize">
       <size>
        <width>0</width>
        <height>200</height>
diff --git a/scribus/plugins/scripter/python/permitdlg.ui b/scribus/plugins/scripter/python/permitdlg.ui
index d2b1ffe15..1404ad5a6 100644
--- a/scribus/plugins/scripter/python/permitdlg.ui
+++ b/scribus/plugins/scripter/python/permitdlg.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>PermitDialog</class>
- <widget class="QDialog" name="PermitDialog" >
-  <property name="geometry" >
+ <widget class="QDialog" name="PermitDialog">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,36 +10,36 @@
     <height>393</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Confirm to run unsafe script</string>
   </property>
-  <property name="sizeGripEnabled" >
+  <property name="sizeGripEnabled">
    <bool>true</bool>
   </property>
-  <property name="modal" >
+  <property name="modal">
    <bool>true</bool>
   </property>
-  <layout class="QGridLayout" name="gridLayout" >
-   <item row="0" column="0" >
-    <layout class="QHBoxLayout" name="horizontalLayout" >
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
-      <layout class="QVBoxLayout" name="verticalLayout" >
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
-        <widget class="QLabel" name="filenameLabel" >
-         <property name="text" >
+        <widget class="QLabel" name="filenameLabel">
+         <property name="text">
           <string>scriptname.py</string>
          </property>
         </widget>
        </item>
        <item>
-        <widget class="QLabel" name="label" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+        <widget class="QLabel" name="label">
+         <property name="sizePolicy">
+          <sizepolicy vsizetype="Expanding" hsizetype="Expanding">
            <horstretch>0</horstretch>
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="text" >
+         <property name="text">
           <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 &lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
 p, li { white-space: pre-wrap; }
@@ -47,7 +48,7 @@ p, li { white-space: pre-wrap; }
 &lt;p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;/p>
 &lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">You should only permit execution of this script if you are sure that it comes from a trustworthy source. &lt;/p>&lt;/body>&lt;/html></string>
          </property>
-         <property name="wordWrap" >
+         <property name="wordWrap">
           <bool>true</bool>
          </property>
         </widget>
@@ -55,20 +56,20 @@ p, li { white-space: pre-wrap; }
       </layout>
      </item>
      <item>
-      <widget class="QPushButton" name="detailsButton" >
-       <property name="text" >
-        <string>De&amp;tails >></string>
+      <widget class="QPushButton" name="detailsButton">
+       <property name="text">
+        <string>De&amp;tails &gt;&gt;</string>
        </property>
-       <property name="checkable" >
+       <property name="checkable">
         <bool>true</bool>
        </property>
       </widget>
      </item>
     </layout>
    </item>
-   <item row="1" column="0" >
-    <widget class="QTextBrowser" name="problemsBrowser" >
-     <property name="html" >
+   <item row="1" column="0">
+    <widget class="QTextBrowser" name="problemsBrowser">
+     <property name="html">
       <string>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
 &lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
 p, li { white-space: pre-wrap; }
@@ -77,21 +78,21 @@ p, li { white-space: pre-wrap; }
      </property>
     </widget>
    </item>
-   <item row="2" column="0" >
-    <widget class="QCheckBox" name="rememberCheck" >
-     <property name="text" >
+   <item row="2" column="0">
+    <widget class="QCheckBox" name="rememberCheck">
+     <property name="text">
       <string>&amp;Remember preference for this file</string>
      </property>
     </widget>
    </item>
-   <item row="3" column="0" >
-    <layout class="QHBoxLayout" name="horizontalLayout_2" >
+   <item row="3" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout_2">
      <item>
-      <spacer name="horizontalSpacer_2" >
-       <property name="orientation" >
+      <spacer name="horizontalSpacer_2">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
@@ -100,28 +101,28 @@ p, li { white-space: pre-wrap; }
       </spacer>
      </item>
      <item>
-      <widget class="QPushButton" name="allowButton" >
-       <property name="text" >
+      <widget class="QPushButton" name="allowButton">
+       <property name="text">
         <string>&amp;Allow</string>
        </property>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="denyButton" >
-       <property name="text" >
+      <widget class="QPushButton" name="denyButton">
+       <property name="text">
         <string>&amp;Deny</string>
        </property>
-       <property name="default" >
+       <property name="default">
         <bool>true</bool>
        </property>
       </widget>
      </item>
      <item>
-      <spacer name="horizontalSpacer_3" >
-       <property name="orientation" >
+      <spacer name="horizontalSpacer_3">
+       <property name="orientation">
         <enum>Qt::Horizontal</enum>
        </property>
-       <property name="sizeHint" stdset="0" >
+       <property name="sizeHint" stdset="0">
         <size>
          <width>40</width>
          <height>20</height>
diff --git a/scribus/plugins/scriptplugin/pconsole.ui b/scribus/plugins/scriptplugin/pconsole.ui
index f21c8eafd..926803067 100644
--- a/scribus/plugins/scriptplugin/pconsole.ui
+++ b/scribus/plugins/scriptplugin/pconsole.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>PythonConsole</class>
- <widget class="QMainWindow" name="PythonConsole" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="PythonConsole">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,47 +10,47 @@
     <height>471</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Script Console</string>
   </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" >
-    <property name="leftMargin" >
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout">
+    <property name="leftMargin">
      <number>9</number>
     </property>
-    <property name="topMargin" >
+    <property name="topMargin">
      <number>9</number>
     </property>
-    <property name="rightMargin" >
+    <property name="rightMargin">
      <number>9</number>
     </property>
-    <property name="bottomMargin" >
+    <property name="bottomMargin">
      <number>9</number>
     </property>
-    <property name="horizontalSpacing" >
+    <property name="horizontalSpacing">
      <number>6</number>
     </property>
-    <property name="verticalSpacing" >
+    <property name="verticalSpacing">
      <number>6</number>
     </property>
-    <item row="0" column="0" >
-     <widget class="QSplitter" name="splitter" >
-      <property name="orientation" >
+    <item row="0" column="0">
+     <widget class="QSplitter" name="splitter">
+      <property name="orientation">
        <enum>Qt::Vertical</enum>
       </property>
-      <widget class="QTextEdit" name="commandEdit" >
-       <property name="lineWrapMode" >
+      <widget class="QTextEdit" name="commandEdit">
+       <property name="lineWrapMode">
         <enum>QTextEdit::NoWrap</enum>
        </property>
       </widget>
-      <widget class="QTextEdit" name="outputEdit" >
-       <property name="lineWrapMode" >
+      <widget class="QTextEdit" name="outputEdit">
+       <property name="lineWrapMode">
         <enum>QTextEdit::NoWrap</enum>
        </property>
-       <property name="readOnly" >
+       <property name="readOnly">
         <bool>true</bool>
        </property>
-       <property name="acceptRichText" >
+       <property name="acceptRichText">
         <bool>false</bool>
        </property>
       </widget>
@@ -57,8 +58,8 @@
     </item>
    </layout>
   </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
@@ -66,60 +67,60 @@
      <height>29</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menu_File" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
      <string>&amp;File</string>
     </property>
-    <addaction name="action_Open" />
-    <addaction name="action_Save" />
-    <addaction name="actionSave_As" />
-    <addaction name="separator" />
-    <addaction name="action_Exit" />
+    <addaction name="action_Open"/>
+    <addaction name="action_Save"/>
+    <addaction name="actionSave_As"/>
+    <addaction name="separator"/>
+    <addaction name="action_Exit"/>
    </widget>
-   <widget class="QMenu" name="menu_Script" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_Script">
+    <property name="title">
      <string>&amp;Script</string>
     </property>
-    <addaction name="action_Run" />
-    <addaction name="actionRun_As_Console" />
-    <addaction name="action_Save_Output" />
+    <addaction name="action_Run"/>
+    <addaction name="actionRun_As_Console"/>
+    <addaction name="action_Save_Output"/>
    </widget>
-   <addaction name="menu_File" />
-   <addaction name="menu_Script" />
+   <addaction name="menu_File"/>
+   <addaction name="menu_Script"/>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <action name="action_Open" >
-   <property name="text" >
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="action_Open">
+   <property name="text">
     <string>&amp;Open...</string>
    </property>
   </action>
-  <action name="action_Save" >
-   <property name="text" >
+  <action name="action_Save">
+   <property name="text">
     <string>&amp;Save</string>
    </property>
   </action>
-  <action name="actionSave_As" >
-   <property name="text" >
+  <action name="actionSave_As">
+   <property name="text">
     <string>Save &amp;As...</string>
    </property>
   </action>
-  <action name="action_Exit" >
-   <property name="text" >
+  <action name="action_Exit">
+   <property name="text">
     <string>&amp;Quit</string>
    </property>
   </action>
-  <action name="action_Run" >
-   <property name="text" >
+  <action name="action_Run">
+   <property name="text">
     <string>&amp;Run</string>
    </property>
   </action>
-  <action name="actionRun_As_Console" >
-   <property name="text" >
+  <action name="actionRun_As_Console">
+   <property name="text">
     <string>Run As &amp;Console</string>
    </property>
   </action>
-  <action name="action_Save_Output" >
-   <property name="text" >
+  <action name="action_Save_Output">
+   <property name="text">
     <string>&amp;Save Output...</string>
    </property>
   </action>
diff --git a/scribus/plugins/scriptplugin_py2x/pconsole.ui b/scribus/plugins/scriptplugin_py2x/pconsole.ui
index f21c8eafd..ee338f40d 100644
--- a/scribus/plugins/scriptplugin_py2x/pconsole.ui
+++ b/scribus/plugins/scriptplugin_py2x/pconsole.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>PythonConsole</class>
- <widget class="QMainWindow" name="PythonConsole" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="PythonConsole">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,47 +10,47 @@
     <height>471</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Script Console</string>
   </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" >
-    <property name="leftMargin" >
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout">
+    <property name="leftMargin">
      <number>9</number>
     </property>
-    <property name="topMargin" >
+    <property name="topMargin">
      <number>9</number>
     </property>
-    <property name="rightMargin" >
+    <property name="rightMargin">
      <number>9</number>
     </property>
-    <property name="bottomMargin" >
+    <property name="bottomMargin">
      <number>9</number>
     </property>
-    <property name="horizontalSpacing" >
+    <property name="horizontalSpacing">
      <number>6</number>
     </property>
-    <property name="verticalSpacing" >
+    <property name="verticalSpacing" 
      <number>6</number>
     </property>
-    <item row="0" column="0" >
-     <widget class="QSplitter" name="splitter" >
-      <property name="orientation" >
+    <item row="0" column="0">
+     <widget class="QSplitter" name="splitter">
+      <property name="orientation">
        <enum>Qt::Vertical</enum>
       </property>
-      <widget class="QTextEdit" name="commandEdit" >
-       <property name="lineWrapMode" >
+      <widget class="QTextEdit" name="commandEdit">
+       <property name="lineWrapMode">
         <enum>QTextEdit::NoWrap</enum>
        </property>
       </widget>
-      <widget class="QTextEdit" name="outputEdit" >
-       <property name="lineWrapMode" >
+      <widget class="QTextEdit" name="outputEdit">
+       <property name="lineWrapMode">
         <enum>QTextEdit::NoWrap</enum>
        </property>
-       <property name="readOnly" >
+       <property name="readOnly">
         <bool>true</bool>
        </property>
-       <property name="acceptRichText" >
+       <property name="acceptRichText">
         <bool>false</bool>
        </property>
       </widget>
@@ -57,69 +58,69 @@
     </item>
    </layout>
   </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
      <width>535</width>
-     <height>29</height>
+     <height>22</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menu_File" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_File">
+    <property name="title">
      <string>&amp;File</string>
     </property>
-    <addaction name="action_Open" />
-    <addaction name="action_Save" />
-    <addaction name="actionSave_As" />
-    <addaction name="separator" />
-    <addaction name="action_Exit" />
+    <addaction name="action_Open"/>
+    <addaction name="action_Save"/>
+    <addaction name="actionSave_As"/>
+    <addaction name="separator"/>
+    <addaction name="action_Exit"/>
    </widget>
-   <widget class="QMenu" name="menu_Script" >
-    <property name="title" >
+   <widget class="QMenu" name="menu_Script">
+    <property name="title">
      <string>&amp;Script</string>
     </property>
-    <addaction name="action_Run" />
-    <addaction name="actionRun_As_Console" />
-    <addaction name="action_Save_Output" />
+    <addaction name="action_Run"/>
+    <addaction name="actionRun_As_Console"/>
+    <addaction name="action_Save_Output"/>
    </widget>
-   <addaction name="menu_File" />
-   <addaction name="menu_Script" />
+   <addaction name="menu_File"/>
+   <addaction name="menu_Script"/>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <action name="action_Open" >
-   <property name="text" >
+  <widget class="QStatusBar" name="statusbar"/>
+  <action name="action_Open">
+   <property name="text">
     <string>&amp;Open...</string>
    </property>
   </action>
-  <action name="action_Save" >
-   <property name="text" >
+  <action name="action_Save">
+   <property name="text">
     <string>&amp;Save</string>
    </property>
   </action>
-  <action name="actionSave_As" >
-   <property name="text" >
+  <action name="actionSave_As">
+   <property name="text">
     <string>Save &amp;As...</string>
    </property>
   </action>
-  <action name="action_Exit" >
-   <property name="text" >
+  <action name="action_Exit">
+   <property name="text">
     <string>&amp;Quit</string>
    </property>
   </action>
-  <action name="action_Run" >
-   <property name="text" >
+  <action name="action_Run">
+   <property name="text">
     <string>&amp;Run</string>
    </property>
   </action>
-  <action name="actionRun_As_Console" >
-   <property name="text" >
+  <action name="actionRun_As_Console">
+   <property name="text">
     <string>Run As &amp;Console</string>
    </property>
   </action>
-  <action name="action_Save_Output" >
-   <property name="text" >
+  <action name="action_Save_Output">
+   <property name="text">
     <string>&amp;Save Output...</string>
    </property>
   </action>
diff --git a/scribus/ui/aboutplugins.ui b/scribus/ui/aboutplugins.ui
index 544a129c4..364216cc0 100644
--- a/scribus/ui/aboutplugins.ui
+++ b/scribus/ui/aboutplugins.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>AboutPlugins</class>
- <widget class="QDialog" name="AboutPlugins" >
-  <property name="geometry" >
+ <widget class="QDialog" name="AboutPlugins">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,10 +10,10 @@
     <height>401</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Scribus: About Plug-ins</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout">
    <property name="leftMargin">
     <number>9</number>
    </property>
@@ -26,18 +27,18 @@
     <number>9</number>
    </property>
    <item>
-    <widget class="QSplitter" name="splitter" >
-     <property name="orientation" >
+    <widget class="QSplitter" name="splitter">
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="opaqueResize" >
+     <property name="opaqueResize">
       <bool>false</bool>
      </property>
-     <property name="childrenCollapsible" >
+     <property name="childrenCollapsible">
       <bool>false</bool>
      </property>
-     <widget class="QListWidget" name="pluginList" >
-      <property name="sizePolicy" >
+     <widget class="QListWidget" name="pluginList">
+      <property name="sizePolicy">
        <sizepolicy>
         <hsizetype>7</hsizetype>
         <vsizetype>7</vsizetype>
@@ -46,15 +47,15 @@
        </sizepolicy>
       </property>
      </widget>
-     <widget class="QTextBrowser" name="infoBrowser" />
+     <widget class="QTextBrowser" name="infoBrowser"/>
     </widget>
    </item>
    <item>
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
+    <widget class="QDialogButtonBox" name="buttonBox">
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="standardButtons" >
+     <property name="standardButtons">
       <set>QDialogButtonBox::Close</set>
      </property>
     </widget>
@@ -69,11 +70,11 @@
    <receiver>AboutPlugins</receiver>
    <slot>accept()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>248</x>
      <y>254</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>157</x>
      <y>274</y>
     </hint>
@@ -85,11 +86,11 @@
    <receiver>AboutPlugins</receiver>
    <slot>reject()</slot>
    <hints>
-    <hint type="sourcelabel" >
+    <hint type="sourcelabel">
      <x>316</x>
      <y>260</y>
     </hint>
-    <hint type="destinationlabel" >
+    <hint type="destinationlabel">
      <x>286</x>
      <y>274</y>
     </hint>
diff --git a/scribus/ui/helpbrowser.ui b/scribus/ui/helpbrowser.ui
index 89a13eda0..8aa1040f8 100644
--- a/scribus/ui/helpbrowser.ui
+++ b/scribus/ui/helpbrowser.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>HelpBrowser</class>
- <widget class="QMainWindow" name="HelpBrowser" >
-  <property name="geometry" >
+ <widget class="QMainWindow" name="HelpBrowser">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,18 +10,18 @@
     <height>535</height>
    </rect>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>Scribus Help</string>
   </property>
-  <widget class="QWidget" name="centralwidget" >
-   <layout class="QGridLayout" name="gridLayout" >
-    <item row="0" column="0" >
-     <widget class="ScTextBrowser" native="1" name="textBrowser" />
+  <widget class="QWidget" name="centralwidget">
+   <layout class="QGridLayout" name="gridLayout">
+    <item row="0" column="0">
+     <widget class="ScTextBrowser" native="1" name="textBrowser"/>
     </item>
    </layout>
   </widget>
-  <widget class="QMenuBar" name="menubar" >
-   <property name="geometry" >
+  <widget class="QMenuBar" name="menubar">
+   <property name="geometry">
     <rect>
      <x>0</x>
      <y>0</y>
@@ -29,55 +30,55 @@
     </rect>
    </property>
   </widget>
-  <widget class="QStatusBar" name="statusbar" />
-  <widget class="QToolBar" name="toolBar" >
-   <property name="windowTitle" >
+  <widget class="QStatusBar" name="statusbar"/>
+  <widget class="QToolBar" name="toolBar">
+   <property name="windowTitle">
     <string>Scribus Help</string>
    </property>
-   <attribute name="toolBarArea" >
+   <attribute name="toolBarArea">
     <enum>TopToolBarArea</enum>
    </attribute>
-   <attribute name="toolBarBreak" >
+   <attribute name="toolBarBreak">
     <bool>false</bool>
    </attribute>
   </widget>
-  <action name="action_Print" >
-   <property name="text" >
+  <action name="action_Print">
+   <property name="text">
     <string>&amp;Print...</string>
    </property>
   </action>
-  <action name="action_Exit" >
-   <property name="text" >
+  <action name="action_Exit">
+   <property name="text">
     <string>&amp;Exit</string>
    </property>
   </action>
-  <action name="action_Find" >
-   <property name="text" >
+  <action name="action_Find">
+   <property name="text">
     <string>&amp;Find...</string>
    </property>
   </action>
-  <action name="actionFind_Next" >
-   <property name="text" >
+  <action name="actionFind_Next">
+   <property name="text">
     <string>Find &amp;Next...</string>
    </property>
   </action>
-  <action name="actionFind_Previous" >
-   <property name="text" >
+  <action name="actionFind_Previous">
+   <property name="text">
     <string>Find &amp;Previous...</string>
    </property>
   </action>
-  <action name="action_Add" >
-   <property name="text" >
+  <action name="action_Add">
+   <property name="text">
     <string>&amp;Add</string>
    </property>
   </action>
-  <action name="action_Delete" >
-   <property name="text" >
+  <action name="action_Delete">
+   <property name="text">
     <string>&amp;Delete</string>
    </property>
   </action>
-  <action name="actionD_elete_All" >
-   <property name="text" >
+  <action name="actionD_elete_All">
+   <property name="text">
     <string>D&amp;elete All</string>
    </property>
   </action>
diff --git a/scribus/ui/shortcutwidget.ui b/scribus/ui/shortcutwidget.ui
index 17b600ff4..6141e7c9b 100644
--- a/scribus/ui/shortcutwidget.ui
+++ b/scribus/ui/shortcutwidget.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>ShortcutWidget</class>
- <widget class="QWidget" name="ShortcutWidget" >
-  <property name="geometry" >
+ <widget class="QWidget" name="ShortcutWidget">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
@@ -9,34 +10,34 @@
     <height>300</height>
    </rect>
   </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="QRadioButton" name="noKey" >
-     <property name="text" >
+  <layout class="QGridLayout">
+   <item row="0" column="0">
+    <widget class="QRadioButton" name="noKey">
+     <property name="text">
       <string>&amp;No Key</string>
      </property>
     </widget>
    </item>
-   <item row="1" column="0" >
-    <widget class="QRadioButton" name="userDef" >
-     <property name="text" >
+   <item row="1" column="0">
+    <widget class="QRadioButton" name="userDef">
+     <property name="text">
       <string>&amp;User Defined Key</string>
      </property>
     </widget>
    </item>
-   <item row="1" column="1" >
-    <widget class="QPushButton" name="setKeyButton" >
-     <property name="text" >
+   <item row="1" column="1">
+    <widget class="QPushButton" name="setKeyButton">
+     <property name="text">
       <string>Set &amp;Key</string>
      </property>
     </widget>
    </item>
-   <item row="1" column="2" >
+   <item row="1" column="2">
     <spacer>
-     <property name="orientation" >
+     <property name="orientation">
       <enum>Qt::Horizontal</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint">
       <size>
        <width>40</width>
        <height>20</height>
@@ -44,37 +45,37 @@
      </property>
     </spacer>
    </item>
-   <item row="2" column="0" colspan="2" >
-    <widget class="QLabel" name="keyDisplay" >
-     <property name="minimumSize" >
+   <item row="2" column="0" colspan="2">
+    <widget class="QLabel" name="keyDisplay">
+     <property name="minimumSize">
       <size>
        <width>0</width>
        <height>40</height>
       </size>
      </property>
-     <property name="frameShape" >
+     <property name="frameShape">
       <enum>QFrame::Panel</enum>
      </property>
-     <property name="frameShadow" >
+     <property name="frameShadow">
       <enum>QFrame::Sunken</enum>
      </property>
-     <property name="lineWidth" >
+     <property name="lineWidth">
       <number>2</number>
      </property>
-     <property name="text" >
+     <property name="text">
       <string/>
      </property>
-     <property name="alignment" >
+     <property name="alignment">
       <set>Qt::AlignCenter</set>
      </property>
     </widget>
    </item>
-   <item row="3" column="0" >
+   <item row="3" column="0">
     <spacer>
-     <property name="orientation" >
+     <property name="orientation">
       <enum>Qt::Vertical</enum>
      </property>
-     <property name="sizeHint" >
+     <property name="sizeHint">
       <size>
        <width>20</width>
        <height>40</height>
-- 
2.27.0

jghali

2021-03-20 11:10

administrator   ~0048965

Applied, thanks!

FirasH

2021-03-21 15:01

developer   ~0048989

Thanks!
Fixed in 1.5.7.svn (24577)

Issue History

Date Modified Username Field Change
2021-03-20 00:34 bubu New Issue
2021-03-20 00:34 bubu File Added: 0001-Clenup-pretty-code-for-.ui-files.patch
2021-03-20 10:17 jghali Summary Clenup, pretty code for .ui files => Cleanup, pretty code for .ui files
2021-03-20 11:10 jghali Assigned To => jghali
2021-03-20 11:10 jghali Status new => resolved
2021-03-20 11:10 jghali Resolution open => fixed
2021-03-20 11:10 jghali Fixed in Version => 1.5.7.svn
2021-03-20 11:10 jghali Note Added: 0048965
2021-03-21 15:01 FirasH Status resolved => closed
2021-03-21 15:01 FirasH Note Added: 0048989