summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-18 21:06:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-19 09:53:55 +0200
commitcc7cb945846e5b476de917bb90976a4fca175ad1 (patch)
treed50e5a6bb05f1f4dfa0c4b85360ea21e13cd8452 /svx
parent8c9c1b852ce0ebc6bd19437e9e583ef4226cf685 (diff)
weld CompressGraphicsDialog
Change-Id: I593e6f0fe2e002c75ecd367a38dda96e7e6552f9 Reviewed-on: https://gerrit.libreoffice.org/53125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx209
-rw-r--r--svx/uiconfig/ui/compressgraphicdialog.ui53
2 files changed, 117 insertions, 145 deletions
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 92edf6e78d48..72ee8732f924 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -39,23 +39,23 @@
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
-CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ) :
- ModalDialog ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ),
- m_pGraphicObj ( pGraphicObj ),
+CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, SdrGrafObj* pGraphicObj, SfxBindings& rBindings ) :
+ GenericDialogController( pParent, "svx/ui/compressgraphicdialog.ui", "CompressGraphicDialog" ),
+ m_xGraphicObj ( pGraphicObj ),
m_aGraphic ( pGraphicObj->GetGraphicObject().GetGraphic() ),
m_aViewSize100mm ( pGraphicObj->GetLogicRect().GetSize() ),
m_rBindings ( rBindings ),
m_dResolution ( 96.0 )
{
- const SdrGrafCropItem& rCrop = m_pGraphicObj->GetMergedItem(SDRATTR_GRAFCROP);
+ const SdrGrafCropItem& rCrop = m_xGraphicObj->GetMergedItem(SDRATTR_GRAFCROP);
m_aCropRectangle = tools::Rectangle(rCrop.GetLeft(), rCrop.GetTop(), rCrop.GetRight(), rCrop.GetBottom());
Initialize();
}
-CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic const & rGraphic, Size rViewSize100mm, tools::Rectangle const & rCropRectangle, SfxBindings& rBindings ) :
- ModalDialog ( pParent, "CompressGraphicDialog", "svx/ui/compressgraphicdialog.ui" ),
- m_pGraphicObj ( nullptr ),
+CompressGraphicsDialog::CompressGraphicsDialog( weld::Window* pParent, Graphic const & rGraphic, Size rViewSize100mm, tools::Rectangle const & rCropRectangle, SfxBindings& rBindings ) :
+ GenericDialogController( pParent, "svx/ui/compressgraphicdialog.ui", "CompressGraphicDialog" ),
+ m_xGraphicObj ( nullptr ),
m_aGraphic ( rGraphic ),
m_aViewSize100mm ( rViewSize100mm ),
m_aCropRectangle ( rCropRectangle ),
@@ -67,75 +67,50 @@ CompressGraphicsDialog::CompressGraphicsDialog( vcl::Window* pParent, Graphic co
CompressGraphicsDialog::~CompressGraphicsDialog()
{
- disposeOnce();
-}
-
-void CompressGraphicsDialog::dispose()
-{
- m_pLabelGraphicType.clear();
- m_pFixedText2.clear();
- m_pFixedText3.clear();
- m_pFixedText5.clear();
- m_pFixedText6.clear();
- m_pReduceResolutionCB.clear();
- m_pMFNewWidth.clear();
- m_pMFNewHeight.clear();
- m_pResolutionLB.clear();
- m_pLosslessRB.clear();
- m_pJpegCompRB.clear();
- m_pCompressionMF.clear();
- m_pQualityMF.clear();
- m_pBtnCalculate.clear();
- m_pInterpolationCombo.clear();
- m_pCompressionSlider.clear();
- m_pQualitySlider.clear();
- ModalDialog::dispose();
}
void CompressGraphicsDialog::Initialize()
{
- get(m_pLabelGraphicType, "label-graphic-type");
- get(m_pFixedText2, "label-original-size");
- get(m_pFixedText3, "label-view-size");
- get(m_pFixedText5, "label-image-capacity");
- get(m_pFixedText6, "label-new-capacity");
- get(m_pJpegCompRB, "radio-jpeg");
- get(m_pCompressionMF, "spin-compression");
- get(m_pCompressionSlider, "scale-compression");
- get(m_pLosslessRB, "radio-lossless");
- get(m_pQualityMF, "spin-quality");
- get(m_pQualitySlider, "scale-quality");
- get(m_pReduceResolutionCB, "checkbox-reduce-resolution");
- get(m_pMFNewWidth, "spin-new-width");
- get(m_pMFNewHeight, "spin-new-height");
- get(m_pResolutionLB, "combo-resolution");
- get(m_pBtnCalculate, "calculate");
- get(m_pInterpolationCombo, "interpolation-method-combo");
-
- m_pInterpolationCombo->SelectEntry( "Lanczos" );
-
- m_pInterpolationCombo->SetSelectHdl( LINK( this, CompressGraphicsDialog, NewInterpolationModifiedHdl ));
-
- m_pMFNewWidth->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewWidthModifiedHdl ));
- m_pMFNewHeight->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewHeightModifiedHdl ));
-
- m_pResolutionLB->SetModifyHdl( LINK( this, CompressGraphicsDialog, ResolutionModifiedHdl ));
- m_pBtnCalculate->SetClickHdl( LINK( this, CompressGraphicsDialog, CalculateClickHdl ) );
-
- m_pLosslessRB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
- m_pJpegCompRB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
-
- m_pReduceResolutionCB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleReduceResolutionRB ) );
-
- m_pQualitySlider->SetLinkedField(m_pQualityMF);
- m_pQualitySlider->SetEndSlideHdl( LINK( this, CompressGraphicsDialog, EndSlideHdl ));
- m_pCompressionSlider->SetLinkedField(m_pCompressionMF);
- m_pCompressionSlider->SetEndSlideHdl( LINK( this, CompressGraphicsDialog, EndSlideHdl ));
- m_pQualityMF->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewQualityModifiedHdl ));
- m_pCompressionMF->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewCompressionModifiedHdl ));
-
- m_pJpegCompRB->Check();
- m_pReduceResolutionCB->Check();
+ m_xLabelGraphicType.reset(m_xBuilder->weld_label("label-graphic-type"));
+ m_xFixedText2.reset(m_xBuilder->weld_label("label-original-size"));
+ m_xFixedText3.reset(m_xBuilder->weld_label("label-view-size"));
+ m_xFixedText5.reset(m_xBuilder->weld_label("label-image-capacity"));
+ m_xFixedText6.reset(m_xBuilder->weld_label("label-new-capacity"));
+ m_xJpegCompRB.reset(m_xBuilder->weld_radio_button("radio-jpeg"));
+ m_xCompressionMF.reset(m_xBuilder->weld_spin_button("spin-compression"));
+ m_xCompressionSlider.reset(m_xBuilder->weld_scale("scale-compression"));
+ m_xLosslessRB.reset(m_xBuilder->weld_radio_button("radio-lossless"));
+ m_xQualityMF.reset(m_xBuilder->weld_spin_button("spin-quality"));
+ m_xQualitySlider.reset(m_xBuilder->weld_scale("scale-quality"));
+ m_xReduceResolutionCB.reset(m_xBuilder->weld_check_button("checkbox-reduce-resolution"));
+ m_xMFNewWidth.reset(m_xBuilder->weld_spin_button("spin-new-width"));
+ m_xMFNewHeight.reset(m_xBuilder->weld_spin_button("spin-new-height"));
+ m_xResolutionLB.reset(m_xBuilder->weld_combo_box_text("combo-resolution"));
+ m_xBtnCalculate.reset(m_xBuilder->weld_button("calculate"));
+ m_xInterpolationCombo.reset(m_xBuilder->weld_combo_box_text("interpolation-method-combo"));
+
+ m_xInterpolationCombo->set_active("Lanczos");
+
+ m_xInterpolationCombo->connect_changed(LINK(this, CompressGraphicsDialog, NewInterpolationModifiedHdl));
+
+ m_xMFNewWidth->connect_changed( LINK( this, CompressGraphicsDialog, NewWidthModifiedHdl ));
+ m_xMFNewHeight->connect_changed( LINK( this, CompressGraphicsDialog, NewHeightModifiedHdl ));
+
+ m_xResolutionLB->connect_changed( LINK( this, CompressGraphicsDialog, ResolutionModifiedHdl ));
+ m_xBtnCalculate->connect_clicked( LINK( this, CompressGraphicsDialog, CalculateClickHdl ) );
+
+ m_xLosslessRB->connect_toggled( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
+ m_xJpegCompRB->connect_toggled( LINK( this, CompressGraphicsDialog, ToggleCompressionRB ) );
+
+ m_xReduceResolutionCB->connect_toggled( LINK( this, CompressGraphicsDialog, ToggleReduceResolutionRB ) );
+
+ m_xQualitySlider->connect_value_changed( LINK( this, CompressGraphicsDialog, SlideHdl ));
+ m_xCompressionSlider->connect_value_changed( LINK( this, CompressGraphicsDialog, SlideHdl ));
+ m_xQualityMF->connect_changed( LINK( this, CompressGraphicsDialog, NewQualityModifiedHdl ));
+ m_xCompressionMF->connect_changed( LINK( this, CompressGraphicsDialog, NewCompressionModifiedHdl ));
+
+ m_xJpegCompRB->set_active(true);
+ m_xReduceResolutionCB->set_active(true);
UpdateNewWidthMF();
UpdateNewHeightMF();
@@ -180,7 +155,7 @@ void CompressGraphicsDialog::Update()
aGraphicTypeString = SvxResId(STR_IMAGE_UNKNOWN);
break;
}
- m_pLabelGraphicType->SetText(aGraphicTypeString);
+ m_xLabelGraphicType->set_label(aGraphicTypeString);
const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit();
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
@@ -200,7 +175,7 @@ void CompressGraphicsDialog::Update()
aBitmapSizeString = aBitmapSizeString.replaceAll("$(HEIGHT)", aHeightString);
aBitmapSizeString = aBitmapSizeString.replaceAll("$(WIDTH_IN_PX)", OUString::number(aPixelSize.Width()));
aBitmapSizeString = aBitmapSizeString.replaceAll("$(HEIGHT_IN_PX)", OUString::number(aPixelSize.Height()));
- m_pFixedText2->SetText(aBitmapSizeString);
+ m_xFixedText2->set_label(aBitmapSizeString);
int aValX = static_cast<int>(aPixelSize.Width() / GetViewWidthInch());
@@ -211,7 +186,7 @@ void CompressGraphicsDialog::Update()
aViewSizeString = aViewSizeString.replaceAll("$(WIDTH)", aWidthString);
aViewSizeString = aViewSizeString.replaceAll("$(HEIGHT)", aHeightString);
aViewSizeString = aViewSizeString.replaceAll("$(DPI)", OUString::number(aValX));
- m_pFixedText3->SetText(aViewSizeString);
+ m_xFixedText3->set_label(aViewSizeString);
SvMemoryStream aMemStream;
aMemStream.SetVersion( SOFFICE_FILEFORMAT_CURRENT );
@@ -221,26 +196,26 @@ void CompressGraphicsDialog::Update()
OUString aNativeSizeString = SvxResId(STR_IMAGE_CAPACITY);
aNativeSizeString = aNativeSizeString.replaceAll("$(CAPACITY)", OUString::number(aNativeSize / 1024));
- m_pFixedText5->SetText(aNativeSizeString);
+ m_xFixedText5->set_label(aNativeSizeString);
- m_pFixedText6->SetText("??");
+ m_xFixedText6->set_label("??");
}
void CompressGraphicsDialog::UpdateNewWidthMF()
{
int nPixelX = static_cast<sal_Int32>( GetViewWidthInch() * m_dResolution );
- m_pMFNewWidth->SetText( OUString::number( nPixelX ));
+ m_xMFNewWidth->set_value(nPixelX);
}
void CompressGraphicsDialog::UpdateNewHeightMF()
{
int nPixelY = static_cast<sal_Int32>( GetViewHeightInch() * m_dResolution );
- m_pMFNewHeight->SetText( OUString::number( nPixelY ));
+ m_xMFNewHeight->set_value(nPixelY);
}
void CompressGraphicsDialog::UpdateResolutionLB()
{
- m_pResolutionLB->SetText( OUString::number( static_cast<sal_Int32>(m_dResolution) ) );
+ m_xResolutionLB->set_entry_text( OUString::number( static_cast<sal_Int32>(m_dResolution) ) );
}
double CompressGraphicsDialog::GetViewWidthInch()
@@ -255,7 +230,7 @@ double CompressGraphicsDialog::GetViewHeightInch()
BmpScaleFlag CompressGraphicsDialog::GetSelectedInterpolationType()
{
- OUString aSelectionText = m_pInterpolationCombo->GetSelectedEntry();
+ OUString aSelectionText = m_xInterpolationCombo->get_active_text();
if( aSelectionText == "Lanczos" ) {
return BmpScaleFlag::Lanczos;
@@ -272,7 +247,7 @@ BmpScaleFlag CompressGraphicsDialog::GetSelectedInterpolationType()
void CompressGraphicsDialog::Compress(SvStream& aStream)
{
BitmapEx aBitmap = m_aGraphic.GetBitmapEx();
- if ( m_pReduceResolutionCB->IsChecked() )
+ if ( m_xReduceResolutionCB->get_active() )
{
long nPixelX = static_cast<long>( GetViewWidthInch() * m_dResolution );
long nPixelY = static_cast<long>( GetViewHeightInch() * m_dResolution );
@@ -286,88 +261,90 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
aFilterData[ 0 ].Name = "Interlaced";
aFilterData[ 0 ].Value <<= sal_Int32(0);
aFilterData[ 1 ].Name = "Compression";
- aFilterData[ 1 ].Value <<= static_cast<sal_Int32>(m_pCompressionMF->GetValue());
+ aFilterData[ 1 ].Value <<= static_cast<sal_Int32>(m_xCompressionMF->get_value());
aFilterData[ 2 ].Name = "Quality";
- aFilterData[ 2 ].Value <<= static_cast<sal_Int32>(m_pQualityMF->GetValue());
+ aFilterData[ 2 ].Value <<= static_cast<sal_Int32>(m_xQualityMF->get_value());
- OUString aGraphicFormatName = m_pLosslessRB->IsChecked() ? OUString( "png" ) : OUString( "jpg" );
+ OUString aGraphicFormatName = m_xLosslessRB->get_active() ? OUString( "png" ) : OUString( "jpg" );
sal_uInt16 nFilterFormat = rFilter.GetExportFormatNumberForShortName( aGraphicFormatName );
rFilter.ExportGraphic( aScaledGraphic, "none", aStream, nFilterFormat, &aFilterData );
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, NewWidthModifiedHdl, Edit&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, NewWidthModifiedHdl, weld::Entry&, void )
{
- fprintf(stderr, "NewWidthModifiedHdl\n");
-
- m_dResolution = m_pMFNewWidth->GetValue() / GetViewWidthInch();
+ m_dResolution = m_xMFNewWidth->get_value() / GetViewWidthInch();
UpdateNewHeightMF();
UpdateResolutionLB();
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, EndSlideHdl, Slider*, void )
+IMPL_LINK( CompressGraphicsDialog, SlideHdl, weld::Scale&, rScale, void )
{
+ if (&rScale == m_xQualitySlider.get())
+ m_xQualityMF->set_value(m_xQualitySlider->get_value());
+ else
+ m_xCompressionMF->set_value(m_xCompressionSlider->get_value());
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, NewInterpolationModifiedHdl, ListBox&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, NewInterpolationModifiedHdl, weld::ComboBoxText&, void )
{
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, NewQualityModifiedHdl, Edit&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, NewQualityModifiedHdl, weld::Entry&, void )
{
- m_pQualitySlider->SetThumbPos(m_pQualityMF->GetValue());
+ m_xQualitySlider->set_value(m_xQualityMF->get_value());
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, NewCompressionModifiedHdl, Edit&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, NewCompressionModifiedHdl, weld::Entry&, void )
{
- m_pCompressionSlider->SetThumbPos(m_pCompressionMF->GetValue());
+ m_xCompressionSlider->set_value(m_xCompressionMF->get_value());
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl, Edit&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl, weld::Entry&, void )
{
- m_dResolution = m_pMFNewHeight->GetValue() / GetViewHeightInch();
+ m_dResolution = m_xMFNewHeight->get_value() / GetViewHeightInch();
UpdateNewWidthMF();
UpdateResolutionLB();
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl, Edit&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl, weld::ComboBoxText&, void )
{
- m_dResolution = static_cast<double>(m_pResolutionLB->GetText().toInt32());
+ m_dResolution = static_cast<double>(m_xResolutionLB->get_active_text().toInt32());
UpdateNewWidthMF();
UpdateNewHeightMF();
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleCompressionRB, RadioButton&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleCompressionRB, weld::ToggleButton&, void )
{
- bool choice = m_pLosslessRB->IsChecked();
- m_pCompressionMF->Enable(choice);
- m_pCompressionSlider->Enable(choice);
- m_pQualityMF->Enable(!choice);
- m_pQualitySlider->Enable(!choice);
+ bool choice = m_xLosslessRB->get_active();
+ m_xCompressionMF->set_sensitive(choice);
+ m_xCompressionSlider->set_sensitive(choice);
+ m_xQualityMF->set_sensitive(!choice);
+ m_xQualitySlider->set_sensitive(!choice);
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleReduceResolutionRB, CheckBox&, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, ToggleReduceResolutionRB, weld::ToggleButton&, void )
{
- bool choice = m_pReduceResolutionCB->IsChecked();
- m_pMFNewWidth->Enable(choice);
- m_pMFNewHeight->Enable(choice);
- m_pResolutionLB->Enable(choice);
- m_pInterpolationCombo->Enable(choice);
+ bool choice = m_xReduceResolutionCB->get_active();
+ m_xMFNewWidth->set_sensitive(choice);
+ m_xMFNewHeight->set_sensitive(choice);
+ m_xResolutionLB->set_sensitive(choice);
+ m_xInterpolationCombo->set_sensitive(choice);
Update();
}
-IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl, Button*, void )
+IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl, weld::Button&, void )
{
sal_Int32 aSize = 0;
@@ -386,13 +363,13 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, CalculateClickHdl, Button*, void )
OUString aNewSizeString = SvxResId(STR_IMAGE_CAPACITY);
aNewSizeString = aNewSizeString.replaceAll("$(CAPACITY)", aSizeAsString);
- m_pFixedText6->SetText(aNewSizeString);
+ m_xFixedText6->set_label(aNewSizeString);
}
}
tools::Rectangle CompressGraphicsDialog::GetScaledCropRectangle()
{
- if ( m_pReduceResolutionCB->IsChecked() )
+ if ( m_xReduceResolutionCB->get_active() )
{
long nPixelX = static_cast<long>( GetViewWidthInch() * m_dResolution );
long nPixelY = static_cast<long>( GetViewHeightInch() * m_dResolution );
@@ -433,9 +410,9 @@ SdrGrafObj* CompressGraphicsDialog::GetCompressedSdrGrafObj()
{
if ( m_dResolution > 0.0 )
{
- SdrGrafObj* pNewObject = m_pGraphicObj->Clone();
+ SdrGrafObj* pNewObject = m_xGraphicObj->Clone();
- if ( m_pReduceResolutionCB->IsChecked() )
+ if ( m_xReduceResolutionCB->get_active() )
{
tools::Rectangle aScaledCropedRectangle = GetScaledCropRectangle();
SdrGrafCropItem aNewCrop(
diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui b/svx/uiconfig/ui/compressgraphicdialog.ui
index 0f4a81af5190..14dd0a1c7bb5 100644
--- a/svx/uiconfig/ui/compressgraphicdialog.ui
+++ b/svx/uiconfig/ui/compressgraphicdialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
+<!-- Generated with glade 3.20.4 -->
<interface domain="svx">
<requires lib="gtk+" version="3.18"/>
<object class="GtkAdjustment" id="compression-adjustment">
@@ -16,26 +16,6 @@
<property name="step_increment">100</property>
<property name="page_increment">100</property>
</object>
- <object class="GtkListStore" id="interpolation-method-store">
- <columns>
- <!-- column-name scale-method-name -->
- <column type="gchararray"/>
- </columns>
- <data>
- <row>
- <col id="0" translatable="yes" context="compressgraphicdialog|interpolation-method-store">None</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="compressgraphicdialog|interpolation-method-store">Bilinear</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="compressgraphicdialog|interpolation-method-store">Bicubic</col>
- </row>
- <row>
- <col id="0" translatable="yes" context="compressgraphicdialog|interpolation-method-store">Lanczos</col>
- </row>
- </data>
- </object>
<object class="GtkAdjustment" id="quality-adjustment">
<property name="lower">1</property>
<property name="upper">99</property>
@@ -56,6 +36,8 @@
<property name="title" translatable="yes" context="compressgraphicdialog|CompressGraphicDialog">Compress Image</property>
<property name="resizable">False</property>
<property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">9</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -151,8 +133,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="compressgraphicdialog|radio-jpeg|tooltip_text">Lossy compression</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
<property name="group">radio-lossless</property>
@@ -168,8 +150,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
- <property name="use_underline">True</property>
<property name="tooltip_text" translatable="yes" context="compressgraphicdialog|radio-lossless|tooltip_text">Lossless compression</property>
+ <property name="use_underline">True</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
@@ -209,7 +191,8 @@
<object class="GtkSpinButton" id="spin-quality">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="text" translatable="no">90</property>
+ <property name="activates_default">True</property>
+ <property name="text">90</property>
<property name="adjustment">quality-adjustment</property>
<property name="numeric">True</property>
<property name="value">90</property>
@@ -256,7 +239,8 @@
<object class="GtkSpinButton" id="spin-compression">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="text" translatable="no">9</property>
+ <property name="activates_default">True</property>
+ <property name="text">9</property>
<property name="adjustment">compression-adjustment</property>
<property name="numeric">True</property>
<property name="value">9</property>
@@ -393,7 +377,8 @@
<object class="GtkSpinButton" id="spin-new-width">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="text" translatable="no">1</property>
+ <property name="activates_default">True</property>
+ <property name="text">1</property>
<property name="adjustment">width-adjustment</property>
<property name="numeric">True</property>
<property name="value">1</property>
@@ -407,7 +392,8 @@
<object class="GtkSpinButton" id="spin-new-height">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="text" translatable="no">1</property>
+ <property name="activates_default">True</property>
+ <property name="text">1</property>
<property name="adjustment">height-adjustment</property>
<property name="numeric">True</property>
<property name="value">1</property>
@@ -434,6 +420,7 @@
<child internal-child="entry">
<object class="GtkEntry">
<property name="can_focus">True</property>
+ <property name="activates_default">True</property>
</object>
</child>
</object>
@@ -443,10 +430,15 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="interpolation-method-combo">
+ <object class="GtkComboBoxText" id="interpolation-method-combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="model">interpolation-method-store</property>
+ <items>
+ <item translatable="yes" context="compressgraphicdialog|interpolation-method-store">None</item>
+ <item translatable="yes" context="compressgraphicdialog|interpolation-method-store">Bilinear</item>
+ <item translatable="yes" context="compressgraphicdialog|interpolation-method-store">Bicubic</item>
+ <item translatable="yes" context="compressgraphicdialog|interpolation-method-store">Lanczos</item>
+ </items>
</object>
<packing>
<property name="left_attach">1</property>
@@ -693,5 +685,8 @@
<action-widget response="-5">ok</action-widget>
<action-widget response="-6">cancel</action-widget>
</action-widgets>
+ <child>
+ <placeholder/>
+ </child>
</object>
</interface>