summaryrefslogtreecommitdiff
path: root/sensors-applet
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2017-04-30 20:11:10 +0200
committerraveit65 <[email protected]>2017-04-30 21:01:37 +0200
commit63a0fed3a88f48ba51b1867a49d5a72f5ba7e0c5 (patch)
tree285985c00f8df3aa561b302a629088a0a38372a6 /sensors-applet
parent9d488e64f0cdd3b2235baa2b0655481451b8faf8 (diff)
downloadmate-sensors-applet-63a0fed3a88f48ba51b1867a49d5a72f5ba7e0c5.tar.bz2
mate-sensors-applet-63a0fed3a88f48ba51b1867a49d5a72f5ba7e0c5.tar.xz
prefs-dialog: avoid deprecated GtkAlignment
Diffstat (limited to 'sensors-applet')
-rw-r--r--sensors-applet/prefs-dialog.c19
-rw-r--r--sensors-applet/prefs-dialog.h1
2 files changed, 7 insertions, 13 deletions
diff --git a/sensors-applet/prefs-dialog.c b/sensors-applet/prefs-dialog.c
index 1d85c17..5dcf655 100644
--- a/sensors-applet/prefs-dialog.c
+++ b/sensors-applet/prefs-dialog.c
@@ -735,6 +735,12 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
1, 8, 1, 1);
#endif
+ gtk_widget_set_valign(GTK_WIDGET(prefs_dialog->globals_grid), GTK_ALIGN_START);
+ gtk_widget_set_margin_start(GTK_WIDGET(prefs_dialog->globals_grid), 12);
+ gtk_widget_set_margin_end(GTK_WIDGET(prefs_dialog->globals_grid), 12);
+ gtk_widget_set_margin_top(GTK_WIDGET(prefs_dialog->globals_grid), 12);
+ gtk_widget_set_margin_bottom(GTK_WIDGET(prefs_dialog->globals_grid), 12);
+
prefs_dialog->view = g_object_new(GTK_TYPE_TREE_VIEW,
"model", GTK_TREE_MODEL(sensors_applet->sensors),
"rules-hint", TRUE,
@@ -910,22 +916,11 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
GTK_WIDGET(prefs_dialog->sensor_config_hbox),
FALSE, FALSE, 0);
- prefs_dialog->globals_alignment = g_object_new(GTK_TYPE_ALIGNMENT,
- "xalign", 0.5,
- "yalign", 0.0,
- "top-padding", 12,
- "left-padding", 12,
- "bottom-padding", 12,
- "right-padding", 12,
- NULL);
- gtk_container_add(GTK_CONTAINER(prefs_dialog->globals_alignment),
- GTK_WIDGET(prefs_dialog->globals_grid));
-
prefs_dialog->notebook = g_object_new(GTK_TYPE_NOTEBOOK,
NULL);
gtk_notebook_append_page(prefs_dialog->notebook,
- GTK_WIDGET(prefs_dialog->globals_alignment),
+ GTK_WIDGET(prefs_dialog->globals_grid),
gtk_label_new(_("General Options")));
gtk_notebook_append_page(prefs_dialog->notebook,
diff --git a/sensors-applet/prefs-dialog.h b/sensors-applet/prefs-dialog.h
index a61a250..3e19916 100644
--- a/sensors-applet/prefs-dialog.h
+++ b/sensors-applet/prefs-dialog.h
@@ -52,7 +52,6 @@ typedef struct {
GtkButtonBox *buttons_box; /* holds sensor reorder buttons */
GtkBox *sensors_hbox; /* holds scrolled window and
* buttons_vbox */
- GtkAlignment *globals_alignment;
GtkBox *sensors_vbox; /* holds sensors_hbox and sensor_config_hbox */
GtkBox *sensor_config_hbox; /* holds config button */
GtkSizeGroup *size_group; /* so comboboxes all