Fix for bug PAL11541 ( With Gnome and Xfce, some dialog boxes appear at the bottom-right corner of the Salome window ).

This commit is contained in:
mzn 2006-02-10 16:06:40 +00:00
parent c691f05ec4
commit 00c8816937
35 changed files with 28 additions and 161 deletions

View File

@ -410,11 +410,7 @@ void SMESHGUI_AddMeshElementDlg::Init()
if (Reverse)
connect(Reverse, SIGNAL(stateChanged(int)), SLOT(CheckBox(int)));
// Move widget on the botton right corner of main widget
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); // displays Dialog
// set selection mode

View File

@ -361,11 +361,7 @@ SMESHGUI_ClippingDlg::SMESHGUI_ClippingDlg (SMESHGUI* theModule,
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
/* to close dialog if study frame change */
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), this, SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
}

View File

@ -159,10 +159,7 @@ void SMESHGUI_CreateHypothesesDlg::Init()
connect(ListAlgoDefinition, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged()));
connect(ListAlgoDefinition, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(onDoubleClicked(QListViewItem*)));
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
}

View File

@ -268,10 +268,7 @@ void SMESHGUI_CreatePatternDlg::Init( const int theType )
activateSelection();
onSelectionDone();
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
}

View File

@ -365,10 +365,6 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::Init()
/* to close dialog if study change */
connect( mySMESHGUI, SIGNAL ( SignalCloseAllDialogs() ), this, SLOT( ClickOnCancel() ) ) ;
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition( this, x, y ) ;
this->move( x, y ) ;
this->show() ; /* displays Dialog */
ConstructorsClicked(0);

View File

@ -161,10 +161,7 @@ void SMESHGUI_DeleteGroupDlg::Init ()
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), SLOT(onSelectionDone()));
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
// set selection mode

View File

@ -62,10 +62,11 @@ SMESHGUI_Dialog::~SMESHGUI_Dialog()
void SMESHGUI_Dialog::show()
{
adjustSize();
SUIT_Desktop *PP = desktop();
int x = abs( PP->x() + PP->size().width() - size().width() - 10 ),
y = abs( PP->y() + PP->size().height() - size().height() - 10 );
move(x, y);
// REASON:: PAL11541
// SUIT_Desktop *PP = desktop();
// int x = abs( PP->x() + PP->size().width() - size().width() - 10 ),
// y = abs( PP->y() + PP->size().height() - size().height() - 10 );
// move(x, y);
LightApp_Dialog::show();
}

View File

@ -290,9 +290,6 @@ void SMESHGUI_EditHypothesesDlg::Init()
connect(ListHypDefinition, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(addItem(QListBoxItem*)));
connect(ListAlgoDefinition, SIGNAL(doubleClicked(QListBoxItem*)), this, SLOT(addItem(QListBoxItem*)));
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
LineEditC1A1->setFocus();

View File

@ -186,10 +186,6 @@ void SMESHGUI_EditMeshDlg::Init()
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()) , this, SLOT(ClickOnCancel()));
// Move widget on the bottom right corner of main widget
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); // displays Dialog
LineEditMesh->setFocus();

View File

@ -370,10 +370,6 @@ SMESHGUI_ExtrusionAlongPathDlg::SMESHGUI_ExtrusionAlongPathDlg( SMESHGUI* theMod
ZSpin->editor()->installEventFilter(this);
/***************************************************************/
// set position and show dialog box
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); // displays Dialog
}

View File

@ -264,10 +264,6 @@ SMESHGUI_ExtrusionDlg::SMESHGUI_ExtrusionDlg (SMESHGUI* theModule,
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
/***************************************************************/
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); // displays Dialog
ConstructorsClicked(0);

View File

@ -1855,11 +1855,7 @@ void SMESHGUI_FilterDlg::Init (const QValueList<int>& theTypes)
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), SLOT(onDeactivate()));
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), SLOT(onClose()));
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
updateMainButtons();
updateSelection();

View File

@ -342,11 +342,7 @@ void SMESHGUI_FilterLibraryDlg::Init (const QValueList<int>& theTypes,
if (myListBox->count() > 0)
myListBox->setCurrentItem(0);
}
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
updateMainButtons();

View File

@ -103,12 +103,6 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
myGeomGroupBtn->setEnabled(false);
myGeomGroupLine->setEnabled(false);
}
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
}
//=================================================================================
@ -136,11 +130,6 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
myCurrentLineEdit = myMeshGroupLine;
setSelectionMode(5);
}
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
}
//=================================================================================

View File

@ -184,10 +184,7 @@ void SMESHGUI_GroupOpDlg::Init()
connect(myBtn1, SIGNAL(clicked()), this, SLOT(onFocusChanged()));
connect(myBtn2, SIGNAL(clicked()), this, SLOT(onFocusChanged()));
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
// set selection mode

View File

@ -272,11 +272,7 @@ SMESHGUI_MergeNodesDlg::SMESHGUI_MergeNodesDlg( SMESHGUI* theModule, const char*
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument()));
/* to close dialog if study change */
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
resize(0,0);

View File

