diff options
Diffstat (limited to 'desktop')
4 files changed, 58 insertions, 28 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx index ab150968ba1c..0a8508026e99 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx @@ -33,27 +33,19 @@ namespace vcl { class Window; } using dp_gui::DependencyDialog; DependencyDialog::DependencyDialog( - vcl::Window * parent, std::vector< OUString > const & dependencies): - ModalDialog(parent, "Dependencies", "desktop/ui/dependenciesdialog.ui") + weld::Window * parent, std::vector< OUString > const & dependencies) + : GenericDialogController(parent, "desktop/ui/dependenciesdialog.ui", "Dependencies") + , m_xList(m_xBuilder->weld_tree_view("depListTreeview")) { - get(m_list, "depListTreeview"); - set_height_request(200); - SetMinOutputSizePixel(GetOutputSizePixel()); - m_list->SetReadOnly(); + m_xList->set_size_request(-1, m_xList->get_height_rows(10)); for (auto const& dependency : dependencies) { - m_list->InsertEntry(dependency); + m_xList->append_text(dependency); } } DependencyDialog::~DependencyDialog() { - disposeOnce(); } -void DependencyDialog::dispose() -{ - m_list.clear(); - ModalDialog::dispose(); -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx index 69115dd001e3..9c350b328b16 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx @@ -22,29 +22,27 @@ #include <sal/config.h> -#include <vector> #include <tools/gen.hxx> -#include <vcl/button.hxx> -#include <vcl/dialog.hxx> -#include <vcl/fixed.hxx> -#include <vcl/lstbox.hxx> +#include <vcl/weld.hxx> + +#include <vector> namespace vcl { class Window; } namespace dp_gui { -class DependencyDialog: public ModalDialog { +class DependencyDialog : public weld::GenericDialogController +{ public: DependencyDialog( - vcl::Window * parent, std::vector< OUString > const & dependencies); + weld::Window* parent, std::vector< OUString > const & dependencies); virtual ~DependencyDialog() override; - virtual void dispose() override; private: DependencyDialog(DependencyDialog const &) = delete; DependencyDialog& operator =(DependencyDialog const &) = delete; - VclPtr<ListBox> m_list; + std::unique_ptr<weld::TreeView> m_xList; }; } diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 5e66b5be8ca8..e0307f0cd142 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -375,7 +375,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & } { SolarMutexGuard guard; - short n = ScopedVclPtrInstance<DependencyDialog>( m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, deps )->Execute(); + DependencyDialog aDlg(m_pDialogHelper ? m_pDialogHelper->getFrameWeld() : nullptr, deps); + short n = aDlg.run(); // Distinguish between closing the dialog and programmatically // canceling the dialog (headless VCL): approve = n == RET_OK diff --git a/desktop/uiconfig/ui/dependenciesdialog.ui b/desktop/uiconfig/ui/dependenciesdialog.ui index e3f2ddc6ed1d..c78a33886b7d 100644 --- a/desktop/uiconfig/ui/dependenciesdialog.ui +++ b/desktop/uiconfig/ui/dependenciesdialog.ui @@ -1,13 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.22.1 --> <interface domain="dkt"> <requires lib="gtk+" version="3.18"/> + <object class="GtkTreeStore" id="liststore1"> + <columns> + <!-- column-name text --> + <column type="gchararray"/> + <!-- column-name id --> + <column type="gchararray"/> + </columns> + </object> <object class="GtkDialog" id="Dependencies"> <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="vexpand">True</property> <property name="border_width">6</property> <property name="title" translatable="yes" context="dependenciesdialog|Dependencies">System dependencies check</property> + <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">dialog</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> @@ -55,10 +70,10 @@ <object class="GtkLabel" id="label1"> <property name="visible">True</property> <property name="can_focus">False</property> - <property name="xalign">0</property> <property name="label" translatable="yes" context="dependenciesdialog|label1">The extension cannot be installed as the following system dependencies are not fulfilled:</property> <property name="wrap">True</property> <property name="max_width_chars">60</property> + <property name="xalign">0</property> </object> <packing> <property name="expand">False</property> @@ -67,14 +82,38 @@ </packing> </child> <child> - <object class="GtkTreeView" id="depListTreeview"> + <object class="GtkScrolledWindow"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="hexpand">True</property> <property name="vexpand">True</property> - <property name="show_expanders">False</property> - <child internal-child="selection"> - <object class="GtkTreeSelection" id="treeview-selection1"/> + <property name="shadow_type">in</property> + <child> + <object class="GtkTreeView" id="depListTreeview"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="model">liststore1</property> + <property name="headers_visible">False</property> + <property name="search_column">0</property> + <property name="show_expanders">False</property> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="Macro Library List-selection2"/> + </child> + <child> + <object class="GtkTreeViewColumn" id="treeviewcolumn5"> + <property name="resizable">True</property> + <property name="spacing">6</property> + <child> + <object class="GtkCellRendererText" id="cellrenderer4"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + </child> + </object> </child> </object> <packing> |