From d3cae6249d156e847176d49897a49ca8a0a0c094 Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Wed, 27 Nov 2019 09:25:50 +0100 Subject: avoid redundant redeclarations --- drivemount/drive-button.c | 3 +++ drivemount/drive-button.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'drivemount') diff --git a/drivemount/drive-button.c b/drivemount/drive-button.c index 2d91c4de..dd135384 100644 --- a/drivemount/drive-button.c +++ b/drivemount/drive-button.c @@ -400,11 +400,14 @@ drive_button_update (gpointer user_data) pixels = cairo_image_surface_get_data (tmp_surface); GdkRGBA color; + GSettings *settings; + settings = g_settings_new ("org.mate.drivemount"); gchar *color_string = g_settings_get_string (settings, "drivemount-checkmark-color"); if (!color_string) color_string = g_strdup ("#00ff00"); gdk_rgba_parse (&color, color_string); g_free (color_string); + g_object_unref (settings); guchar red = color.red*255; guchar green = color.green*255; diff --git a/drivemount/drive-button.h b/drivemount/drive-button.h index 8974f7bf..010e65a0 100644 --- a/drivemount/drive-button.h +++ b/drivemount/drive-button.h @@ -63,7 +63,7 @@ void drive_button_set_size (DriveButton *button, int drive_button_compare (DriveButton *button, DriveButton *other_button); -GSettings *settings; + void drive_button_redraw (gpointer key, gpointer value, gpointer user_data); G_END_DECLS -- cgit v1.2.1