@ -364,10 +364,7 @@ SMESHGUI_MeshInfosDlg::SMESHGUI_MeshInfosDlg (SMESHGUI* theModule,
connect(mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
// resize and move dialog, then show
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
// show the dialog
this->show();
// init dialog with current selection

View File

@ -350,10 +350,7 @@ void SMESHGUI_MeshPatternDlg::Init()
activateSelection();
onSelectionDone();
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
}

View File

@ -223,10 +223,7 @@ void SMESHGUI_MoveNodesDlg::Init()
reset();
setEnabled(true);
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
// set selection mode

View File

@ -373,11 +373,7 @@ void SMESHGUI_NodesDlg::Init ()
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), SLOT(DeactivateActiveDialog()));
/* to close dialog if study frame change */
connect(mySMESHGUI, SIGNAL (SignalStudyFrameChanged()), SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
// set selection mode

View File

@ -199,11 +199,6 @@ void SMESHGUI_Preferences_ColorDlg::Init()
connect(mySMESHGUI, SIGNAL (SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
/* to close dialog if study change */
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
}
//=================================================================================

View File

@ -205,11 +205,6 @@ SMESHGUI_Preferences_SelectionDlg::SMESHGUI_Preferences_SelectionDlg( SMESHGUI*
connect(aOKBtn, SIGNAL(clicked()), this, SLOT(accept()));
connect(aCloseBtn, SIGNAL(clicked()), this, SLOT(reject()));
/* Move widget on the botton right corner of main widget */
int x, y ;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
}
//=================================================================================

View File

@ -218,11 +218,7 @@ void SMESHGUI_RemoveElementsDlg::Init()
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))

View File

@ -218,10 +218,6 @@ void SMESHGUI_RemoveNodesDlg::Init()
connect(myEditCurrentArgument, SIGNAL(textChanged(const QString&)),
SLOT(onTextChange(const QString&)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
SMESH::SetPointRepresentation(true);

View File

@ -211,10 +211,6 @@ void SMESHGUI_RenumberingDlg::Init()
/* to close dialog if study change */
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
myEditCurrentArgument = LineEditMesh;

View File

@ -333,11 +333,7 @@ SMESHGUI_RevolutionDlg::SMESHGUI_RevolutionDlg( SMESHGUI* theModule, const char*
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
ConstructorsClicked(0);

View File

@ -322,11 +322,7 @@ SMESHGUI_RotationDlg::SMESHGUI_RotationDlg( SMESHGUI* theModule, const char* nam
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
ConstructorsClicked(0);

View File

@ -312,11 +312,7 @@ SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule, const char* name,
connect(LineEdit4, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(LineEdit5, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(LineEdit6, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
ConstructorsClicked(0);

View File

@ -203,10 +203,7 @@ void SMESHGUI_ShapeByMeshDlg::Init()
activateSelection();
onSelectionDone();
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
}

View File

@ -232,10 +232,7 @@ void SMESHGUI_SingleEditDlg::Init()
myOkBtn->setEnabled(false);
myApplyBtn->setEnabled(false);
setEnabled(true);
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
// set selection mode

View File

@ -290,10 +290,6 @@ SMESHGUI_SmoothingDlg::SMESHGUI_SmoothingDlg( SMESHGUI* theModule, const char* n
SLOT(onSelectMesh(bool)));
/***************************************************************/
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); // displays Dialog
}

View File

@ -162,11 +162,8 @@ SMESHGUI_StandardMeshInfosDlg::SMESHGUI_StandardMeshInfosDlg( SMESHGUI* theModul
connect( mySMESHGUI, SIGNAL(SignalDeactivateActiveDialog()), this, SLOT(DeactivateActiveDialog()));
connect( mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
// resize and move dialog, then show
// show the dialog
this->setMinimumSize(270, 428);
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
// init dialog with current selection

View File

@ -316,11 +316,7 @@ SMESHGUI_SymmetryDlg::SMESHGUI_SymmetryDlg( SMESHGUI* theModule, const char* nam
connect(mySMESHGUI, SIGNAL(SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
ConstructorsClicked(0);

View File

@ -292,11 +292,7 @@ SMESHGUI_TranslationDlg::SMESHGUI_TranslationDlg( SMESHGUI* theModule, const cha
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnCancel()));
connect(LineEditElements, SIGNAL(textChanged(const QString&)), SLOT(onTextChange(const QString&)));
connect(CheckBoxMesh, SIGNAL(toggled(bool)), SLOT(onSelectMesh(bool)));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show(); /* displays Dialog */
ConstructorsClicked(0);

View File

@ -145,11 +145,7 @@ SMESHGUI_TransparencyDlg::SMESHGUI_TransparencyDlg( SMESHGUI* theModule,
connect(Slider1, SIGNAL(sliderMoved(int)), this, SLOT(ValueHasChanged()));
connect(mySMESHGUI, SIGNAL (SignalCloseAllDialogs()), this, SLOT(ClickOnOk()));
connect(mySelectionMgr, SIGNAL(currentSelectionChanged()), this, SLOT(onSelectionChanged()));
/* Move widget on the botton right corner of main widget */
int x, y;
mySMESHGUI->DefineDlgPosition(this, x, y);
this->move(x, y);
this->show();
}