mirror of
https://github.com/labwc/labwc.git
synced 2025-10-31 22:25:34 -04:00
Compare commits
7 commits
998ff9e7b5
...
e1820adcd3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1820adcd3 | ||
|
|
474c513ed6 | ||
|
|
c27d4955a4 | ||
|
|
7166efe7bf | ||
|
|
017152da52 | ||
|
|
814af0ae4d | ||
|
|
cb0a4b875e |
4 changed files with 36 additions and 11 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
|
@ -17,6 +17,7 @@ on:
|
||||||
- 'src/**'
|
- 'src/**'
|
||||||
- 'include/**'
|
- 'include/**'
|
||||||
- 'protocols/**'
|
- 'protocols/**'
|
||||||
|
- 'clients/**'
|
||||||
- 'scripts/**'
|
- 'scripts/**'
|
||||||
- '.github/workflows/**'
|
- '.github/workflows/**'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ executable(
|
||||||
epoll_dep,
|
epoll_dep,
|
||||||
],
|
],
|
||||||
include_directories: [labwc_inc],
|
include_directories: [labwc_inc],
|
||||||
install: true
|
install: true,
|
||||||
)
|
)
|
||||||
|
|
||||||
clients = files('lab-sensible-terminal')
|
clients = files('lab-sensible-terminal')
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ create_attribute_tree(const xmlAttr *attr)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Consider <keybind name.action="ShowMenu" x.position.action="1" y.position="2" />.
|
* Consider <keybind name.action="ShowMenu" x.position.action="1" y.position.action="2" />.
|
||||||
* These three attributes are represented by following trees.
|
* These three attributes are represented by following trees.
|
||||||
* action(dst)---name
|
* action(dst)---name
|
||||||
* action(src)---position---x
|
* action(src)---position---x
|
||||||
|
|
@ -79,7 +79,8 @@ merge_two_trees(xmlNode *dst, xmlNode *src)
|
||||||
&& !strcasecmp((char *)dst->name, (char *)src->name)) {
|
&& !strcasecmp((char *)dst->name, (char *)src->name)) {
|
||||||
xmlNode *next_dst = dst->last;
|
xmlNode *next_dst = dst->last;
|
||||||
xmlNode *next_src = src->children;
|
xmlNode *next_src = src->children;
|
||||||
xmlAddChild(dst, src->children);
|
xmlUnlinkNode(next_src);
|
||||||
|
xmlAddChild(dst, next_src);
|
||||||
xmlUnlinkNode(src);
|
xmlUnlinkNode(src);
|
||||||
xmlFreeNode(src);
|
xmlFreeNode(src);
|
||||||
src = next_src;
|
src = next_src;
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,10 @@ log_handler(enum sfdo_log_level level, const char *fmt, va_list args, void *tag)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To avoid logging issues with .desktop files as errors, all libsfdo
|
* To avoid logging issues with .desktop files as errors, all libsfdo
|
||||||
* error-logging is demoted to info level.
|
* error-logging is demoted to info level unless running with
|
||||||
|
* LABWC_DEBUG_LIBSFDO.
|
||||||
*/
|
*/
|
||||||
if (level == SFDO_LOG_LEVEL_ERROR) {
|
if (!debug_libsfdo && level == SFDO_LOG_LEVEL_ERROR) {
|
||||||
level = SFDO_LOG_LEVEL_INFO;
|
level = SFDO_LOG_LEVEL_INFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -95,19 +96,37 @@ desktop_entry_init(struct server *server)
|
||||||
* We set some relaxed load options to accommodate delinquent themes in
|
* We set some relaxed load options to accommodate delinquent themes in
|
||||||
* the wild, namely:
|
* the wild, namely:
|
||||||
*
|
*
|
||||||
* - SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING to "impose less
|
* - SFDO_ICON_THEME_LOAD_OPTION_RELAXED to "impose less restrictions
|
||||||
* restrictions on the format of icon theme files"
|
* on the format of icon theme files"
|
||||||
*
|
*
|
||||||
* - SFDO_ICON_THEME_LOAD_OPTION_RELAXED to "continue loading even if it
|
* - SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING to "continue loading
|
||||||
* fails to find a theme or one of its dependencies."
|
* even if it fails to find a theme or one of its dependencies."
|
||||||
*/
|
*/
|
||||||
int load_options = SFDO_ICON_THEME_LOAD_OPTIONS_DEFAULT
|
int load_options = SFDO_ICON_THEME_LOAD_OPTIONS_DEFAULT
|
||||||
| SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING
|
| SFDO_ICON_THEME_LOAD_OPTION_RELAXED
|
||||||
| SFDO_ICON_THEME_LOAD_OPTION_RELAXED;
|
| SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING;
|
||||||
|
|
||||||
sfdo->icon_theme = sfdo_icon_theme_load(
|
sfdo->icon_theme = sfdo_icon_theme_load(
|
||||||
sfdo->icon_ctx,
|
sfdo->icon_ctx,
|
||||||
rc.icon_theme_name, load_options);
|
rc.icon_theme_name, load_options);
|
||||||
|
if (!sfdo->icon_theme) {
|
||||||
|
/*
|
||||||
|
* sfdo_icon_theme_load() falls back to hicolor theme with
|
||||||
|
* _ALLOW_MISSING flag when the theme is missing, but just
|
||||||
|
* fails when the theme is invalid.
|
||||||
|
* So manually call sfdo_icon_theme_load() again here.
|
||||||
|
*/
|
||||||
|
wlr_log(WLR_ERROR, "Failed to load icon theme %s, falling back to 'hicolor'",
|
||||||
|
rc.icon_theme_name);
|
||||||
|
|
||||||
|
if (!debug_libsfdo) {
|
||||||
|
wlr_log(WLR_ERROR, "Further information is available by setting "
|
||||||
|
"the LABWC_DEBUG_LIBSFDO=1 env var before starting labwc");
|
||||||
|
}
|
||||||
|
|
||||||
|
sfdo->icon_theme = sfdo_icon_theme_load(
|
||||||
|
sfdo->icon_ctx, "hicolor", load_options);
|
||||||
|
}
|
||||||
if (!sfdo->icon_theme) {
|
if (!sfdo->icon_theme) {
|
||||||
goto err_icon_theme;
|
goto err_icon_theme;
|
||||||
}
|
}
|
||||||
|
|
@ -129,6 +148,10 @@ err_desktop_ctx:
|
||||||
err_basedir_ctx:
|
err_basedir_ctx:
|
||||||
free(sfdo);
|
free(sfdo);
|
||||||
wlr_log(WLR_ERROR, "Failed to initialize icon loader");
|
wlr_log(WLR_ERROR, "Failed to initialize icon loader");
|
||||||
|
if (!debug_libsfdo) {
|
||||||
|
wlr_log(WLR_ERROR, "Further information is available by setting "
|
||||||
|
"the LABWC_DEBUG_LIBSFDO=1 env var before starting labwc");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue