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

convert RID_QUERYBOX_INSTALL_FOR_ALL with custom buttons to .ui

Change-Id: If7ac491cb6f256af22b48f681590adb1484350d0
üst db83365b
......@@ -13,6 +13,7 @@ $(eval $(call gb_UIConfig_add_uifiles,desktop,\
desktop/uiconfig/ui/cmdlinehelp \
desktop/uiconfig/ui/dependenciesdialog \
desktop/uiconfig/ui/extensionmanager \
desktop/uiconfig/ui/installforalldialog \
desktop/uiconfig/ui/licensedialog \
desktop/uiconfig/ui/showlicensedialog \
desktop/uiconfig/ui/updatedialog \
......
......@@ -23,7 +23,6 @@
#include "deployment.hrc"
#include "helpid.hrc"
#define RID_QUERYBOX_INSTALL_FOR_ALL (RID_DEPLOYMENT_GUI_START + 2)
#define RID_WARNINGBOX_VERSION_LESS (RID_DEPLOYMENT_GUI_START + 3)
#define RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES (RID_DEPLOYMENT_GUI_START + 4)
#define RID_WARNINGBOX_VERSION_EQUAL (RID_DEPLOYMENT_GUI_START + 5)
......@@ -77,8 +76,6 @@
#define RID_STR_DISABLING_PACKAGES (RID_DEPLOYMENT_GUI_START+88)
#define RID_STR_ACCEPT_LICENSE (RID_DEPLOYMENT_GUI_START+89)
#define RID_STR_INSTALL_FOR_ALL (RID_DEPLOYMENT_GUI_START+90)
#define RID_STR_INSTALL_FOR_ME (RID_DEPLOYMENT_GUI_START+91)
#define RID_STR_ERROR_UNKNOWN_STATUS (RID_DEPLOYMENT_GUI_START+92)
#define RID_STR_CLOSE_BTN (RID_DEPLOYMENT_GUI_START+93)
#define RID_STR_EXIT_BTN (RID_DEPLOYMENT_GUI_START+94)
......
......@@ -74,16 +74,6 @@ String RID_STR_ACCEPT_LICENSE
Text [ en-US ] = "Accept license for %EXTENSION_NAME";
};
String RID_STR_INSTALL_FOR_ALL
{
Text [ en-US ] = "~For all users";
};
String RID_STR_INSTALL_FOR_ME
{
Text [ en-US ] = "~Only for me";
};
String RID_STR_ERROR_UNKNOWN_STATUS
{
Text [ en-US ] = "Error: The status of this extension is unknown";
......
......@@ -643,35 +643,20 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
return ( RET_OK == aInfo.Execute() );
}
bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const
{
const SolarMutexGuard guard;
QueryBox aQuery( m_pVCLWindow, getResId( RID_QUERYBOX_INSTALL_FOR_ALL ) );
OUString sMsgText(aQuery.GetMessText());
sMsgText = sMsgText.replaceAll(
"%PRODUCTNAME", utl::ConfigManager::getProductName());
aQuery.SetMessText(sMsgText);
sal_uInt16 nYesBtnID = aQuery.GetButtonId( 0 );
sal_uInt16 nNoBtnID = aQuery.GetButtonId( 1 );
if ( nYesBtnID != BUTTONDIALOG_BUTTON_NOTFOUND )
aQuery.SetButtonText( nYesBtnID, getResourceString( RID_STR_INSTALL_FOR_ME ) );
if ( nNoBtnID != BUTTONDIALOG_BUTTON_NOTFOUND )
aQuery.SetButtonText( nNoBtnID, getResourceString( RID_STR_INSTALL_FOR_ALL ) );
MessageDialog aQuery(m_pVCLWindow, "InstallForAllDialog",
"desktop/ui/installforalldialog.ui");
short nRet = aQuery.Execute();
if ( nRet == RET_CANCEL )
if (nRet == RET_CANCEL)
return false;
bInstallForAll = ( nRet == RET_NO );
return true;
}
void DialogHelper::PostUserEvent( const Link& rLink, void* pCaller )
{
if ( m_nEventID )
......
......@@ -40,11 +40,4 @@ Image RID_IMG_EXTENSION
ImageBitmap = Bitmap { File = "extension_32.png"; };
};
QueryBox RID_QUERYBOX_INSTALL_FOR_ALL
{
Buttons = WB_YES_NO_CANCEL;
DefButton = WB_DEF_YES;
Message[en-US] = "Make sure that no further users are working with the same %PRODUCTNAME, when installing an extension for all users in a multi user environment.\n\nFor whom do you want to install the extension?\n";
};
/* 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"/>
<object class="GtkMessageDialog" id="InstallForAllDialog">
<property name="can_focus">False</property>
<property name="border_width">12</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="text" translatable="yes">For whom do you want to install the extension?</property>
<property name="secondary_text" translatable="yes">Make sure that no further users are working with the same %PRODUCTNAME, when installing an extension for all users in a multi user environment.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="no">
<property name="label" translatable="yes">_For all users</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">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="yes">
<property name="label" translatable="yes">_Only for me</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">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="cancel">
<property name="label">gtk-cancel</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">2</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>
</object>
</child>
<action-widgets>
<action-widget response="3">no</action-widget>
<action-widget response="2">yes</action-widget>
<action-widget response="0">cancel</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