summaryrefslogtreecommitdiff
path: root/sensors-applet
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-05-01 17:26:31 +0200
committerraveit65 <[email protected]>2017-05-01 17:42:59 +0200
commitaa3666f12c86a90c8a536867f0a2a44a6528bd7f (patch)
tree853862bb54d9f29fa56966b24f0a63adbe9d322b /sensors-applet
parentca9ef4c9ebcd9f24ee5e8819a7e7214f01df1ac4 (diff)
downloadmate-sensors-applet-aa3666f12c86a90c8a536867f0a2a44a6528bd7f.tar.bz2
mate-sensors-applet-aa3666f12c86a90c8a536867f0a2a44a6528bd7f.tar.xz
sensor-applet.c: replace deprecated GtkMisc
Diffstat (limited to 'sensors-applet')
-rw-r--r--sensors-applet/sensors-applet.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/sensors-applet/sensors-applet.c b/sensors-applet/sensors-applet.c
index 557653c..48a03ff 100644
--- a/sensors-applet/sensors-applet.c
+++ b/sensors-applet/sensors-applet.c
@@ -728,13 +728,20 @@ static void sensors_applet_pack_display(SensorsApplet *sensors_applet) {
if (layout_mode == VALUE_BESIDE_LABEL) {
/* left align labels */
if (((ActiveSensor *)(current_sensor->data))->icon) {
- gtk_misc_set_alignment(GTK_MISC(((ActiveSensor *)(current_sensor->data))->icon), 0.0, 0.5);
+ gtk_widget_set_halign (((ActiveSensor *)(current_sensor->data))->icon, GTK_ALIGN_START);
+ gtk_widget_set_valign (((ActiveSensor *)(current_sensor->data))->icon, GTK_ALIGN_CENTER);
}
if (((ActiveSensor *)(current_sensor->data))->label) {
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL(((ActiveSensor *)(current_sensor->data))->label), 0);
+ gtk_label_set_yalign (GTK_LABEL(((ActiveSensor *)(current_sensor->data))->label), 0.5);
+#else
gtk_misc_set_alignment(GTK_MISC(((ActiveSensor *)(current_sensor->data))->label), 0.0, 0.5);
+#endif
}
if (((ActiveSensor *)(current_sensor->data))->value) {
- gtk_misc_set_alignment(GTK_MISC(((ActiveSensor *)(current_sensor->data))->value), 0.0, 0.5);
+ gtk_widget_set_halign (((ActiveSensor *)(current_sensor->data))->value, GTK_ALIGN_START);
+ gtk_widget_set_valign (((ActiveSensor *)(current_sensor->data))->value, GTK_ALIGN_CENTER);
}
/* place value next to label */
@@ -748,13 +755,20 @@ static void sensors_applet_pack_display(SensorsApplet *sensors_applet) {
/* center align labels */
if (((ActiveSensor *)(current_sensor->data))->icon) {
- gtk_misc_set_alignment(GTK_MISC(((ActiveSensor *)(current_sensor->data))->icon), 0.5, 0.5);
+ gtk_widget_set_halign (((ActiveSensor *)(current_sensor->data))->icon, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (((ActiveSensor *)(current_sensor->data))->icon, GTK_ALIGN_CENTER);
}
if (((ActiveSensor *)(current_sensor->data))->label) {
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL(((ActiveSensor *)(current_sensor->data))->label), 0.5);
+ gtk_label_set_yalign (GTK_LABEL(((ActiveSensor *)(current_sensor->data))->label), 0.5);
+#else
gtk_misc_set_alignment(GTK_MISC(((ActiveSensor *)(current_sensor->data))->label), 0.5, 0.5);
+#endif
}
if (((ActiveSensor *)(current_sensor->data))->value) {
- gtk_misc_set_alignment(GTK_MISC(((ActiveSensor *)(current_sensor->data))->value), 0.5, 0.5);
+ gtk_widget_set_halign (((ActiveSensor *)(current_sensor->data))->value, GTK_ALIGN_CENTER);
+ gtk_widget_set_valign (((ActiveSensor *)(current_sensor->data))->value, GTK_ALIGN_CENTER);
}
if (((ActiveSensor *)(current_sensor->data))->value) {