#include "upac-gtk.h"

gboolean yon_size_update(main_window *widgets){
    long groups_size = yon_groups_get_size(widgets);
    long modules_size = yon_modules_get_size(widgets);
    long pacman_size = yon_pacman_get_size(widgets);
    long desktop_size = yon_desktop_get_size(widgets);

    long full_size = groups_size + modules_size + pacman_size + desktop_size;

    textdomain(timezone_locale_name);
    char *size_string = yon_size_long_convert_automatic_to_string_preserve_negative(full_size);
    textdomain(LocaleName);
    gtk_label_set_text(GTK_LABEL(widgets->OverallSizeLabel),size_string);
    free(size_string);
    if (!full_size) return 0;
    return 1;
}
