Kaydet (Commit) 571df3ed authored tarafından Michael Weghorn's avatar Michael Weghorn Kaydeden (comit) Katarina Behrens

tdf119556 Sync "Use only paper size from printer preferences"

Since commit ee6dad51,
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.

Change-Id: I41d29a11b4e1695a4b2f676b8d7a9c01e4abde3e
Reviewed-on: https://gerrit.libreoffice.org/59581
Tested-by: Jenkins
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst a67acf8e
...@@ -233,6 +233,7 @@ namespace vcl ...@@ -233,6 +233,7 @@ namespace vcl
DECL_LINK( ToggleHdl, CheckBox&, void ); DECL_LINK( ToggleHdl, CheckBox&, void );
DECL_LINK( ToggleRadioHdl, RadioButton&, void ); DECL_LINK( ToggleRadioHdl, RadioButton&, void );
DECL_LINK( ModifyHdl, Edit&, void ); DECL_LINK( ModifyHdl, Edit&, void );
DECL_LINK( ActivatePageHdl, TabControl *, void);
DECL_LINK( UIOption_CheckHdl, CheckBox&, void ); DECL_LINK( UIOption_CheckHdl, CheckBox&, void );
DECL_LINK( UIOption_RadioHdl, RadioButton&, void ); DECL_LINK( UIOption_RadioHdl, RadioButton&, void );
......
...@@ -724,6 +724,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC ...@@ -724,6 +724,7 @@ PrintDialog::PrintDialog( vcl::Window* i_pParent, const std::shared_ptr<PrinterC
// set a select handler // set a select handler
maJobPage.mpPrinters->SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) ); maJobPage.mpPrinters->SetSelectHdl( LINK( this, PrintDialog, SelectHdl ) );
mpTabCtrl->SetActivatePageHdl( LINK( this, PrintDialog, ActivatePageHdl ) );
// setup sizes for N-Up // setup sizes for N-Up
Size aNupSize( maPController->getPrinter()->PixelToLogic( Size aNupSize( maPController->getPrinter()->PixelToLogic(
...@@ -1752,6 +1753,14 @@ IMPL_LINK( PrintDialog, ModifyHdl, Edit&, rEdit, void ) ...@@ -1752,6 +1753,14 @@ IMPL_LINK( PrintDialog, ModifyHdl, Edit&, rEdit, void )
} }
} }
IMPL_LINK( 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* PrintDialog::getValueForWindow( vcl::Window* i_pWindow ) const
{ {
PropertyValue* pVal = nullptr; PropertyValue* pVal = nullptr;
......
...@@ -1517,10 +1517,10 @@ ...@@ -1517,10 +1517,10 @@
</packing> </packing>
</child> </child>
<child type="tab"> <child type="tab">
<object class="GtkLabel" id="label20"> <object class="GtkLabel" id="optionstab">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="label" translatable="yes" context="printdialog|label20">Options</property> <property name="label" translatable="yes" context="printdialog|optionstab">Options</property>
</object> </object>
<packing> <packing>
<property name="position">3</property> <property name="position">3</property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment