summaryrefslogtreecommitdiff
path: root/drivemount
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-11-27 09:25:50 +0100
committerZenWalker <[email protected]>2019-12-04 14:55:43 +0100
commitd3cae6249d156e847176d49897a49ca8a0a0c094 (patch)
tree611bb1e847511c2ecdd23bb3eea1a32ff58a5c7e /drivemount
parentcec742f132e318db1de4d01d841fea15238798c3 (diff)
downloadmate-applets-d3cae6249d156e847176d49897a49ca8a0a0c094.tar.bz2
mate-applets-d3cae6249d156e847176d49897a49ca8a0a0c094.tar.xz
avoid redundant redeclarations
Diffstat (limited to 'drivemount')
-rw-r--r--drivemount/drive-button.c3
-rw-r--r--drivemount/drive-button.h2
2 files changed, 4 insertions, 1 deletions
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