| | 458 | | STATUSBAR_REC *statusbar_create(STATUSBAR_GROUP_REC *group, | | | 459 | | STATUSBAR_CONFIG_REC *config, | | | 460 | | MAIN_WINDOW_REC *parent_window) | | | 461 | | { | | | 462 | | STATUSBAR_REC *bar; | | | 463 | | THEME_REC *theme; | | | 464 | | GSList *tmp; | | | 465 | | char *name, *value; | | | 466 | | | | | 467 | | g_return_val_if_fail(group != NULL, NULL);
| | | 468 | | g_return_val_if_fail(config != NULL, NULL);
| | | 469 | | g_return_val_if_fail(config->type != STATUSBAR_TYPE_WINDOW ||
| | | 470 | | parent_window != NULL, NULL); | | | 471 | | | | | 472 | | bar = g_new0(STATUSBAR_REC, 1);
| | | 473 | | group->bars = g_slist_append(group->bars, bar); | | | 474 | | | | | 475 | | bar->group = group; | | | 476 | | | | | 477 | | bar->config = config; | | | 478 | | bar->parent_window = parent_window; | | | 479 | | | | | 480 | | (); | | | 481 | | bar->dirty = TRUE;
| | | 482 | | bar->dirty_xpos = 0; | | | 483 | | | | | 484 | | signal_remove("terminal resized", (SIGNAL_FUNC) sig_terminal_resized);
| | | 485 | | signal_remove("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized);
| | | 486 | | signal_remove("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized);
| | | 487 | | | | | 488 | | if (config->type == STATUSBAR_TYPE_ROOT) {
| | | 489 | | | | | 490 | | mainwindows_reserve_lines(config->placement == STATUSBAR_TOP,
| | | 491 | | config->placement == STATUSBAR_BOTTOM);
| | | 492 | | theme = current_theme; | | | 493 | | } else { | | | 494 | | | | | 495 | | parent_window->statusbars = | | | 496 | | g_slist_append(parent_window->statusbars, bar); | | | 497 | | mainwindow_set_statusbar_lines(parent_window, | | | 498 | | config->placement == STATUSBAR_TOP,
| | | 499 | | config->placement == STATUSBAR_BOTTOM);
| | | 500 | | theme = parent_window != NULL && parent_window->active != NULL &&
| | | 501 | | parent_window->active->theme != NULL ?
| | | 502 | | parent_window->active->theme : current_theme; | | | 503 | | } | | | 504 | | | | | 505 | | signal_add("terminal resized", (SIGNAL_FUNC) sig_terminal_resized);
| | | 506 | | signal_add("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized);
| | | 507 | | signal_add("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized);
| | | 508 | | | | | 509 | | | | | 510 | | name = g_strdup_printf("{sb_%s_bg}", config->name); |
| | 558 | | | | char *theme_format_expand(THEME_REC *theme, const char *format) | | | 559 | | | | { | | | 560 | | | | char *data, *ret; | | | 561 | | | | | | true | 562 | | | | g_return_val_if_fail(theme != NULL, NULL);
| | | 563 | | | | g_return_val_if_fail(format != NULL, NULL);
| | | 564 | | | | | | | 565 | | | | data = theme_format_expand_data(theme, &format, 'n', 'n', NULL, NULL,
| | | 566 | | | | EXPAND_FLAG_ROOT);
| | | 567 | | | | ret = theme_format_compress_colors(theme, data); | | | 568 | | | | g_free(data); | | | 569 | | | | return ret; | | theme_format_expand$return <= 4095 | 570 | | | | } | Problem | | theme_format_expand$return <= 4095 |
|
|