B_SAFEMODE_DISABLE_USER_ADD_ONS is also a safe mode we now honor in translation kit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25332 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -7,7 +7,7 @@ if $(TARGET_PLATFORM) != haiku {
|
|||||||
UsePublicHeaders translation ;
|
UsePublicHeaders translation ;
|
||||||
}
|
}
|
||||||
|
|
||||||
UsePrivateHeaders translation textencoding ;
|
UsePrivateHeaders kernel translation textencoding ;
|
||||||
|
|
||||||
SharedLibrary libtranslation.so :
|
SharedLibrary libtranslation.so :
|
||||||
BitmapStream.cpp
|
BitmapStream.cpp
|
||||||
|
|||||||
@@ -17,12 +17,13 @@
|
|||||||
#include "FuncTranslator.h"
|
#include "FuncTranslator.h"
|
||||||
#include "TranslatorRosterPrivate.h"
|
#include "TranslatorRosterPrivate.h"
|
||||||
|
|
||||||
|
#include <image.h>
|
||||||
|
#include <safemode.h>
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <FindDirectory.h>
|
#include <FindDirectory.h>
|
||||||
#include <driver_settings.h>
|
|
||||||
#include <image.h>
|
|
||||||
#include <NodeMonitor.h>
|
#include <NodeMonitor.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
@@ -152,6 +153,18 @@ BTranslatorRoster::Private::Private()
|
|||||||
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
|
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
|
||||||
fSafeMode = true;
|
fSafeMode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAIKU_TARGET_PLATFORM_HAIKU
|
||||||
|
if (_kern_get_safemode_option(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, ¶meterLength) == B_OK)
|
||||||
|
#else
|
||||||
|
if (_kget_safemode_option_(B_SAFEMODE_DISABLE_USER_ADD_ONS, parameter, ¶meterLength) == B_OK)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
if (!strcasecmp(parameter, "enabled") || !strcasecmp(parameter, "on")
|
||||||
|
|| !strcasecmp(parameter, "true") || !strcasecmp(parameter, "yes")
|
||||||
|
|| !strcasecmp(parameter, "enable") || !strcmp(parameter, "1"))
|
||||||
|
fSafeMode = true;
|
||||||
|
}
|
||||||
|
|
||||||
// we're sneaking us into the BApplication
|
// we're sneaking us into the BApplication
|
||||||
if (be_app != NULL && be_app->Lock()) {
|
if (be_app != NULL && be_app->Lock()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user