[Libreoffice-commits] core.git: vcl/uiconfig vcl/unx
Katarina Behrens
Katarina.Behrens at cib.de
Wed Dec 20 11:33:14 UTC 2017
vcl/uiconfig/ui/printerpaperpage.ui | 40 ++++++++++++++++++++++++------------
vcl/unx/generic/print/prtsetup.cxx | 16 +++++++++++++-
vcl/unx/generic/print/prtsetup.hxx | 3 ++
3 files changed, 45 insertions(+), 14 deletions(-)
New commits:
commit 75fc4934c3aafcd83d9bbee63d8d24cbddae8ea0
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Fri Oct 27 18:02:35 2017 +0200
tdf#79077: copy 'paper from printer setup' toggle
into printer properties dialog, it is rather badly accessible
(almost invisible) in File > Print > Options tabpage
Change-Id: I18d538a20dc207c359ae1e7c2c914a68daf58f31
Reviewed-on: https://gerrit.libreoffice.org/43956
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/vcl/uiconfig/ui/printerpaperpage.ui b/vcl/uiconfig/ui/printerpaperpage.ui
index 90d72859708d..c8d834a1e1e5 100644
--- a/vcl/uiconfig/ui/printerpaperpage.ui
+++ b/vcl/uiconfig/ui/printerpaperpage.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="vcl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkGrid" id="PrinterPaperPage">
@@ -16,52 +16,52 @@
<object class="GtkLabel" id="paperft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="printerpaperpage|paperft">_Paper size:</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="printerpaperpage|label4">_Orientation:</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="duplexft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="printerpaperpage|duplexft">_Duplex:</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="slotft">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
<property name="label" translatable="yes" context="printerpaperpage|slotft">Paper tray:</property>
<property name="use_underline">True</property>
+ <property name="xalign">1</property>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
</packing>
</child>
<child>
@@ -71,7 +71,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">0</property>
+ <property name="top_attach">1</property>
</packing>
</child>
<child>
@@ -85,7 +85,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
</packing>
</child>
<child>
@@ -95,7 +95,7 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -105,7 +105,21 @@
</object>
<packing>
<property name="left_attach">1</property>
- <property name="top_attach">3</property>
+ <property name="top_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="papersizefromsetup">
+ <property name="label" translatable="yes" context="printerpaperpage|papersizefromsetup">Use only paper size from printer preferences</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">2</property>
</packing>
</child>
</object>
diff --git a/vcl/unx/generic/print/prtsetup.cxx b/vcl/unx/generic/print/prtsetup.cxx
index 3faddbf3e7b8..dc667fbc9825 100644
--- a/vcl/unx/generic/print/prtsetup.cxx
+++ b/vcl/unx/generic/print/prtsetup.cxx
@@ -152,6 +152,7 @@ RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
: TabPage(pParent->m_pTabControl, "PrinterPaperPage", "vcl/ui/printerpaperpage.ui")
, m_pParent( pParent )
{
+ get(m_pCbFromSetup, "papersizefromsetup");
get(m_pPaperText, "paperft");
get(m_pPaperBox, "paperlb");
get(m_pOrientBox, "orientlb");
@@ -164,6 +165,8 @@ RTSPaperPage::RTSPaperPage(RTSDialog* pParent)
m_pOrientBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
m_pDuplexBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
m_pSlotBox->SetSelectHdl( LINK( this, RTSPaperPage, SelectHdl ) );
+ m_pCbFromSetup->SetToggleHdl( LINK( this, RTSPaperPage, CheckBoxHdl ) );
+
sal_Int32 nPos = 0;
@@ -189,6 +192,7 @@ void RTSPaperPage::dispose()
{
m_pParent.clear();
m_pPaperText.clear();
+ m_pCbFromSetup.clear();
m_pPaperBox.clear();
m_pOrientBox.clear();
m_pDuplexText.clear();
@@ -242,9 +246,11 @@ void RTSPaperPage::update()
m_pSlotBox->Enable( false );
}
+ if ( m_pParent->m_aJobData.m_bPapersizeFromSetup )
+ m_pCbFromSetup->Check( m_pParent->m_aJobData.m_bPapersizeFromSetup );
// disable those, unless user wants to use papersize from printer prefs
// as they have no influence on what's going to be printed anyway
- if (!m_pParent->m_aJobData.m_bPapersizeFromSetup)
+ else
{
m_pPaperBox->Enable( false );
m_pOrientBox->Enable( false );
@@ -283,6 +289,14 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox&, rBox, void )
m_pParent->SetDataModified( true );
}
+IMPL_LINK( RTSPaperPage, CheckBoxHdl, CheckBox&, /*cBox*/, void )
+{
+ bool bFromSetup = m_pCbFromSetup->IsChecked();
+ m_pParent->m_aJobData.m_bPapersizeFromSetup = bFromSetup;
+ m_pPaperBox->Enable( bFromSetup );
+ m_pOrientBox->Enable( bFromSetup );
+ m_pParent->SetDataModified( true );
+}
/*
* RTSDevicePage
*/
diff --git a/vcl/unx/generic/print/prtsetup.hxx b/vcl/unx/generic/print/prtsetup.hxx
index ff4d3fb01df7..924d4c54b27f 100644
--- a/vcl/unx/generic/print/prtsetup.hxx
+++ b/vcl/unx/generic/print/prtsetup.hxx
@@ -78,6 +78,8 @@ class RTSPaperPage : public TabPage
{
VclPtr<RTSDialog> m_pParent;
+ VclPtr<CheckBox> m_pCbFromSetup;
+
VclPtr<FixedText> m_pPaperText;
VclPtr<ListBox> m_pPaperBox;
@@ -90,6 +92,7 @@ class RTSPaperPage : public TabPage
VclPtr<ListBox> m_pSlotBox;
DECL_LINK( SelectHdl, ListBox&, void );
+ DECL_LINK( CheckBoxHdl, CheckBox&, void );
public:
explicit RTSPaperPage( RTSDialog* );
virtual ~RTSPaperPage() override;
More information about the Libreoffice-commits
mailing list