Add setcontrollook minimal CLI tool
Just does what the name says Change-Id: I6cf23f997ce544df83d4ef2f73a3b130dea8825c Reviewed-on: https://review.haiku-os.org/c/1432 Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
26b5a18eb0
commit
e88c3d58bd
@@ -10,7 +10,7 @@ SYSTEM_BIN += [ FFilterByBuildFeatures
|
|||||||
FirstBootPrompt fwcontrol@x86
|
FirstBootPrompt fwcontrol@x86
|
||||||
installsound
|
installsound
|
||||||
mail mail2mbox mbox2mail media_client mkdos mount_nfs
|
mail mail2mbox mbox2mail media_client mkdos mount_nfs
|
||||||
play recover screenshot setdecor spamdbm
|
play recover screenshot setcontrollook setdecor spamdbm
|
||||||
translate
|
translate
|
||||||
WindowShade
|
WindowShade
|
||||||
] ;
|
] ;
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ StdBinCommands
|
|||||||
resattr.cpp
|
resattr.cpp
|
||||||
screeninfo.cpp
|
screeninfo.cpp
|
||||||
setarch.cpp
|
setarch.cpp
|
||||||
|
setcontrollook.cpp
|
||||||
setdecor.cpp
|
setdecor.cpp
|
||||||
settype.cpp
|
settype.cpp
|
||||||
spybmessage.cpp
|
spybmessage.cpp
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2019, François Revol, [email protected].
|
||||||
|
* Distributed under the terms of the MIT license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <Application.h>
|
||||||
|
#include <InterfacePrivate.h>
|
||||||
|
#include <String.h>
|
||||||
|
|
||||||
|
using BPrivate::set_control_look;
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
if (argc < 2) {
|
||||||
|
printf("usage: %s /path/to/ControlLook\n", argv[0]);
|
||||||
|
printf("\nTells app_server and applications which ControlLook "
|
||||||
|
"add-on to load, which defines the look of interface controls.\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
BString path(argv[1]);
|
||||||
|
|
||||||
|
BApplication app("application/x-vnd.Haiku-setcontrollook");
|
||||||
|
|
||||||
|
status_t err = set_control_look(path);
|
||||||
|
if (err < B_OK) {
|
||||||
|
fprintf(stderr, "error setting Control Look: %s\n", strerror(err));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user