[PC-BSD Commits] r7978 - in pcbsd/current/src-qt4/pc-controlpanel: . images

svn at pcbsd.org svn at pcbsd.org
Wed Nov 3 17:33:08 PDT 2010


Author: kris
Date: 2010-11-03 17:33:08 -0700 (Wed, 03 Nov 2010)
New Revision: 7978

Added:
   pcbsd/current/src-qt4/pc-controlpanel/images/video-display.png
Modified:
   pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.cpp
   pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.h
   pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.qrc
   pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.ui
Log:

Added option to pc-controlpanel which allows user to exit the current desktop
session, and re-run the display setup wizard




Property changes on: pcbsd/current/src-qt4/pc-controlpanel/images/video-display.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.cpp	2010-11-04 00:19:59 UTC (rev 7977)
+++ pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.cpp	2010-11-04 00:33:08 UTC (rev 7978)
@@ -26,6 +26,7 @@
 #include <QPixmap>
 #include <QDebug>
 #include <QProcess>
+#include <QMessageBox>
 
 /* Local includes */
 #include "pc-controlpanel.h"
@@ -38,14 +39,15 @@
 
    // Connect our buttons
    connect(action_Quit, SIGNAL(triggered()), this, SLOT(slotQuitClicked()));
-   connect(pushSoftware, SIGNAL(clicked()), this, SLOT(slotSoftwareClicked()));
+   connect(pushDisplay, SIGNAL(clicked()), this, SLOT(slotDisplayClicked()));
    connect(pushFirewall, SIGNAL(clicked()), this, SLOT(slotFirewallClicked()));
+   connect(pushLife, SIGNAL(clicked()), this, SLOT(slotLifeClicked()));
+   connect(pushPrint, SIGNAL(clicked()), this, SLOT(slotPrintClicked()));
    connect(pushNetwork, SIGNAL(clicked()), this, SLOT(slotNetworkClicked()));
+   connect(pushServices, SIGNAL(clicked()), this, SLOT(slotServicesClicked()));
+   connect(pushSoftware, SIGNAL(clicked()), this, SLOT(slotSoftwareClicked()));
    connect(pushSystem, SIGNAL(clicked()), this, SLOT(slotSystemClicked()));
-   connect(pushServices, SIGNAL(clicked()), this, SLOT(slotServicesClicked()));
    connect(pushUsers, SIGNAL(clicked()), this, SLOT(slotUsersClicked()));
-   connect(pushLife, SIGNAL(clicked()), this, SLOT(slotLifeClicked()));
-   connect(pushPrint, SIGNAL(clicked()), this, SLOT(slotPrintClicked()));
 
 }
 
@@ -84,6 +86,25 @@
 	runProg("life-preserver");
 }
 
+void PCC::slotDisplayClicked()
+{
+	int ret = QMessageBox::question(this, tr("Exit Desktop Session?"),
+		tr("Are you sure you want to run the display setup wizard? Doing so will exit the current desktop session and any unsaved files will be lost."),
+		QMessageBox::No | QMessageBox::Yes,
+		QMessageBox::No);
+
+	switch (ret) {
+		case QMessageBox::Yes:
+		runProg("pc-runxgui");
+		break;
+
+		case QMessageBox::No:
+          	return;
+          	break;
+      	}
+
+}
+
 void PCC::slotPrintClicked()
 {
 	QString user;

Modified: pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.h
===================================================================
--- pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.h	2010-11-04 00:19:59 UTC (rev 7977)
+++ pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.h	2010-11-04 00:33:08 UTC (rev 7978)
@@ -27,6 +27,7 @@
 private slots:
 
     // Button Slots
+    void slotDisplayClicked();
     void slotFirewallClicked();
     void slotLifeClicked();
     void slotNetworkClicked();

Modified: pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.qrc
===================================================================
--- pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.qrc	2010-11-04 00:19:59 UTC (rev 7977)
+++ pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.qrc	2010-11-04 00:33:08 UTC (rev 7978)
@@ -1,5 +1,6 @@
 <RCC>
   <qresource>
+    <file>images/video-display.png</file>
     <file>images/printer.png</file>
     <file>images/lifepreserver.png</file>
     <file>images/preferences-desktop-user-password.png</file>

Modified: pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.ui
===================================================================
--- pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.ui	2010-11-04 00:19:59 UTC (rev 7977)
+++ pcbsd/current/src-qt4/pc-controlpanel/pc-controlpanel.ui	2010-11-04 00:33:08 UTC (rev 7978)
@@ -34,8 +34,8 @@
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>631</width>
-         <height>393</height>
+         <width>625</width>
+         <height>423</height>
         </rect>
        </property>
        <layout class="QGridLayout" name="gridLayout_5">
@@ -178,17 +178,17 @@
            <string>Administration</string>
           </property>
           <layout class="QGridLayout" name="gridLayout_4">
-           <item row="0" column="2">
-            <widget class="QPushButton" name="pushServices">
+           <item row="0" column="0">
+            <widget class="QPushButton" name="pushDisplay">
              <property name="statusTip">
-              <string>Manage your systems services.</string>
+              <string>Change the video resolution and driver.</string>
              </property>
              <property name="text">
-              <string>Services</string>
+              <string>Display</string>
              </property>
              <property name="icon">
               <iconset resource="pc-controlpanel.qrc">
-               <normaloff>:/images/preferences-system-session-services.png</normaloff>:/images/preferences-system-session-services.png</iconset>
+               <normaloff>:/images/video-display.png</normaloff>:/images/video-display.png</iconset>
              </property>
              <property name="iconSize">
               <size>
@@ -201,17 +201,17 @@
              </property>
             </widget>
            </item>
-           <item row="0" column="4">
-            <widget class="QPushButton" name="pushUsers">
+           <item row="0" column="1">
+            <widget class="QPushButton" name="pushPrint">
              <property name="statusTip">
-              <string>Add / Remove and edit users on this system.</string>
+              <string>Setup and manage printers on this system.</string>
              </property>
              <property name="text">
-              <string>Users</string>
+              <string>Printers</string>
              </property>
              <property name="icon">
               <iconset resource="pc-controlpanel.qrc">
-               <normaloff>:/images/preferences-desktop-user-password.png</normaloff>:/images/preferences-desktop-user-password.png</iconset>
+               <normaloff>:/images/printer.png</normaloff>:/images/printer.png</iconset>
              </property>
              <property name="iconSize">
               <size>
@@ -224,30 +224,17 @@
              </property>
             </widget>
            </item>
-           <item row="0" column="6">
-            <spacer name="horizontalSpacer_4">
-             <property name="orientation">
-              <enum>Qt::Horizontal</enum>
-             </property>
-             <property name="sizeHint" stdset="0">
-              <size>
-               <width>183</width>
-               <height>20</height>
-              </size>
-             </property>
-            </spacer>
-           </item>
-           <item row="0" column="0">
-            <widget class="QPushButton" name="pushPrint">
+           <item row="0" column="2">
+            <widget class="QPushButton" name="pushServices">
              <property name="statusTip">
-              <string>Setup and manage printers on this system.</string>
+              <string>Manage your systems services.</string>
              </property>
              <property name="text">
-              <string>Printers</string>
+              <string>Services</string>
              </property>
              <property name="icon">
               <iconset resource="pc-controlpanel.qrc">
-               <normaloff>:/images/printer.png</normaloff>:/images/printer.png</iconset>
+               <normaloff>:/images/preferences-system-session-services.png</normaloff>:/images/preferences-system-session-services.png</iconset>
              </property>
              <property name="iconSize">
               <size>
@@ -283,6 +270,42 @@
              </property>
             </widget>
            </item>
+           <item row="0" column="4">
+            <widget class="QPushButton" name="pushUsers">
+             <property name="statusTip">
+              <string>Add / Remove and edit users on this system.</string>
+             </property>
+             <property name="text">
+              <string>Users</string>
+             </property>
+             <property name="icon">
+              <iconset resource="pc-controlpanel.qrc">
+               <normaloff>:/images/preferences-desktop-user-password.png</normaloff>:/images/preferences-desktop-user-password.png</iconset>
+             </property>
+             <property name="iconSize">
+              <size>
+               <width>42</width>
+               <height>42</height>
+              </size>
+             </property>
+             <property name="flat">
+              <bool>true</bool>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="5">
+            <spacer name="horizontalSpacer_4">
+             <property name="orientation">
+              <enum>Qt::Horizontal</enum>
+             </property>
+             <property name="sizeHint" stdset="0">
+              <size>
+               <width>183</width>
+               <height>20</height>
+              </size>
+             </property>
+            </spacer>
+           </item>
           </layout>
          </widget>
         </item>
@@ -350,7 +373,7 @@
      <x>0</x>
      <y>0</y>
      <width>662</width>
-     <height>24</height>
+     <height>25</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuFile">



More information about the Commits mailing list