diff --git a/source/rofi.c b/source/rofi.c index 7b8d553c..2bf17cb0 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -946,6 +946,7 @@ int main(int argc, char *argv[]) { TICK_N("Parse theme"); rofi_theme_reset(); if (rofi_theme_parse_file(config.theme)) { + g_warning("Failed to parse theme: \"%s\"", config.theme); // TODO: instantiate fallback theme.? rofi_theme_free(rofi_theme); rofi_theme = NULL; @@ -986,7 +987,9 @@ int main(int argc, char *argv[]) { windowid = config.monitor; } } - if (rofi_theme_is_empty()) { + // Load default theme, if no theme was set and we don't have a current theme + // loaded. + if (config.theme == NULL && rofi_theme_is_empty()) { GBytes *theme_data = g_resource_lookup_data( resources_get_resource(), "/org/qtools/rofi/default_theme.rasi", G_RESOURCE_LOOKUP_FLAGS_NONE, NULL); @@ -1016,6 +1019,8 @@ int main(int argc, char *argv[]) { if (theme_str) { for (int index = 0; theme_str && theme_str[index]; index++) { if (rofi_theme_parse_string(theme_str[index])) { + g_warning("Failed to parse -theme-str option: \"%s\"", + theme_str[index]); rofi_theme_free(rofi_theme); rofi_theme = NULL; } diff --git a/source/theme.c b/source/theme.c index 10b4e0f5..8a7e3d0a 100644 --- a/source/theme.c +++ b/source/theme.c @@ -1313,16 +1313,6 @@ gboolean rofi_theme_is_empty(void) { if (rofi_theme->properties == NULL && rofi_theme->num_widgets == 0) { return TRUE; } - if (rofi_theme->num_widgets == 3) { - // HACK: check for default added elements. - for (unsigned int i = 0; i < rofi_theme->num_widgets; i++) { - if (strncmp(rofi_theme->widgets[i]->name, "element", 7) != 0) { - return FALSE; - } - } - return TRUE; - } - return FALSE; }