diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-05 17:26:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-08-22 16:37:16 +0200 |
commit | 69057064d8957804c76e623d57c103c3413b7cbc (patch) | |
tree | 8026201f2750300a3b9f831a04dcc34016d54a95 /cui | |
parent | e724f245e9652230d4c1f58c353be150006affcd (diff) |
weld ODbTypeWizDialogSetup
split up RoadmapWizard to sit its wizard logic on top of a a native GtkAssistant
a) awkwardly GtkAssistant is not a GtkDialog, but derives directly from
GtkWindow so some shuffling around required due to that
b) hidden/unused pages are shuffled to the end of the list of pages and
their titles turned off in order to hide them from the roadmap
c) some nonstandard hackery required to get the gtk roadmap titles to wrap
Change-Id: I0d2346c489fef744136a2785f33c846d97bd8dc6
Reviewed-on: https://gerrit.libreoffice.org/76876
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/source/dialogs/about.cxx | 28 | ||||
-rw-r--r-- | cui/source/inc/about.hxx | 11 |
2 files changed, 19 insertions, 20 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index a9617f7a8381..da2e4d2b4e2d 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -68,13 +68,13 @@ AboutDialog::AboutDialog(weld::Window* pParent) m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_WEBSITE), 102); m_xDialog->add_button(CuiResId(RID_SVXSTR_ABOUT_RELEASE_NOTES), 103); - 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_xCreditsButton.reset(m_xDialog->weld_widget_for_response(101)); + m_xCreditsButton->set_secondary(true); + m_xWebsiteButton.reset(m_xDialog->weld_widget_for_response(102)); + m_xWebsiteButton->set_secondary(true); + m_xReleaseNotesButton.reset(m_xDialog->weld_widget_for_response(103)); + m_xReleaseNotesButton->set_secondary(true); + m_xCloseButton.reset(m_xDialog->weld_widget_for_response(RET_CLOSE)); m_buildIdLinkString = m_xDialog->get_website_label(); @@ -88,10 +88,10 @@ AboutDialog::AboutDialog(weld::Window* pParent) m_xDialog->connect_size_allocate(LINK(this, AboutDialog, SizeAllocHdl)); // 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(); + m_xCreditsButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) ); + m_xWebsiteButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) ); + m_xReleaseNotesButton->connect_clicked( LINK( this, AboutDialog, HandleClick ) ); + m_xCloseButton->grab_focus(); } AboutDialog::~AboutDialog() @@ -103,14 +103,14 @@ 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 (&rButton == m_pCreditsButton) + if (&rButton == m_xCreditsButton.get()) sURL = CuiResId(RID_SVXSTR_ABOUT_CREDITS_URL); - else if (&rButton == m_pWebsiteButton) + else if (&rButton == m_xWebsiteButton.get()) { sURL = officecfg::Office::Common::Help::StartCenter::InfoURL::get(); localizeWebserviceURI(sURL); } - else if (&rButton == m_pReleaseNotesButton) + else if (&rButton == m_xReleaseNotesButton.get()) { sURL = officecfg::Office::Common::Menus::ReleaseNotesURL::get() + "?LOvers=" + utl::ConfigManager::getProductVersion() + diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index adafb7448ef0..c51eb15433d8 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -27,18 +27,17 @@ class AboutDialog : public weld::DialogController private: std::unique_ptr<weld::Builder> m_xBuilder; std::shared_ptr<weld::AboutDialog> m_xDialog; - std::shared_ptr<weld::Container> m_xContentArea; + std::unique_ptr<weld::Container> m_xContentArea; + std::unique_ptr<weld::Button> m_xCreditsButton; + std::unique_ptr<weld::Button> m_xWebsiteButton; + std::unique_ptr<weld::Button> m_xReleaseNotesButton; + std::unique_ptr<weld::Button> m_xCloseButton; BitmapEx aLogoBitmap; BitmapEx aBackgroundBitmap; OUString m_buildIdLinkString; - weld::Button* m_pCreditsButton; - weld::Button* m_pWebsiteButton; - weld::Button* m_pReleaseNotesButton; - weld::Button* m_pCloseButton; - void SetBuildIdLink(); void SetLogo(); |