From e88c019fba743999c7b5f31adc5ff5946649734b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 13 Jun 2014 09:44:26 +0100 Subject: convert extensions update required dialog to .ui Change-Id: Ia3ad4032f500e95db5db520292e6c8b07b0f5c0b --- desktop/UIConfig_deployment.mk | 1 + desktop/source/deployment/gui/dp_gui.hrc | 10 - desktop/source/deployment/gui/dp_gui_dialog2.cxx | 233 +++++---------------- desktop/source/deployment/gui/dp_gui_dialog2.hxx | 17 +- desktop/source/deployment/gui/dp_gui_dialog2.src | 62 ------ .../source/deployment/gui/dp_gui_extlistbox.cxx | 9 + .../source/deployment/gui/dp_gui_extlistbox.hxx | 1 + desktop/source/inc/helpid.hrc | 2 - desktop/uiconfig/ui/updaterequireddialog.ui | 178 ++++++++++++++++ 9 files changed, 252 insertions(+), 261 deletions(-) create mode 100644 desktop/uiconfig/ui/updaterequireddialog.ui (limited to 'desktop') diff --git a/desktop/UIConfig_deployment.mk b/desktop/UIConfig_deployment.mk index 208876cbd00d..c41eaa793526 100644 --- a/desktop/UIConfig_deployment.mk +++ b/desktop/UIConfig_deployment.mk @@ -16,6 +16,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\ desktop/uiconfig/ui/showlicensedialog \ desktop/uiconfig/ui/updatedialog \ desktop/uiconfig/ui/updateinstalldialog \ + desktop/uiconfig/ui/updaterequireddialog \ )) # vim: set noet sw=4 ts=4: diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 71b25df43df9..c0a9aef634fd 100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -23,16 +23,6 @@ #include "deployment.hrc" #include "helpid.hrc" -// Package Manager Dialog: -#define RID_DLG_UPDATE_REQUIRED (RID_DEPLOYMENT_GUI_START + 11) - -#define RID_EM_BTN_CLOSE 10 -#define RID_EM_BTN_HELP 11 -#define RID_EM_BTN_CHECK_UPDATES 12 -#define RID_EM_BTN_CANCEL 13 -#define RID_EM_FT_PROGRESS 14 -#define RID_EM_FT_MSG 15 - #define RID_DLG_DEPENDENCIES (RID_DEPLOYMENT_GUI_START + 1) #define RID_DLG_DEPENDENCIES_TEXT 1 #define RID_DLG_DEPENDENCIES_LIST 2 diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 5b9cb7bd9619..ea71dff98e2f 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -81,9 +81,6 @@ using namespace ::com::sun::star::system; namespace dp_gui { #define TOP_OFFSET 5 -#define LINE_SIZE 4 -#define PROGRESS_WIDTH 60 -#define PROGRESS_HEIGHT 14 #define USER_PACKAGE_MANAGER "user" #define SHARED_PACKAGE_MANAGER "shared" @@ -146,8 +143,6 @@ public: virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; - virtual Size GetOptimalSize() const SAL_OVERRIDE; - virtual void RecalcAll() SAL_OVERRIDE; virtual void selectEntry( const long nPos ) SAL_OVERRIDE; @@ -164,12 +159,6 @@ ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(Window* pParent) { } -Size ExtBoxWithBtns_Impl::GetOptimalSize() const -{ - return LogicToPixel(Size(250, 150), MAP_APPFONT); -} - - void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog) { setExtensionManager(pParentDialog->getExtensionManager()); @@ -691,9 +680,7 @@ void DialogHelper::PostUserEvent( const Link& rLink, void* pCaller ) m_nEventID = Application::PostUserEvent( rLink, pCaller ); } - // ExtMgrDialog - ExtMgrDialog::ExtMgrDialog(Window *pParent, TheExtensionManager *pManager) : ModelessDialog(pParent, "ExtensionManagerDialog", "desktop/ui/extensionmanager.ui") , DialogHelper(pManager->getContext(), (Dialog*) this) @@ -1186,92 +1173,55 @@ bool ExtMgrDialog::Close() return bRet; } +//UpdateRequiredDialog +UpdateRequiredDialog::UpdateRequiredDialog(Window *pParent, TheExtensionManager *pManager) + : ModalDialog(pParent, "UpdateRequiredDialog", "desktop/ui/updaterequireddialog.ui") + , DialogHelper(pManager->getContext(), (Dialog*) this) + , m_sAddPackages(getResourceString(RID_STR_ADD_PACKAGES)) + , m_sCloseText(getResourceString(RID_STR_CLOSE_BTN)) + , m_bHasProgress(false) + , m_bProgressChanged(false) + , m_bStartProgress(false) + , m_bStopProgress(false) + , m_bUpdateWarning(false) + , m_bDisableWarning(false) + , m_bHasLockedEntries(false) + , m_nProgress(0) + , m_pManager(pManager) +{ + get(m_pExtensionBox, "extensions"); + m_pExtensionBox->setExtensionManager(pManager); + get(m_pUpdateNeeded, "updatelabel"); + get(m_pUpdateBtn, "check"); + get(m_pCloseBtn, "disable"); + get(m_pCancelBtn, "cancel"); + get(m_pProgressText, "progresslabel"); + get(m_pProgressBar, "progress"); -// UpdateRequiredDialog - -UpdateRequiredDialog::UpdateRequiredDialog( Window *pParent, TheExtensionManager *pManager ) : - ModalDialog( pParent, getResId( RID_DLG_UPDATE_REQUIRED ) ), - DialogHelper( pManager->getContext(), (Dialog*) this ), - m_aUpdateNeeded( this, getResId( RID_EM_FT_MSG ) ), - m_aUpdateBtn( this, getResId( RID_EM_BTN_CHECK_UPDATES ) ), - m_aCloseBtn( this, getResId( RID_EM_BTN_CLOSE ) ), - m_aHelpBtn( this, getResId( RID_EM_BTN_HELP ) ), - m_aCancelBtn( this, getResId( RID_EM_BTN_CANCEL ) ), - m_aDivider( this ), - m_aProgressText( this, getResId( RID_EM_FT_PROGRESS ) ), - m_aProgressBar( this, WB_BORDER + WB_3DLOOK ), - m_sAddPackages( getResourceString( RID_STR_ADD_PACKAGES ) ), - m_sCloseText( getResourceString( RID_STR_CLOSE_BTN ) ), - m_bHasProgress( false ), - m_bProgressChanged( false ), - m_bStartProgress( false ), - m_bStopProgress( false ), - m_bUpdateWarning( false ), - m_bDisableWarning( false ), - m_bHasLockedEntries( false ), - m_nProgress( 0 ), - m_pManager( pManager ) -{ - // free local resources (RID < 256): - FreeResource(); - - m_pExtensionBox = new ExtensionBox_Impl( this, pManager ); m_pExtensionBox->SetHyperlinkHdl( LINK( this, UpdateRequiredDialog, HandleHyperlink ) ); - m_aUpdateBtn.SetClickHdl( LINK( this, UpdateRequiredDialog, HandleUpdateBtn ) ); - m_aCloseBtn.SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCloseBtn ) ); - m_aCancelBtn.SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCancelBtn ) ); + m_pUpdateBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleUpdateBtn ) ); + m_pCloseBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCloseBtn ) ); + m_pCancelBtn->SetClickHdl( LINK( this, UpdateRequiredDialog, HandleCancelBtn ) ); - OUString aText = m_aUpdateNeeded.GetText(); + OUString aText = m_pUpdateNeeded->GetText(); aText = aText.replaceAll( "%PRODUCTNAME", utl::ConfigManager::getProductName()); - m_aUpdateNeeded.SetText(aText); - - // resize update button - Size aBtnSize = m_aUpdateBtn.GetSizePixel(); - OUString sTitle = m_aUpdateBtn.GetText(); - long nWidth = m_aUpdateBtn.GetCtrlTextWidth( sTitle ); - nWidth += 2 * m_aUpdateBtn.GetTextHeight(); - if ( nWidth > aBtnSize.Width() ) - m_aUpdateBtn.SetSizePixel( Size( nWidth, aBtnSize.Height() ) ); - - // resize update button - aBtnSize = m_aCloseBtn.GetSizePixel(); - sTitle = m_aCloseBtn.GetText(); - nWidth = m_aCloseBtn.GetCtrlTextWidth( sTitle ); - nWidth += 2 * m_aCloseBtn.GetTextHeight(); - if ( nWidth > aBtnSize.Width() ) - m_aCloseBtn.SetSizePixel( Size( nWidth, aBtnSize.Height() ) ); - - // minimum size: - SetMinOutputSizePixel( - Size( // width: - (5 * m_aHelpBtn.GetSizePixel().Width()) + - (5 * RSC_SP_DLG_INNERBORDER_LEFT ), - // height: - (1 * m_aHelpBtn.GetSizePixel().Height()) + - (1 * m_aUpdateNeeded.GetSizePixel().Height()) + - (1 * m_pExtensionBox->GetMinOutputSizePixel().Height()) + - (3 * RSC_SP_DLG_INNERBORDER_LEFT) ) ); - - m_aDivider.Show(); - m_aProgressBar.Hide(); - m_aUpdateBtn.Enable( false ); - m_aCloseBtn.GrabFocus(); + m_pUpdateNeeded->SetText(aText); + + m_pProgressBar->Hide(); + m_pUpdateBtn->Enable( false ); + m_pCloseBtn->GrabFocus(); m_aTimeoutTimer.SetTimeout( 50 ); // mSec m_aTimeoutTimer.SetTimeoutHdl( LINK( this, UpdateRequiredDialog, TimeOutHdl ) ); } - UpdateRequiredDialog::~UpdateRequiredDialog() { m_aTimeoutTimer.Stop(); - - delete m_pExtensionBox; } - long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage, bool bLicenseMissing ) { @@ -1280,7 +1230,7 @@ long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::X { m_bHasLockedEntries |= m_pManager->isReadOnly( xPackage ); const SolarMutexGuard aGuard; - m_aUpdateBtn.Enable( true ); + m_pUpdateBtn->Enable( true ); return m_pExtensionBox->addEntry( xPackage ); } return 0; @@ -1300,8 +1250,8 @@ void UpdateRequiredDialog::checkEntries() if ( ! hasActiveEntries() ) { - m_aCloseBtn.SetText( m_sCloseText ); - m_aCloseBtn.GrabFocus(); + m_pCloseBtn->SetText( m_sCloseText ); + m_pCloseBtn->GrabFocus(); } } @@ -1342,8 +1292,8 @@ IMPL_LINK( UpdateRequiredDialog, startProgress, void*, _bLockInterface ) if ( m_bStopProgress ) { - if ( m_aProgressBar.IsVisible() ) - m_aProgressBar.SetValue( 100 ); + if ( m_pProgressBar->IsVisible() ) + m_pProgressBar->SetValue( 100 ); m_xAbortChannel.clear(); OSL_TRACE( " startProgress handler: stop" ); } @@ -1352,8 +1302,8 @@ IMPL_LINK( UpdateRequiredDialog, startProgress, void*, _bLockInterface ) OSL_TRACE( " startProgress handler: start" ); } - m_aCancelBtn.Enable( bLockInterface ); - m_aUpdateBtn.Enable( false ); + m_pCancelBtn->Enable( bLockInterface ); + m_pUpdateBtn->Enable( false ); clearEventID(); return 0; @@ -1415,8 +1365,8 @@ void UpdateRequiredDialog::updatePackageInfo( const uno::Reference< deployment:: if ( ! hasActiveEntries() ) { - m_aCloseBtn.SetText( m_sCloseText ); - m_aCloseBtn.GrabFocus(); + m_pCloseBtn->SetText( m_sCloseText ); + m_pCloseBtn->GrabFocus(); } } @@ -1474,30 +1424,30 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl) { m_bHasProgress = false; m_bStopProgress = false; - m_aProgressText.Hide(); - m_aProgressBar.Hide(); - m_aCancelBtn.Hide(); + m_pProgressText->Hide(); + m_pProgressBar->Hide(); + m_pCancelBtn->Hide(); } else { if ( m_bProgressChanged ) { m_bProgressChanged = false; - m_aProgressText.SetText( m_sProgressText ); + m_pProgressText->SetText( m_sProgressText ); } if ( m_bStartProgress ) { m_bStartProgress = false; m_bHasProgress = true; - m_aProgressBar.Show(); - m_aProgressText.Show(); - m_aCancelBtn.Enable(); - m_aCancelBtn.Show(); + m_pProgressBar->Show(); + m_pProgressText->Show(); + m_pCancelBtn->Enable(); + m_pCancelBtn->Show(); } - if ( m_aProgressBar.IsVisible() ) - m_aProgressBar.SetValue( (sal_uInt16) m_nProgress ); + if ( m_pProgressBar->IsVisible() ) + m_pProgressBar->SetValue( (sal_uInt16) m_nProgress ); m_aTimeoutTimer.Start(); } @@ -1505,76 +1455,6 @@ IMPL_LINK_NOARG(UpdateRequiredDialog, TimeOutHdl) return 1; } - -// VCL::Window / Dialog -void UpdateRequiredDialog::Resize() -{ - Size aTotalSize( GetOutputSizePixel() ); - Size aBtnSize( m_aHelpBtn.GetSizePixel() ); - - Point aPos( RSC_SP_DLG_INNERBORDER_LEFT, - aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM - aBtnSize.Height() ); - - m_aHelpBtn.SetPosPixel( aPos ); - - aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - m_aCloseBtn.GetSizePixel().Width(); - m_aCloseBtn.SetPosPixel( aPos ); - - aPos.X() -= ( RSC_SP_CTRL_X + m_aUpdateBtn.GetSizePixel().Width() ); - m_aUpdateBtn.SetPosPixel( aPos ); - - Size aDivSize( aTotalSize.Width(), LINE_SIZE ); - aPos = Point( 0, aPos.Y() - LINE_SIZE - RSC_SP_DLG_INNERBORDER_BOTTOM ); - m_aDivider.SetPosSizePixel( aPos, aDivSize ); - - // Calc fixed text size - aPos = Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ); - Size aFTSize = m_aUpdateNeeded.CalcMinimumSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - RSC_SP_DLG_INNERBORDER_LEFT ); - m_aUpdateNeeded.SetPosSizePixel( aPos, aFTSize ); - - // Calc list box size - Size aSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT, - aTotalSize.Height() - 2*aBtnSize.Height() - LINE_SIZE - - 2*RSC_SP_DLG_INNERBORDER_TOP - 3*RSC_SP_DLG_INNERBORDER_BOTTOM - aFTSize.Height() ); - aPos.Y() += aFTSize.Height()+RSC_SP_DLG_INNERBORDER_TOP; - - m_pExtensionBox->SetPosSizePixel( aPos, aSize ); - - aPos.X() = aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_RIGHT - aBtnSize.Width(); - aPos.Y() += aSize.Height()+RSC_SP_DLG_INNERBORDER_TOP; - m_aCancelBtn.SetPosPixel( aPos ); - - // Calc progress height - aFTSize = m_aProgressText.GetSizePixel(); - long nProgressHeight = aFTSize.Height(); - - if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) ) - { - ImplControlValue aValue; - Rectangle aControlRegion( Point( 0, 0 ), m_aProgressBar.GetSizePixel() ); - Rectangle aNativeControlRegion, aNativeContentRegion; - if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, - CTRL_STATE_ENABLED, aValue, OUString(), - aNativeControlRegion, aNativeContentRegion ) ) - { - nProgressHeight = aNativeControlRegion.GetHeight(); - } - } - - if ( nProgressHeight < PROGRESS_HEIGHT ) - nProgressHeight = PROGRESS_HEIGHT; - - aPos.X() -= ( RSC_SP_CTRL_GROUP_Y + PROGRESS_WIDTH ); - m_aProgressBar.SetPosSizePixel( Point( aPos.X(), aPos.Y() + ((aBtnSize.Height()-nProgressHeight)/2) ), - Size( PROGRESS_WIDTH, nProgressHeight ) ); - - aFTSize.Width() = aPos.X() - 2*RSC_SP_DLG_INNERBORDER_LEFT; - aPos.X() = RSC_SP_DLG_INNERBORDER_LEFT; - aPos.Y() += ( aBtnSize.Height() - aFTSize.Height() - 1 ) / 2; - m_aProgressText.SetPosSizePixel( aPos, aFTSize ); -} - - // VCL::Dialog short UpdateRequiredDialog::Execute() { @@ -1588,9 +1468,9 @@ short UpdateRequiredDialog::Execute() if ( m_bHasLockedEntries ) { // Set other text, disable update btn, remove not shared entries from list; - m_aUpdateNeeded.SetText( DialogHelper::getResourceString( RID_STR_NO_ADMIN_PRIVILEGE ) ); - m_aCloseBtn.SetText( DialogHelper::getResourceString( RID_STR_EXIT_BTN ) ); - m_aUpdateBtn.Enable( false ); + m_pUpdateNeeded->SetText( DialogHelper::getResourceString( RID_STR_NO_ADMIN_PRIVILEGE ) ); + m_pCloseBtn->SetText( DialogHelper::getResourceString( RID_STR_EXIT_BTN ) ); + m_pUpdateBtn->Enable( false ); m_pExtensionBox->RemoveUnlocked(); Resize(); } @@ -1598,7 +1478,6 @@ short UpdateRequiredDialog::Execute() return Dialog::Execute(); } - // VCL::Dialog bool UpdateRequiredDialog::Close() { @@ -1696,7 +1575,7 @@ void UpdateRequiredDialog::disableAllEntries() setBusy( false ); if ( ! hasActiveEntries() ) - m_aCloseBtn.SetText( m_sCloseText ); + m_pCloseBtn->SetText( m_sCloseText ); } diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index 35af003f7476..df9622dd5025 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -172,15 +172,13 @@ public: class UpdateRequiredDialog : public ModalDialog, public DialogHelper { - ExtensionBox_Impl *m_pExtensionBox; - FixedText m_aUpdateNeeded; - PushButton m_aUpdateBtn; - PushButton m_aCloseBtn; - HelpButton m_aHelpBtn; - CancelButton m_aCancelBtn; - FixedLine m_aDivider; - FixedText m_aProgressText; - ProgressBar m_aProgressBar; + ExtensionBox_Impl* m_pExtensionBox; + FixedText* m_pUpdateNeeded; + PushButton* m_pUpdateBtn; + PushButton* m_pCloseBtn; + CancelButton* m_pCancelBtn; + FixedText* m_pProgressText; + ProgressBar* m_pProgressBar; const OUString m_sAddPackages; const OUString m_sCloseText; OUString m_sProgressText; @@ -215,7 +213,6 @@ public: virtual ~UpdateRequiredDialog(); virtual short Execute() SAL_OVERRIDE; - virtual void Resize() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE; virtual void showProgress( bool bStart ) SAL_OVERRIDE; diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index b4978efc4c44..ca6e0af18ee7 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -20,68 +20,6 @@ #include #include "dp_gui.hrc" -ModalDialog RID_DLG_UPDATE_REQUIRED -{ - HelpId = HID_PACKAGE_MANAGER_UPD_REQ; - Text [ en-US ] = "Extension Update Required"; - - Size = MAP_APPFONT( 300, 200 ); - OutputSize = TRUE; - SVLook = TRUE; - Moveable = TRUE; - Closeable = TRUE; - Sizeable = TRUE; - Hide = TRUE; - - FixedText RID_EM_FT_MSG - { - Text [ en-US ] = "%PRODUCTNAME has been updated to a new version. Some installed %PRODUCTNAME extensions are not compatible with this version and need to be updated before they can be used."; - WordBreak = TRUE; - NoLabel = TRUE; - Size = MAP_APPFONT( 280, 3*RSC_BS_CHARHEIGHT ); - Pos = MAP_APPFONT( 5, 5 ); - }; - - FixedText RID_EM_FT_PROGRESS - { - Hide = TRUE; - Right = TRUE; - Text [ en-US ] = "Adding %EXTENSION_NAME"; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT ); - }; - - HelpButton RID_EM_BTN_HELP - { - TabStop = TRUE; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - PushButton RID_EM_BTN_CHECK_UPDATES - { - HelpID = "desktop:PushButton:RID_DLG_UPDATE_REQUIRED:RID_EM_BTN_CHECK_UPDATES"; - TabStop = TRUE; - Text [ en-US ] = "Check for ~Updates..."; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - PushButton RID_EM_BTN_CLOSE - { - HelpID = "desktop:PushButton:RID_DLG_UPDATE_REQUIRED:RID_EM_BTN_CLOSE"; - TabStop = TRUE; - DefButton = TRUE; - Text [ en-US ] = "Disable all"; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - - CancelButton RID_EM_BTN_CANCEL - { - TabStop = TRUE; - Hide = TRUE; - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; - -}; - Image RID_IMG_WARNING { ImageBitmap = Bitmap { File = "caution_16.png"; }; diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index a67eb9514263..7e8a9b65ffc6 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -862,6 +862,15 @@ void ExtensionBox_Impl::Resize() RecalcAll(); } +Size ExtensionBox_Impl::GetOptimalSize() const +{ + return LogicToPixel(Size(250, 150), MAP_APPFONT); +} + +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeExtensionBox(Window *pParent, VclBuilder::stringmap &) +{ + return new ExtensionBox_Impl(pParent); +} long ExtensionBox_Impl::PointToPos( const Point& rPos ) { diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index 509c08ae0090..019e80422f65 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -190,6 +190,7 @@ public: virtual void Paint( const Rectangle &rPaintRect ) SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; + virtual Size GetOptimalSize() const SAL_OVERRIDE; const Size GetMinOutputSizePixel() const; void SetExtraSize( long nSize ) { m_nExtraHeight = nSize; } diff --git a/desktop/source/inc/helpid.hrc b/desktop/source/inc/helpid.hrc index 6d14ab50837e..5a662867baa4 100644 --- a/desktop/source/inc/helpid.hrc +++ b/desktop/source/inc/helpid.hrc @@ -26,8 +26,6 @@ #define HID_EXTENSION_MANAGER_LISTBOX_DISABLE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_DISABLE" #define HID_EXTENSION_MANAGER_LISTBOX_REMOVE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_REMOVE" -#define HID_PACKAGE_MANAGER_UPD_REQ "DESKTOP_HID_PACKAGE_MANAGER_UPD_REQ" - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/uiconfig/ui/updaterequireddialog.ui b/desktop/uiconfig/ui/updaterequireddialog.ui new file mode 100644 index 000000000000..7c641c706f47 --- /dev/null +++ b/desktop/uiconfig/ui/updaterequireddialog.ui @@ -0,0 +1,178 @@ + + + + + + + False + 5 + Extension Update Required + dialog + + + False + vertical + 12 + + + True + False + 12 + + + True + False + 0 + %PRODUCTNAME has been updated to a new version. Some installed %PRODUCTNAME extensions are not compatible with this version and need to be updated before they can be used. + True + 95 + + + 0 + 0 + 1 + 1 + + + + + True + False + True + True + + + 0 + 1 + 1 + 1 + + + + + True + False + True + 6 + + + False + True + 0 + Adding %EXTENSION_NAME + True + + + 0 + 0 + 1 + 1 + + + + + False + True + True + + + 0 + 1 + 1 + 1 + + + + + 0 + 2 + 1 + 1 + + + + + False + True + 0 + + + + + False + end + + + Check for_Updates... + True + True + True + True + True + True + + + False + True + 0 + + + + + Disable all + True + True + True + True + + + False + True + 1 + + + + + gtk-cancel + True + True + True + True + + + False + True + 2 + + + + + gtk-help + True + True + True + True + + + False + True + 3 + + + + + False + True + end + 1 + + + + + + check + disable + help + + + -- cgit