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 <superstippi@gmx.de>
This commit is contained in:
parent
26b5a18eb0
commit
e88c3d58bd
|
@ -10,7 +10,7 @@ SYSTEM_BIN += [ FFilterByBuildFeatures
|
|||
FirstBootPrompt fwcontrol@x86
|
||||
installsound
|
||||
mail mail2mbox mbox2mail media_client mkdos mount_nfs
|
||||
play recover screenshot setdecor spamdbm
|
||||
play recover screenshot setcontrollook setdecor spamdbm
|
||||
translate
|
||||
WindowShade
|
||||
] ;
|
||||
|
|
|
@ -118,6 +118,7 @@ StdBinCommands
|
|||
resattr.cpp
|
||||
screeninfo.cpp
|
||||
setarch.cpp
|
||||
setcontrollook.cpp
|
||||
setdecor.cpp
|
||||
settype.cpp
|
||||
spybmessage.cpp
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* Copyright 2019, François Revol, revol@free.fr.
|
||||
* 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue