summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-07-06 20:38:55 +0200
committerinfirit <[email protected]>2015-07-06 20:38:55 +0200
commit069182d3b7eb3cbe831f3c486d474129a4a69c70 (patch)
tree09c9eff4a37466638e334b6ab52a63999fa705ce
parentb1a9157125af03750b8bf9ba92972ae0988bc7bb (diff)
downloadmate-sensors-applet-069182d3b7eb3cbe831f3c486d474129a4a69c70.tar.bz2
mate-sensors-applet-069182d3b7eb3cbe831f3c486d474129a4a69c70.tar.xz
Small cleanup
Bring the code in sync with gnome-sensors-applet.
-rw-r--r--sensors-applet/prefs-dialog.c13
-rw-r--r--sensors-applet/sensor-config-dialog.c5
2 files changed, 13 insertions, 5 deletions
diff --git a/sensors-applet/prefs-dialog.c b/sensors-applet/prefs-dialog.c
index 002a668..ab2278c 100644
--- a/sensors-applet/prefs-dialog.c
+++ b/sensors-applet/prefs-dialog.c
@@ -389,6 +389,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
gchar *header_text;
PrefsDialog *prefs_dialog;
DisplayMode display_mode;
+ GtkWidget *content_area;
g_assert(sensors_applet->prefs_dialog == NULL);
@@ -420,9 +421,10 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
"default-height", 350,
NULL);
- gtk_box_set_homogeneous(GTK_BOX(gtk_dialog_get_content_area (prefs_dialog->dialog)), FALSE);
+ content_area = gtk_dialog_get_content_area (prefs_dialog->dialog);
+ gtk_box_set_homogeneous(GTK_BOX(content_area), FALSE);
- gtk_box_set_spacing(GTK_BOX(gtk_dialog_get_content_area (prefs_dialog->dialog)), 5);
+ gtk_box_set_spacing(GTK_BOX(content_area), 5);
g_signal_connect(prefs_dialog->dialog,
@@ -441,8 +443,10 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
we haven't been able to access any sensors */
if (sensors_applet->sensors == NULL) {
GtkWidget *label;
+ GtkWidget *content_area;
label = gtk_label_new(_("No sensors found!"));
- gtk_box_pack_start (GTK_BOX(gtk_dialog_get_content_area (prefs_dialog->dialog)), label, TRUE, TRUE, 0);
+ content_area = gtk_dialog_get_content_area (prefs_dialog->dialog);
+ gtk_box_pack_start (GTK_BOX(content_area), label, FALSE, FALSE, 0);
return;
}
@@ -990,7 +994,8 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
gtk_label_new(_("Sensors")));
/* pack notebook into prefs_dialog */
- gtk_box_pack_start (GTK_BOX(gtk_dialog_get_content_area (prefs_dialog->dialog)),
+ content_area = gtk_dialog_get_content_area (prefs_dialog->dialog);
+ gtk_box_pack_start (GTK_BOX(content_area),
GTK_WIDGET(prefs_dialog->notebook), TRUE, TRUE, 0);
diff --git a/sensors-applet/sensor-config-dialog.c b/sensors-applet/sensor-config-dialog.c
index cc09305..bb76da6 100644
--- a/sensors-applet/sensor-config-dialog.c
+++ b/sensors-applet/sensor-config-dialog.c
@@ -323,6 +323,7 @@ static void sensor_config_dialog_graph_color_set(GtkColorButton *color_button,
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
+ GtkWidget *content_area;
GdkColor color;
gchar *color_string;
@@ -352,6 +353,7 @@ static void sensor_config_dialog_graph_color_set(GtkColorButton *color_button,
void sensor_config_dialog_create(SensorsApplet *sensors_applet) {
GtkTreeModel *model;
GtkTreeIter iter;
+ GtkWidget *content_area;
SensorConfigDialog *config_dialog;
@@ -912,7 +914,8 @@ void sensor_config_dialog_create(SensorsApplet *sensors_applet) {
2, 3,
14, 15);
- gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area (GTK_DIALOG(config_dialog->dialog))), GTK_WIDGET(config_dialog->table), TRUE, TRUE, 0);
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG(config_dialog->dialog));
+ gtk_box_pack_start(GTK_BOX(content_area), GTK_WIDGET(config_dialog->table), FALSE, FALSE, 0);
gtk_widget_show_all(config_dialog->dialog);
}