Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(src): improved some strings. #112

Merged
merged 1 commit into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
### Generic
- [ ] Drop is_smooth options for gamma
- [ ] avoid returning boolean where it does not make sense
- [ ] Rename Wl to Wlr (wlroots) in interfaces

## Ideas
- [ ] follow ddcci kernel driver and in case, drop ddcutil and add the kernel driver as clightd opt-dep
4 changes: 2 additions & 2 deletions src/modules/dpms.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static int method_getdpms(sd_bus_message *m, void *userdata, sd_bus_error *ret_e
if (dpms_state < 0) {
switch (dpms_state) {
case COMPOSITOR_NO_PROTOCOL:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support wayland protocol.");
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support required wayland protocols.");
break;
case WRONG_PLUGIN:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "No plugin available for your configuration.");
Expand Down Expand Up @@ -171,7 +171,7 @@ static int method_setdpms(sd_bus_message *m, void *userdata, sd_bus_error *ret_e
if (err) {
switch (err) {
case COMPOSITOR_NO_PROTOCOL:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support neither 'wlr-output-power-management-unstable-v1' nor 'org_kde_kwin_dpms' protocols.");
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support required wayland protocols.");
break;
case WRONG_PLUGIN:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "No plugin available for your configuration.");
Expand Down
2 changes: 1 addition & 1 deletion src/modules/dpms_plugins/kwin_wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static int wl_init(const char *display, const char *env) {
wl_display_roundtrip(dpy);

if (dpms_control_manager == NULL) {
fprintf(stderr, "compositor doesn't support org_kde_kwin_dpms\n");
fprintf(stderr, "compositor doesn't support '%s'\n", org_kde_kwin_dpms_manager_interface.name);
ret = COMPOSITOR_NO_PROTOCOL;
goto err;
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/gamma.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ static int method_setgamma(sd_bus_message *m, void *userdata, sd_bus_error *ret_
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Temperature value should be between 1000 and 10000.");
break;
case COMPOSITOR_NO_PROTOCOL:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support wayland protocol.");
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support required wayland protocols.");
break;
case WRONG_PLUGIN:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "No plugin available for your configuration.");
Expand Down Expand Up @@ -375,7 +375,7 @@ static int method_getgamma(sd_bus_message *m, void *userdata, sd_bus_error *ret_
if (error || temp == -1) {
switch (error) {
case COMPOSITOR_NO_PROTOCOL:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support 'wlr-gamma-control-unstable-v1' protocol.");
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "Compositor does not support required wayland protocols.");
break;
case WRONG_PLUGIN:
sd_bus_error_set_const(ret_error, SD_BUS_ERROR_FAILED, "No plugin available for your configuration.");
Expand Down
2 changes: 1 addition & 1 deletion src/modules/gamma_plugins/wl.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ static int validate(const char **id, const char *env, void **priv_data) {
wl_display_roundtrip(display);

if (priv->gamma_control_manager == NULL) {
fprintf(stderr, "compositor doesn't support wlr-gamma-control-unstable-v1\n");
fprintf(stderr, "compositor doesn't support '%s'\n", zwlr_gamma_control_manager_v1_interface.name);
ret = COMPOSITOR_NO_PROTOCOL;
goto err;
}
Expand Down
Loading