summaryrefslogtreecommitdiff
path: root/padmin
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-14 14:54:24 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-14 15:43:04 +0000
commit00427faebbe66dde8bd2253e67b19e96f982fe27 (patch)
tree039bbd96f5641b9a8f26edf2b790b897b94777ca /padmin
parentc60ef32a644a707bf7d8a1f0e8408771c48b0c46 (diff)
split out printer device page and adapt code to .ui
Change-Id: I7eacd837aacba452ab55ce707c3c032b2efadfb3
Diffstat (limited to 'padmin')
-rw-r--r--padmin/Module_padmin.mk1
-rw-r--r--padmin/UI_spa.mk16
-rw-r--r--padmin/source/prtsetup.cxx113
-rw-r--r--padmin/source/prtsetup.hxx27
-rw-r--r--padmin/source/rtsetup.hrc12
-rw-r--r--padmin/source/rtsetup.src101
-rw-r--r--padmin/uiconfig/ui/printerdevicepage.ui208
-rw-r--r--padmin/uiconfig/ui/printerproperties.ui286
8 files changed, 369 insertions, 395 deletions
diff --git a/padmin/Module_padmin.mk b/padmin/Module_padmin.mk
index 53c54b4266a7..c8d024d00d88 100644
--- a/padmin/Module_padmin.mk
+++ b/padmin/Module_padmin.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_Module_add_targets,padmin,\
Library_spa \
AllLangResTarget_spa \
Package_inc \
+ UI_spa \
))
endif
diff --git a/padmin/UI_spa.mk b/padmin/UI_spa.mk
new file mode 100644
index 000000000000..70008c266227
--- /dev/null
+++ b/padmin/UI_spa.mk
@@ -0,0 +1,16 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UI_UI,spa))
+
+$(eval $(call gb_UI_add_uifiles,spa,\
+ padmin/uiconfig/ui/printerdevicepage \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx
index 3862cde35605..6b398f1e5fd2 100644
--- a/padmin/source/prtsetup.cxx
+++ b/padmin/source/prtsetup.cxx
@@ -94,8 +94,7 @@ RTSDialog::RTSDialog( const PrinterInfo& rJobData, const String& rPrinter, bool
m_pOtherPage( NULL ),
m_pFontSubstPage( NULL ),
m_pCommandPage( NULL ),
- m_aInvalidString( PaResId( RID_RTS_RTSDIALOG_INVALID_TXT ) ),
- m_aFromDriverString( PaResId( RID_RTS_RTSDIALOG_FROMDRIVER_TXT ) )
+ m_aInvalidString( PaResId( RID_RTS_RTSDIALOG_INVALID_TXT ) )
{
FreeResource();
@@ -350,37 +349,28 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox )
* RTSDevicePage
*/
-RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
- TabPage( & pParent->m_aTabControl, PaResId( RID_RTS_DEVICEPAGE ) ),
+RTSDevicePage::RTSDevicePage( RTSDialog* pParent )
+ : TabPage(&pParent->m_aTabControl, "PrinterDevicePage", "spa/ui/printerdevicepage.ui" )
+ , m_pParent( pParent )
+{
+ get(m_pPPDKeyBox, "options");
+ get(m_pPPDValueBox, "values");
- m_pParent( pParent ),
+ m_pPPDKeyBox->SetDropDownLineCount(12);
+ m_pPPDValueBox->SetDropDownLineCount(12);
- m_aSpaceColor( PaResId( RID_RTS_DEVICE_COLOR_TXT ) ),
- m_aSpaceGray( PaResId( RID_RTS_DEVICE_GRAY_TXT ) ),
- m_aPPDKeyText( this, PaResId( RID_RTS_DEVICE_PPDKEY_TXT ) ),
- m_aPPDKeyBox( this, PaResId( RID_RTS_DEVICE_PPDKEY_BOX ) ),
- m_aPPDValueText( this, PaResId( RID_RTS_DEVICE_PPDVALUE_TXT ) ),
- m_aPPDValueBox( this, PaResId( RID_RTS_DEVICE_PPDVALUE_BOX ) ),
- m_aLevelText( this, PaResId( RID_RTS_DEVICE_PRINTLANG_TXT ) ),
- m_aLevelBox( this, PaResId( RID_RTS_DEVICE_PRINTLANG_BOX ) ),
- m_aSpaceText( this, PaResId( RID_RTS_DEVICE_SPACE_TXT ) ),
- m_aSpaceBox( this, PaResId( RID_RTS_DEVICE_SPACE_BOX ) ),
- m_aDepthText( this, PaResId( RID_RTS_DEVICE_DEPTH_TXT ) ),
- m_aDepthBox( this, PaResId( RID_RTS_DEVICE_DEPTH_BOX ) )
-{
- FreeResource();
+ get(m_pLevelBox, "level");
+ get(m_pSpaceBox, "colorspace");
+ get(m_pDepthBox, "colordepth");
- m_aPPDKeyBox.SetSelectHdl( LINK( this, RTSDevicePage, SelectHdl ) );
- m_aPPDValueBox.SetSelectHdl( LINK( this, RTSDevicePage, SelectHdl ) );
+ m_pPPDKeyBox->SetSelectHdl( LINK( this, RTSDevicePage, SelectHdl ) );
+ m_pPPDValueBox->SetSelectHdl( LINK( this, RTSDevicePage, SelectHdl ) );
- m_aSpaceBox.InsertEntry( m_pParent->m_aFromDriverString );
- m_aSpaceBox.InsertEntry( m_aSpaceColor );
- m_aSpaceBox.InsertEntry( m_aSpaceGray );
switch( m_pParent->m_aJobData.m_nColorDevice )
{
- case -1: m_aSpaceBox.SelectEntry( m_aSpaceGray );break;
- case 0: m_aSpaceBox.SelectEntry( m_pParent->m_aFromDriverString );break;
- case 1: m_aSpaceBox.SelectEntry( m_aSpaceColor );break;
+ case 0: m_pSpaceBox->SelectEntryPos(0);break;
+ case 1: m_pSpaceBox->SelectEntryPos(1);break;
+ case -1: m_pSpaceBox->SelectEntryPos(2);break;
}
sal_uLong nLevelEntryData = 0; //automatic
@@ -397,21 +387,24 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
assert(nLevelEntryData != 0 || bAutoIsPDF == m_pParent->m_aJobData.m_nPDFDevice);
- OUString sStr = m_aLevelBox.GetEntry(0);
- m_aLevelBox.InsertEntry(sStr.replaceAll("%s", bAutoIsPDF ? m_aLevelBox.GetEntry(5) : m_aLevelBox.GetEntry(1)), 0);
- m_aLevelBox.SetEntryData(0, m_aLevelBox.GetEntryData(1));
- m_aLevelBox.RemoveEntry(1);
+ OUString sStr = m_pLevelBox->GetEntry(0);
+ m_pLevelBox->InsertEntry(sStr.replaceAll("%s", bAutoIsPDF ? m_pLevelBox->GetEntry(5) : m_pLevelBox->GetEntry(1)), 0);
+ m_pLevelBox->SetEntryData(0, m_pLevelBox->GetEntryData(1));
+ m_pLevelBox->RemoveEntry(1);
- for( sal_uInt16 i = 0; i < m_aLevelBox.GetEntryCount(); i++ )
+ for( sal_uInt16 i = 0; i < m_pLevelBox->GetEntryCount(); i++ )
{
- if( (sal_uLong)m_aLevelBox.GetEntryData( i ) == nLevelEntryData )
+ if( (sal_uLong)m_pLevelBox->GetEntryData( i ) == nLevelEntryData )
{
- m_aLevelBox.SelectEntryPos( i );
+ m_pLevelBox->SelectEntryPos( i );
break;
}
}
- m_aDepthBox.SelectEntry( String::CreateFromInt32( m_pParent->m_aJobData.m_nColorDepth ).AppendAscii( " Bit" ) );
+ if (m_pParent->m_aJobData.m_nColorDepth == 8)
+ m_pDepthBox->SelectEntryPos(0);
+ else if (m_pParent->m_aJobData.m_nColorDepth == 24)
+ m_pDepthBox->SelectEntryPos(1);
// fill ppd boxes
if( m_pParent->m_aJobData.m_pParser )
@@ -427,8 +420,8 @@ RTSDevicePage::RTSDevicePage( RTSDialog* pParent ) :
)
{
String aEntry( m_pParent->m_aJobData.m_pParser->translateKey( pKey->getKey() ) );
- sal_uInt16 nPos = m_aPPDKeyBox.InsertEntry( aEntry );
- m_aPPDKeyBox.SetEntryData( nPos, (void*)pKey );
+ sal_uInt16 nPos = m_pPPDKeyBox->InsertEntry( aEntry );
+ m_pPPDKeyBox->SetEntryData( nPos, (void*)pKey );
}
}
}
@@ -446,11 +439,35 @@ void RTSDevicePage::update()
{
}
+sal_uLong RTSDevicePage::getDepth()
+{
+ sal_uInt16 nSelectPos = m_pDepthBox->GetSelectEntryPos();
+ if (nSelectPos == 0)
+ return 8;
+ else
+ return 24;
+}
+
+sal_uLong RTSDevicePage::getColorDevice()
+{
+ sal_uInt16 nSelectPos = m_pSpaceBox->GetSelectEntryPos();
+ switch (nSelectPos)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return 1;
+ case 2:
+ return -1;
+ }
+ return 0;
+}
+
// ------------------------------------------------------------------
sal_uLong RTSDevicePage::getLevel()
{
- sal_uLong nLevel = (sal_uLong)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
+ sal_uLong nLevel = (sal_uLong)m_pLevelBox->GetEntryData( m_pLevelBox->GetSelectEntryPos() );
if (nLevel == 0)
return 0; //automatic
return nLevel < 10 ? nLevel-1 : 0;
@@ -460,7 +477,7 @@ sal_uLong RTSDevicePage::getLevel()
sal_uLong RTSDevicePage::getPDFDevice()
{
- sal_uLong nLevel = (sal_uLong)m_aLevelBox.GetEntryData( m_aLevelBox.GetSelectEntryPos() );
+ sal_uLong nLevel = (sal_uLong)m_pLevelBox->GetEntryData( m_pLevelBox->GetSelectEntryPos() );
if (nLevel > 9)
return 2; //explictly PDF
else if (nLevel == 0)
@@ -472,15 +489,15 @@ sal_uLong RTSDevicePage::getPDFDevice()
IMPL_LINK( RTSDevicePage, SelectHdl, ListBox*, pBox )
{
- if( pBox == &m_aPPDKeyBox )
+ if( pBox == m_pPPDKeyBox )
{
- const PPDKey* pKey = (PPDKey*)m_aPPDKeyBox.GetEntryData( m_aPPDKeyBox.GetSelectEntryPos() );
+ const PPDKey* pKey = (PPDKey*)m_pPPDKeyBox->GetEntryData( m_pPPDKeyBox->GetSelectEntryPos() );
FillValueBox( pKey );
}
- else if( pBox == &m_aPPDValueBox )
+ else if( pBox == m_pPPDValueBox )
{
- const PPDKey* pKey = (PPDKey*)m_aPPDKeyBox.GetEntryData( m_aPPDKeyBox.GetSelectEntryPos() );
- const PPDValue* pValue = (PPDValue*)m_aPPDValueBox.GetEntryData( m_aPPDValueBox.GetSelectEntryPos() );
+ const PPDKey* pKey = (PPDKey*)m_pPPDKeyBox->GetEntryData( m_pPPDKeyBox->GetSelectEntryPos() );
+ const PPDValue* pValue = (PPDValue*)m_pPPDValueBox->GetEntryData( m_pPPDValueBox->GetSelectEntryPos() );
if( pKey && pValue )
{
m_pParent->m_aJobData.m_aContext.setValue( pKey, pValue );
@@ -494,7 +511,7 @@ IMPL_LINK( RTSDevicePage, SelectHdl, ListBox*, pBox )
void RTSDevicePage::FillValueBox( const PPDKey* pKey )
{
- m_aPPDValueBox.Clear();
+ m_pPPDValueBox->Clear();
if( ! pKey )
return;
@@ -507,12 +524,12 @@ void RTSDevicePage::FillValueBox( const PPDKey* pKey )
m_pParent->m_aJobData.m_pParser )
{
String aEntry( m_pParent->m_aJobData.m_pParser->translateOption( pKey->getKey(), pValue->m_aOption ) );
- sal_uInt16 nPos = m_aPPDValueBox.InsertEntry( aEntry );
- m_aPPDValueBox.SetEntryData( nPos, (void*)pValue );
+ sal_uInt16 nPos = m_pPPDValueBox->InsertEntry( aEntry );
+ m_pPPDValueBox->SetEntryData( nPos, (void*)pValue );
}
}
pValue = m_pParent->m_aJobData.m_aContext.getValue( pKey );
- m_aPPDValueBox.SelectEntryPos( m_aPPDValueBox.GetEntryPos( (void*)pValue ) );
+ m_pPPDValueBox->SelectEntryPos( m_pPPDValueBox->GetEntryPos( (void*)pValue ) );
}
// --------------------------------------------------------------------------
diff --git a/padmin/source/prtsetup.hxx b/padmin/source/prtsetup.hxx
index feaea88078ab..9e8d098d6211 100644
--- a/padmin/source/prtsetup.hxx
+++ b/padmin/source/prtsetup.hxx
@@ -68,7 +68,6 @@ class RTSDialog : public TabDialog
// some resources
String m_aInvalidString;
- String m_aFromDriverString;
DECL_LINK( ActivatePage, TabControl* );
DECL_LINK( ClickButton, Button* );
@@ -115,20 +114,12 @@ class RTSDevicePage : public TabPage
String m_aSpaceColor;
String m_aSpaceGray;
- FixedText m_aPPDKeyText;
- ListBox m_aPPDKeyBox;
+ ListBox* m_pPPDKeyBox;
+ ListBox* m_pPPDValueBox;
- FixedText m_aPPDValueText;
- ListBox m_aPPDValueBox;
-
- FixedText m_aLevelText;
- ListBox m_aLevelBox;
-
- FixedText m_aSpaceText;
- ListBox m_aSpaceBox;
-
- FixedText m_aDepthText;
- ListBox m_aDepthBox;
+ ListBox* m_pLevelBox;
+ ListBox* m_pSpaceBox;
+ ListBox* m_pDepthBox;
void FillValueBox( const ::psp::PPDKey* );
@@ -141,12 +132,8 @@ public:
sal_uLong getLevel();
sal_uLong getPDFDevice();
- sal_uLong getDepth() { return m_aDepthBox.GetSelectEntry().ToInt32(); }
- sal_uLong getColorDevice()
- {
- String aSpace( m_aSpaceBox.GetSelectEntry() );
- return aSpace == m_aSpaceColor ? 1 : ( aSpace == m_aSpaceGray ? -1 : 0 );
- }
+ sal_uLong getDepth();
+ sal_uLong getColorDevice();
};
class RTSOtherPage : public TabPage
diff --git a/padmin/source/rtsetup.hrc b/padmin/source/rtsetup.hrc
index ffb26dd6b388..75bf2f9040fe 100644
--- a/padmin/source/rtsetup.hrc
+++ b/padmin/source/rtsetup.hrc
@@ -38,18 +38,6 @@
#define RID_RTS_OTHER_DEFAULT_BTN 11
#define RID_RTS_DEVICEPAGE 4003
-#define RID_RTS_DEVICE_COLOR_TXT 1
-#define RID_RTS_DEVICE_GRAY_TXT 2
-#define RID_RTS_DEVICE_PPDKEY_TXT 3
-#define RID_RTS_DEVICE_PPDKEY_BOX 4
-#define RID_RTS_DEVICE_PPDVALUE_TXT 5
-#define RID_RTS_DEVICE_PPDVALUE_BOX 6
-#define RID_RTS_DEVICE_PRINTLANG_TXT 7
-#define RID_RTS_DEVICE_PRINTLANG_BOX 8
-#define RID_RTS_DEVICE_SPACE_TXT 9
-#define RID_RTS_DEVICE_SPACE_BOX 10
-#define RID_RTS_DEVICE_DEPTH_TXT 11
-#define RID_RTS_DEVICE_DEPTH_BOX 12
#define RID_RTS_PAPERPAGE 4004
#define RID_RTS_PAPER_PAPER_TXT 1
diff --git a/padmin/source/rtsetup.src b/padmin/source/rtsetup.src
index 9449cfd9701b..9005c09686e9 100644
--- a/padmin/source/rtsetup.src
+++ b/padmin/source/rtsetup.src
@@ -56,10 +56,6 @@ TabDialog RID_RTS_RTSDIALOG
};
};
};
- String RID_RTS_RTSDIALOG_FROMDRIVER_TXT
- {
- Text [ en-US ] = "from driver";
- };
String RID_RTS_RTSDIALOG_INVALID_TXT
{
Text [ en-US ] = "<ignore>";
@@ -130,103 +126,6 @@ TabPage RID_RTS_PAPERPAGE
};
};
-TabPage RID_RTS_DEVICEPAGE
-{
- HelpID = "padmin:TabPage:RID_RTS_DEVICEPAGE";
- Hide = TRUE;
- Size = MAP_APPFONT( 230, 175 );
-
- String RID_RTS_DEVICE_COLOR_TXT
- {
- Text [ en-US ] = "Color";
- };
- String RID_RTS_DEVICE_GRAY_TXT
- {
- Text [ en-US ] = "Grayscale";
- };
-
- FixedText RID_RTS_DEVICE_PPDKEY_TXT
- {
- Pos = MAP_APPFONT( 5, 5 );
- Size = MAP_APPFONT( 85, 8 );
- Text [ en-US ] = "~Option";
- };
- ListBox RID_RTS_DEVICE_PPDKEY_BOX
- {
- HelpID = "padmin:ListBox:RID_RTS_DEVICEPAGE:RID_RTS_DEVICE_PPDKEY_BOX";
- Border = TRUE;
- Pos = MAP_APPFONT( 5, 14 );
- Size = MAP_APPFONT( 105, 111 );
- };
- FixedText RID_RTS_DEVICE_PPDVALUE_TXT
- {
- Pos = MAP_APPFONT( 120, 5 );
- Size = MAP_APPFONT( 105, 8 );
- Text [ en-US ] = "Current ~value";
- };
- ListBox RID_RTS_DEVICE_PPDVALUE_BOX
- {
- HelpID = "padmin:ListBox:RID_RTS_DEVICEPAGE:RID_RTS_DEVICE_PPDVALUE_BOX";
- Border = TRUE;
- Pos = MAP_APPFONT( 120, 14 );
- Size = MAP_APPFONT( 105, 111 );
- };
-
- FixedText RID_RTS_DEVICE_PRINTLANG_TXT
- {
- Pos = MAP_APPFONT( 5, 130 );
- Size = MAP_APPFONT( 100, 8 );
- Text [ en-US ] = "Printer ~Language type";
- };
- ListBox RID_RTS_DEVICE_PRINTLANG_BOX
- {
- HelpID = "padmin:ListBox:RID_RTS_DEVICEPAGE:RID_RTS_DEVICE_LEVEL_BOX";
- DropDown = TRUE;
- Pos = MAP_APPFONT( 120, 130 );
- Size = MAP_APPFONT( 105, 200 );
- StringList [en-US] =
- {
- < "Automatic : %s" ; 0; > ;
- < "PostScript (Level from driver)" ; 1; > ;
- < "PostScript Level 1" ; 2; > ;
- < "PostScript Level 2"; 3; > ;
- < "PostScript Level 3"; 4; > ;
- < "PDF"; 10; > ;
- };
- };
- FixedText RID_RTS_DEVICE_SPACE_TXT
- {
- Pos = MAP_APPFONT( 5, 145 );
- Size = MAP_APPFONT( 100, 8 );
- Text [ en-US ] = "~Color";
- };
- ListBox RID_RTS_DEVICE_SPACE_BOX
- {
- HelpID = "padmin:ListBox:RID_RTS_DEVICEPAGE:RID_RTS_DEVICE_SPACE_BOX";
- DropDown = TRUE;
- Pos = MAP_APPFONT( 120, 145 );
- Size = MAP_APPFONT( 105, 200 );
- };
- FixedText RID_RTS_DEVICE_DEPTH_TXT
- {
- Pos = MAP_APPFONT( 5, 160 );
- Size = MAP_APPFONT( 80, 8 );
- Text [ en-US ] = "Color ~depth";
- };
- ListBox RID_RTS_DEVICE_DEPTH_BOX
- {
- HelpID = "padmin:ListBox:RID_RTS_DEVICEPAGE:RID_RTS_DEVICE_DEPTH_BOX";
- DropDown = TRUE;
- Pos = MAP_APPFONT( 120, 160 );
- Size = MAP_APPFONT( 105, 200 );
- StringList =
- {
- "8 Bit";
- "24 Bit";
- };
- };
-};
-
TabPage RID_RTS_FONTSUBSTPAGE
{
HelpID = "padmin:TabPage:RID_RTS_FONTSUBSTPAGE";
diff --git a/padmin/uiconfig/ui/printerdevicepage.ui b/padmin/uiconfig/ui/printerdevicepage.ui
new file mode 100644
index 000000000000..dbd3c3f3dda3
--- /dev/null
+++ b/padmin/uiconfig/ui/printerdevicepage.ui
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkGrid" id="PrinterDevicePage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Option</property>
+ <property name="use_underline">True</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Current _value</property>
+ <property name="use_underline">True</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Printer _Language type</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Color</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Color _depth</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="colorspace">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">From driver</item>
+ <item translatable="yes">Color</item>
+ <item translatable="yes">Grayscale</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="colordepth">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">8 Bit</item>
+ <item translatable="yes">24 Bit</item>
+ </items>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBox" id="level">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="model">liststore1</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="options">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTreeView" id="values">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection2"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name gint1 -->
+ <column type="gint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Automatic : %s</col>
+ <col id="1">0</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">PostScript (Level from driver)</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">PostScript Level 1</col>
+ <col id="1">2</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">PostScript Level 2</col>
+ <col id="1">3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">PostScript Level 3</col>
+ <col id="1">4</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">PDF</col>
+ <col id="1">10</col>
+ </row>
+ </data>
+ </object>
+</interface>
diff --git a/padmin/uiconfig/ui/printerproperties.ui b/padmin/uiconfig/ui/printerproperties.ui
index 47c71a80707c..f78d12c7883c 100644
--- a/padmin/uiconfig/ui/printerproperties.ui
+++ b/padmin/uiconfig/ui/printerproperties.ui
@@ -1,13 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
- <object class="GtkWindow" id="printer property">
+ <object class="GtkDialog" id="dialog1">
<property name="can_focus">False</property>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
+ <property name="border_width">5</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
<child>
<object class="GtkNotebook" id="notebook1">
<property name="visible">True</property>
@@ -16,13 +62,18 @@
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">10</property>
- <property name="column_spacing">25</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="column_homogeneous">True</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Paper Size</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Paper size</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -35,7 +86,9 @@
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Orientataion </property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Orientataion</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -48,7 +101,9 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Duplex</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Duplex</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -61,7 +116,9 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="xalign">0</property>
<property name="label" translatable="yes">Paper tray</property>
+ <property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
@@ -139,213 +196,10 @@
</packing>
</child>
<child>
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">10</property>
- <property name="column_spacing">30</property>
- <child>
- <object class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Option </property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Current value</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="width_request">100</property>
- <property name="height_request">150</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="width_request">140</property>
- <property name="height_request">150</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Printer Language type </property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Color</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Color depth</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext6">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="comboboxtext7">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
</child>
<child type="tab">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Device</property>
- </object>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox" id="buttonbox1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button1">
- <property name="label">gtk-ok</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label">gtk-cancel</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
+ <placeholder/>
</child>
</object>
<packing>
@@ -356,5 +210,9 @@
</child>
</object>
</child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
</object>
</interface>