summaryrefslogtreecommitdiff
path: root/drivemount/drive-list.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-02-08 23:55:57 +0100
committerraveit65 <[email protected]>2020-02-29 15:45:09 +0100
commit42818f5e0569eb9045c009a9a9b7366f4cfba727 (patch)
treec43d6537b7c060fb9a9c4c99fa5d51394f3c4a98 /drivemount/drive-list.c
parent71d007c4765efb844c5d6c960a78f479ff7196d9 (diff)
downloadmate-applets-42818f5e0569eb9045c009a9a9b7366f4cfba727.tar.bz2
mate-applets-42818f5e0569eb9045c009a9a9b7366f4cfba727.tar.xz
drivemount: Remove global variable
Diffstat (limited to 'drivemount/drive-list.c')
-rw-r--r--drivemount/drive-list.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivemount/drive-list.c b/drivemount/drive-list.c
index 1b3679b3..97e28573 100644
--- a/drivemount/drive-list.c
+++ b/drivemount/drive-list.c
@@ -32,8 +32,6 @@
G_DEFINE_TYPE (DriveList, drive_list, GTK_TYPE_GRID);
-GSettings *settings;
-
static GVolumeMonitor *volume_monitor = NULL;
static void drive_list_finalize (GObject *object);
@@ -89,9 +87,15 @@ drive_list_init (DriveList *self)
self->mounts = g_hash_table_new (NULL, NULL);
self->orientation = GTK_ORIENTATION_HORIZONTAL;
self->layout_tag = 0;
+ self->settings = g_settings_new ("org.mate.drivemount");
self->icon_size = 24;
self->relief = GTK_RELIEF_NORMAL;
+ g_signal_connect(self->settings,
+ "changed::drivemount-checkmark-color",
+ G_CALLBACK (settings_color_changed),
+ self);
+
/* listen for drive connects/disconnects, and add
* currently connected drives. */
self->count = 0;
@@ -154,8 +158,7 @@ drive_list_finalize (GObject *object)
g_hash_table_destroy (self->volumes);
g_hash_table_destroy (self->mounts);
-
- g_object_unref (settings);
+ g_object_unref (self->settings);
if (G_OBJECT_CLASS (drive_list_parent_class)->finalize)
(* G_OBJECT_CLASS (drive_list_parent_class)->finalize) (object);