Kaydet (Commit) 9d88c7a3 authored tarafından Rafael Dominguez's avatar Rafael Dominguez

Remove close button in template dialog.

Change-Id: I7a8cac7b8dfa73eabea9113d4b9921a2d48b0324
üst 3f660094
......@@ -49,7 +49,6 @@ private:
virtual void MouseButtonDown( const MouseEvent& rMEvt );
DECL_LINK(CloseHdl, void*);
DECL_LINK(CloseOverlayHdl, void*);
DECL_LINK(OnClickSelectionMode, ImageButton*);
......@@ -114,7 +113,6 @@ private:
PushButton aButtonPresents;
PushButton aButtonSheets;
PushButton aButtonDraws;
PushButton maButtonClose;
ImageButton maButtonSelMode;
Edit *mpSearchEdit;
......
......@@ -107,7 +107,6 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
aButtonPresents(this,SfxResId(BTN_SELECT_PRESENTATIONS)),
aButtonSheets(this,SfxResId(BTN_SELECT_SHEETS)),
aButtonDraws(this,SfxResId(BTN_SELECT_DRAWS)),
maButtonClose(this,SfxResId(BTN_TEMPLATE_CLOSE)),
maButtonSelMode(this,SfxResId(BTN_SELECTION_MODE)),
mpSearchEdit(new Edit(this,WB_HIDE | WB_BORDER)),
mpViewBar( new ToolBox(this, SfxResId(TBX_ACTION_VIEW))),
......@@ -229,22 +228,11 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg (Window *parent)
mpSearchView->setItemStateHdl(LINK(this,SfxTemplateManagerDlg,TVTemplateStateHdl));
// Set OK button position
Point aBtnPos;
Size aBtnSize = maButtonClose.GetSizePixel();
aBtnPos.setX(aWinSize.getWidth() - PADDING_DLG_BORDER - aBtnSize.getWidth());
aBtnPos.setY(aViewPos.getY()+aThumbSize.getHeight() + PADDING_TOOLBAR_VIEW);
maButtonClose.SetPosPixel(aBtnPos);
if (aWinSize.getHeight() != aBtnPos.getY() + aBtnSize.getHeight() + PADDING_DLG_BORDER )
aWinSize.setHeight(aBtnPos.getY() + aBtnSize.getHeight() + PADDING_DLG_BORDER);
aButtonAll.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewAllHdl));
aButtonDocs.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewDocsHdl));
aButtonPresents.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewPresentsHdl));
aButtonSheets.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewSheetsHdl));
aButtonDraws.SetClickHdl(LINK(this,SfxTemplateManagerDlg,ViewDrawsHdl));
maButtonClose.SetClickHdl(LINK(this,SfxTemplateManagerDlg,CloseHdl));
maButtonSelMode.SetClickHdl(LINK(this,SfxTemplateManagerDlg,OnClickSelectionMode));
// Set dialog to correct dimensions
......@@ -326,12 +314,6 @@ void SfxTemplateManagerDlg::MouseButtonDown( const MouseEvent& rMEvt )
}
}
IMPL_LINK_NOARG (SfxTemplateManagerDlg, CloseHdl)
{
Close();
return 0;
}
IMPL_LINK_NOARG(SfxTemplateManagerDlg, CloseOverlayHdl)
{
maSelTemplates.clear();
......@@ -783,7 +765,6 @@ void SfxTemplateManagerDlg::OnTemplateImport ()
void SfxTemplateManagerDlg::OnTemplateSearch ()
{
Point aPos = maView->GetPosPixel();
Point aClosePos = maButtonClose.GetPosPixel();
bool bVisible = mpSearchEdit->IsVisible();
Size aWinSize = GetSizePixel();
long nEditHeight = mpSearchEdit->GetSizePixel().getHeight();
......@@ -792,14 +773,12 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
{
aWinSize.setHeight(aWinSize.getHeight() - nEditHeight );
aPos.setY(aPos.getY() - nEditHeight );
aClosePos.setY(aClosePos.getY() - nEditHeight );
mpActionBar->SetItemState(TBI_TEMPLATE_SEARCH,STATE_NOCHECK);
}
else
{
aWinSize.setHeight(aWinSize.getHeight() + nEditHeight );
aPos.setY(aPos.getY() + nEditHeight );
aClosePos.setY(aClosePos.getY() + nEditHeight );
mpActionBar->SetItemState(TBI_TEMPLATE_SEARCH,STATE_CHECK);
}
......@@ -807,7 +786,6 @@ void SfxTemplateManagerDlg::OnTemplateSearch ()
maView->SetPosPixel(aPos);
mpOnlineView->SetPosPixel(aPos);
mpSearchView->SetPosPixel(aPos);
maButtonClose.SetPosPixel(aClosePos);
// Hide search view
if (bVisible)
......
......@@ -32,8 +32,6 @@
#define MNI_ACTION_REFRESH 22
#define MNI_ACTION_SORT_NAME 23
#define BTN_TEMPLATE_CLOSE 24
#define TBI_TEMPLATE_FOLDER_DEL 25
#define TBI_TEMPLATE_REPOSITORY 26
......
......@@ -110,13 +110,6 @@ ModelessDialog DLG_TEMPLATE_MANAGER
QuickHelpText [en-US] = "Enables selecting items by just clicking in the thumbnail or title.";
};
PushButton BTN_TEMPLATE_CLOSE
{
Size = MAP_APPFONT(50,14);
TabStop = TRUE;
Text [en-US] = "Close";
};
Control TEMPLATE_VIEW
{
Pos = MAP_APPFONT(5,30);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment