[PC-BSD Commits] r2354 - pcbsd/trunk/XGUISource
svn at pcbsd.org
svn at pcbsd.org
Wed Jul 16 08:10:07 PDT 2008
Author: kris
Date: 2008-07-16 08:10:06 -0700 (Wed, 16 Jul 2008)
New Revision: 2354
Modified:
pcbsd/trunk/XGUISource/xgui.cpp
pcbsd/trunk/XGUISource/xgui.h
Log:
Added a new warning to the XGUI tool. It will now check if we are working on an
unprobed monitor, and warn the user, while enabling the "Monitor Settings" under the advanced tab. This should help more systems bring up a workable resolution, while giving the
user a notice that something needs their attention.
Modified: pcbsd/trunk/XGUISource/xgui.cpp
===================================================================
--- pcbsd/trunk/XGUISource/xgui.cpp 2008-07-16 14:49:41 UTC (rev 2353)
+++ pcbsd/trunk/XGUISource/xgui.cpp 2008-07-16 15:10:06 UTC (rev 2354)
@@ -10,6 +10,8 @@
** destructor.
*****************************************************************************/
#include "xgui.h"
+#include <qfile.h>
+#include <qmessagebox.h>
void XGUI::ProgramInit()
@@ -31,10 +33,35 @@
// Disable the monitor advanced group box
monitorChangedSlot();
+ // Check for an unprobed monitor
+ checkUnprobedMonitor();
+
}
+// Function which checks if we are using an unprobed monitor, warns the user
+// and then enables the advanced tab
+void XGUI::checkUnprobedMonitor()
+{
+ QFile test("/tmp/.unprobedMonitor");
+ if (test.exists())
+ {
+ // Enable the advanced monitor horz / vert refresh rates
+ checkMonitorSync->setChecked(true);
+ monitorChangedSlot();
+
+ QFile test2("/tmp/.warnedUnprobedMonitor");
+ if ( ! test2.exists() )
+ {
+ system("touch /tmp/.warnedUnprobedMonitor");
+ QMessageBox::warning(0, tr("Warning!"), tr("PC-BSD was unable to autodetect your monitor. You may need to specify this monitor's Horizontal and Vertical refresh rates in the 'Advanced' tab."));
+ }
+
+ }
+
+}
+
void XGUI::loadResolutions()
{
QString line;
Modified: pcbsd/trunk/XGUISource/xgui.h
===================================================================
--- pcbsd/trunk/XGUISource/xgui.h 2008-07-16 14:49:41 UTC (rev 2353)
+++ pcbsd/trunk/XGUISource/xgui.h 2008-07-16 15:10:06 UTC (rev 2354)
@@ -29,6 +29,7 @@
void loadResolutions();
void loadDrivers();
void loadDepth();
+ void checkUnprobedMonitor();
signals:
More information about the Commits
mailing list