Renamed to pango_markup

This commit is contained in:
Mykyta Holubakha 2016-04-24 20:35:21 +03:00
parent ee4e245f16
commit 0f1cfdec61
9 changed files with 18 additions and 18 deletions

View file

@ -46,7 +46,7 @@ char *parse_font(const char *font) {
struct config *init_config() {
struct config *config = calloc(1, sizeof(struct config));
config->status_command = NULL;
config->plaintext_markup = true;
config->pango_markup = true;
config->position = DESKTOP_SHELL_PANEL_POSITION_BOTTOM;
config->font = strdup("monospace 10");
config->mode = NULL;

View file

@ -27,7 +27,7 @@ static void ipc_parse_config(struct config *config, const char *payload) {
json_object_object_get_ex(bar_config, "separator_symbol", &sep_symbol);
json_object_object_get_ex(bar_config, "colors", &colors);
json_object_object_get_ex(bar_config, "outputs", &outputs);
json_object_object_get_ex(bar_config, "plaintext_markup", &markup);
json_object_object_get_ex(bar_config, "pango_markup", &markup);
if (status_command) {
free(config->status_command);
@ -65,7 +65,7 @@ static void ipc_parse_config(struct config *config, const char *payload) {
}
if (markup) {
config->plaintext_markup = json_object_get_boolean(markup);
config->pango_markup = json_object_get_boolean(markup);
}
// free previous outputs list

View file

@ -278,9 +278,9 @@ void render(struct output *output, struct config *config, struct status_line *li
int width, height;
if (line->protocol == TEXT) {
get_text_size(window->cairo, window->font, &width, &height, config->plaintext_markup, "%s", line->text_line);
get_text_size(window->cairo, window->font, &width, &height, config->pango_markup, "%s", line->text_line);
cairo_move_to(cairo, window->width - margin - width, margin);
pango_printf(window->cairo, window->font, config->plaintext_markup, "%s", line->text_line);
pango_printf(window->cairo, window->font, config->pango_markup, "%s", line->text_line);
} else if (line->protocol == I3BAR && line->block_line) {
double pos = window->width - 0.5;
bool edge = true;