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

convert extensions update required dialog to .ui

Change-Id: Ia3ad4032f500e95db5db520292e6c8b07b0f5c0b
üst 2278e8f8
...@@ -16,6 +16,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\ ...@@ -16,6 +16,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\
desktop/uiconfig/ui/showlicensedialog \ desktop/uiconfig/ui/showlicensedialog \
desktop/uiconfig/ui/updatedialog \ desktop/uiconfig/ui/updatedialog \
desktop/uiconfig/ui/updateinstalldialog \ desktop/uiconfig/ui/updateinstalldialog \
desktop/uiconfig/ui/updaterequireddialog \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
...@@ -23,16 +23,6 @@ ...@@ -23,16 +23,6 @@
#include "deployment.hrc" #include "deployment.hrc"
#include "helpid.hrc" #include "helpid.hrc"
// Package Manager Dialog:
#define RID_DLG_UPDATE_REQUIRED (RID_DEPLOYMENT_GUI_START + 11)
#define RID_EM_BTN_CLOSE 10
#define RID_EM_BTN_HELP 11
#define RID_EM_BTN_CHECK_UPDATES 12
#define RID_EM_BTN_CANCEL 13
#define RID_EM_FT_PROGRESS 14
#define RID_EM_FT_MSG 15
#define RID_DLG_DEPENDENCIES (RID_DEPLOYMENT_GUI_START + 1) #define RID_DLG_DEPENDENCIES (RID_DEPLOYMENT_GUI_START + 1)
#define RID_DLG_DEPENDENCIES_TEXT 1 #define RID_DLG_DEPENDENCIES_TEXT 1
#define RID_DLG_DEPENDENCIES_LIST 2 #define RID_DLG_DEPENDENCIES_LIST 2
......
...@@ -172,15 +172,13 @@ public: ...@@ -172,15 +172,13 @@ public:
class UpdateRequiredDialog : public ModalDialog, class UpdateRequiredDialog : public ModalDialog,
public DialogHelper public DialogHelper
{ {
ExtensionBox_Impl *m_pExtensionBox; ExtensionBox_Impl* m_pExtensionBox;
FixedText m_aUpdateNeeded; FixedText* m_pUpdateNeeded;
PushButton m_aUpdateBtn; PushButton* m_pUpdateBtn;
PushButton m_aCloseBtn; PushButton* m_pCloseBtn;
HelpButton m_aHelpBtn; CancelButton* m_pCancelBtn;
CancelButton m_aCancelBtn; FixedText* m_pProgressText;
FixedLine m_aDivider; ProgressBar* m_pProgressBar;
FixedText m_aProgressText;
ProgressBar m_aProgressBar;
const OUString m_sAddPackages; const OUString m_sAddPackages;
const OUString m_sCloseText; const OUString m_sCloseText;
OUString m_sProgressText; OUString m_sProgressText;
...@@ -215,7 +213,6 @@ public: ...@@ -215,7 +213,6 @@ public:
virtual ~UpdateRequiredDialog(); virtual ~UpdateRequiredDialog();
virtual short Execute() SAL_OVERRIDE; virtual short Execute() SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE;
virtual bool Close() SAL_OVERRIDE; virtual bool Close() SAL_OVERRIDE;
virtual void showProgress( bool bStart ) SAL_OVERRIDE; virtual void showProgress( bool bStart ) SAL_OVERRIDE;
......
...@@ -20,68 +20,6 @@ ...@@ -20,68 +20,6 @@
#include <svtools/controldims.hrc> #include <svtools/controldims.hrc>
#include "dp_gui.hrc" #include "dp_gui.hrc"
ModalDialog RID_DLG_UPDATE_REQUIRED
{
HelpId = HID_PACKAGE_MANAGER_UPD_REQ;
Text [ en-US ] = "Extension Update Required";
Size = MAP_APPFONT( 300, 200 );
OutputSize = TRUE;
SVLook = TRUE;
Moveable = TRUE;
Closeable = TRUE;
Sizeable = TRUE;
Hide = TRUE;
FixedText RID_EM_FT_MSG
{
Text [ en-US ] = "%PRODUCTNAME has been updated to a new version. Some installed %PRODUCTNAME extensions are not compatible with this version and need to be updated before they can be used.";
WordBreak = TRUE;
NoLabel = TRUE;
Size = MAP_APPFONT( 280, 3*RSC_BS_CHARHEIGHT );
Pos = MAP_APPFONT( 5, 5 );
};
FixedText RID_EM_FT_PROGRESS
{
Hide = TRUE;
Right = TRUE;
Text [ en-US ] = "Adding %EXTENSION_NAME";
Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_FIXEDTEXT_HEIGHT );
};
HelpButton RID_EM_BTN_HELP
{
TabStop = TRUE;
Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
PushButton RID_EM_BTN_CHECK_UPDATES
{
HelpID = "desktop:PushButton:RID_DLG_UPDATE_REQUIRED:RID_EM_BTN_CHECK_UPDATES";
TabStop = TRUE;
Text [ en-US ] = "Check for ~Updates...";
Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
PushButton RID_EM_BTN_CLOSE
{
HelpID = "desktop:PushButton:RID_DLG_UPDATE_REQUIRED:RID_EM_BTN_CLOSE";
TabStop = TRUE;
DefButton = TRUE;
Text [ en-US ] = "Disable all";
Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
CancelButton RID_EM_BTN_CANCEL
{
TabStop = TRUE;
Hide = TRUE;
Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
};
};
Image RID_IMG_WARNING Image RID_IMG_WARNING
{ {
ImageBitmap = Bitmap { File = "caution_16.png"; }; ImageBitmap = Bitmap { File = "caution_16.png"; };
......
...@@ -862,6 +862,15 @@ void ExtensionBox_Impl::Resize() ...@@ -862,6 +862,15 @@ void ExtensionBox_Impl::Resize()
RecalcAll(); RecalcAll();
} }
Size ExtensionBox_Impl::GetOptimalSize() const
{
return LogicToPixel(Size(250, 150), MAP_APPFONT);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeExtensionBox(Window *pParent, VclBuilder::stringmap &)
{
return new ExtensionBox_Impl(pParent);
}
long ExtensionBox_Impl::PointToPos( const Point& rPos ) long ExtensionBox_Impl::PointToPos( const Point& rPos )
{ {
......
...@@ -190,6 +190,7 @@ public: ...@@ -190,6 +190,7 @@ public:
virtual void Paint( const Rectangle &rPaintRect ) SAL_OVERRIDE; virtual void Paint( const Rectangle &rPaintRect ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE;
virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
const Size GetMinOutputSizePixel() const; const Size GetMinOutputSizePixel() const;
void SetExtraSize( long nSize ) { m_nExtraHeight = nSize; } void SetExtraSize( long nSize ) { m_nExtraHeight = nSize; }
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
#define HID_EXTENSION_MANAGER_LISTBOX_DISABLE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_DISABLE" #define HID_EXTENSION_MANAGER_LISTBOX_DISABLE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_DISABLE"
#define HID_EXTENSION_MANAGER_LISTBOX_REMOVE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_REMOVE" #define HID_EXTENSION_MANAGER_LISTBOX_REMOVE "DESKTOP_HID_EXTENSION_MANAGER_LISTBOX_REMOVE"
#define HID_PACKAGE_MANAGER_UPD_REQ "DESKTOP_HID_PACKAGE_MANAGER_UPD_REQ"
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkDialog" id="UpdateRequiredDialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Extension Update Required</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>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="row_spacing">12</property>
<child>
<object class="GtkLabel" id="updatelabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">%PRODUCTNAME has been updated to a new version. Some installed %PRODUCTNAME extensions are not compatible with this version and need to be updated before they can be used.</property>
<property name="wrap">True</property>
<property name="max_width_chars">95</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="deploymentgui-ExtensionBox" id="extensions">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<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>
<child>
<object class="GtkLabel" id="progresslabel">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Adding %EXTENSION_NAME</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="progress">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<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="check">
<property name="label">Check for_Updates...</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_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="disable">
<property name="label">Disable all</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="no_show_all">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="help">
<property name="label">gtk-help</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">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">check</action-widget>
<action-widget response="0">disable</action-widget>
<action-widget response="0">help</action-widget>
</action-widgets>
</object>
</interface>
...@@ -406,9 +406,12 @@ ...@@ -406,9 +406,12 @@
<glade-widget-class title="Drop Caps Preview" name="swuilo-SwDropCapsPict" <glade-widget-class title="Drop Caps Preview" name="swuilo-SwDropCapsPict"
generic-name="Drop Caps Preview Window" parent="GtkDrawingArea" generic-name="Drop Caps Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Extension List" name="deploymentgui-ExtBoxWithBtns" <glade-widget-class title="Extension List" name="deploymentgui-ExtensionBox"
generic-name="Extensions List" parent="GtkDrawingArea" generic-name="Extensions List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Extension List With Buttons" name="deploymentgui-ExtBoxWithBtns"
generic-name="Extensions List With Buttons" parent="deploymentgui-ExtensionBox"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Path List" name="xsltdlglo-SvxPathControl" <glade-widget-class title="Path List" name="xsltdlglo-SvxPathControl"
generic-name="Path List" parent="GtkDrawingArea" generic-name="Path List" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>
......
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