void statusbar_deinit(void) { while (statusbar_groups != NULL) statusbar_group_destroy(statusbar_groups->data); g_hash_table_foreach(sbar_item_defs, (GHFunc) statusbar_item_def_destroy, NULL); g_hash_table_destroy(sbar_item_defs); g_hash_table_foreach(sbar_item_funcs, (GHFunc) g_free, NULL); g_hash_table_destroy(sbar_item_funcs); g_hash_table_foreach(sbar_signal_items, (GHFunc) statusbar_signal_item_destroy, NULL); g_hash_table_destroy(sbar_signal_items); g_hash_table_foreach(sbar_item_signals, (GHFunc) statusbar_item_signal_destroy, NULL); g_hash_table_destroy(sbar_item_signals); g_hash_table_destroy(named_sbar_items); signal_remove("terminal resized", (SIGNAL_FUNC) sig_terminal_resized); signal_remove("mainwindow resized", (SIGNAL_FUNC) sig_mainwindow_resized); signal_remove("mainwindow moved", (SIGNAL_FUNC) sig_mainwindow_resized); signal_remove("gui window created", (SIGNAL_FUNC) sig_gui_window_created); signal_remove("window changed", (SIGNAL_FUNC) sig_window_changed); signal_remove("mainwindow destroyed", (SIGNAL_FUNC) sig_mainwindow_destroyed); statusbar_items_deinit(); statusbar_config_deinit(); }
static void statusbar_reset_defaults(void) { CONFIG_REC *config; CONFIG_NODE *node; while (statusbar_groups != NULL) statusbar_group_destroy(statusbar_groups->data); active_statusbar_group = NULL; /* read the default statusbar settings from internal config */ config = config_open(NULL, -1); config_parse_data(config, default_config, "internal"); node = config_node_traverse(config, "statusbar", FALSE); if (node != NULL) read_statusbar_config_from_node(node); config_close(config); }