Project

General

Profile

Bug #931 » 0035-gtk-Fix-memory-leaks.patch

main - Marko Lindqvist, 10/08/2024 08:21 PM

View differences:

client/gui-gtk-3.22/pages.c
static gboolean intro_expose(GtkWidget *w, cairo_t *cr, gpointer *data)
{
static PangoLayout *layout;
PangoFontDescription* desc;
static int width, height;
static bool left = FALSE;
GtkAllocation allocation;
......
const char *rev_ver;
layout = pango_layout_new(gtk_widget_create_pango_context(w));
pango_layout_set_font_description(layout,
pango_font_description_from_string("Sans Bold 10"));
desc = pango_font_description_from_string("Sans Bold 10");
pango_layout_set_font_description(layout, desc);
pango_font_description_free(desc);
rev_ver = fc_git_revision();
client/gui-gtk-3.22/themes.c
fc_snprintf(buf, sizeof(buf), "%s/%s/gtk-3.0/gtk.css", directory,
theme_name);
gtk_css_provider_load_from_file(theme_provider, g_file_new_for_path(buf), &error);
gtk_css_provider_load_from_path(theme_provider, buf, &error);
if (error != NULL) {
g_warning("%s\n", error->message);
client/gui-gtk-4.0/pages.c
int width, int height, gpointer data)
{
static PangoLayout *layout;
PangoFontDescription* desc;
static int pwidth, pheight;
static bool left = FALSE;
GtkAllocation allocation;
......
const char *rev_ver;
layout = pango_layout_new(gtk_widget_create_pango_context(GTK_WIDGET(w)));
pango_layout_set_font_description(layout,
pango_font_description_from_string("Sans Bold 10"));
desc = pango_font_description_from_string("Sans Bold 10");
pango_layout_set_font_description(layout, desc);
pango_font_description_free(desc);
rev_ver = fc_git_revision();
client/gui-gtk-4.0/themes.c
fc_snprintf(buf, sizeof(buf), "%s/%s/gtk-4.0/gtk.css", directory,
theme_name);
gtk_css_provider_load_from_file(theme_provider, g_file_new_for_path(buf));
gtk_css_provider_load_from_path(theme_provider, buf);
}
/*************************************************************************//**
client/gui-gtk-5.0/pages.c
int width, int height, gpointer data)
{
static PangoLayout *layout;
PangoFontDescription* desc;
static int pwidth, pheight;
static bool left = FALSE;
GtkAllocation allocation;
......
const char *rev_ver;
layout = pango_layout_new(gtk_widget_create_pango_context(GTK_WIDGET(w)));
pango_layout_set_font_description(layout,
pango_font_description_from_string("Sans Bold 10"));
desc = pango_font_description_from_string("Sans Bold 10");
pango_layout_set_font_description(layout, desc);
pango_font_description_free(desc);
rev_ver = fc_git_revision();
client/gui-gtk-5.0/themes.c
fc_snprintf(buf, sizeof(buf), "%s/%s/gtk-4.0/gtk.css", directory,
theme_name);
gtk_css_provider_load_from_file(theme_provider, g_file_new_for_path(buf));
gtk_css_provider_load_from_path(theme_provider, buf);
}
/*************************************************************************//**
(1-1/4)