QueryBox QBX_USERDATALOCKED -> MessageDialog + string
Change-Id: If9256bc2ea23a31a902590ca5379abbaec80f080
This commit is contained in:
@@ -26,10 +26,9 @@
|
|||||||
// RID_FIRSTSTSTART_START 3000
|
// RID_FIRSTSTSTART_START 3000
|
||||||
#define RID_DESKTOP_STRING_START 10000
|
#define RID_DESKTOP_STRING_START 10000
|
||||||
|
|
||||||
#define QBX_USERDATALOCKED (RID_DESKTOP_DIALOG_START+100)
|
|
||||||
|
|
||||||
#define STR_RECOVER_QUERY (RID_DESKTOP_STRING_START+0)
|
#define STR_RECOVER_QUERY (RID_DESKTOP_STRING_START+0)
|
||||||
#define STR_RECOVER_TITLE (RID_DESKTOP_STRING_START+1)
|
#define STR_RECOVER_TITLE (RID_DESKTOP_STRING_START+1)
|
||||||
|
#define STR_QUERY_USERDATALOCKED (RID_DESKTOP_STRING_START+2)
|
||||||
|
|
||||||
#define STR_BOOTSTRAP_ERR_CANNOT_START (RID_DESKTOP_STRING_START+100)
|
#define STR_BOOTSTRAP_ERR_CANNOT_START (RID_DESKTOP_STRING_START+100)
|
||||||
#define STR_BOOTSTRAP_ERR_DIR_MISSING (RID_DESKTOP_STRING_START+101)
|
#define STR_BOOTSTRAP_ERR_DIR_MISSING (RID_DESKTOP_STRING_START+101)
|
||||||
|
@@ -134,11 +134,9 @@ String STR_LO_MUST_BE_RESTARTED
|
|||||||
Text [ en-US ] = "%PRODUCTNAME must unfortunately be manually restarted once after installation or update." ;
|
Text [ en-US ] = "%PRODUCTNAME must unfortunately be manually restarted once after installation or update." ;
|
||||||
};
|
};
|
||||||
|
|
||||||
QueryBox QBX_USERDATALOCKED
|
String STR_QUERY_USERDATALOCKED
|
||||||
{
|
{
|
||||||
Buttons = WB_YES_NO ;
|
Text [ en-US ] = "Either another instance of %PRODUCTNAME is accessing your personal settings or your personal settings are locked.\nSimultaneous access can lead to inconsistencies in your personal settings. Before continuing, you should make sure user '$u' closes %PRODUCTNAME on host '$h'.\n\nDo you really want to continue?";
|
||||||
DefButton = WB_DEF_NO ;
|
|
||||||
Message [ en-US ] = "Either another instance of %PRODUCTNAME is accessing your personal settings or your personal settings are locked.\nSimultaneous access can lead to inconsistencies in your personal settings. Before continuing, you should make sure user '$u' closes %PRODUCTNAME on host '$h'.\n\nDo you really want to continue?";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
String STR_TITLE_USERDATALOCKED
|
String STR_TITLE_USERDATALOCKED
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <vcl/msgbox.hxx>
|
#include <vcl/layout.hxx>
|
||||||
#include "desktopresid.hxx"
|
#include "desktopresid.hxx"
|
||||||
#include "desktop.hrc"
|
#include "desktop.hrc"
|
||||||
#include <tools/config.hxx>
|
#include <tools/config.hxx>
|
||||||
@@ -38,19 +38,20 @@ bool Lockfile_execWarning( Lockfile * that )
|
|||||||
OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
|
OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
|
||||||
|
|
||||||
// display warning and return response
|
// display warning and return response
|
||||||
QueryBox aBox( NULL, DesktopResId( QBX_USERDATALOCKED ) );
|
MessageDialog aBox(NULL, DesktopResId(STR_QUERY_USERDATALOCKED),
|
||||||
|
VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
|
||||||
// set box title
|
// set box title
|
||||||
OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
|
OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
|
||||||
aBox.SetText( aTitle );
|
aBox.SetText( aTitle );
|
||||||
// insert values...
|
// insert values...
|
||||||
OUString aMsgText = aBox.GetMessText( );
|
OUString aMsgText = aBox.get_primary_text();
|
||||||
aMsgText = aMsgText.replaceFirst(
|
aMsgText = aMsgText.replaceFirst(
|
||||||
"$u", OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) );
|
"$u", OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) );
|
||||||
aMsgText = aMsgText.replaceFirst(
|
aMsgText = aMsgText.replaceFirst(
|
||||||
"$h", OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) );
|
"$h", OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) );
|
||||||
aMsgText = aMsgText.replaceFirst(
|
aMsgText = aMsgText.replaceFirst(
|
||||||
"$t", OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) );
|
"$t", OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) );
|
||||||
aBox.SetMessText(aMsgText);
|
aBox.set_primary_text(aMsgText);
|
||||||
// do it
|
// do it
|
||||||
return aBox.Execute( ) == RET_YES;
|
return aBox.Execute( ) == RET_YES;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user