summaryrefslogtreecommitdiff
path: root/sensors-applet
diff options
context:
space:
mode:
Diffstat (limited to 'sensors-applet')
-rw-r--r--sensors-applet/prefs-dialog.c32
-rw-r--r--sensors-applet/prefs-dialog.h2
2 files changed, 22 insertions, 12 deletions
diff --git a/sensors-applet/prefs-dialog.c b/sensors-applet/prefs-dialog.c
index ab2278c..97ba8f5 100644
--- a/sensors-applet/prefs-dialog.c
+++ b/sensors-applet/prefs-dialog.c
@@ -460,18 +460,24 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
NULL);
g_free(header_text);
- prefs_dialog->display_mode_combo_box = GTK_COMBO_BOX(gtk_combo_box_text_new());
+ prefs_dialog->display_mode_combo_box = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
- gtk_combo_box_text_append_text(prefs_dialog->display_mode_combo_box, _("label with value"));
- gtk_combo_box_text_append_text(prefs_dialog->display_mode_combo_box, _("icon with value"));
- gtk_combo_box_text_append_text(prefs_dialog->display_mode_combo_box, _("value only"));
- gtk_combo_box_text_append_text(prefs_dialog->display_mode_combo_box, _("icon only"));
- gtk_combo_box_text_append_text(prefs_dialog->display_mode_combo_box, _("graph only"));
+ gtk_combo_box_text_append_text(
+ GTK_COMBO_BOX_TEXT(prefs_dialog->display_mode_combo_box), _("label with value"));
+ gtk_combo_box_text_append_text(
+ GTK_COMBO_BOX_TEXT(prefs_dialog->display_mode_combo_box), _("icon with value"));
+ gtk_combo_box_text_append_text(
+ GTK_COMBO_BOX_TEXT(prefs_dialog->display_mode_combo_box), _("value only"));
+ gtk_combo_box_text_append_text(
+ GTK_COMBO_BOX_TEXT(prefs_dialog->display_mode_combo_box), _("icon only"));
+ gtk_combo_box_text_append_text(
+ GTK_COMBO_BOX_TEXT(prefs_dialog->display_mode_combo_box), _("graph only"));
display_mode = g_settings_get_int(sensors_applet->settings, DISPLAY_MODE);
- gtk_combo_box_set_active(prefs_dialog->display_mode_combo_box, display_mode);
+ gtk_combo_box_set_active(
+ GTK_COMBO_BOX(prefs_dialog->display_mode_combo_box), display_mode);
g_signal_connect(prefs_dialog->display_mode_combo_box,
"changed",
@@ -491,7 +497,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
- prefs_dialog->layout_mode_combo_box = GTK_COMBO_BOX(gtk_combo_box_text_new());
+ prefs_dialog->layout_mode_combo_box = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
gtk_widget_set_sensitive(GTK_WIDGET(prefs_dialog->layout_mode_combo_box),
(display_mode != DISPLAY_ICON) &&
@@ -501,7 +507,9 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
gtk_combo_box_text_append_text(prefs_dialog->layout_mode_combo_box, _("beside labels / icons"));
gtk_combo_box_text_append_text(prefs_dialog->layout_mode_combo_box, _("below labels / icons"));
- gtk_combo_box_set_active(prefs_dialog->layout_mode_combo_box, g_settings_get_int(sensors_applet->settings, LAYOUT_MODE));
+ gtk_combo_box_set_active(
+ GTK_COMBO_BOX(prefs_dialog->layout_mode_combo_box),
+ g_settings_get_int(sensors_applet->settings, LAYOUT_MODE));
g_signal_connect(prefs_dialog->layout_mode_combo_box,
"changed",
@@ -520,13 +528,15 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) {
(display_mode != DISPLAY_VALUE) &&
(display_mode != DISPLAY_GRAPH));
- prefs_dialog->temperature_scale_combo_box = GTK_COMBO_BOX(gtk_combo_box_text_new());
+ prefs_dialog->temperature_scale_combo_box = GTK_COMBO_BOX_TEXT(gtk_combo_box_text_new());
gtk_combo_box_text_append_text(prefs_dialog->temperature_scale_combo_box, _("Kelvin"));
gtk_combo_box_text_append_text(prefs_dialog->temperature_scale_combo_box, _("Celsius"));
gtk_combo_box_text_append_text(prefs_dialog->temperature_scale_combo_box, _("Fahrenheit"));
- gtk_combo_box_set_active(prefs_dialog->temperature_scale_combo_box, g_settings_get_int(sensors_applet->settings, TEMPERATURE_SCALE));
+ gtk_combo_box_set_active(
+ GTK_COMBO_BOX(prefs_dialog->temperature_scale_combo_box),
+ g_settings_get_int(sensors_applet->settings, TEMPERATURE_SCALE));
g_signal_connect(prefs_dialog->temperature_scale_combo_box,
"changed",
diff --git a/sensors-applet/prefs-dialog.h b/sensors-applet/prefs-dialog.h
index 9ff6525..c748ff3 100644
--- a/sensors-applet/prefs-dialog.h
+++ b/sensors-applet/prefs-dialog.h
@@ -34,7 +34,7 @@ typedef struct {
GtkSpinButton *timeout_spinbutton, *graph_size_spinbutton;
GtkTable *globals_table;
GtkHSeparator *globals_separator;
- GtkComboBox *display_mode_combo_box, *layout_mode_combo_box, *temperature_scale_combo_box;
+ GtkComboBoxText *display_mode_combo_box, *layout_mode_combo_box, *temperature_scale_combo_box;
GtkLabel *timeout_label, *display_mode_label, *layout_mode_label, *temperature_scale_label, *graph_size_label, *update_header, *display_header;
GtkAdjustment *timeout_adjust, *graph_size_adjust;