diff options
author | sk94 <eszkadev@gmail.com> | 2014-05-20 19:47:50 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-21 07:46:34 -0500 |
commit | 5690def7c8e8c1d875b4f9bed4dea712d99480d8 (patch) | |
tree | 2eddb56425026dcdf8d5177bd384835e97ff5102 | |
parent | 2bbcf97eb35b98da33f3aaba67cd7abc1a265c69 (diff) |
RID_DLG_UPDATE conversion to .ui
Conflicts:
desktop/source/deployment/gui/descedit.hxx
Change-Id: Icf9ee3081b468f99833d1e38182887ad1da6f675
Reviewed-on: https://gerrit.libreoffice.org/9417
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | desktop/UIConfig_deployment.mk | 1 | ||||
-rw-r--r-- | desktop/source/deployment/gui/descedit.cxx | 10 | ||||
-rw-r--r-- | desktop/source/deployment/gui/descedit.hxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui.hrc | 53 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 281 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.hxx | 36 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_updatedialog.src | 292 | ||||
-rw-r--r-- | desktop/uiconfig/ui/updatedialog.ui | 325 | ||||
-rw-r--r-- | extras/source/glade/libreoffice-catalog.xml.in | 3 | ||||
-rw-r--r-- | include/svx/checklbx.hxx | 1 | ||||
-rw-r--r-- | svx/source/dialog/checklbx.cxx | 10 |
11 files changed, 553 insertions, 461 deletions
diff --git a/desktop/UIConfig_deployment.mk b/desktop/UIConfig_deployment.mk index 6c00412923a2..fc1c48a942ae 100644 --- a/desktop/UIConfig_deployment.mk +++ b/desktop/UIConfig_deployment.mk @@ -14,6 +14,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\ desktop/uiconfig/ui/extensionmanager \ desktop/uiconfig/ui/licensedialog \ desktop/uiconfig/ui/showlicensedialog \ + desktop/uiconfig/ui/updatedialog \ )) # vim: set noet sw=4 ts=4: diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx index 019202f89fe0..a7fb8b431678 100644 --- a/desktop/source/deployment/gui/descedit.cxx +++ b/desktop/source/deployment/gui/descedit.cxx @@ -18,6 +18,7 @@ */ +#include <vcl/builder.hxx> #include <vcl/scrbar.hxx> #include <vcl/txtattr.hxx> #include <vcl/xtextedt.hxx> @@ -30,9 +31,9 @@ using dp_gui::DescriptionEdit; // DescriptionEdit ------------------------------------------------------- -DescriptionEdit::DescriptionEdit( Window* pParent, const ResId& rResId ) : +DescriptionEdit::DescriptionEdit( Window* pParent) : - ExtMultiLineEdit( pParent, rResId ), + ExtMultiLineEdit( pParent), m_bIsVerticalScrollBarHidden( true ) @@ -41,6 +42,11 @@ DescriptionEdit::DescriptionEdit( Window* pParent, const ResId& rResId ) : } +extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeDescriptionEdit(Window* pParent, VclBuilder::stringmap &) +{ + return new DescriptionEdit(pParent); +} + void DescriptionEdit::Init() { diff --git a/desktop/source/deployment/gui/descedit.hxx b/desktop/source/deployment/gui/descedit.hxx index d8f2257b372a..da2ee7d461f0 100644 --- a/desktop/source/deployment/gui/descedit.hxx +++ b/desktop/source/deployment/gui/descedit.hxx @@ -35,7 +35,7 @@ namespace dp_gui void Init(); public: - DescriptionEdit( Window* pParent, const ResId& rResId ); + DescriptionEdit( Window* pParent); virtual inline ~DescriptionEdit() {} void Clear(); diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 1ef23bc3ff07..b6a8ca55ddb4 100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -67,41 +67,24 @@ #define RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES (RID_DEPLOYMENT_GUI_START + 8) #define RID_WARNINGBOX_INSTALL_EXTENSION (RID_DEPLOYMENT_GUI_START + 9) -#define RID_DLG_UPDATE (RID_DEPLOYMENT_GUI_START + 10) - -#define RID_DLG_UPDATE_CHECKING 1 -#define RID_DLG_UPDATE_THROBBER 2 -#define RID_DLG_UPDATE_UPDATE 3 -#define RID_DLG_UPDATE_UPDATES 4 -#define RID_DLG_UPDATE_ALL 5 -#define RID_DLG_UPDATE_DESCRIPTION 6 -#define RID_DLG_UPDATE_DESCRIPTIONS 7 -#define RID_DLG_UPDATE_LINE 8 -#define RID_DLG_UPDATE_HELP 9 -#define RID_DLG_UPDATE_OK 10 -#define RID_DLG_UPDATE_CLOSE 11 -#define RID_DLG_UPDATE_NORMALALERT 12 -#define RID_DLG_UPDATE_ERROR 14 -#define RID_DLG_UPDATE_NONE 15 -#define RID_DLG_UPDATE_NOINSTALLABLE 16 -#define RID_DLG_UPDATE_FAILURE 17 -#define RID_DLG_UPDATE_UNKNOWNERROR 18 -#define RID_DLG_UPDATE_NODESCRIPTION 19 -#define RID_DLG_UPDATE_NOINSTALL 20 -#define RID_DLG_UPDATE_NODEPENDENCY 21 -#define RID_DLG_UPDATE_NODEPENDENCY_CUR_VER 22 -#define RID_DLG_UPDATE_BROWSERBASED 25 -#define RID_DLG_UPDATE_PUBLISHER_LABEL 26 -#define RID_DLG_UPDATE_PUBLISHER_LINK 27 -#define RID_DLG_UPDATE_RELEASENOTES_LABEL 28 -#define RID_DLG_UPDATE_RELEASENOTES_LINK 29 -#define RID_DLG_UPDATE_VERSION 31 -#define RID_DLG_UPDATE_IGNORE 32 -#define RID_DLG_UPDATE_ENABLE 33 -#define RID_DLG_UPDATE_IGNORE_ALL 34 -#define RID_DLG_UPDATE_IGNORED_UPDATE 35 - -#define RID_DLG_UPDATEINSTALL (RID_DEPLOYMENT_GUI_START + 20) +#define RID_DLG_UPDATE_NORMALALERT (RID_DEPLOYMENT_GUI_START + 11) +#define RID_DLG_UPDATE_ERROR (RID_DEPLOYMENT_GUI_START + 12) +#define RID_DLG_UPDATE_NONE (RID_DEPLOYMENT_GUI_START + 13) +#define RID_DLG_UPDATE_NOINSTALLABLE (RID_DEPLOYMENT_GUI_START + 14) +#define RID_DLG_UPDATE_FAILURE (RID_DEPLOYMENT_GUI_START + 15) +#define RID_DLG_UPDATE_UNKNOWNERROR (RID_DEPLOYMENT_GUI_START + 16) +#define RID_DLG_UPDATE_NODESCRIPTION (RID_DEPLOYMENT_GUI_START + 17) +#define RID_DLG_UPDATE_NOINSTALL (RID_DEPLOYMENT_GUI_START + 18) +#define RID_DLG_UPDATE_NODEPENDENCY (RID_DEPLOYMENT_GUI_START + 19) +#define RID_DLG_UPDATE_NODEPENDENCY_CUR_VER (RID_DEPLOYMENT_GUI_START + 20) +#define RID_DLG_UPDATE_BROWSERBASED (RID_DEPLOYMENT_GUI_START + 21) +#define RID_DLG_UPDATE_VERSION (RID_DEPLOYMENT_GUI_START + 22) +#define RID_DLG_UPDATE_IGNORE (RID_DEPLOYMENT_GUI_START + 23) +#define RID_DLG_UPDATE_ENABLE (RID_DEPLOYMENT_GUI_START + 24) +#define RID_DLG_UPDATE_IGNORE_ALL (RID_DEPLOYMENT_GUI_START + 25) +#define RID_DLG_UPDATE_IGNORED_UPDATE (RID_DEPLOYMENT_GUI_START + 36) + +#define RID_DLG_UPDATEINSTALL (RID_DEPLOYMENT_GUI_START + 37) #define RID_IMG_WARNING (RID_DEPLOYMENT_GUI_START+56) #define RID_IMG_LOCKED (RID_DEPLOYMENT_GUI_START+58) diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index b71cc23a058f..89e00abfbf3f 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -483,31 +483,15 @@ bool UpdateDialog::Thread::update( return ret; } + // UpdateDialog ---------------------------------------------------------- UpdateDialog::UpdateDialog( uno::Reference< uno::XComponentContext > const & context, Window * parent, - const std::vector<uno::Reference< deployment::XPackage > > &vExtensionList, + const std::vector<uno::Reference< deployment::XPackage > > &vExtensionList, std::vector< dp_gui::UpdateData > * updateData): - ModalDialog(parent,DpGuiResId(RID_DLG_UPDATE)), + ModalDialog(parent, "UpdateDialog", "desktop/ui/updatedialog.ui"), m_context(context), - m_checking(this, DpGuiResId(RID_DLG_UPDATE_CHECKING)), - m_throbber(this, DpGuiResId(RID_DLG_UPDATE_THROBBER)), - m_update(this, DpGuiResId(RID_DLG_UPDATE_UPDATE)), - m_updates( - *this, DpGuiResId(RID_DLG_UPDATE_UPDATES), - Image(DpGuiResId(RID_DLG_UPDATE_NORMALALERT))), - m_all(this, DpGuiResId(RID_DLG_UPDATE_ALL)), - m_description(this, DpGuiResId(RID_DLG_UPDATE_DESCRIPTION)), - m_PublisherLabel(this, DpGuiResId(RID_DLG_UPDATE_PUBLISHER_LABEL)), - m_PublisherLink(this, DpGuiResId(RID_DLG_UPDATE_PUBLISHER_LINK)), - m_ReleaseNotesLabel(this, DpGuiResId(RID_DLG_UPDATE_RELEASENOTES_LABEL)), - m_ReleaseNotesLink(this, DpGuiResId(RID_DLG_UPDATE_RELEASENOTES_LINK)), - m_descriptions(this, DpGuiResId(RID_DLG_UPDATE_DESCRIPTIONS)), - m_line(this, DpGuiResId(RID_DLG_UPDATE_LINE)), - m_help(this, DpGuiResId(RID_DLG_UPDATE_HELP)), - m_ok(this, DpGuiResId(RID_DLG_UPDATE_OK)), - m_close(this, DpGuiResId(RID_DLG_UPDATE_CLOSE)), m_error(DPGUI_RESSTR(RID_DLG_UPDATE_ERROR)), m_none(DPGUI_RESSTR(RID_DLG_UPDATE_NONE)), m_noInstallable(DPGUI_RESSTR(RID_DLG_UPDATE_NOINSTALLABLE)), @@ -532,6 +516,28 @@ UpdateDialog::UpdateDialog( // , // m_extensionManagerDialog(extensionManagerDialog) { + get(m_pchecking, "UPDATE_CHECKING"); + get(m_pthrobber, "THROBBER"); + get(m_pUpdate, "UPDATE_LABEL"); + get(m_pContainer, "UPDATES_CONTAINER"); + m_pUpdates = new UpdateDialog::CheckListBox(m_pContainer, *this); + Size aSize(LogicToPixel(Size(240, 51), MAP_APPFONT)); + m_pUpdates->set_width_request(aSize.Width()); + m_pUpdates->set_height_request(aSize.Height()); + m_pUpdates->Show(); + get(m_pAll, "UPDATE_ALL"); + get(m_pDescription, "DESCRIPTION_LABEL"); + get(m_pPublisherLabel, "PUBLISHER_LABEL"); + get(m_pPublisherLink, "PUBLISHER_LINK"); + get(m_pReleaseNotesLabel, "RELEASE_NOTES_LABEL"); + get(m_pReleaseNotesLink, "RELEASE_NOTES_LINK"); + get(m_pDescriptions, "DESCRIPTIONS"); + aSize = LogicToPixel(Size(240, 59), MAP_APPFONT); + m_pDescriptions->set_width_request(aSize.Width()); + m_pDescriptions->set_height_request(aSize.Height()); + get(m_pOk, "INSTALL"); + get(m_pClose, "gtk-close"); + get(m_pHelp, "gtk-help"); OSL_ASSERT(updateData != NULL); m_xExtensionManager = deployment::ExtensionManager::get( context ); @@ -544,13 +550,12 @@ UpdateDialog::UpdateDialog( } catch (const uno::Exception & e) { throw uno::RuntimeException(e.Message, e.Context); } - m_updates.SetSelectHdl(LINK(this, UpdateDialog, selectionHandler)); - m_all.SetToggleHdl(LINK(this, UpdateDialog, allHandler)); - m_ok.SetClickHdl(LINK(this, UpdateDialog, okHandler)); - m_close.SetClickHdl(LINK(this, UpdateDialog, closeHandler)); + m_pUpdates->SetSelectHdl(LINK(this, UpdateDialog, selectionHandler)); + m_pAll->SetToggleHdl(LINK(this, UpdateDialog, allHandler)); + m_pOk->SetClickHdl(LINK(this, UpdateDialog, okHandler)); + m_pClose->SetClickHdl(LINK(this, UpdateDialog, closeHandler)); if ( ! dp_misc::office_is_running()) - m_help.Disable(); - FreeResource(); + m_pHelp->Disable(); initDescription(); getIgnoredUpdates(); @@ -569,6 +574,7 @@ UpdateDialog::~UpdateDialog() { delete (*i); } + delete m_pUpdates; } @@ -578,23 +584,20 @@ bool UpdateDialog::Close() { } short UpdateDialog::Execute() { - m_throbber.start(); + m_pthrobber->start(); m_thread->launch(); return ModalDialog::Execute(); } - - - -UpdateDialog::CheckListBox::CheckListBox( UpdateDialog & dialog, ResId const & resource, - Image const & normalStaticImage ): - SvxCheckListBox( &dialog, resource, normalStaticImage ), +UpdateDialog::CheckListBox::CheckListBox( Window* pParent, UpdateDialog & dialog): + SvxCheckListBox( pParent, WinBits(WB_BORDER) ), m_ignoreUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE ) ), m_ignoreAllUpdates( DPGUI_RESSTR( RID_DLG_UPDATE_IGNORE_ALL ) ), m_enableUpdate( DPGUI_RESSTR( RID_DLG_UPDATE_ENABLE ) ), m_dialog(dialog) -{} - +{ + SetNormalStaticImage(Image(DpGuiResId(RID_DLG_UPDATE_NORMALALERT))); +} UpdateDialog::CheckListBox::~CheckListBox() {} @@ -689,12 +692,12 @@ void UpdateDialog::CheckListBox::handlePopupMenu( const Point &rPos ) sal_uInt16 UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKind kind ) { - m_updates.InsertEntry( pEntry->m_aName, TREELIST_APPEND, static_cast< void * >( pEntry ), kind ); + m_pUpdates->InsertEntry( pEntry->m_aName, TREELIST_APPEND, static_cast< void * >( pEntry ), kind ); - for ( sal_uInt16 i = m_updates.getItemCount(); i != 0 ; ) + for ( sal_uInt16 i = m_pUpdates->getItemCount(); i != 0 ; ) { i -= 1; - UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData( i ) ); + UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_pUpdates->GetEntryData( i ) ); if ( p == pEntry ) return i; } @@ -705,14 +708,14 @@ sal_uInt16 UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKi void UpdateDialog::addAdditional( UpdateDialog::Index * index, SvLBoxButtonKind kind ) { - m_all.Enable(); - if (m_all.IsChecked()) + m_pAll->Enable(); + if (m_pAll->IsChecked()) { insertItem( index, kind ); - m_update.Enable(); - m_updates.Enable(); - m_description.Enable(); - m_descriptions.Enable(); + m_pUpdate->Enable(); + m_pUpdates->Enable(); + m_pDescription->Enable(); + m_pDescriptions->Enable(); } } @@ -732,15 +735,15 @@ void UpdateDialog::addEnabledUpdate( OUString const & name, if ( ! isIgnoredUpdate( pEntry ) ) { sal_uInt16 nPos = insertItem( pEntry, SvLBoxButtonKind_enabledCheckbox ); - m_updates.CheckEntryPos( nPos ); + m_pUpdates->CheckEntryPos( nPos ); } else addAdditional( pEntry, SvLBoxButtonKind_disabledCheckbox ); - m_update.Enable(); - m_updates.Enable(); - m_description.Enable(); - m_descriptions.Enable(); + m_pUpdate->Enable(); + m_pUpdates->Enable(); + m_pDescription->Enable(); + m_pDescriptions->Enable(); } @@ -775,27 +778,27 @@ void UpdateDialog::addSpecificError( UpdateDialog::SpecificError & data ) } void UpdateDialog::checkingDone() { - m_checking.Hide(); - m_throbber.stop(); - m_throbber.Hide(); - if (m_updates.getItemCount() == 0) + m_pchecking->Hide(); + m_pthrobber->stop(); + m_pthrobber->Hide(); + if (m_pUpdates->getItemCount() == 0) { clearDescription(); - m_description.Enable(); - m_descriptions.Enable(); + m_pDescription->Enable(); + m_pDescriptions->Enable(); if ( m_disabledUpdates.empty() && m_specificErrors.empty() && m_ignoredUpdates.empty() ) - showDescription( m_none, false ); + showDescription( m_none ); else - showDescription( m_noInstallable, false ); + showDescription( m_noInstallable ); } enableOk(); } void UpdateDialog::enableOk() { - if (!m_checking.IsVisible()) { - m_ok.Enable(m_updates.GetCheckedEntryCount() != 0); + if (!m_pchecking->IsVisible()) { + m_pOk->Enable(m_pUpdates->GetCheckedEntryCount() != 0); } } @@ -869,11 +872,11 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) if ( ! bRecheckOnly ) { sal_Int32 nCount = 0; - for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i ) + for ( sal_Int16 i = 0; i < m_pUpdates->getItemCount(); ++i ) { uno::Sequence< OUString > aItem(2); - UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >(m_updates.GetEntryData(i)); + UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >(m_pUpdates->GetEntryData(i)); if ( p->m_eKind == ENABLED_UPDATE ) { @@ -900,70 +903,29 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly ) void UpdateDialog::initDescription() { - m_PublisherLabel.Hide(); - m_PublisherLink.Hide(); - m_ReleaseNotesLabel.Hide(); - m_ReleaseNotesLink.Hide(); - m_descriptions.Hide(); + m_pPublisherLabel->Hide(); + m_pPublisherLink->Hide(); + m_pReleaseNotesLabel->Hide(); + m_pReleaseNotesLink->Hide(); + m_pDescriptions->Hide(); Link aLink = LINK( this, UpdateDialog, hyperlink_clicked ); - m_PublisherLink.SetClickHdl( aLink ); - m_ReleaseNotesLink.SetClickHdl( aLink ); - - long nTextWidth = m_PublisherLabel.GetCtrlTextWidth( m_PublisherLabel.GetText() ); - long nTemp = m_ReleaseNotesLabel.GetTextWidth( m_ReleaseNotesLabel.GetText() ); - if ( nTemp > nTextWidth ) - nTextWidth = nTemp; - nTextWidth = nTextWidth * 110 / 100; - - Size aNewSize = m_PublisherLabel.GetSizePixel(); - if ( nTextWidth > aNewSize.Width() ) - { - long nDelta = nTextWidth - aNewSize.Width(); - aNewSize.Width() = nTextWidth; - m_PublisherLabel.SetSizePixel( aNewSize ); - m_ReleaseNotesLabel.SetSizePixel( aNewSize ); - - aNewSize = m_PublisherLink.GetSizePixel(); - aNewSize.Width() = aNewSize.Width() - nDelta; - Point aNewPos = m_PublisherLink.GetPosPixel(); - aNewPos.X() = aNewPos.X() + nDelta; - m_PublisherLink.SetPosSizePixel( aNewPos, aNewSize ); - aNewPos.Y() = m_ReleaseNotesLink.GetPosPixel().Y(); - m_ReleaseNotesLink.SetPosSizePixel( aNewPos, aNewSize ); - } - - m_aFirstLinePos = m_descriptions.GetPosPixel(); - m_aFirstLineSize = m_descriptions.GetSizePixel(); - Size aMarginSize = LogicToPixel( Size( RSC_SP_CTRL_GROUP_X, RSC_SP_CTRL_GROUP_Y ), MAP_APPFONT ); - Point aThirdLinePos = m_ReleaseNotesLabel.GetPosPixel(); - aThirdLinePos.Y() = aThirdLinePos.Y() + m_ReleaseNotesLabel.GetSizePixel().Height() + aMarginSize.Height(); - m_nFirstLineDelta = aThirdLinePos.Y() - m_aFirstLinePos.Y(); - m_nOneLineMissing = m_ReleaseNotesLabel.GetPosPixel().Y() - m_PublisherLabel.GetPosPixel().Y(); + m_pPublisherLink->SetClickHdl( aLink ); + m_pReleaseNotesLink->SetClickHdl( aLink ); } void UpdateDialog::clearDescription() { OUString sEmpty; - m_PublisherLabel.Hide(); - m_PublisherLink.Hide(); - m_PublisherLink.SetText( sEmpty ); - m_PublisherLink.SetURL( sEmpty ); - m_ReleaseNotesLabel.Hide(); - m_ReleaseNotesLink.Hide(); - m_ReleaseNotesLink.SetURL( sEmpty ); - if ( m_PublisherLabel.GetPosPixel().Y() == m_ReleaseNotesLabel.GetPosPixel().Y() ) - { - Point aNewPos = m_ReleaseNotesLabel.GetPosPixel(); - aNewPos.Y() += m_nOneLineMissing; - m_ReleaseNotesLabel.SetPosPixel( aNewPos ); - aNewPos = m_ReleaseNotesLink.GetPosPixel(); - aNewPos.Y() += m_nOneLineMissing; - m_ReleaseNotesLink.SetPosPixel( aNewPos ); - } - m_descriptions.Hide(); - m_descriptions.Clear(); - m_descriptions.SetPosSizePixel( m_aFirstLinePos, m_aFirstLineSize ); + m_pPublisherLabel->Hide(); + m_pPublisherLink->Hide(); + m_pPublisherLink->SetText( sEmpty ); + m_pPublisherLink->SetURL( sEmpty ); + m_pReleaseNotesLabel->Hide(); + m_pReleaseNotesLink->Hide(); + m_pReleaseNotesLink->SetURL( sEmpty ); + m_pDescriptions->Hide(); + m_pDescriptions->Clear(); } bool UpdateDialog::showDescription(uno::Reference< xml::dom::XNode > const & aUpdateInfo) @@ -991,51 +953,31 @@ bool UpdateDialog::showDescription(std::pair< OUString, OUString > const & pairP // nothing to show return false; - bool bPublisher = false; if ( !sPub.isEmpty() ) { - m_PublisherLabel.Show(); - m_PublisherLink.Show(); - m_PublisherLink.SetText( sPub ); - m_PublisherLink.SetURL( sURL ); - bPublisher = true; + m_pPublisherLabel->Show(); + m_pPublisherLink->Show(); + m_pPublisherLink->SetText( sPub ); + m_pPublisherLink->SetURL( sURL ); } if ( !sReleaseNotes.isEmpty() ) { - if ( !bPublisher ) - { - m_ReleaseNotesLabel.SetPosPixel( m_PublisherLabel.GetPosPixel() ); - m_ReleaseNotesLink.SetPosPixel( m_PublisherLink.GetPosPixel() ); - } - m_ReleaseNotesLabel.Show(); - m_ReleaseNotesLink.Show(); - m_ReleaseNotesLink.SetURL( sReleaseNotes ); + m_pReleaseNotesLabel->Show(); + m_pReleaseNotesLink->Show(); + m_pReleaseNotesLink->SetURL( sReleaseNotes ); } return true; } -bool UpdateDialog::showDescription( const OUString& rDescription, bool bWithPublisher ) +bool UpdateDialog::showDescription( const OUString& rDescription) { if ( rDescription.isEmpty() ) // nothing to show return false; - if ( bWithPublisher ) - { - bool bOneLineMissing = !m_ReleaseNotesLabel.IsVisible() || !m_PublisherLabel.IsVisible(); - Point aNewPos = m_aFirstLinePos; - aNewPos.Y() += m_nFirstLineDelta; - if ( bOneLineMissing ) - aNewPos.Y() -= m_nOneLineMissing; - Size aNewSize = m_aFirstLineSize; - aNewSize.Height() -= m_nFirstLineDelta; - if ( bOneLineMissing ) - aNewSize.Height() += m_nOneLineMissing; - m_descriptions.SetPosSizePixel( aNewPos, aNewSize ); - } - m_descriptions.Show(); - m_descriptions.SetText( rDescription ); + m_pDescriptions->Show(); + m_pDescriptions->SetText( rDescription ); return true; } @@ -1199,9 +1141,8 @@ void UpdateDialog::setIgnoredUpdate( UpdateDialog::Index *pIndex, bool bIgnore, IMPL_LINK_NOARG(UpdateDialog, selectionHandler) { OUStringBuffer b; - bool bInserted = false; UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( - m_updates.GetEntryData(m_updates.GetSelectEntryPos())); + m_pUpdates->GetEntryData(m_pUpdates->GetSelectEntryPos())); clearDescription(); if ( p != NULL ) @@ -1213,9 +1154,9 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) case ENABLED_UPDATE: { if ( m_enabledUpdates[ pos ].aUpdateSource.is() ) - bInserted = showDescription( m_enabledUpdates[ pos ].aUpdateSource ); + showDescription( m_enabledUpdates[ pos ].aUpdateSource ); else - bInserted = showDescription( m_enabledUpdates[ pos ].aUpdateInfo ); + showDescription( m_enabledUpdates[ pos ].aUpdateInfo ); if ( p->m_bIgnored ) b.append( m_ignoredUpdate ); @@ -1225,7 +1166,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) case DISABLED_UPDATE: { if ( !m_disabledUpdates.empty() ) - bInserted = showDescription( m_disabledUpdates[pos].aUpdateInfo ); + showDescription( m_disabledUpdates[pos].aUpdateInfo ); if ( p->m_bIgnored ) b.append( m_ignoredUpdate ); @@ -1292,18 +1233,18 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) if ( b.isEmpty() ) b.append( m_noDescription ); - showDescription( b.makeStringAndClear(), bInserted ); + showDescription( b.makeStringAndClear() ); return 0; } IMPL_LINK_NOARG(UpdateDialog, allHandler) { - if (m_all.IsChecked()) + if (m_pAll->IsChecked()) { - m_update.Enable(); - m_updates.Enable(); - m_description.Enable(); - m_descriptions.Enable(); + m_pUpdate->Enable(); + m_pUpdates->Enable(); + m_pDescription->Enable(); + m_pDescriptions->Enable(); for (std::vector< UpdateDialog::Index* >::iterator i( m_ListboxEntries.begin() ); i != m_ListboxEntries.end(); ++i ) @@ -1314,26 +1255,26 @@ IMPL_LINK_NOARG(UpdateDialog, allHandler) } else { - for ( sal_uInt16 i = 0; i < m_updates.getItemCount(); ) + for ( sal_uInt16 i = 0; i < m_pUpdates->getItemCount(); ) { - UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_updates.GetEntryData(i) ); + UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( m_pUpdates->GetEntryData(i) ); if ( p->m_bIgnored || ( p->m_eKind != ENABLED_UPDATE ) ) { - m_updates.RemoveEntry(i); + m_pUpdates->RemoveEntry(i); } else { ++i; } } - if (m_updates.getItemCount() == 0) + if (m_pUpdates->getItemCount() == 0) { clearDescription(); - m_update.Disable(); - m_updates.Disable(); - if (m_checking.IsVisible()) - m_description.Disable(); + m_pUpdate->Disable(); + m_pUpdates->Disable(); + if (m_pchecking->IsVisible()) + m_pDescription->Disable(); else - showDescription(m_noInstallable,false); + showDescription(m_noInstallable); } } return 0; @@ -1352,11 +1293,11 @@ IMPL_LINK_NOARG(UpdateDialog, okHandler) } - for (sal_uInt16 i = 0; i < m_updates.getItemCount(); ++i) { + for (sal_uInt16 i = 0; i < m_pUpdates->getItemCount(); ++i) { UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( - m_updates.GetEntryData(i)); - if (p->m_eKind == ENABLED_UPDATE && m_updates.IsChecked(i)) { + m_pUpdates->GetEntryData(i)); + if (p->m_eKind == ENABLED_UPDATE && m_pUpdates->IsChecked(i)) { m_updateData.push_back( m_enabledUpdates[ p->m_nIndex ] ); } } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index 8168d0374679..e7740c170353 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -30,6 +30,7 @@ #include "svtools/svlbitm.hxx" #include "svx/checklbx.hxx" #include "tools/link.hxx" +#include <vcl/layout.hxx> #include <vcl/button.hxx> #include <vcl/dialog.hxx> #include <vcl/fixed.hxx> @@ -109,8 +110,7 @@ private: class CheckListBox: public SvxCheckListBox { public: CheckListBox( - UpdateDialog & dialog, ResId const & resource, - Image const & normalStaticImage); + Window* pParent, UpdateDialog & dialog); virtual ~CheckListBox(); @@ -159,7 +159,7 @@ private: OUString const & sReleaseNotes); bool showDescription( ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XNode > const & aUpdateInfo); - bool showDescription( const OUString& rDescription, bool bWithPublisher ); + bool showDescription( const OUString& rDescription); bool isReadOnly( const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage ) const; DECL_LINK(selectionHandler, void *); @@ -170,21 +170,21 @@ private: com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_context; - FixedText m_checking; - Throbber m_throbber; - FixedText m_update; - UpdateDialog::CheckListBox m_updates; - CheckBox m_all; - FixedLine m_description; - FixedText m_PublisherLabel; - FixedHyperlink m_PublisherLink; - FixedText m_ReleaseNotesLabel; - FixedHyperlink m_ReleaseNotesLink; - dp_gui::DescriptionEdit m_descriptions; - FixedLine m_line; - HelpButton m_help; - PushButton m_ok; - PushButton m_close; + FixedText* m_pchecking; + Throbber* m_pthrobber; + FixedText* m_pUpdate; + VclScrolledWindow* m_pContainer; + UpdateDialog::CheckListBox* m_pUpdates; + CheckBox* m_pAll; + FixedText* m_pDescription; + FixedText* m_pPublisherLabel; + FixedHyperlink* m_pPublisherLink; + FixedText* m_pReleaseNotesLabel; + FixedHyperlink* m_pReleaseNotesLink; + dp_gui::DescriptionEdit* m_pDescriptions; + HelpButton* m_pHelp; + PushButton* m_pOk; + PushButton* m_pClose; OUString m_error; OUString m_none; OUString m_noInstallable; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src index 43d7d7bbd463..ff76550614bd 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.src +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src @@ -21,238 +21,70 @@ #include "dp_gui.hrc" -#define LOCAL_WIDTH (60 * RSC_BS_CHARWIDTH) -#define LABEL_WIDTH (1 * RSC_BS_CHARWIDTH) -#define LOCAL_LIST_HEIGHT1 (6 * RSC_BS_CHARHEIGHT) + 4 -#define LOCAL_LIST_HEIGHT2 (7 * RSC_BS_CHARHEIGHT) + 3 - -ModalDialog RID_DLG_UPDATE { - HelpID = HID_DEPLOYMENT_GUI_UPDATE; - Size = MAP_APPFONT( - (RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH + - RSC_SP_DLG_INNERBORDER_RIGHT), - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT2 + RSC_SP_FLGR_SPACE_Y + - RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y + - RSC_CD_PUSHBUTTON_HEIGHT + RSC_SP_DLG_INNERBORDER_BOTTOM)); - Text[en-US] = "Extension Update"; - Moveable = TRUE; - Closeable = TRUE; - FixedText RID_DLG_UPDATE_CHECKING { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH * 2 / 3, - RSC_SP_DLG_INNERBORDER_TOP); - Size = MAP_APPFONT( - (LOCAL_WIDTH - LOCAL_WIDTH * 2 / 3 - RSC_SP_CTRL_DESC_X - - RSC_CD_FIXEDTEXT_HEIGHT), - RSC_CD_FIXEDTEXT_HEIGHT); - Text[en-US] = "Checking..."; - Right = TRUE; - NoLabel = TRUE; - }; - FixedImage RID_DLG_UPDATE_THROBBER { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - RSC_CD_FIXEDTEXT_HEIGHT, - RSC_SP_DLG_INNERBORDER_TOP); - Size = MAP_APPFONT(RSC_CD_FIXEDTEXT_HEIGHT, RSC_CD_FIXEDTEXT_HEIGHT + 1); - }; - FixedText RID_DLG_UPDATE_UPDATE { - Disable = TRUE; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP); - Size = MAP_APPFONT( - LOCAL_WIDTH * 2 / 3 - RSC_SP_CTRL_GROUP_X, RSC_CD_FIXEDTEXT_HEIGHT); - Text[en-US] = "~Available extension updates"; - }; - Control RID_DLG_UPDATE_UPDATES { - HelpId = HID_DEPLOYMENT_GUI_UPDATE_AVAILABLE_UPDATES; - Disable = TRUE; - Border = TRUE; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH, LOCAL_LIST_HEIGHT1); - TabStop = TRUE; - }; - CheckBox RID_DLG_UPDATE_ALL { - HelpID = "desktop:CheckBox:RID_DLG_UPDATE:RID_DLG_UPDATE_ALL"; - Disable = TRUE; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_CHECKBOX_HEIGHT); - Text[en-US] = "~Show all updates"; - }; - FixedLine RID_DLG_UPDATE_DESCRIPTION { - Disable = TRUE; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT); - Text[en-US] = "Description"; - }; - FixedText RID_DLG_UPDATE_PUBLISHER_LABEL - { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y)); - Size = MAP_APPFONT(LABEL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT); - Text[en-US] = "Publisher:"; - }; - FixedText RID_DLG_UPDATE_PUBLISHER_LINK - { - HelpId = HID_DEPLOYMENT_GUI_UPDATE_PUBLISHER; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT + LABEL_WIDTH + RSC_SP_CTRL_DESC_X, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH - LABEL_WIDTH - RSC_SP_CTRL_DESC_X, RSC_CD_FIXEDTEXT_HEIGHT); - }; - FixedText RID_DLG_UPDATE_RELEASENOTES_LABEL - { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y)); - Size = MAP_APPFONT(LABEL_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT); - Text[en-US] = "What is new:"; - }; - FixedText RID_DLG_UPDATE_RELEASENOTES_LINK - { - HelpId = HID_DEPLOYMENT_GUI_UPDATE_RELEASENOTES; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT + LABEL_WIDTH + RSC_SP_CTRL_DESC_X, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_DESC_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH - LABEL_WIDTH - RSC_SP_CTRL_DESC_X, RSC_CD_FIXEDTEXT_HEIGHT); - Text[en-US] = "Release Notes"; - }; - MultiLineEdit RID_DLG_UPDATE_DESCRIPTIONS { - HelpID = "desktop:MultiLineEdit:RID_DLG_UPDATE:RID_DLG_UPDATE_DESCRIPTIONS"; - Disable = TRUE; - Border = TRUE; - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH, LOCAL_LIST_HEIGHT2); - ReadOnly = TRUE; - VScroll = TRUE; - IgnoreTab = TRUE; - }; - FixedLine RID_DLG_UPDATE_LINE { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT2 + RSC_SP_FLGR_SPACE_Y)); - Size = MAP_APPFONT(LOCAL_WIDTH, RSC_CD_FIXEDLINE_HEIGHT); - }; - HelpButton RID_DLG_UPDATE_HELP { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT2 + RSC_SP_FLGR_SPACE_Y + - RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y)); - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT); - }; - PushButton RID_DLG_UPDATE_OK { - HelpID = "desktop:PushButton:RID_DLG_UPDATE:RID_DLG_UPDATE_OK"; - Disable = TRUE; - Pos = MAP_APPFONT( - (RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - RSC_CD_PUSHBUTTON_WIDTH - - RSC_SP_CTRL_GROUP_X - RSC_CD_PUSHBUTTON_WIDTH), - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT2 + RSC_SP_FLGR_SPACE_Y + - RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y)); - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT); - Text[en-US] = "~Install"; - DefButton = TRUE; - }; - PushButton RID_DLG_UPDATE_CLOSE { - Pos = MAP_APPFONT( - RSC_SP_DLG_INNERBORDER_LEFT + LOCAL_WIDTH - RSC_CD_PUSHBUTTON_WIDTH, - (RSC_SP_DLG_INNERBORDER_TOP + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT1 + RSC_SP_CTRL_GROUP_Y + - RSC_CD_CHECKBOX_HEIGHT + RSC_SP_CTRL_GROUP_Y + RSC_CD_FIXEDTEXT_HEIGHT + - RSC_SP_CTRL_DESC_Y + LOCAL_LIST_HEIGHT2 + RSC_SP_FLGR_SPACE_Y + - RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_FLGR_SPACE_Y)); - Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT); - Text[en-US] = "Close"; +Image RID_DLG_UPDATE_NORMALALERT { + ImageBitmap = Bitmap { + File = "caution_12.png"; }; +}; - Image RID_DLG_UPDATE_NORMALALERT { - ImageBitmap = Bitmap { - File = "caution_12.png"; - }; - }; - String RID_DLG_UPDATE_ERROR { - Text[en-US] = "Error"; - }; - String RID_DLG_UPDATE_NONE { - Text[en-US] = "No new updates are available."; - }; - String RID_DLG_UPDATE_NOINSTALLABLE { - Text[en-US] = "No installable updates are available. To see ignored or disabled updates, mark the check box 'Show all updates'."; - }; - String RID_DLG_UPDATE_FAILURE { - Text[en-US] = "An error occurred:"; - }; - String RID_DLG_UPDATE_UNKNOWNERROR { - Text[en-US] = "Unknown error."; - }; - String RID_DLG_UPDATE_NODESCRIPTION { - Text[en-US] = "No more details are available for this update."; - }; - String RID_DLG_UPDATE_NOINSTALL { - Text[en-US] = "The extension cannot be updated because:"; - }; - String RID_DLG_UPDATE_NODEPENDENCY { - Text[en-US] = "Required %PRODUCTNAME version doesn't match:"; - }; - String RID_DLG_UPDATE_NODEPENDENCY_CUR_VER { - Text[en-US] = "You have %PRODUCTNAME %VERSION"; - }; - String RID_DLG_UPDATE_BROWSERBASED { - Text[en-US] = "browser based update"; - }; - String RID_DLG_UPDATE_VERSION { - Text[en-US] = "Version"; - }; - String RID_DLG_UPDATE_IGNORE { - Text[en-US] = "Ignore this Update"; - }; - String RID_DLG_UPDATE_IGNORE_ALL { - Text[en-US] = "Ignore all Updates"; - }; - String RID_DLG_UPDATE_ENABLE { - Text[en-US] = "Enable Updates"; - }; - String RID_DLG_UPDATE_IGNORED_UPDATE { - Text[en-US] = "This update will be ignored.\n"; - }; +String RID_DLG_UPDATE_ERROR { + Text[en-US] = "Error"; +}; + +String RID_DLG_UPDATE_NONE { + Text[en-US] = "No new updates are available."; +}; + +String RID_DLG_UPDATE_NOINSTALLABLE { + Text[en-US] = "No installable updates are available. To see ignored or disabled updates, mark the check box 'Show all updates'."; +}; + +String RID_DLG_UPDATE_FAILURE { + Text[en-US] = "An error occurred:"; +}; + +String RID_DLG_UPDATE_UNKNOWNERROR { + Text[en-US] = "Unknown error."; +}; + +String RID_DLG_UPDATE_NODESCRIPTION { + Text[en-US] = "No more details are available for this update."; +}; + +String RID_DLG_UPDATE_NOINSTALL { + Text[en-US] = "The extension cannot be updated because:"; +}; + +String RID_DLG_UPDATE_NODEPENDENCY { + Text[en-US] = "Required %PRODUCTNAME version doesn't match:"; +}; + +String RID_DLG_UPDATE_NODEPENDENCY_CUR_VER { + Text[en-US] = "You have %PRODUCTNAME %VERSION"; +}; + +String RID_DLG_UPDATE_BROWSERBASED { + Text[en-US] = "browser based update"; +}; + +String RID_DLG_UPDATE_VERSION { + Text[en-US] = "Version"; +}; + +String RID_DLG_UPDATE_IGNORE { + Text[en-US] = "Ignore this Update"; +}; + +String RID_DLG_UPDATE_IGNORE_ALL { + Text[en-US] = "Ignore all Updates"; +}; + +String RID_DLG_UPDATE_ENABLE { + Text[en-US] = "Enable Updates"; +}; + +String RID_DLG_UPDATE_IGNORED_UPDATE { + Text[en-US] = "This update will be ignored.\n"; }; WarningBox RID_WARNINGBOX_UPDATE_SHARED_EXTENSION diff --git a/desktop/uiconfig/ui/updatedialog.ui b/desktop/uiconfig/ui/updatedialog.ui new file mode 100644 index 000000000000..9410aff2311a --- /dev/null +++ b/desktop/uiconfig/ui/updatedialog.ui @@ -0,0 +1,325 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <!-- interface-requires LibreOffice 1.0 --> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="UpdateDialog"> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">6</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="gtk-help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="INSTALL"> + <property name="label" translatable="yes">_Install</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="gtk-close"> + <property name="label">gtk-close</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkBox" id="box2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="UPDATE_LABEL"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="hexpand">True</property> + <property name="label" translatable="yes">_Available extension updates</property> + <property name="use_underline">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="UPDATE_CHECKING"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">end</property> + <property name="label" translatable="yes">Checking...</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinner" id="THROBBER"> + <property name="visible">True</property> + <property name="can_focus">False</property> + </object> + <packing> + <property name="left_attach">2</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="UPDATES_CONTAINER"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="shadow_type">in</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkCheckButton" id="UPDATE_ALL"> + <property name="label" translatable="yes">_Show all updates</property> + <property name="use_action_appearance">False</property> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkBox" id="box3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">6</property> + <child> + <object class="GtkLabel" id="DESCRIPTION_LABEL"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Description</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="column_spacing">6</property> + <child> + <object class="GtkLabel" id="PUBLISHER_LABEL"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">Publisher:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">PUBLISHER_LINK</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="PUBLISHER_LINK"> + <property name="label" translatable="yes">button</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="relief">none</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="RELEASE_NOTES_LABEL"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="halign">start</property> + <property name="label" translatable="yes">What is new:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">RELEASE_NOTES_LINK</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLinkButton" id="RELEASE_NOTES_LINK"> + <property name="label" translatable="yes">Release notes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="has_tooltip">True</property> + <property name="relief">none</property> + </object> + <packing> + <property name="left_attach">1</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="vscrollbar_policy">always</property> + <property name="shadow_type">in</property> + <child> + <object class="deploymentgui-DescriptionEdit" id="DESCRIPTIONS"> + <property name="visible">True</property> + <property name="sensitive">False</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="editable">False</property> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">2</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">gtk-help</action-widget> + <action-widget response="0">INSTALL</action-widget> + <action-widget response="0">gtk-close</action-widget> + </action-widgets> + </object> +</interface> diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in index fb120faa1064..cbfcc6ab3726 100644 --- a/extras/source/glade/libreoffice-catalog.xml.in +++ b/extras/source/glade/libreoffice-catalog.xml.in @@ -326,6 +326,9 @@ <glade-widget-class title="LicenseView" name="deploymentgui-LicenseView" generic-name="LicenseView" parent="GtkTextView" icon-name="widget-gtk-textview"/> + <glade-widget-class title="DescriptionEdit" name="deploymentgui-DescriptionEdit" + generic-name="DescriptionEdit" parent="GtkTextView" + icon-name="widget-gtk-textview"/> <glade-widget-class title="SvtValueSet" name="svtlo-ValueSet" generic-name="Set of Value Options" parent="GtkDrawingArea" icon-name="widget-gtk-drawingarea"/> diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx index 6edefd3233da..aa2c300a2e98 100644 --- a/include/svx/checklbx.hxx +++ b/include/svx/checklbx.hxx @@ -46,6 +46,7 @@ public: SvxCheckListBox( Window* pParent, WinBits nWinStyle = 0 ); SvxCheckListBox( Window* pParent, const ResId& rResId, const Image& rNormalStaticImage ); + void SetNormalStaticImage(const Image& rNormalStaticImage); virtual ~SvxCheckListBox(); void InsertEntry ( const OUString& rStr, diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index 384fa1856c42..a2fdfa52a0a8 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -50,9 +50,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvxCheckListBox(Window *pPa SvxCheckListBox::SvxCheckListBox( Window* pParent, const ResId& rResId, const Image& rNormalStaticImage ) : SvTreeListBox( pParent, rResId ) - { Init_Impl(); + SetNormalStaticImage(rNormalStaticImage); +} + +void SvxCheckListBox::SetNormalStaticImage(const Image& rNormalStaticImage) +{ pCheckButton->aBmps[SV_BMP_STATICIMAGE] = rNormalStaticImage; } @@ -61,16 +65,12 @@ SvxCheckListBox::~SvxCheckListBox() delete pCheckButton; } - - void SvxCheckListBox::Init_Impl() { pCheckButton = new SvLBoxButtonData( this ); EnableCheckButton( pCheckButton ); } - - void SvxCheckListBox::InsertEntry( const OUString& rStr, sal_uLong nPos, void* pUserData, SvLBoxButtonKind eButtonKind ) |