mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -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/**'
|
||||
- 'include/**'
|
||||
- 'protocols/**'
|
||||
- 'clients/**'
|
||||
- 'scripts/**'
|
||||
- '.github/workflows/**'
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ executable(
|
|||
epoll_dep,
|
||||
],
|
||||
include_directories: [labwc_inc],
|
||||
install: true
|
||||
install: true,
|
||||
)
|
||||
|
||||
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.
|
||||
* action(dst)---name
|
||||
* action(src)---position---x
|
||||
|
|
@ -79,7 +79,8 @@ merge_two_trees(xmlNode *dst, xmlNode *src)
|
|||
&& !strcasecmp((char *)dst->name, (char *)src->name)) {
|
||||
xmlNode *next_dst = dst->last;
|
||||
xmlNode *next_src = src->children;
|
||||
xmlAddChild(dst, src->children);
|
||||
xmlUnlinkNode(next_src);
|
||||
xmlAddChild(dst, next_src);
|
||||
xmlUnlinkNode(src);
|
||||
xmlFreeNode(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
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
|
@ -95,19 +96,37 @@ desktop_entry_init(struct server *server)
|
|||
* We set some relaxed load options to accommodate delinquent themes in
|
||||
* the wild, namely:
|
||||
*
|
||||
* - SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING to "impose less
|
||||
* restrictions on the format of icon theme files"
|
||||
* - SFDO_ICON_THEME_LOAD_OPTION_RELAXED to "impose less restrictions
|
||||
* on the format of icon theme files"
|
||||
*
|
||||
* - SFDO_ICON_THEME_LOAD_OPTION_RELAXED to "continue loading even if it
|
||||
* fails to find a theme or one of its dependencies."
|
||||
* - SFDO_ICON_THEME_LOAD_OPTION_ALLOW_MISSING to "continue loading
|
||||
* even if it fails to find a theme or one of its dependencies."
|
||||
*/
|
||||
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_ctx,
|
||||
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) {
|
||||
goto err_icon_theme;
|
||||
}
|
||||
|
|
@ -129,6 +148,10 @@ err_desktop_ctx:
|
|||
err_basedir_ctx:
|
||||
free(sfdo);
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue