mirror of
https://github.com/TrianguloY/LightningLauncher.git
synced 2024-12-26 09:58:20 +01:00
Show toast when disabling scripts.
(note: I don't fully understand the string naming convention, probably needs a different name)
This commit is contained in:
parent
e7a5b19775
commit
5894104e6d
3 changed files with 10 additions and 2 deletions
|
@ -6,6 +6,8 @@ import android.content.Context;
|
|||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Toast;
|
||||
|
||||
import net.pierrox.lightning_launcher.LLApp;
|
||||
import net.pierrox.lightning_launcher.R;
|
||||
import net.pierrox.lightning_launcher.api.ScreenIdentity;
|
||||
|
@ -68,7 +70,9 @@ public class MultiPurposeTransparentActivity extends ResourceWrapperActivity {
|
|||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
// should pass the base dir of the engine in the intent and use it instead of the default engine
|
||||
LLApp.get().getAppEngine().getScriptManager().getOrLoadScript(script_id).setFlag(Script.FLAG_DISABLED, true);
|
||||
LLApp llApp = LLApp.get();
|
||||
llApp.getAppEngine().getScriptManager().getOrLoadScript(script_id).setFlag(Script.FLAG_DISABLED, true);
|
||||
Toast.makeText(llApp, R.string.sc_disable_toast, Toast.LENGTH_LONG).show();
|
||||
finish();
|
||||
}
|
||||
});
|
||||
|
|
|
@ -344,6 +344,7 @@ public class ScriptExecutor {
|
|||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
mCurrentScriptDialog = false;
|
||||
mCurrentScript.setFlag(Script.FLAG_DISABLED, true);
|
||||
Toast.makeText(context, R.string.sc_disable_toast, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
builder.setCancelable(false);
|
||||
|
@ -406,6 +407,7 @@ public class ScriptExecutor {
|
|||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
mCurrentScriptDialog = false;
|
||||
script.setFlag(Script.FLAG_DISABLED, true);
|
||||
Toast.makeText(context, R.string.sc_disable_toast, Toast.LENGTH_LONG).show();
|
||||
continuePendingContinuation(pending, input == null ? false : null);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1309,7 +1309,9 @@
|
|||
|
||||
|
||||
<string name="permission_label">Use Script Service</string>
|
||||
<string name="permission_description">Allows to view, create, editm delete and run scripts in Lightning Launcher.</string>
|
||||
<string name="permission_description">Allows to view, create, edit, delete and run scripts in Lightning Launcher.</string>
|
||||
|
||||
<string name="sc_disable_toast">Script disabled. Open it in the editor to enable again</string>
|
||||
|
||||
|
||||
<!-- deprecated: before 90 -->
|
||||
|
|
Loading…
Reference in a new issue