diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-04 11:34:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-06 09:57:53 +0200 |
commit | a30a5d1b8af18d19526f1980df41857f455cc8ef (patch) | |
tree | e8add75abca3c336cbc46936a7d19028ba4251aa /cui | |
parent | 7665246ac8addc002f74e3a9b22d1baeda448af3 (diff) |
weld AboutDialog
use a native GtkAboutDialog on that platform and refactor the current cui about
dialog body to form the body of a vcl AboutDialog
use add_button to add the buttons to whichever is preferred of the headerbar
or action-area
Change-Id: I67e0b36dcb8d3fa08ec4f0397b0f6185b0778675
Reviewed-on: https://gerrit.libreoffice.org/73439
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/inc/strings.hrc | 13 | ||||
-rw-r--r-- | cui/source/dialogs/about.cxx | 215 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.cxx | 10 | ||||
-rw-r--r-- | cui/source/factory/dlgfact.hxx | 2 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 59 | ||||
-rw-r--r-- | cui/uiconfig/ui/aboutdialog.ui | 328 |
6 files changed, 136 insertions, 491 deletions
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc index 70aa6383149c..9b302e439453 100644 --- a/cui/inc/strings.hrc +++ b/cui/inc/strings.hrc @@ -391,6 +391,19 @@ #define RID_SVXSTR_REGISTERED_DATABASES NC_("RID_SVXSTR_REGISTERED_DATABASES", "Registered Databases") +#define RID_SVXSTR_ABOUT_VERSION NC_("aboutdialog|textbuffer1", "Version: %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX") +#define RID_SVXSTR_ABOUT_COPYRIGHT NC_("aboutdialog|copyright", "Copyright © 2000–2019 LibreOffice contributors.") +#define RID_SVXSTR_ABOUT_CREDITS_URL NC_("aboutdialog|link", "https://www.libreoffice.org/about-us/credits/") +#define RID_SVXSTR_ABOUT_BUILDID NC_("aboutdialog|buildid", "Build ID: $BUILDID") +#define RID_SVXSTR_ABOUT_VENDOR NC_("aboutdialog|vendor", "This release was supplied by %OOOVENDOR.") +#define RID_SVXSTR_ABOUT_BASED_ON NC_("aboutdialog|libreoffice", "LibreOffice was based on OpenOffice.org.") +#define RID_SVXSTR_ABOUT_DERIVED NC_("aboutdialog|derived", "%PRODUCTNAME is derived from LibreOffice which was based on OpenOffice.org") +#define RID_SVXSTR_ABOUT_LOCALE NC_("aboutdialog|locale", "Locale: $LOCALE") +#define RID_SVXSTR_ABOUT_UILOCALE NC_("aboutdialog|uilocale", "UI-Language: $LOCALE") +#define RID_SVXSTR_ABOUT_RELEASE_NOTES NC_("aboutdialog|releasenotes", "~Release Notes") +#define RID_SVXSTR_ABOUT_WEBSITE NC_("aboutdialog|website", "~Website") +#define RID_SVXSTR_ABOUT_CREDITS NC_("aboutdialog|credits", "Cre~dits") + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index cdafad532c2c..776d89f9e88f 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -22,18 +22,19 @@ #include <sal/log.hxx> #include <osl/diagnose.h> #include <rtl/character.hxx> +#include <vcl/graph.hxx> +#include <vcl/graphicfilter.hxx> #include <vcl/layout.hxx> -#include <vcl/weld.hxx> -#include <vcl/svapp.hxx> #include <vcl/settings.hxx> +#include <vcl/svapp.hxx> +#include <vcl/virdev.hxx> +#include <vcl/weld.hxx> #include <tools/stream.hxx> #include <rtl/bootstrap.hxx> #include <unotools/configmgr.hxx> #include <unotools/bootstrap.hxx> #include <com/sun/star/uno/Any.h> -#include <vcl/graph.hxx> -#include <vcl/graphicfilter.hxx> #include <svtools/langhelp.hxx> #include <i18nlangtag/languagetag.hxx> @@ -49,6 +50,8 @@ #include <sfx2/sfxuno.hxx> #include <about.hxx> +#include <dialmgr.hxx> +#include <strings.hrc> #include <config_buildid.h> #include <sfx2/app.hxx> #include <rtl/ustrbuf.hxx> @@ -64,80 +67,59 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star; -AboutDialog::AboutDialog(vcl::Window* pParent) - : SfxModalDialog(pParent, "AboutDialog", "cui/ui/aboutdialog.ui") +AboutDialog::AboutDialog(weld::Window* pParent) + : m_xBuilder(Application::CreateBuilder(pParent, "cui/ui/aboutdialog.ui")) + , m_xDialog(m_xBuilder->weld_about_dialog("AboutDialog")) + , m_xContentArea(m_xDialog->weld_content_area()) { - get(m_pLogoReplacement, "logoreplacement"); - get(m_pLogoImage, "logo"); - get(m_pVersion, "version"); - get(m_pDescriptionText, "description"); - get(m_pCopyrightText, "copyright"); - get(m_pBuildIdLink, "buildIdLink"); - m_aCopyrightTextStr = m_pCopyrightText->GetText(); - get(m_pWebsiteButton, "website"); - get(m_pCreditsButton, "credits"); - get(m_pReleaseNotesButton, "btnReleaseNotes"); - m_aCreditsLinkStr = get<FixedText>("link")->GetText(); - m_sBuildStr = get<FixedText>("buildid")->GetText(); - m_aVendorTextStr = get<FixedText>("vendor")->GetText(); - m_aVersionTextStr = m_pVersion->GetText(); - m_aBasedTextStr = get<FixedText>("libreoffice")->GetText(); - m_aBasedDerivedTextStr = get<FixedText>("derived")->GetText(); - m_aLocaleStr = get<FixedText>("locale")->GetText(); - m_aUILocaleStr = get<FixedText>("uilocale")->GetText(); - m_buildIdLinkString = m_pBuildIdLink->GetText(); - - m_pVersion->SetText(GetVersionString()); - - OUString aCopyrightString = GetCopyrightString(); - m_pCopyrightText->SetText( aCopyrightString ); + m_xDialog->add_button(Button::GetStandardText(StandardButtonType::Close), RET_CLOSE); + m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_CREDITS), 101); + m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_WEBSITE), 102); + m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_RELEASE_NOTES), 103); - SetBuildIdLink(); + m_pCreditsButton = m_xDialog->get_widget_for_response(101); + m_pCreditsButton->set_secondary(true); + m_pWebsiteButton = m_xDialog->get_widget_for_response(102); + m_pWebsiteButton->set_secondary(true); + m_pReleaseNotesButton = m_xDialog->get_widget_for_response(103); + m_pReleaseNotesButton->set_secondary(true); + m_pCloseButton = m_xDialog->get_widget_for_response(RET_CLOSE); + + m_buildIdLinkString = m_xDialog->get_website_label(); - StyleControls(); + m_xDialog->set_version(GetVersionString()); + m_xDialog->set_copyright(GetCopyrightString()); + + SetBuildIdLink(); SetLogo(); - // Connect all handlers - m_pCreditsButton->SetClickHdl( LINK( this, AboutDialog, HandleClick ) ); - m_pWebsiteButton->SetClickHdl( LINK( this, AboutDialog, HandleClick ) ); - m_pReleaseNotesButton->SetClickHdl( LINK( this, AboutDialog, HandleClick ) ); + m_xDialog->connect_size_allocate(LINK(this, AboutDialog, SizeAllocHdl)); - get<PushButton>("close")->GrabFocus(); + // Connect all handlers + m_pCreditsButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) ); + m_pWebsiteButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) ); + m_pReleaseNotesButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) ); + m_pCloseButton->grab_focus(); } AboutDialog::~AboutDialog() { - disposeOnce(); -} - -void AboutDialog::dispose() -{ - m_pVersion.clear(); - m_pDescriptionText.clear(); - m_pCopyrightText.clear(); - m_pLogoImage.clear(); - m_pLogoReplacement.clear(); - m_pCreditsButton.clear(); - m_pWebsiteButton.clear(); - m_pBuildIdLink.clear(); - m_pReleaseNotesButton.clear(); - SfxModalDialog::dispose(); } -IMPL_LINK( AboutDialog, HandleClick, Button*, pButton, void ) +IMPL_LINK(AboutDialog, HandleClick, weld::Button&, rButton, void) { OUString sURL = ""; // Find which button was pressed and from this, get the URL to be opened - if (pButton == m_pCreditsButton) - sURL = m_aCreditsLinkStr; - else if (pButton == m_pWebsiteButton) + if (&rButton == m_pCreditsButton) + sURL = CuiResId(RID_SVXSTR_ABOUT_CREDITS_URL); + else if (&rButton == m_pWebsiteButton) { sURL = officecfg::Office::Common::Help::StartCenter::InfoURL::get(); localizeWebserviceURI(sURL); } - else if (pButton == m_pReleaseNotesButton) + else if (&rButton == m_pReleaseNotesButton) { sURL = officecfg::Office::Common::Menus::ReleaseNotesURL::get() + "?LOvers=" + utl::ConfigManager::getProductVersion() + @@ -158,9 +140,9 @@ IMPL_LINK( AboutDialog, HandleClick, Button*, pButton, void ) Any exc( ::cppu::getCaughtException() ); OUString msg( ::comphelper::anyToString( exc ) ); const SolarMutexGuard guard; - std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(pButton->GetFrameWeld(), + std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(getDialog(), VclMessageType::Warning, VclButtonsType::Ok, msg)); - xErrorBox->set_title(GetText()); + xErrorBox->set_title(m_xDialog->get_title()); xErrorBox->run(); } } @@ -177,41 +159,19 @@ void AboutDialog::SetBuildIdLink() m_buildIdLinkString += " $GITHASH"; } - m_pBuildIdLink->SetText(m_buildIdLinkString.replaceAll("$GITHASH", buildId)); - m_pBuildIdLink->SetURL("https://hub.libreoffice.org/git-core/" + buildId); + m_xDialog->set_website_label(m_buildIdLinkString.replaceAll("$GITHASH", buildId)); + m_xDialog->set_website("https://hub.libreoffice.org/git-core/" + buildId); } else { - m_pBuildIdLink->Hide(); + m_xDialog->set_website_label(OUString()); + m_xDialog->set_website(OUString()); } } -void AboutDialog::StyleControls() -{ - // Make all the controls have a transparent background - m_pLogoImage->SetBackground(); - m_pLogoReplacement->SetPaintTransparent(true); - m_pVersion->SetPaintTransparent(true); - m_pDescriptionText->SetPaintTransparent(true); - m_pCopyrightText->SetPaintTransparent(true); - - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); - - const vcl::Font& aLabelFont = rStyleSettings.GetLabelFont(); - vcl::Font aLargeFont = aLabelFont; - aLargeFont.SetFontSize(Size( 0, aLabelFont.GetFontSize().Height() * 3)); - - // Logo Replacement Text - m_pLogoReplacement->SetControlFont(aLargeFont); - - // Description Text - aLargeFont.SetFontSize(Size(0, aLabelFont.GetFontSize().Height() * 1.3)); - m_pDescriptionText->SetControlFont(aLargeFont); -} - void AboutDialog::SetLogo() { - long nWidth = get_content_area()->get_preferred_size().Width(); + auto nWidth = m_xContentArea->get_preferred_size().Width(); // fdo#67401 set AntiAliasing for SVG logo SvtOptionsDrawinglayer aDrawOpt; @@ -219,43 +179,36 @@ void AboutDialog::SetLogo() aDrawOpt.SetAntiAliasing(true); // load svg logo, specify desired width, scale height isotropically - if (SfxApplication::loadBrandSvg("flat_logo", aLogoBitmap, nWidth) && - !aLogoBitmap.IsEmpty()) - { - m_pLogoImage->SetImage(Image(aLogoBitmap)); - m_pLogoReplacement->Hide(); - m_pLogoImage->Show(); - } + SfxApplication::loadBrandSvg("flat_logo", aLogoBitmap, nWidth); + + aDrawOpt.SetAntiAliasing(bOldAntiAliasSetting); + + if (!aLogoBitmap) + m_xDialog->set_logo(nullptr); else { - m_pLogoImage->Hide(); - m_pLogoReplacement->Show(); + ScopedVclPtr<VirtualDevice> xDevice(m_xDialog->create_virtual_device()); + xDevice->SetOutputSize(aLogoBitmap.GetSizePixel()); + xDevice->DrawBitmapEx(Point(), aLogoBitmap); + m_xDialog->set_logo(xDevice.get()); } - aDrawOpt.SetAntiAliasing(bOldAntiAliasSetting); } -void AboutDialog::Resize() +IMPL_LINK(AboutDialog, SizeAllocHdl, const Size&, rSize, void) { - SfxModalDialog::Resize(); - + if (rSize.Width() == aBackgroundBitmap.GetSizePixel().Width()) + return; // Load background image - if (isInitialLayout(this) && !(Application::GetSettings().GetStyleSettings().GetHighContrastMode())) + if (!(Application::GetSettings().GetStyleSettings().GetHighContrastMode())) { - SfxApplication::loadBrandSvg("shell/about", aBackgroundBitmap, GetSizePixel().Width()); + SfxApplication::loadBrandSvg("shell/about", aBackgroundBitmap, rSize.Width()); + ScopedVclPtr<VirtualDevice> xDevice(m_xDialog->create_virtual_device()); + xDevice->SetOutputSize(aBackgroundBitmap.GetSizePixel()); + xDevice->DrawBitmapEx(Point(), aBackgroundBitmap); + m_xDialog->set_background(xDevice.get()); } } -void AboutDialog::Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) -{ - rRenderContext.SetClipRegion(vcl::Region(rRect)); - - Size aSize(GetOutputSizePixel()); - Point aPos(aSize.Width() - aBackgroundBitmap.GetSizePixel().Width(), - aSize.Height() - aBackgroundBitmap.GetSizePixel().Height()); - - rRenderContext.DrawBitmapEx(aPos, aBackgroundBitmap); -} - OUString AboutDialog::GetBuildId() { OUString sDefault; @@ -309,7 +262,7 @@ bool AboutDialog::IsStringValidGitHash(const OUString& hash) OUString AboutDialog::GetVersionString() { - OUString sVersion = m_aVersionTextStr; + OUString sVersion = CuiResId(RID_SVXSTR_ABOUT_VERSION); #ifdef _WIN64 sVersion += " (x64)"; @@ -325,12 +278,13 @@ OUString AboutDialog::GetVersionString() if (!sBuildId.trim().isEmpty()) { sVersion += "\n"; - if (m_sBuildStr.indexOf("$BUILDID") == -1) + OUString sBuildStr = CuiResId(RID_SVXSTR_ABOUT_BUILDID); + if (sBuildStr.indexOf("$BUILDID") == -1) { SAL_WARN( "cui.dialogs", "translated Build Id string in translations doesn't contain $BUILDID placeholder" ); - m_sBuildStr += " $BUILDID"; + sBuildStr += " $BUILDID"; } - sVersion += m_sBuildStr.replaceAll("$BUILDID", sBuildId); + sVersion += sBuildStr.replaceAll("$BUILDID", sBuildId); } sVersion += "\n" + Application::GetHWOSConfInfo(); @@ -342,19 +296,21 @@ OUString AboutDialog::GetVersionString() sVersion += "\n" EXTRA_BUILDID; } - if (m_aLocaleStr.indexOf("$LOCALE") == -1) + OUString sLocaleStr(CuiResId(RID_SVXSTR_ABOUT_LOCALE)); + if (sLocaleStr.indexOf("$LOCALE") == -1) { SAL_WARN( "cui.dialogs", "translated locale string in translations doesn't contain $LOCALE placeholder" ); - m_aLocaleStr += " $LOCALE"; + sLocaleStr += " $LOCALE"; } - sVersion += "\n" + m_aLocaleStr.replaceAll("$LOCALE", aLocaleStr); + sVersion += "\n" + sLocaleStr.replaceAll("$LOCALE", aLocaleStr); - if (m_aUILocaleStr.indexOf("$LOCALE") == -1) + OUString sUILocaleStr(CuiResId(RID_SVXSTR_ABOUT_UILOCALE)); + if (sUILocaleStr.indexOf("$LOCALE") == -1) { SAL_WARN( "cui.dialogs", "translated uilocale string in translations doesn't contain $LOCALE placeholder" ); - m_aUILocaleStr += " $LOCALE"; + sUILocaleStr += " $LOCALE"; } - sVersion += "; " + m_aUILocaleStr.replaceAll("$LOCALE", aUILocaleStr); + sVersion += "; " + sUILocaleStr.replaceAll("$LOCALE", aUILocaleStr); OUString aCalcMode = "Calc: "; // Calc calculation mode @@ -383,21 +339,16 @@ OUString AboutDialog::GetVersionString() OUString AboutDialog::GetCopyrightString() { - OUString aCopyrightString = m_aVendorTextStr + "\n" - + m_aCopyrightTextStr + "\n"; + OUString sVendorTextStr(CuiResId(RID_SVXSTR_ABOUT_VENDOR)); + OUString aCopyrightString = sVendorTextStr + "\n" + + CuiResId(RID_SVXSTR_ABOUT_COPYRIGHT) + "\n"; if (utl::ConfigManager::getProductName() == "LibreOffice") - aCopyrightString += m_aBasedTextStr; + aCopyrightString += CuiResId(RID_SVXSTR_ABOUT_BASED_ON); else - aCopyrightString += m_aBasedDerivedTextStr; + aCopyrightString += CuiResId(RID_SVXSTR_ABOUT_DERIVED); return aCopyrightString; } -bool AboutDialog::Close() -{ - EndDialog( RET_OK ); - return false; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 17f8c137c2a4..0c1fbe4612c8 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -925,11 +925,6 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Wind VclPtr<Dialog> pDlg; switch ( nResId ) { - case SID_ABOUT: - { - pDlg = VclPtr<AboutDialog>::Create(pParent); - break; - } case SID_OPTIONS_TREEDIALOG : case SID_OPTIONS_DATABASES : case SID_LANGUAGE_OPTIONS : @@ -960,6 +955,11 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog( vcl::Wind return nullptr; } +VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent) +{ + return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<AboutDialog>(pParent)); +} + VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(vcl::Window* pParent, const Reference< frame::XFrame >& rxFrame, sal_uInt32 nResId, const OUString& rParameter ) { diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 6623de48ab6a..58548d82463b 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -685,6 +685,8 @@ class AbstractDialogFactory_Impl : public SvxAbstractDialogFactory public: virtual VclPtr<VclAbstractDialog> CreateVclDialog( vcl::Window* pParent, sal_uInt32 nResId ) override; + virtual VclPtr<VclAbstractDialog> CreateAboutDialog(weld::Window* pParent) override; + virtual VclPtr<SfxAbstractDialog> CreateSfxDialog( weld::Window* pParent, const SfxItemSet& rAttr, const SdrView* pView, diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index d191343f941a..cabfc3eb652f 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -19,67 +19,44 @@ #ifndef INCLUDED_CUI_SOURCE_INC_ABOUT_HXX #define INCLUDED_CUI_SOURCE_INC_ABOUT_HXX -#include <vcl/accel.hxx> -#include <vcl/button.hxx> -#include <vcl/fixed.hxx> -#include <vcl/fixedhyper.hxx> -#include <vcl/vclmedit.hxx> -#include <sfx2/basedlgs.hxx> -#include <vector> +#include <vcl/weld.hxx> -// class AboutDialog ----------------------------------------------------- - -class AboutDialog : public SfxModalDialog +class AboutDialog : public weld::DialogController { private: - BitmapEx aBackgroundBitmap; - BitmapEx aLogoBitmap; + std::unique_ptr<weld::Builder> m_xBuilder; + std::shared_ptr<weld::AboutDialog> m_xDialog; + std::shared_ptr<weld::Container> m_xContentArea; - VclPtr<VclMultiLineEdit> m_pVersion; - VclPtr<FixedHyperlink> m_pBuildIdLink; - VclPtr<FixedText> m_pDescriptionText; - VclPtr<FixedText> m_pCopyrightText; - VclPtr<FixedImage> m_pLogoImage; - VclPtr<FixedText> m_pLogoReplacement; - VclPtr<PushButton> m_pCreditsButton; - VclPtr<PushButton> m_pWebsiteButton; - VclPtr<PushButton> m_pReleaseNotesButton; + BitmapEx aLogoBitmap; + BitmapEx aBackgroundBitmap; - OUString m_aVersionTextStr; - OUString m_aVendorTextStr; - OUString m_aCopyrightTextStr; - OUString m_aBasedTextStr; - OUString m_aBasedDerivedTextStr; - OUString m_aCreditsLinkStr; - OUString m_sBuildStr; - OUString m_aLocaleStr; - OUString m_aUILocaleStr; OUString m_buildIdLinkString; + weld::Button* m_pCreditsButton; + weld::Button* m_pWebsiteButton; + weld::Button* m_pReleaseNotesButton; + weld::Button* m_pCloseButton; + void SetBuildIdLink(); void StyleControls(); void SetLogo(); static OUString GetBuildId(); - OUString GetVersionString(); - OUString GetCopyrightString(); + static OUString GetVersionString(); + static OUString GetCopyrightString(); static OUString GetLocaleString(); static bool IsStringValidGitHash(const OUString& hash); -protected: - virtual bool Close() override; - virtual void Paint(vcl::RenderContext& rRenderContext, const ::tools::Rectangle& rRect) override; - virtual void Resize() override; - public: - AboutDialog(vcl::Window* pParent); + AboutDialog(weld::Window* pParent); + virtual weld::Dialog* getDialog() override { return m_xDialog.get(); } virtual ~AboutDialog() override; - virtual void dispose() override; - DECL_LINK( HandleClick, Button*, void ); + DECL_LINK(HandleClick, weld::Button&, void); + DECL_LINK(SizeAllocHdl, const Size&, void); }; #endif // INCLUDED_CUI_SOURCE_INC_ABOUT_HXX - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui index a85bcc66b322..07f2be7e3e06 100644 --- a/cui/uiconfig/ui/aboutdialog.ui +++ b/cui/uiconfig/ui/aboutdialog.ui @@ -2,15 +2,21 @@ <!-- Generated with glade 3.22.1 --> <interface domain="cui"> <requires lib="gtk+" version="3.18"/> - <object class="GtkTextBuffer" id="textbuffer1"> - <property name="text" translatable="yes" context="aboutdialog|textbuffer1">Version: %ABOUTBOXPRODUCTVERSION%ABOUTBOXPRODUCTVERSIONSUFFIX</property> - </object> - <object class="GtkDialog" id="AboutDialog"> + <object class="GtkAboutDialog" id="AboutDialog"> <property name="can_focus">False</property> - <property name="border_width">6</property> - <property name="title" translatable="yes" context="aboutdialog|AboutDialog">About %PRODUCTNAME</property> - <property name="resizable">False</property> + <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> + <property name="title" translatable="yes" context="aboutdialog|AboutDialog">About %PRODUCTNAME</property> + <property name="program_name">%PRODUCTNAME</property> + <property name="comments" translatable="yes" context="aboutdialog|description">%PRODUCTNAME is a modern, easy-to-use, open source productivity suite for word processing, spreadsheets, presentations and more.</property> + <property name="website">https://www.libreoffice.org/</property> + <property name="website_label" translatable="yes" context="aboutdialog|buildIdLink">See Log: $GITHASH</property> + <property name="logo_icon_name">image-missing</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> @@ -18,68 +24,11 @@ <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> <property name="can_focus">False</property> <property name="layout_style">end</property> <child> - <object class="GtkButton" id="btnReleaseNotes"> - <property name="label" translatable="yes" context="aboutdialog|releasenotes">_Release Notes</property> - <property name="visible">True</property> - <property name="can_focus">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">0</property> - <property name="secondary">True</property> - </packing> - </child> - <child> - <object class="GtkButton" id="credits"> - <property name="label" translatable="yes" context="aboutdialog|credits">Cre_dits</property> - <property name="visible">True</property> - <property name="can_focus">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> - <property name="secondary">True</property> - </packing> - </child> - <child> - <object class="GtkButton" id="website"> - <property name="label" translatable="yes" context="aboutdialog|website">_Website</property> - <property name="visible">True</property> - <property name="can_focus">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">2</property> - <property name="secondary">True</property> - </packing> - </child> - <child> - <object class="GtkButton" id="close"> - <property name="label">gtk-close</property> - <property name="visible">True</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_stock">True</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> + <placeholder/> </child> </object> <packing> @@ -89,254 +38,7 @@ <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">12</property> - <child> - <object class="GtkImage" id="logo"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <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">12</property> - <child> - <object class="GtkLabel" id="logoreplacement"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes" context="aboutdialog|logoreplacement">%PRODUCTNAME</property> - <property name="justify">center</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="grid1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <child> - <object class="GtkLabel" id="buildid"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|buildid">Build ID: $BUILDID</property> - <property name="justify">center</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="locale"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|locale">Locale: $LOCALE</property> - <property name="justify">center</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkTextView" id="version"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="hexpand">True</property> - <property name="editable">False</property> - <property name="wrap_mode">word</property> - <property name="justification">center</property> - <property name="cursor_visible">False</property> - <property name="buffer">textbuffer1</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="uilocale"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|locale">UI-Language: $LOCALE</property> - <property name="justify">center</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</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="GtkLinkButton" id="buildIdLink"> - <property name="label" translatable="yes" context="aboutdialog|buildIdLink">See Log: $GITHASH</property> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <property name="relief">none</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="description"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|description">%PRODUCTNAME is a modern, easy-to-use, open source productivity suite for word processing, spreadsheets, presentations and more.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - <property name="max_width_chars">62</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">3</property> - </packing> - </child> - <child> - <object class="GtkGrid" id="grid2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <child> - <object class="GtkLabel" id="copyright"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="margin_left">12</property> - <property name="margin_right">12</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|copyright">Copyright © 2000–2019 LibreOffice contributors.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="libreoffice"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|libreoffice">LibreOffice was based on OpenOffice.org.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="derived"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|derived">%PRODUCTNAME is derived from LibreOffice which was based on OpenOffice.org.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="vendor"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="hexpand">True</property> - <property name="label" translatable="yes" context="aboutdialog|vendor">This release was supplied by %OOOVENDOR.</property> - <property name="justify">center</property> - <property name="wrap">True</property> - </object> - <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">4</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="link"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="label" translatable="yes" context="aboutdialog|link">https://www.libreoffice.org/about-us/credits/</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">5</property> - </packing> - </child> - </object> - <packing> - <property name="expand">False</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="101">btnReleaseNotes</action-widget> - <action-widget response="102">credits</action-widget> - <action-widget response="103">website</action-widget> - <action-widget response="-7">close</action-widget> - </action-widgets> - </object> - <object class="GtkSizeGroup" id="sizegroup1"> - <widgets> - <widget name="copyright"/> - <widget name="libreoffice"/> - <widget name="vendor"/> - </widgets> </object> </interface> |