svx/uiconfig/ui/compressgraphicdialog.ui | 415 +++++++++++++++---------------- vcl/CustomTarget_qt5_moc.mk | 1 vcl/CustomTarget_qt6_moc.mk | 1 vcl/Library_vclplug_qt5.mk | 1 vcl/Library_vclplug_qt6.mk | 1 vcl/inc/qt5/QtBuilder.hxx | 2 vcl/inc/qt5/QtInstanceBuilder.hxx | 2 vcl/inc/qt5/QtInstanceScale.hxx | 36 ++ vcl/inc/qt6/QtInstanceScale.hxx | 12 vcl/qt5/QtBuilder.cxx | 33 ++ vcl/qt5/QtInstanceBuilder.cxx | 9 vcl/qt5/QtInstanceScale.cxx | 73 +++++ vcl/qt6/QtInstanceScale.cxx | 12 13 files changed, 385 insertions(+), 213 deletions(-)
New commits: commit 255cbbed8bbac810889329676dc14e7a7b04f765 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Dec 20 09:42:04 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Dec 20 12:07:10 2024 +0100 tdf#130857 qt weld: Apply GtkScale/slider properties from .ui file Change-Id: I6f7de7e27ee87a5b50e38f5c763288b0e010d8f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178874 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/inc/qt5/QtBuilder.hxx b/vcl/inc/qt5/QtBuilder.hxx index db4505902380..d962a26c983b 100644 --- a/vcl/inc/qt5/QtBuilder.hxx +++ b/vcl/inc/qt5/QtBuilder.hxx @@ -19,6 +19,7 @@ #include <QtWidgets/QMenu> #include <QtWidgets/QMessageBox> #include <QtWidgets/QPushButton> +#include <QtWidgets/QSlider> #include <rtl/ustring.hxx> #include <unotools/resmgr.hxx> @@ -96,6 +97,7 @@ private: static void replaceWidget(QWidget* pOldWidget, QWidget* pNewWidget); void setProperties(QObject* obj, stringmap& rProps); static void setLabelProperties(QLabel& rLabel, stringmap& rProps); + void setScaleProperties(QSlider& rSlider, stringmap& rProps); void setSpinButtonProperties(QDoubleSpinBox& rSpinBox, stringmap& rProps); static QWidget* windowForObject(QObject* pObject); static QDialogButtonBox* findButtonBox(QDialog* pDialog); diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index 0146526908ce..8d37ea196caf 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -302,7 +302,9 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: } else if (sName == u"GtkScale") { - pObject = new QSlider(pParentWidget); + QSlider* pSlider = new QSlider(pParentWidget); + setScaleProperties(*pSlider, rMap); + pObject = pSlider; } else if (sName == u"GtkSpinButton") { @@ -795,6 +797,32 @@ void QtBuilder::setLabelProperties(QLabel& rLabel, stringmap& rProps) } } +void QtBuilder::setScaleProperties(QSlider& rSlider, stringmap& rProps) +{ + if (!hasOrientationVertical(rProps)) + rSlider.setOrientation(Qt::Horizontal); + + auto aAdjustmentIt = rProps.find("adjustment"); + if (aAdjustmentIt != rProps.end()) + { + const Adjustment* pAdjustment = get_adjustment_by_name(aAdjustmentIt->second); + assert(pAdjustment && "referenced adjustment doesn't exist"); + for (auto const & [ rKey, rValue ] : *pAdjustment) + { + if (rKey == u"upper") + rSlider.setMaximum(rValue.toInt32()); + else if (rKey == u"lower") + rSlider.setMinimum(rValue.toInt32()); + else if (rKey == "value") + rSlider.setValue(rValue.toInt32()); + else if (rKey == "page-increment") + rSlider.setPageStep(rValue.toInt32()); + else if (rKey == "step-increment") + rSlider.setSingleStep(rValue.toInt32()); + } + } +} + void QtBuilder::setSpinButtonProperties(QDoubleSpinBox& rSpinBox, stringmap& rProps) { auto aDigitsIt = rProps.find(u"digits"_ustr); commit 9bce3ab468b7840a0aef682ff7c2ecfff6749822 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Dec 19 21:19:31 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Dec 20 12:07:04 2024 +0100 tdf#130857 qt weld: Add QtInstanceScale QSlider [1] is the Qt equivalent for GtkScale [2], so use it. [1] https://doc.qt.io/qt-6/qslider.html [2] https://docs.gtk.org/gtk4/class.Scale.html Change-Id: I0d04b4db0b4531daba1e1110879acf85aff53aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178867 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/CustomTarget_qt5_moc.mk b/vcl/CustomTarget_qt5_moc.mk index b6c6ee2b51f4..17c91545cdb0 100644 --- a/vcl/CustomTarget_qt5_moc.mk +++ b/vcl/CustomTarget_qt5_moc.mk @@ -33,6 +33,7 @@ $(call gb_CustomTarget_get_target,vcl/qt5) : \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceNotebook.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceProgressBar.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceRadioButton.moc \ + $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceScale.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceScrolledWindow.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceSpinButton.moc \ $(gb_CustomTarget_workdir)/vcl/qt5/QtInstanceTextView.moc \ diff --git a/vcl/CustomTarget_qt6_moc.mk b/vcl/CustomTarget_qt6_moc.mk index 5b1c4e351143..214a17952bc4 100644 --- a/vcl/CustomTarget_qt6_moc.mk +++ b/vcl/CustomTarget_qt6_moc.mk @@ -33,6 +33,7 @@ $(call gb_CustomTarget_get_target,vcl/qt6) : \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceNotebook.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceProgressBar.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceRadioButton.moc \ + $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceScale.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceScrolledWindow.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceSpinButton.moc \ $(gb_CustomTarget_workdir)/vcl/qt6/QtInstanceTextView.moc \ diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk index 096cb97ae889..b260c4fae083 100644 --- a/vcl/Library_vclplug_qt5.mk +++ b/vcl/Library_vclplug_qt5.mk @@ -119,6 +119,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt5,\ vcl/qt5/QtInstanceNotebook \ vcl/qt5/QtInstanceProgressBar \ vcl/qt5/QtInstanceRadioButton \ + vcl/qt5/QtInstanceScale \ vcl/qt5/QtInstanceScrolledWindow \ vcl/qt5/QtInstanceSpinButton \ vcl/qt5/QtInstanceTextView \ diff --git a/vcl/Library_vclplug_qt6.mk b/vcl/Library_vclplug_qt6.mk index 910d6367c899..56bab58a2918 100644 --- a/vcl/Library_vclplug_qt6.mk +++ b/vcl/Library_vclplug_qt6.mk @@ -118,6 +118,7 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_qt6,\ vcl/qt6/QtInstanceNotebook \ vcl/qt6/QtInstanceProgressBar \ vcl/qt6/QtInstanceRadioButton \ + vcl/qt6/QtInstanceScale \ vcl/qt6/QtInstanceScrolledWindow \ vcl/qt6/QtInstanceSpinButton \ vcl/qt6/QtInstanceTextView \ diff --git a/vcl/inc/qt5/QtInstanceBuilder.hxx b/vcl/inc/qt5/QtInstanceBuilder.hxx index 57fcfc34ba4f..4cf1a59a6b55 100644 --- a/vcl/inc/qt5/QtInstanceBuilder.hxx +++ b/vcl/inc/qt5/QtInstanceBuilder.hxx @@ -50,7 +50,7 @@ public: virtual std::unique_ptr<weld::ToggleButton> weld_toggle_button(const OUString& rId) override; virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OUString& rId) override; virtual std::unique_ptr<weld::CheckButton> weld_check_button(const OUString& rId) override; - virtual std::unique_ptr<weld::Scale> weld_scale(const OUString&) override; + virtual std::unique_ptr<weld::Scale> weld_scale(const OUString& rId) override; virtual std::unique_ptr<weld::ProgressBar> weld_progress_bar(const OUString& rId) override; virtual std::unique_ptr<weld::LevelBar> weld_level_bar(const OUString& rId) override; virtual std::unique_ptr<weld::Spinner> weld_spinner(const OUString&) override; diff --git a/vcl/inc/qt5/QtInstanceScale.hxx b/vcl/inc/qt5/QtInstanceScale.hxx new file mode 100644 index 000000000000..df0d55993607 --- /dev/null +++ b/vcl/inc/qt5/QtInstanceScale.hxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#pragma once + +#include "QtInstanceWidget.hxx" + +#include <QtWidgets/QSlider> + +class QtInstanceScale : public QtInstanceWidget, public virtual weld::Scale +{ + Q_OBJECT + + QSlider* m_pSlider; + +public: + QtInstanceScale(QSlider* pSlider); + + virtual void set_value(int nValue) override; + virtual int get_value() const override; + virtual void set_range(int nMin, int nMax) override; + + virtual void set_increments(int nStep, int nPage) override; + virtual void get_increments(int& rStep, int& rPage) const override; + +private Q_SLOTS: + void handleValueChanged(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/inc/qt6/QtInstanceScale.hxx b/vcl/inc/qt6/QtInstanceScale.hxx new file mode 100644 index 000000000000..16ab92127b93 --- /dev/null +++ b/vcl/inc/qt6/QtInstanceScale.hxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#include "../qt5/QtInstanceScale.hxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt5/QtBuilder.cxx b/vcl/qt5/QtBuilder.cxx index f1e5748c1fa3..0146526908ce 100644 --- a/vcl/qt5/QtBuilder.cxx +++ b/vcl/qt5/QtBuilder.cxx @@ -35,6 +35,7 @@ #include <QtWidgets/QPushButton> #include <QtWidgets/QRadioButton> #include <QtWidgets/QScrollArea> +#include <QtWidgets/QSlider> #include <QtWidgets/QSplitter> #include <QtWidgets/QTabWidget> #include <QtWidgets/QToolButton> @@ -299,6 +300,10 @@ QObject* QtBuilder::makeObject(QObject* pParent, std::u16string_view sName, std: pFrame->setFrameShape(bVertical ? QFrame::VLine : QFrame::HLine); pObject = pFrame; } + else if (sName == u"GtkScale") + { + pObject = new QSlider(pParentWidget); + } else if (sName == u"GtkSpinButton") { QtDoubleSpinBox* pSpinBox = new QtDoubleSpinBox(pParentWidget); diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 248c0e7a7487..afada9c8d9e0 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -28,6 +28,7 @@ #include <QtInstanceNotebook.hxx> #include <QtInstanceProgressBar.hxx> #include <QtInstanceRadioButton.hxx> +#include <QtInstanceScale.hxx> #include <QtInstanceScrolledWindow.hxx> #include <QtInstanceSpinButton.hxx> #include <QtInstanceTextView.hxx> @@ -246,10 +247,12 @@ std::unique_ptr<weld::CheckButton> QtInstanceBuilder::weld_check_button(const OU return xRet; } -std::unique_ptr<weld::Scale> QtInstanceBuilder::weld_scale(const OUString&) +std::unique_ptr<weld::Scale> QtInstanceBuilder::weld_scale(const OUString& rId) { - assert(false && "Not implemented yet"); - return nullptr; + QSlider* pSlider = m_xBuilder->get<QSlider>(rId); + std::unique_ptr<weld::Scale> xRet(pSlider ? std::make_unique<QtInstanceScale>(pSlider) + : nullptr); + return xRet; } std::unique_ptr<weld::ProgressBar> QtInstanceBuilder::weld_progress_bar(const OUString& rId) diff --git a/vcl/qt5/QtInstanceScale.cxx b/vcl/qt5/QtInstanceScale.cxx new file mode 100644 index 000000000000..fe5f832e3dba --- /dev/null +++ b/vcl/qt5/QtInstanceScale.cxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#include <QtInstanceScale.hxx> +#include <QtInstanceScale.moc> + +QtInstanceScale::QtInstanceScale(QSlider* pSlider) + : QtInstanceWidget(pSlider) + , m_pSlider(pSlider) +{ + assert(m_pSlider); + connect(m_pSlider, &QSlider::valueChanged, this, &QtInstanceScale::handleValueChanged); +} + +void QtInstanceScale::set_value(int nValue) +{ + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { m_pSlider->setValue(nValue); }); +} + +int QtInstanceScale::get_value() const +{ + SolarMutexGuard g; + + int nValue; + GetQtInstance().RunInMainThread([&] { nValue = m_pSlider->value(); }); + + return nValue; +} + +void QtInstanceScale::set_range(int nMin, int nMax) +{ + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + m_pSlider->setMinimum(nMin); + m_pSlider->setMaximum(nMax); + }); +} + +void QtInstanceScale::set_increments(int nStep, int nPage) +{ + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + m_pSlider->setSingleStep(nStep); + m_pSlider->setPageStep(nPage); + }); +} +void QtInstanceScale::get_increments(int& rStep, int& rPage) const +{ + SolarMutexGuard g; + + GetQtInstance().RunInMainThread([&] { + rStep = m_pSlider->singleStep(); + rPage = m_pSlider->pageStep(); + }); +} + +void QtInstanceScale::handleValueChanged() +{ + SolarMutexGuard aGuard; + signal_value_changed(); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/vcl/qt6/QtInstanceScale.cxx b/vcl/qt6/QtInstanceScale.cxx new file mode 100644 index 000000000000..c7017117ff9f --- /dev/null +++ b/vcl/qt6/QtInstanceScale.cxx @@ -0,0 +1,12 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * 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/. + */ + +#include "../qt5/QtInstanceScale.cxx" + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ commit f4523f671038d8dd7bce30ae90f8ab2f0337de92 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Dec 20 09:05:18 2024 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Dec 20 12:06:59 2024 +0100 svx: Resave compressgraphicdialog.ui with glade 3.40 To trigger the dialog, right-click on an image in Writer and select the "Compress" context menu entry. Change-Id: Ib0c11475c1cf50762f02f4f6cd0b1e14588a66c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178866 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/svx/uiconfig/ui/compressgraphicdialog.ui b/svx/uiconfig/ui/compressgraphicdialog.ui index 511b3355041f..397f4af5afdc 100644 --- a/svx/uiconfig/ui/compressgraphicdialog.ui +++ b/svx/uiconfig/ui/compressgraphicdialog.ui @@ -1,75 +1,75 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.20.4 --> +<!-- Generated with glade 3.40.0 --> <interface domain="svx"> <requires lib="gtk+" version="3.20"/> - <object class="GtkAdjustment" id="compression-adjustment-spin"> + <object class="GtkAdjustment" id="compression-adjustment-scale"> <property name="lower">1</property> <property name="upper">9</property> <property name="value">6</property> - <property name="step_increment">1</property> - <property name="page_increment">1</property> + <property name="step-increment">1</property> + <property name="page-increment">1</property> </object> - <object class="GtkAdjustment" id="compression-adjustment-scale"> + <object class="GtkAdjustment" id="compression-adjustment-spin"> <property name="lower">1</property> <property name="upper">9</property> <property name="value">6</property> - <property name="step_increment">1</property> - <property name="page_increment">1</property> + <property name="step-increment">1</property> + <property name="page-increment">1</property> </object> <object class="GtkAdjustment" id="height-adjustment"> <property name="lower">1</property> <property name="upper">20000</property> <property name="value">1</property> - <property name="step_increment">100</property> - <property name="page_increment">100</property> + <property name="step-increment">100</property> + <property name="page-increment">100</property> </object> - <object class="GtkAdjustment" id="quality-adjustment-spin"> + <object class="GtkAdjustment" id="quality-adjustment-scale"> <property name="lower">1</property> <property name="upper">99</property> <property name="value">80</property> - <property name="step_increment">1</property> - <property name="page_increment">5</property> + <property name="step-increment">1</property> + <property name="page-increment">5</property> </object> - <object class="GtkAdjustment" id="quality-adjustment-scale"> + <object class="GtkAdjustment" id="quality-adjustment-spin"> <property name="lower">1</property> <property name="upper">99</property> <property name="value">80</property> - <property name="step_increment">1</property> - <property name="page_increment">5</property> + <property name="step-increment">1</property> + <property name="page-increment">5</property> </object> <object class="GtkAdjustment" id="width-adjustment"> <property name="lower">1</property> <property name="upper">20000</property> <property name="value">1</property> - <property name="step_increment">100</property> - <property name="page_increment">100</property> + <property name="step-increment">100</property> + <property name="page-increment">100</property> </object> <object class="GtkDialog" id="CompressGraphicDialog"> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <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> + <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"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</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> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -82,8 +82,8 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -96,8 +96,8 @@ <object class="GtkButton" id="help"> <property name="label" translatable="yes" context="stock">_Help</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -111,43 +111,43 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=2 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> + <property name="can-focus">False</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkFrame" id="frame2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">start</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=4 --> <object class="GtkGrid" id="grid2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="hexpand">True</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="hexpand">True</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkRadioButton" id="radio-jpeg"> <property name="label" translatable="yes" context="compressgraphicdialog|radio-jpeg">JPEG Quality</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes" context="compressgraphicdialog|radio-jpeg|tooltip_text">Lossy compression</property> - <property name="use_underline">True</property> - <property name="draw_indicator">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="tooltip-text" translatable="yes" context="compressgraphicdialog|radio-jpeg|tooltip_text">Lossy compression</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> <property name="group">radio-lossless</property> <accessibility> <relation type="label-for" target="scale-quality"/> @@ -155,127 +155,127 @@ </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkRadioButton" id="radio-lossless"> <property name="label" translatable="yes" context="compressgraphicdialog|radio-lossless">PNG Compression</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">False</property> - <property name="tooltip_text" translatable="yes" context="compressgraphicdialog|radio-lossless|tooltip_text">Lossless compression</property> - <property name="use_underline">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="tooltip-text" translatable="yes" context="compressgraphicdialog|radio-lossless|tooltip_text">Lossless compression</property> + <property name="use-underline">True</property> <property name="active">True</property> - <property name="draw_indicator">True</property> + <property name="draw-indicator">True</property> <accessibility> <relation type="label-for" target="scale-compression"/> <relation type="label-for" target="spin-compression"/> </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_spacing">6</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> + <property name="column-spacing">6</property> <child> <object class="GtkScale" id="scale-quality"> - <property name="width_request">150</property> + <property name="width-request">150</property> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="hexpand">True</property> <property name="adjustment">quality-adjustment-scale</property> <property name="digits">0</property> - <property name="draw_value">False</property> - <property name="value_pos">right</property> + <property name="draw-value">False</property> + <property name="value-pos">right</property> <accessibility> <relation type="labelled-by" target="radio-jpeg"/> </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkSpinButton" id="spin-quality"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> + <property name="truncate-multiline">True</property> <property name="adjustment">quality-adjustment-spin</property> <property name="numeric">True</property> - <property name="truncate-multiline">True</property> <accessibility> <relation type="labelled-by" target="radio-jpeg"/> </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=1 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="column_spacing">6</property> + <property name="can-focus">False</property> <property name="margin-start">12</property> + <property name="column-spacing">6</property> <child> <object class="GtkScale" id="scale-compression"> - <property name="width_request">150</property> + <property name="width-request">150</property> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="adjustment">compression-adjustment-scale</property> <property name="digits">0</property> - <property name="draw_value">False</property> - <property name="value_pos">right</property> + <property name="draw-value">False</property> + <property name="value-pos">right</property> <accessibility> <relation type="labelled-by" target="radio-lossless"/> </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkSpinButton" id="spin-compression"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> <property name="text">6</property> + <property name="truncate-multiline">True</property> <property name="adjustment">compression-adjustment-spin</property> <property name="numeric">True</property> <property name="value">6</property> - <property name="truncate-multiline">True</property> <accessibility> <relation type="labelled-by" target="radio-lossless"/> </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> </object> @@ -283,7 +283,7 @@ <child type="label"> <object class="GtkLabel" id="label2"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label2">Compression</property> <attributes> <attribute name="weight" value="bold"/> @@ -292,138 +292,138 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="frame3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=3 n-rows=5 --> <object class="GtkGrid"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">start</property> - <property name="row_spacing">6</property> - <property name="column_spacing">12</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">12</property> <child> <object class="GtkCheckButton" id="checkbox-change-resolution"> <property name="label" translatable="yes" context="compressgraphicdialog|checkbox-change-resolution">Change image resolution to:</property> <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="draw_indicator">True</property> + <property name="can-focus">True</property> + <property name="receives-default">False</property> + <property name="use-underline">True</property> + <property name="draw-indicator">True</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> <property name="width">3</property> </packing> </child> <child> <object class="GtkLabel" id="label3"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label3">Width:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">spin-new-width</property> - <property name="width_chars">14</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">spin-new-width</property> + <property name="width-chars">14</property> <property name="xalign">1</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-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="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label4">Height:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">spin-new-height</property> - <property name="width_chars">14</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">spin-new-height</property> + <property name="width-chars">14</property> <property name="xalign">1</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkLabel" id="label5"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label5">Resolution:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">combo-resolution</property> - <property name="width_chars">14</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">combo-resolution</property> + <property name="width-chars">14</property> <property name="xalign">1</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkLabel" id="label12"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label12">Interpolation:</property> - <property name="use_underline">True</property> - <property name="mnemonic_widget">interpolation-method-combo</property> - <property name="width_chars">14</property> + <property name="use-underline">True</property> + <property name="mnemonic-widget">interpolation-method-combo</property> + <property name="width-chars">14</property> <property name="xalign">1</property> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> + <property name="left-attach">0</property> + <property name="top-attach">4</property> </packing> </child> <child> <object class="GtkSpinButton" id="spin-new-width"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> <property name="text">1</property> + <property name="truncate-multiline">True</property> <property name="adjustment">width-adjustment</property> <property name="numeric">True</property> - <property name="truncate-multiline">True</property> <property name="value">1</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkSpinButton" id="spin-new-height"> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="activates_default">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> <property name="text">1</property> + <property name="truncate-multiline">True</property> <property name="adjustment">height-adjustment</property> <property name="numeric">True</property> - <property name="truncate-multiline">True</property> <property name="value">1</property> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkComboBoxText" id="combo-resolution"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="has_entry">True</property> + <property name="can-focus">False</property> + <property name="has-entry">True</property> <items> <item>96</item> <item>150</item> @@ -433,21 +433,21 @@ </items> <child internal-child="entry"> <object class="GtkEntry"> - <property name="can_focus">True</property> + <property name="can-focus">True</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> - <property name="activates_default">True</property> </object> </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> + <property name="left-attach">1</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkComboBoxText" id="interpolation-method-combo"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <items> <item translatable="yes" context="compressgraphicdialog|interpolation-method-store">None</item> <item translatable="yes" context="compressgraphicdialog|interpolation-method-store">Bilinear</item> @@ -456,44 +456,44 @@ </items> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">4</property> + <property name="left-attach">1</property> + <property name="top-attach">4</property> </packing> </child> <child> <object class="GtkLabel" id="label13"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label13">px</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">1</property> + <property name="left-attach">2</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkLabel" id="label14"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label14">px</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">2</property> + <property name="left-attach">2</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkLabel" id="label16"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label16">DPI</property> <property name="xalign">0</property> </object> <packing> - <property name="left_attach">2</property> - <property name="top_attach">3</property> + <property name="left-attach">2</property> + <property name="top-attach">3</property> </packing> </child> <child> @@ -504,7 +504,7 @@ <child type="label"> <object class="GtkLabel" id="label22"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label22">Resolution</property> <attributes> <attribute name="weight" value="bold"/> @@ -513,46 +513,46 @@ </child> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="frame1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=2 n-rows=5 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="valign">start</property> - <property name="row_spacing">6</property> - <property name="column_spacing">6</property> <property name="margin-start">16</property> <property name="margin-top">6</property> + <property name="row-spacing">6</property> + <property name="column-spacing">6</property> <child> <object class="GtkLabel" id="label15"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label15">Type:</property> - <property name="single_line_mode">True</property> + <property name="single-line-mode">True</property> <property name="xalign">0</property> <accessibility> <relation type="label-for" target="label-graphic-type"/> </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="label-graphic-type"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">???</property> <property name="xalign">0</property> @@ -561,30 +561,30 @@ </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="left-attach">1</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkLabel" id="label7"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label7">Actual dimensions:</property> - <property name="single_line_mode">True</property> + <property name="single-line-mode">True</property> <property name="xalign">0</property> <accessibility> <relation type="label-for" target="label-original-size"/> </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkLabel" id="label-original-size"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">???</property> <property name="xalign">0</property> @@ -593,14 +593,14 @@ </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="left-attach">1</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkLabel" id="label8"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label8">Apparent dimensions:</property> <property name="xalign">0</property> <accessibility> @@ -608,14 +608,14 @@ </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkLabel" id="label-view-size"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">???</property> <property name="xalign">0</property> @@ -624,14 +624,14 @@ </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">2</property> + <property name="left-attach">1</property> + <property name="top-attach">2</property> </packing> </child> <child> <object class="GtkLabel" id="label9"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label9">Image size:</property> <property name="xalign">0</property> <accessibility> @@ -639,14 +639,14 @@ </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">3</property> + <property name="left-attach">0</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkLabel" id="label-image-capacity"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">???</property> <property name="xalign">0</property> @@ -655,30 +655,30 @@ </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">3</property> + <property name="left-attach">1</property> + <property name="top-attach">3</property> </packing> </child> <child> <object class="GtkButton" id="calculate"> <property name="label" translatable="yes" context="compressgraphicdialog|calculate">Calculate New Size:</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="halign">start</property> <accessibility> <relation type="label-for" target="label-new-capacity"/> </accessibility> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">4</property> + <property name="left-attach">0</property> + <property name="top-attach">4</property> </packing> </child> <child> <object class="GtkLabel" id="label-new-capacity"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="hexpand">True</property> <property name="label">???</property> <property name="xalign">0</property> @@ -687,8 +687,8 @@ </accessibility> </object> <packing> - <property name="left_attach">1</property> - <property name="top_attach">4</property> + <property name="left-attach">1</property> + <property name="top-attach">4</property> </packing> </child> </object> @@ -696,7 +696,7 @@ <child type="label"> <object class="GtkLabel" id="label1"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="compressgraphicdialog|label1">Image Information</property> <attributes> <attribute name="weight" value="bold"/> @@ -705,8 +705,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> <property name="width">2</property> </packing> </child> @@ -724,8 +724,5 @@ <action-widget response="-6">cancel</action-widget> <action-widget response="-11">help</action-widget> </action-widgets> - <child> - <placeholder/> - </child> </object> </interface>