diff options
author | Palenik Mihály <palenik.mihaly@gmail.com> | 2014-08-03 19:50:32 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-08-04 10:43:20 +0000 |
commit | 8c0bd0deee50a5f54926afe87d849411757c2f18 (patch) | |
tree | 177e085faf6a08273c4ccdf75f753f65f31771d2 /desktop | |
parent | c6f4f70b24eaddbedf8bb463dfc4bd225f3c7f86 (diff) |
Convert RID_DLG_DEPENDENCIES to .ui
Change-Id: I45779ac7dd88608e0f46b468cc51641b386e8a1a
Reviewed-on: https://gerrit.libreoffice.org/10712
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/UIConfig_deployment.mk | 1 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dependencydialog.cxx | 29 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dependencydialog.hxx | 7 | ||||
-rw-r--r-- | desktop/uiconfig/ui/dependenciesdialog.ui | 99 |
4 files changed, 106 insertions, 30 deletions
diff --git a/desktop/UIConfig_deployment.mk b/desktop/UIConfig_deployment.mk index c41eaa793526..4bc03a552436 100644 --- a/desktop/UIConfig_deployment.mk +++ b/desktop/UIConfig_deployment.mk @@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,desktop)) $(eval $(call gb_UIConfig_add_uifiles,desktop,\ desktop/uiconfig/ui/cmdlinehelp \ + desktop/uiconfig/ui/dependenciesdialog \ desktop/uiconfig/ui/extensionmanager \ desktop/uiconfig/ui/licensedialog \ desktop/uiconfig/ui/showlicensedialog \ diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx index 63e72c31a184..bcdf2320e78f 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx @@ -37,38 +37,19 @@ using dp_gui::DependencyDialog; DependencyDialog::DependencyDialog( Window * parent, std::vector< OUString > const & dependencies): - ModalDialog(parent, DpGuiResId(RID_DLG_DEPENDENCIES) ), - m_text(this, DpGuiResId(RID_DLG_DEPENDENCIES_TEXT)), - m_list(this, DpGuiResId(RID_DLG_DEPENDENCIES_LIST)), - m_ok(this, DpGuiResId(RID_DLG_DEPENDENCIES_OK)), - m_listDelta( - GetOutputSizePixel().Width() - m_list.GetSizePixel().Width(), - GetOutputSizePixel().Height() - m_list.GetSizePixel().Height()) + ModalDialog(parent, "Dependencies", "desktop/ui/dependenciesdialog.ui") { - FreeResource(); + get(m_list, "depListTreeview"); + set_height_request(200); SetMinOutputSizePixel(GetOutputSizePixel()); - m_list.SetReadOnly(); + m_list->SetReadOnly(); for (std::vector< OUString >::const_iterator i(dependencies.begin()); i != dependencies.end(); ++i) { - m_list.InsertEntry(*i); + m_list->InsertEntry(*i); } } DependencyDialog::~DependencyDialog() {} -void DependencyDialog::Resize() { - long n = m_ok.GetPosPixel().Y() - - (m_list.GetPosPixel().Y() + m_list.GetSizePixel().Height()); - m_list.SetSizePixel( - Size( - GetOutputSizePixel().Width() - m_listDelta.Width(), - GetOutputSizePixel().Height() - m_listDelta.Height())); - m_ok.SetPosPixel( - Point( - (m_list.GetPosPixel().X() + - (m_list.GetSizePixel().Width() - m_ok.GetSizePixel().Width()) / 2), - m_list.GetPosPixel().Y() + m_list.GetSizePixel().Height() + n)); -} - /* 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 cab93b71526c..e9397e221925 100644 --- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx @@ -44,12 +44,7 @@ private: DependencyDialog(DependencyDialog &); // not defined void operator =(DependencyDialog &); // not defined - virtual void Resize() SAL_OVERRIDE; - - FixedText m_text; - ListBox m_list; - OKButton m_ok; - Size m_listDelta; + ListBox* m_list; }; } diff --git a/desktop/uiconfig/ui/dependenciesdialog.ui b/desktop/uiconfig/ui/dependenciesdialog.ui new file mode 100644 index 000000000000..cdc6bf35362f --- /dev/null +++ b/desktop/uiconfig/ui/dependenciesdialog.ui @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <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">System dependencies check</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="hexpand">True</property> + <property name="vexpand">True</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">center</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="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</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> + </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="GtkBox" id="box1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child> + <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">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> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <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> + <child internal-child="selection"> + <object class="GtkTreeSelection" id="treeview-selection1"/> + </child> + </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="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">ok</action-widget> + </action-widgets> + </object> +</interface> |