Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49679 - in /trunk/qt: package/yast2-qt.changes src/YQApplication.cc src/YQDialog.cc src/YQUI_builtins.cc
  • From: tgoettlicher@xxxxxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2008 09:08:13 -0000
  • Message-id: <20080805090813.CAF8039C15@xxxxxxxxxxxxxxxx>
Author: tgoettlicher
Date: Tue Aug 5 11:08:13 2008
New Revision: 49679

URL: http://svn.opensuse.org/viewcvs/yast?rev=49679&view=rev
Log:
Fixed bnc #409612: popup menu during installation becomes hidden because of
NULL parent

Modified:
trunk/qt/package/yast2-qt.changes
trunk/qt/src/YQApplication.cc
trunk/qt/src/YQDialog.cc
trunk/qt/src/YQUI_builtins.cc

Modified: trunk/qt/package/yast2-qt.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=49679&r1=49678&r2=49679&view=diff
==============================================================================
--- trunk/qt/package/yast2-qt.changes (original)
+++ trunk/qt/package/yast2-qt.changes Tue Aug 5 11:08:13 2008
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Tue Aug 5 10:54:04 CEST 2008 - tgoettlicher@xxxxxxx
+
+- Fixed bnc #409612: popup menu during installation becomes
+ hidden because of NULL parent
+
+-------------------------------------------------------------------
Tue Jul 29 11:21:53 CEST 2008 - tgoettlicher@xxxxxxx

- Fixed sorting in Table (bnc #399206)

Modified: trunk/qt/src/YQApplication.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQApplication.cc?rev=49679&r1=49678&r2=49679&view=diff
==============================================================================
--- trunk/qt/src/YQApplication.cc (original)
+++ trunk/qt/src/YQApplication.cc Tue Aug 5 11:08:13 2008
@@ -483,12 +483,18 @@
QString fileName;
bool tryAgain = false;

+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+
do
{
// Leave the mouse cursor alone - this function might be called from
// some other widget, not only from UI::AskForSaveFileName().

- fileName = QFileDialog::getSaveFileName( 0, //
parent
+ fileName = QFileDialog::getSaveFileName( parent, //
parent
headline, //
caption
startWith, // dir
filter ); //
filter
@@ -512,7 +518,7 @@
msg = ( _( "%1 exists and is write-protected!\nReally
overwrite?" ) ).arg( fileName );
}

- int buttonNo = QMessageBox::information( 0, // parent widget
+ int buttonNo = QMessageBox::information( parent,
// Translators: Window
title for confirmation dialog
_( "Confirm" ),
msg,
@@ -588,7 +594,13 @@
"\n"
"Switch left and right mouse buttons?"
);
- int button = QMessageBox::question( 0,
+
+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+ int button = QMessageBox::question( parent,
// Popup dialog caption
_( "Unexpected Click" ),
message,

Modified: trunk/qt/src/YQDialog.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQDialog.cc?rev=49679&r1=49678&r2=49679&view=diff
==============================================================================
--- trunk/qt/src/YQDialog.cc (original)
+++ trunk/qt/src/YQDialog.cc Tue Aug 5 11:08:13 2008
@@ -576,8 +576,13 @@

if ( YQUI::ui()->usingVisionImpairedPalette() )
{
+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
yuiMilestone() << "Switched to vision impaired palette" << endl;
- QMessageBox::information( 0,
// parent
+ QMessageBox::information( parent,
// parent
_("Color switching"),
// caption
_( "Switching to color palette for
vision impaired users -\n"
"press Shift-F4 again to switch
back to normal colors." ), // text

Modified: trunk/qt/src/YQUI_builtins.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQUI_builtins.cc?rev=49679&r1=49678&r2=49679&view=diff
==============================================================================
--- trunk/qt/src/YQUI_builtins.cc (original)
+++ trunk/qt/src/YQUI_builtins.cc Tue Aug 5 11:08:13 2008
@@ -182,7 +182,12 @@

if ( interactive )
{
- QMessageBox::warning( 0, //
parent
+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+ QMessageBox::warning( parent, //
parent
"Error", //
caption
QString( "Couldn't save screen shot\nto %1"
).arg( fileName ),
QMessageBox::Ok | QMessageBox::Default,
// button0
@@ -199,6 +204,12 @@
QString( "*.tgz
*.tar.gz" ), // filter
QString( "Save y2logs
to..." ) ); // headline

+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+
if ( ! fileName.isEmpty() )
{
QString saveLogsCommand = "/sbin/save_y2logs";
@@ -215,7 +226,7 @@
<< "\" exited with " << result
<< endl;

- QMessageBox::warning( 0,
// parent
+ QMessageBox::warning( parent,
// parent
"Error",
// caption
QString( "Couldn't save y2logs to %1 - "
"exit code %2" ).arg( fileName
).arg( result ),
@@ -234,7 +245,7 @@
<< saveLogsCommand << "\" not found"
<< endl;

- QMessageBox::warning( 0,
// parent
+ QMessageBox::warning( parent,
// parent
"Error",
// caption
QString( "Couldn't save y2logs to %1:\n"
"Command %2 not found" ).arg(
fileName ).arg( saveLogsCommand ),
@@ -253,7 +264,13 @@
items << "Debug logging off"
<< "Debug logging on";

- QString result = QInputDialog::getItem( 0,
+
+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+ QString result = QInputDialog::getItem( parent,
_("YaST2 Logging"),
_("Configure YaST2 Logging:"),
items, 0,
@@ -269,12 +286,18 @@

void YQUI::toggleRecordMacro()
{
+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+
if ( YMacro::recording() )
{
YMacro::endRecording();
normalCursor();

- QMessageBox::information( 0,
// parent
+ QMessageBox::information( parent,
// parent
"YaST2 Macro Recorder",
// caption
"Macro recording done.",
// text
QMessageBox::Ok | QMessageBox::Default,
// button0
@@ -286,7 +309,7 @@
normalCursor();

QString filename =
- QFileDialog::getSaveFileName( 0,
+ QFileDialog::getSaveFileName( parent,
"Select Macro File to Record to",
DEFAULT_MACRO_FILE_NAME,
// startWith
"*.ycp"
// filter
@@ -304,8 +327,14 @@
{
normalCursor();

+ QWidget* parent = 0;
+ YDialog * currentDialog = YDialog::currentDialog( false );
+ if (currentDialog)
+ parent = (QWidget *) currentDialog->widgetRep();
+
+
QString filename =
- QFileDialog::getOpenFileName( 0,
+ QFileDialog::getOpenFileName( parent,
"Select Macro File to Play",
DEFAULT_MACRO_FILE_NAME, //
startWith
"*.ycp" );

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages