vcl/inc/printdlg.hxx | 1 + vcl/source/window/printdlg.cxx | 9 +++++++++ vcl/uiconfig/ui/printdialog.ui | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-)
New commits: commit d6b74181df4a1ddb562fc888f919f56c66242db9 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Aug 28 07:53:43 2018 +0200 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Wed Aug 29 10:54:40 2018 +0200 tdf119556 Sync "Use only paper size from printer preferences" Since commit ee6dad51150fd53d19f882edfefa879e18f9897d, the "Use only paper size from printer settings" is shown at two places in the print dialog 1) in the "Options" tab 2) in the "Properties" -> "Paper" tab This makes the setting being correctly updated in the UI in 1) as well if changed in 2). The other way around was already working previously. Reviewed-on: https://gerrit.libreoffice.org/59581 Tested-by: Jenkins Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> (cherry picked from commit 571df3ede6f09c945c4cdfd37f34ef760b6b1af2) Conflicts: vcl/inc/printdlg.hxx vcl/uiconfig/ui/printdialog.ui Change-Id: I41d29a11b4e1695a4b2f676b8d7a9c01e4abde3e Reviewed-on: https://gerrit.libreoffice.org/59745 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> Tested-by: Thorsten Behrens <thorsten.behr...@cib.de> diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index 1017f509c78b..4e32ed209613 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -234,6 +234,7 @@ namespace vcl DECL_LINK_TYPED( ToggleHdl, CheckBox&, void ); DECL_LINK_TYPED( ToggleRadioHdl, RadioButton&, void ); DECL_LINK_TYPED( ModifyHdl, Edit&, void ); + DECL_LINK_TYPED( ActivatePageHdl, TabControl *, void); DECL_LINK_TYPED( UIOption_CheckHdl, CheckBox&, void ); DECL_LINK_TYPED( UIOption_RadioHdl, RadioButton&, void ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 4761ab68e8c2..3b8fb87fb26b 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -728,6 +728,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC // set a select handler maJobPage.mpPrinters->SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) ); + mpTabCtrl->SetActivatePageHdl( LINK( this, PrintDialog, ActivatePageHdl ) ); // setup sizes for N-Up Size aNupSize( maPController->getPrinter()->PixelToLogic( @@ -1765,6 +1766,14 @@ IMPL_LINK_TYPED( PrintDialog, ModifyHdl, Edit&, rEdit, void ) } } +IMPL_LINK_TYPED( PrintDialog, ActivatePageHdl, TabControl *, pTabCtrl, void ) +{ + const sal_uInt16 id = pTabCtrl->GetCurPageId(); + if (pTabCtrl->GetPageName(id) == "optionstab" ) { + maOptionsPage.mpPapersizeFromSetup->Check( maPController->getPapersizeFromSetup() ); + } +} + PropertyValue* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const { PropertyValue* pVal = nullptr; diff --git a/vcl/uiconfig/ui/printdialog.ui b/vcl/uiconfig/ui/printdialog.ui index 50a86b55b658..d1db837fef5c 100644 --- a/vcl/uiconfig/ui/printdialog.ui +++ b/vcl/uiconfig/ui/printdialog.ui @@ -1510,10 +1510,10 @@ </packing> </child> <child type="tab"> - <object class="GtkLabel" id="label20"> + <object class="GtkLabel" id="optionstab"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes">Options</property> + <property name="label" translatable="yes" context="printdialog|optionstab">Options</property> </object> <packing> <property name="position">3</property> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits