[gnome-applets] drivemount: don't connect to change_background signal
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-applets] drivemount: don't connect to change_background signal
- Date: Tue, 26 Jul 2016 21:50:10 +0000 (UTC)
commit ea315cdba29f77b42bccb338f54806aa66f45f1d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Jul 27 00:48:37 2016 +0300
drivemount: don't connect to change_background signal
drivemount/drive-list.c | 27 ---------------------------
drivemount/drive-list.h | 2 --
drivemount/drivemount.c | 10 ----------
3 files changed, 0 insertions(+), 39 deletions(-)
---
diff --git a/drivemount/drive-list.c b/drivemount/drive-list.c
index 12a85fe..8656aec 100644
--- a/drivemount/drive-list.c
+++ b/drivemount/drive-list.c
@@ -87,7 +87,6 @@ drive_list_init (DriveList *self)
self->orientation = GTK_ORIENTATION_HORIZONTAL;
self->layout_tag = 0;
self->icon_size = 24;
- self->relief = GTK_RELIEF_NORMAL;
/* listen for drive connects/disconnects, and add
* currently connected drives. */
@@ -336,7 +335,6 @@ add_volume (DriveList *self, GVolume *volume)
return;
button = drive_button_new (volume);
- gtk_button_set_relief (GTK_BUTTON (button), self->relief);
drive_button_set_size (DRIVE_BUTTON (button), self->icon_size);
gtk_container_add (GTK_CONTAINER (self), button);
gtk_widget_show (button);
@@ -379,7 +377,6 @@ add_mount (DriveList *self, GMount *mount)
return;
button = drive_button_new_from_mount (mount);
- gtk_button_set_relief (GTK_BUTTON (button), self->relief);
drive_button_set_size (DRIVE_BUTTON (button), self->icon_size);
gtk_container_add (GTK_CONTAINER (self), button);
gtk_widget_show (button);
@@ -432,27 +429,3 @@ drive_list_set_panel_size (DriveList *self, int panel_size)
g_hash_table_foreach (self->mounts, set_icon_size, self);
}
}
-
-static void
-set_button_relief (gpointer key, gpointer value, gpointer user_data)
-{
- GtkButton *button = value;
- DriveList *self = user_data;
-
- gtk_button_set_relief (button, self->relief);
-}
-
-void
-drive_list_set_transparent (DriveList *self, gboolean transparent)
-{
- GtkReliefStyle relief;
-
- relief = transparent ? GTK_RELIEF_NONE : GTK_RELIEF_NORMAL;
-
- if (relief == self->relief)
- return;
-
- self->relief = relief;
- g_hash_table_foreach (self->volumes, set_button_relief, self);
- g_hash_table_foreach (self->mounts, set_button_relief, self);
-}
diff --git a/drivemount/drive-list.h b/drivemount/drive-list.h
index e870349..f0188e7 100644
--- a/drivemount/drive-list.h
+++ b/drivemount/drive-list.h
@@ -60,7 +60,5 @@ void drive_list_set_orientation (DriveList *list,
GtkOrientation orientation);
void drive_list_set_panel_size (DriveList *list,
int panel_size);
-void drive_list_set_transparent (DriveList *self,
- gboolean transparent);
#endif /* DRIVE_LIST_H */
diff --git a/drivemount/drivemount.c b/drivemount/drivemount.c
index acbee38..47286ac 100644
--- a/drivemount/drivemount.c
+++ b/drivemount/drivemount.c
@@ -75,14 +75,6 @@ size_allocate (PanelApplet *applet,
}
static void
-change_background (PanelApplet *applet,
- cairo_pattern_t *pattern,
- DriveList *drivelist)
-{
- drive_list_set_transparent (drivelist, pattern != NULL);
-}
-
-static void
display_about_dialog (GSimpleAction *action,
GVariant *parameter,
gpointer user_data)
@@ -174,8 +166,6 @@ applet_factory (PanelApplet *applet,
G_CALLBACK (change_orient), drive_list, 0);
g_signal_connect_object (applet, "size_allocate",
G_CALLBACK (size_allocate), drive_list, 0);
- g_signal_connect (applet, "change_background",
- G_CALLBACK (change_background), drive_list);
/* set initial state */
change_orient (applet,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]