Kaydet (Commit) e661d295 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert show extension licence dialog to .ui

Change-Id: I0e34a0ddaee1485184b55788d618288f4e3f69cb
üst 5efc2a34
...@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,desktop)) ...@@ -12,6 +12,7 @@ $(eval $(call gb_UIConfig_UIConfig,desktop))
$(eval $(call gb_UIConfig_add_uifiles,desktop,\ $(eval $(call gb_UIConfig_add_uifiles,desktop,\
desktop/uiconfig/ui/cmdlinehelp \ desktop/uiconfig/ui/cmdlinehelp \
desktop/uiconfig/ui/extensionmanager \ desktop/uiconfig/ui/extensionmanager \
desktop/uiconfig/ui/showlicensedialog \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
...@@ -153,7 +153,6 @@ ...@@ -153,7 +153,6 @@
#define RID_WARNINGBOX_REMOVE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+104) #define RID_WARNINGBOX_REMOVE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+104)
#define RID_WARNINGBOX_ENABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+105) #define RID_WARNINGBOX_ENABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+105)
#define RID_WARNINGBOX_DISABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+106) #define RID_WARNINGBOX_DISABLE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START+106)
#define RID_DLG_SHOW_LICENSE (RID_DEPLOYMENT_GUI_START+107)
#define RID_DLG_LICENSE RID_DEPLOYMENT_LICENSE_START #define RID_DLG_LICENSE RID_DEPLOYMENT_LICENSE_START
......
...@@ -295,37 +295,6 @@ ModalDialog RID_DLG_LICENSE ...@@ -295,37 +295,6 @@ ModalDialog RID_DLG_LICENSE
}; };
ModalDialog RID_DLG_SHOW_LICENSE
{
Text [ en-US ] = "Extension Software License Agreement";
Size = MAP_APPFONT( 300, 200 );
OutputSize = TRUE;
SVLook = TRUE;
Moveable = TRUE;
Closeable = TRUE;
Sizeable = TRUE;
MultiLineEdit ML_LICENSE
{
Pos = MAP_APPFONT( 5, 5 );
Size = MAP_APPFONT( 300 - 10, 200 - 15 - RSC_CD_PUSHBUTTON_HEIGHT );
Border = TRUE;
VScroll = TRUE;
ReadOnly = TRUE;
};
OKButton RID_EM_BTN_CLOSE
{
TabStop = TRUE;
DefButton = TRUE;
Text [ en-US ] = "Close";
Pos = MAP_APPFONT( (300-RSC_CD_PUSHBUTTON_WIDTH)/2, 200 - 5 - RSC_CD_PUSHBUTTON_HEIGHT );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
};
WarningBox RID_WARNINGBOX_INSTALL_EXTENSION { WarningBox RID_WARNINGBOX_INSTALL_EXTENSION {
Buttons = WB_OK_CANCEL; Buttons = WB_OK_CANCEL;
DefButton = WB_DEF_OK; DefButton = WB_DEF_OK;
......
...@@ -167,7 +167,7 @@ ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(Window* pParent) ...@@ -167,7 +167,7 @@ ExtBoxWithBtns_Impl::ExtBoxWithBtns_Impl(Window* pParent)
Size ExtBoxWithBtns_Impl::GetOptimalSize() const Size ExtBoxWithBtns_Impl::GetOptimalSize() const
{ {
return LogicToPixel(Size(250, 150), MapMode(MAP_APPFONT)); return LogicToPixel(Size(250, 150), MAP_APPFONT);
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -1704,36 +1704,14 @@ void UpdateRequiredDialog::disableAllEntries() ...@@ -1704,36 +1704,14 @@ void UpdateRequiredDialog::disableAllEntries()
// ShowLicenseDialog // ShowLicenseDialog
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
ShowLicenseDialog::ShowLicenseDialog( Window * pParent, ShowLicenseDialog::ShowLicenseDialog( Window * pParent,
const uno::Reference< deployment::XPackage > &xPackage ) : const uno::Reference< deployment::XPackage > &xPackage )
ModalDialog( pParent, DialogHelper::getResId( RID_DLG_SHOW_LICENSE ) ), : ModalDialog(pParent, "ShowLicenseDialog", "desktop/ui/showlicensedialog.ui")
m_aLicenseText( this, DialogHelper::getResId( ML_LICENSE ) ), {
m_aCloseBtn( this, DialogHelper::getResId( RID_EM_BTN_CLOSE ) ) get(m_pLicenseText, "textview");
{ Size aSize(m_pLicenseText->LogicToPixel(Size(290, 170), MAP_APPFONT));
FreeResource(); m_pLicenseText->set_width_request(aSize.Width());
m_pLicenseText->set_height_request(aSize.Height());
OUString aText = xPackage->getLicenseText(); m_pLicenseText->SetText(xPackage->getLicenseText());
m_aLicenseText.SetText( aText );
}
//------------------------------------------------------------------------------
ShowLicenseDialog::~ShowLicenseDialog()
{}
//------------------------------------------------------------------------------
void ShowLicenseDialog::Resize()
{
Size aTotalSize( GetOutputSizePixel() );
Size aTextSize( aTotalSize.Width() - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT,
aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_TOP - 2*RSC_SP_DLG_INNERBORDER_BOTTOM
- m_aCloseBtn.GetSizePixel().Height() );
m_aLicenseText.SetPosSizePixel( Point( RSC_SP_DLG_INNERBORDER_LEFT, RSC_SP_DLG_INNERBORDER_TOP ),
aTextSize );
Point aBtnPos( (aTotalSize.Width() - m_aCloseBtn.GetSizePixel().Width())/2,
aTotalSize.Height() - RSC_SP_DLG_INNERBORDER_BOTTOM
- m_aCloseBtn.GetSizePixel().Height() );
m_aCloseBtn.SetPosPixel( aBtnPos );
} }
//================================================================================= //=================================================================================
......
...@@ -242,15 +242,9 @@ public: ...@@ -242,15 +242,9 @@ public:
//============================================================================== //==============================================================================
class ShowLicenseDialog : public ModalDialog class ShowLicenseDialog : public ModalDialog
{ {
MultiLineEdit m_aLicenseText; VclMultiLineEdit* m_pLicenseText;
OKButton m_aCloseBtn;
public: public:
ShowLicenseDialog( Window * pParent, ShowLicenseDialog(Window * pParent, const css::uno::Reference< css::deployment::XPackage > &xPackage);
const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > &xPackage );
virtual ~ShowLicenseDialog();
virtual void Resize();
}; };
//============================================================================== //==============================================================================
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkDialog" id="ShowLicenseDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Extension Software License Agreement</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="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>
<child>
<object class="GtkButton" id="close">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">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">1</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="GtkScrolledWindow" id="scrolledwindow1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="vscrollbar_policy">always</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="editable">False</property>
</object>
</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">close</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