[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdebase/apps/konqueror/settings/konqhtml
From:       Pino Toscano <pino () kde ! org>
Date:       2008-03-31 22:45:43
Message-ID: 1207003543.184146.8982.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 792382 by pino:

Restructure a bit the layout of the Netscape plugins module:
use two tabs for the whole module, General Settings and Plugins.
The former holds all the general configurations, while the latter the plugin search folders and the list of found plugins.


 M  +134 -164  nsconfigwidget.ui  
 M  +12 -13    pluginopts.cpp  


--- trunk/KDE/kdebase/apps/konqueror/settings/konqhtml/nsconfigwidget.ui #792381:792382
@@ -11,181 +11,151 @@
    </rect>
   </property>
   <property name="windowTitle" >
-   <string>Netscape Plugin Config</string>
+   <string>Plugins</string>
   </property>
-  <layout class="QVBoxLayout" >
+  <layout class="QVBoxLayout" name="verticalLayout_2" >
    <item>
-    <widget class="QTabWidget" name="TabWidget2" >
-     <property name="enabled" >
-      <bool>true</bool>
+    <widget class="QGroupBox" name="GroupBox1" >
+     <property name="minimumSize" >
+      <size>
+       <width>300</width>
+       <height>0</height>
+      </size>
      </property>
-     <property name="currentIndex" >
-      <number>1</number>
+     <property name="title" >
+      <string>Folders</string>
      </property>
-     <widget class="QWidget" name="tab" >
-      <attribute name="title" >
-       <string>Scan</string>
-      </attribute>
-      <layout class="QVBoxLayout" >
-       <item>
-        <layout class="QHBoxLayout" >
-         <property name="spacing" >
-          <number>3</number>
+     <layout class="QGridLayout" name="gridLayout" >
+      <item row="0" column="0" >
+       <widget class="KUrlRequester" name="dirEdit" >
+        <property name="enabled" >
+         <bool>false</bool>
+        </property>
+       </widget>
+      </item>
+      <item row="0" column="1" >
+       <widget class="QPushButton" name="dirNew" >
+        <property name="text" >
+         <string>&amp;New</string>
+        </property>
+       </widget>
+      </item>
+      <item rowspan="5" row="1" column="0" >
+       <widget class="KListWidget" name="dirList" >
+        <property name="sizePolicy" >
+         <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+          <horstretch>0</horstretch>
+          <verstretch>0</verstretch>
+         </sizepolicy>
+        </property>
+       </widget>
+      </item>
+      <item row="1" column="1" >
+       <widget class="QPushButton" name="dirRemove" >
+        <property name="enabled" >
+         <bool>false</bool>
+        </property>
+        <property name="text" >
+         <string>&amp;Remove</string>
+        </property>
+       </widget>
+      </item>
+      <item row="2" column="1" >
+       <widget class="QPushButton" name="dirUp" >
+        <property name="enabled" >
+         <bool>false</bool>
+        </property>
+        <property name="text" >
+         <string>&amp;Up</string>
+        </property>
+       </widget>
+      </item>
+      <item row="3" column="1" >
+       <widget class="QPushButton" name="dirDown" >
+        <property name="enabled" >
+         <bool>false</bool>
+        </property>
+        <property name="text" >
+         <string>Do&amp;wn</string>
+        </property>
+       </widget>
+      </item>
+      <item row="4" column="1" >
+       <spacer>
+        <property name="orientation" >
+         <enum>Qt::Vertical</enum>
+        </property>
+        <property name="sizeType" >
+         <enum>QSizePolicy::Minimum</enum>
+        </property>
+        <property name="sizeHint" stdset="0" >
+         <size>
+          <width>20</width>
+          <height>0</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item row="5" column="1" >
+       <widget class="QPushButton" name="scanButton" >
+        <property name="whatsThis" >
+         <string>Click here to scan for newly installed Netscape plugins now.</string>
+        </property>
+        <property name="text" >
+         <string>&amp;Scan for Plugins</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+     <zorder>dirRemove</zorder>
+     <zorder>dirNew</zorder>
+     <zorder>dirEdit</zorder>
+     <zorder>dirDown</zorder>
+     <zorder>dirUp</zorder>
+     <zorder>dirList</zorder>
+     <zorder>scanButton</zorder>
+     <zorder>scanButton</zorder>
+    </widget>
+   </item>
+   <item>
+    <widget class="QGroupBox" name="groupBox_2" >
+     <property name="title" >
+      <string>Plugins</string>
+     </property>
+     <layout class="QVBoxLayout" name="verticalLayout" >
+      <item>
+       <widget class="Q3ListView" name="pluginList" >
+        <property name="whatsThis" >
+         <string>Here you can see a list of the Netscape plugins KDE has found.</string>
+        </property>
+        <property name="allColumnsShowFocus" >
+         <bool>true</bool>
+        </property>
+        <column>
+         <property name="text" >
+          <string>Information</string>
          </property>
-         <property name="leftMargin" >
-          <number>0</number>
+         <property name="clickable" >
+          <bool>true</bool>
          </property>
-         <property name="topMargin" >
-          <number>0</number>
+         <property name="resizable" >
+          <bool>true</bool>
          </property>
-         <property name="rightMargin" >
-          <number>0</number>
+        </column>
+        <column>
+         <property name="text" >
+          <string>Value</string>
          </property>
-         <property name="bottomMargin" >
-          <number>0</number>
+         <property name="clickable" >
+          <bool>true</bool>
          </property>
-         <item>
-          <widget class="QPushButton" name="scanButton" >
-           <property name="whatsThis" >
-            <string>Click here to scan for newly installed Netscape plugins now.</string>
-           </property>
-           <property name="text" >
-            <string>&amp;Scan for New Plugins</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <spacer>
-           <property name="orientation" >
-            <enum>Qt::Horizontal</enum>
-           </property>
-           <property name="sizeType" >
-            <enum>QSizePolicy::Expanding</enum>
-           </property>
-           <property name="sizeHint" >
-            <size>
-             <width>20</width>
-             <height>20</height>
-            </size>
-           </property>
-          </spacer>
-         </item>
-        </layout>
-       </item>
-       <item>
-        <widget class="QGroupBox" name="GroupBox1" >
-         <property name="minimumSize" >
-          <size>
-           <width>300</width>
-           <height>0</height>
-          </size>
-         </property>
-         <property name="title" >
-          <string>Scan Folders</string>
-         </property>
-         <layout class="QGridLayout" >
-          <item row="1" column="2" >
-           <widget class="QPushButton" name="dirRemove" >
-            <property name="enabled" >
-             <bool>false</bool>
-            </property>
-            <property name="text" >
-             <string>&amp;Remove</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="2" >
-           <widget class="QPushButton" name="dirNew" >
-            <property name="text" >
-             <string>&amp;New</string>
-            </property>
-           </widget>
-          </item>
-          <item row="0" column="0" colspan="2" >
-           <widget class="KUrlRequester" name="dirEdit" >
-            <property name="enabled" >
-             <bool>false</bool>
-            </property>
-           </widget>
-          </item>
-          <item row="3" column="2" >
-           <widget class="QPushButton" name="dirDown" >
-            <property name="enabled" >
-             <bool>false</bool>
-            </property>
-            <property name="text" >
-             <string>Do&amp;wn</string>
-            </property>
-           </widget>
-          </item>
-          <item row="2" column="2" >
-           <widget class="QPushButton" name="dirUp" >
-            <property name="enabled" >
-             <bool>false</bool>
-            </property>
-            <property name="text" >
-             <string>&amp;Up</string>
-            </property>
-           </widget>
-          </item>
-          <item rowspan="4" row="1" column="0" colspan="2" >
-           <widget class="KListWidget" name="dirList" >
-            <property name="sizePolicy" >
-             <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
-              <horstretch>0</horstretch>
-              <verstretch>0</verstretch>
-             </sizepolicy>
-            </property>
-           </widget>
-          </item>
-          <item row="4" column="2" >
-           <spacer>
-            <property name="orientation" >
-             <enum>Qt::Vertical</enum>
-            </property>
-            <property name="sizeType" >
-             <enum>QSizePolicy::Expanding</enum>
-            </property>
-            <property name="sizeHint" >
-             <size>
-              <width>20</width>
-              <height>20</height>
-             </size>
-            </property>
-           </spacer>
-          </item>
-         </layout>
-        </widget>
-       </item>
-      </layout>
-     </widget>
-     <widget class="QWidget" name="tab" >
-      <attribute name="title" >
-       <string>Plugins</string>
-      </attribute>
-      <layout class="QHBoxLayout" >
-       <item>
-        <widget class="Q3ListView" name="pluginList" >
-         <property name="whatsThis" >
-          <string>Here you can see a list of the Netscape plugins KDE has found.</string>
-         </property>
-         <property name="allColumnsShowFocus" >
+         <property name="resizable" >
           <bool>true</bool>
          </property>
-         <column>
-          <property name="text" >
-           <string>Information</string>
-          </property>
-         </column>
-         <column>
-          <property name="text" >
-           <string>Value</string>
-          </property>
-         </column>
-        </widget>
-       </item>
-      </layout>
-     </widget>
+        </column>
+       </widget>
+      </item>
+     </layout>
     </widget>
    </item>
   </layout>
--- trunk/KDE/kdebase/apps/konqueror/settings/konqhtml/pluginopts.cpp #792381:792382
@@ -69,11 +69,15 @@
 {
     QVBoxLayout* toplevel = new QVBoxLayout( this );
 
+    QTabWidget* topleveltab = new QTabWidget( this );
+    toplevel->addWidget( topleveltab );
+
+    QWidget* globalGB = new QWidget( topleveltab );
+    topleveltab->addTab( globalGB, i18n( "Global Settings" ) );
+
     /**************************************************************************
      ******************** Global Settings *************************************
      *************************************************************************/
-    QGroupBox* globalGB = new QGroupBox( i18n( "Global Settings" ), this );
-    toplevel->addWidget( globalGB );
     enablePluginsGloballyCB = new QCheckBox( i18n( "&Enable plugins globally" ), globalGB );
     enableHTTPOnly = new QCheckBox( i18n( "Only allow &HTTP and HTTPS URLs for plugins" ), globalGB );
     enableUserDemand = new QCheckBox( i18n( "&Load plugins on demand only" ), globalGB );
@@ -115,6 +119,8 @@
 
     globalGB->setLayout(vbox);
 
+    vbox->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding));
+
     domainSpecificDlg = new KDialog( this );
     domainSpecificDlg->setCaption( i18n("Domain-Specific Policies") );
     domainSpecificDlg->setButtons( KDialog::Close );
@@ -162,22 +168,15 @@
 
 /*****************************************************************************/
 
-    QGroupBox* netscapeGB = new QGroupBox( i18n( "Netscape Plugins" ), this );
-    toplevel->addWidget( netscapeGB );
+    QWidget* pluginsSettingsContainer = new QWidget( topleveltab );
+    topleveltab->addTab( pluginsSettingsContainer, i18n( "Plugins" ) );
 
     // create Designer made widget
-    QWidget *dummy = new QWidget(netscapeGB);
     m_widget = new Ui::NSConfigWidget();
-    m_widget->setupUi( dummy );
-    dummy->layout()->setMargin( 0 );
-    dummy->setObjectName( "configwidget" );
+    m_widget->setupUi( pluginsSettingsContainer );
+    pluginsSettingsContainer->setObjectName( "configwidget" );
     m_widget->dirEdit->setMode(KFile::ExistingOnly | KFile::LocalOnly | KFile::Directory);
 
-    vbox = new QVBoxLayout();
-    vbox->addWidget(dummy);
-    vbox->setMargin( KDialog::marginHint());
-    netscapeGB->setLayout(vbox);
-
 #ifndef Q_WS_WIN
     // setup widgets
     connect( m_widget->scanButton, SIGNAL(clicked()), SLOT(scan()) );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic