Author: jdsn
Date: Fri Nov 7 02:25:28 2008
New Revision: 53026
URL: http://svn.opensuse.org/viewcvs/yast?rev=53026&view=rev
Log:
fix deadlock in x11 dialogs (bnc#440281)
set PreferredMode (bnc#402581)
disable autoYaST mode for unsupported architectures (bnc#439612)
more verbose logging
2.17.8
Modified:
trunk/x11/VERSION
trunk/x11/package/yast2-x11.changes
trunk/x11/src/XLib.pm
trunk/x11/src/autoyast/modules/AutoinstX11.ycp
trunk/x11/src/autoyast/proposal/x11_auto.ycp
trunk/x11/src/dialog/x11Dialog.ycp
trunk/x11/src/proposal/x11_proposal.ycp
Modified: trunk/x11/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/x11/VERSION?rev=53026&r1=53025&r2=53026&view=diff
==============================================================================
--- trunk/x11/VERSION (original)
+++ trunk/x11/VERSION Fri Nov 7 02:25:28 2008
@@ -1 +1 @@
-2.17.7
+2.17.8
Modified: trunk/x11/package/yast2-x11.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/x11/package/yast2-x11.changes?rev=53026&r1=53025&r2=53026&view=diff
==============================================================================
--- trunk/x11/package/yast2-x11.changes (original)
+++ trunk/x11/package/yast2-x11.changes Fri Nov 7 02:25:28 2008
@@ -1,4 +1,13 @@
-------------------------------------------------------------------
+Fri Nov 7 02:27:35 CET 2008 - jdsn@suse.de
+
+- fix deadlock in x11 dialogs (bnc#440281)
+- set PreferredMode (bnc#402581)
+- disable autoYaST mode for unsupported architectures (bnc#439612)
+- more verbose logging
+- 2.17.8
+
+-------------------------------------------------------------------
Thu Nov 6 23:26:31 CET 2008 - jdsn@suse.de
- adding more verbose loggin to x11 proposal
Modified: trunk/x11/src/XLib.pm
URL: http://svn.opensuse.org/viewcvs/yast/trunk/x11/src/XLib.pm?rev=53026&r1=53025&r2=53026&view=diff
==============================================================================
--- trunk/x11/src/XLib.pm (original)
+++ trunk/x11/src/XLib.pm Fri Nov 7 02:25:28 2008
@@ -131,6 +131,37 @@
return $status;
}
#==========================================
+# setPreferredMode
+# set the selected resolution and color depth the user selected (bnc#402581)
+#------------------------------------------
+BEGIN{ $TYPEINFO{setPreferredMode} = ["function", "boolean", "string", "string"]; }
+sub setPreferredMode {
+ my $class = shift;
+ my $resolution = shift;
+ my $colorDepth = shift;
+ my $mCard = new SaX::SaXManipulateCard ( $section{Card} );
+ $mCard->selectCard(0);
+
+ # if card driver is fbdev do not set preferred mode
+ if ( $mCard->getCardDriver() eq "fbdev" )
+ { return 0; }
+
+ # check if the values are valid
+ if ( $resolution !~ /^\d+x\d+$/ ||
+ $colorDepth !~ /^\d+$/ )
+ { return 0; }
+
+ # really set the preferred mode
+ my $mDesktop = new SaX::SaXManipulateDesktop (
+ $section{Desktop},$section{Card},$section{Path}
+ );
+ $mDesktop->selectDesktop(0);
+ $mDesktop->setPreferredMode( $resolution );
+ $mDesktop->setColorDepth( $colorDepth );
+
+ return 1;
+}
+#==========================================
# testConfiguration
#------------------------------------------
BEGIN{ $TYPEINFO{testConfiguration} = ["function","boolean"]; }
Modified: trunk/x11/src/autoyast/modules/AutoinstX11.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/x11/src/autoyast/modules/AutoinstX11.ycp?rev=53026&r1=53025&r2=53026&view=diff
==============================================================================
--- trunk/x11/src/autoyast/modules/AutoinstX11.ycp (original)
+++ trunk/x11/src/autoyast/modules/AutoinstX11.ycp Fri Nov 7 02:25:28 2008
@@ -213,6 +213,17 @@
} else {
XLib::deactivate3D();
}
+ // set the PreferredMode (bnc#402581)
+ string colorDepth = tostring(colors);
+ y2milestone("Trying to set X11 PreferredMode to: %1 @ %2", resolution, colorDepth);
+ if ( XLib::setPreferredMode(resolution, colorDepth) )
+ {
+ y2milestone("Sucessfully set the PreferredMode for X11");
+ }
+ else
+ {
+ y2error("Failed to set the PreferredMode for X11.");
+ }
boolean status = XLib::writeConfiguration();
return status;
}
Modified: trunk/x11/src/autoyast/proposal/x11_auto.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/x11/src/autoyast/proposal/x11_auto.ycp?rev=53026&r1=53025&r2=53026&view=diff
==============================================================================
--- trunk/x11/src/autoyast/proposal/x11_auto.ycp (original)
+++ trunk/x11/src/autoyast/proposal/x11_auto.ycp Fri Nov 7 02:25:28 2008
@@ -25,6 +25,7 @@
textdomain "x11";
import "AutoinstX11";
+import "Arch";
include "x11/autoDialog.ycp";
@@ -49,9 +50,17 @@
y2debug("param=%1", param);
//=================================
+// check if this hardware supports X11 configuration (bnc#439612)
+//---------------------------------
+if ( ! Arch::x11_setup_needed() ) {
+ y2milestone("On this architecture no automatic X11 setup is supported. Thus no autoYaST configuration will be created or written.");
+ ret = false;
+}
+
+//=================================
// Import configuration
//---------------------------------
-if (func == "Import") {
+else if (func == "Import") {
ret = AutoinstX11::Import(param);
}
Modified: trunk/x11/src/dialog/x11Dialog.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/x11/src/dialog/x11Dialog.ycp?rev=53026&r1=53025&r2=53026&view=diff
==============================================================================
--- trunk/x11/src/dialog/x11Dialog.ycp (original)
+++ trunk/x11/src/dialog/x11Dialog.ycp Fri Nov 7 02:25:28 2008
@@ -51,6 +51,7 @@
define string setupColors ( string currentRes, string currentDepth )
{ // rewritten due to consistency with setupDisplaySize
+ y2milestone("Called setupColors with resolution(%1) and colorDepth(%2)", currentRes, currentDepth);
string topic = XMessages::colorDepth;
UI::OpenDialog( `MarginBox( 0.5, 0.5,
`VBox(
@@ -86,10 +87,14 @@
color = (string) UI::QueryWidget(`id(`depth), `Value);
- if (! XLib::hasValidColorResolutionSetup (color,currentRes))
+ // let the user cancel the dialog with cancel (bnc#440281)
+ if ( ret == `ok )
{
- warnInvalidColorResolution();
- ret = nil;
+ if (! XLib::hasValidColorResolutionSetup (color,currentRes))
+ {
+ warnInvalidColorResolution();
+ ret = nil;
+ }
}
} until ( ret == `ok || ret == `cancel);
@@ -109,6 +114,7 @@
define string setupResolutions (list reslist, string currentText, string currentColor)
{ // rewritten to be consistent with
+ y2milestone("Called setupResolution with reslist(%1) and resolution(%2) and color(%3).", reslist, currentText, currentColor);
string topic = XMessages::resolution;
UI::OpenDialog( `MarginBox( 0.5, 0.5,
`VBox(
@@ -132,11 +138,17 @@
ret = UI::UserInput();
res = (string) UI::QueryWidget(`id(`resitem), `Value);
- if (! XLib::hasValidColorResolutionSetup(currentColor, res))
+
+ // let the user cancel the dialog with cancel (bnc#440281)
+ if ( ret == `ok )
{
- warnInvalidColorResolution();
- ret = nil;
+ if (! XLib::hasValidColorResolutionSetup(currentColor, res))
+ {
+ warnInvalidColorResolution();
+ ret = nil;
+ }
}
+
} until (ret == `ok || ret == `cancel);
UI::CloseDialog();
@@ -152,6 +164,7 @@
{
// function rewritten because of (bnc#331664) and (bnc#399411)
+ y2milestone("Called setupDisplaySize with traversal(%1) and ratio(%2)", currentTraversal, currentRatio);
string topic1 = XMessages::selectDisplayTraversal;
string topic2 = XMessages::selectDisplayRatio;
// offer some common display settings
@@ -324,6 +337,8 @@
//--------------------------------
define list<string> setupTablet ( map