Kaydet (Commit) 8c0bd0de authored tarafından Palenik Mihály's avatar Palenik Mihály Kaydeden (comit) David Tardon

Convert RID_DLG_DEPENDENCIES to .ui

Change-Id: I45779ac7dd88608e0f46b468cc51641b386e8a1a
Reviewed-on: https://gerrit.libreoffice.org/10712Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst c6f4f70b
......@@ -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 \
......
......@@ -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: */
......@@ -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;
};
}
......
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment