diff options
Diffstat (limited to 'sensors-applet/prefs-dialog.c')
-rw-r--r-- | sensors-applet/prefs-dialog.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/sensors-applet/prefs-dialog.c b/sensors-applet/prefs-dialog.c index fc7d3ac..711fac9 100644 --- a/sensors-applet/prefs-dialog.c +++ b/sensors-applet/prefs-dialog.c @@ -20,8 +20,8 @@ #include "config.h" #endif /* HAVE_CONFIG_H */ -#include <libgnome/libgnome.h> -#include "sensors-applet-gconf.h" +#include <libmate/libmate.h> +#include "sensors-applet-mateconf.h" #include "prefs-dialog.h" #include "sensor-config-dialog.h" @@ -29,12 +29,12 @@ #define NEW_TEMP_SCALE 1 /* when a user closes the prefs-dialog we assume that applet is now - setup, so store all values in gconf */ + setup, so store all values in mateconf */ void prefs_dialog_close(SensorsApplet *sensors_applet) { if (sensors_applet->sensors != NULL) { - if (sensors_applet_gconf_save_sensors(sensors_applet)) - panel_applet_gconf_set_bool(sensors_applet->applet, + if (sensors_applet_mateconf_save_sensors(sensors_applet)) + mate_panel_applet_mateconf_set_bool(sensors_applet->applet, IS_SETUP, TRUE, NULL); } if (sensors_applet->prefs_dialog) { @@ -44,7 +44,7 @@ void prefs_dialog_close(SensorsApplet *sensors_applet) { } if (sensors_applet->timeout_id == 0) { - sensors_applet->timeout_id = g_timeout_add_seconds(panel_applet_gconf_get_int(sensors_applet->applet, TIMEOUT, NULL) / 1000, (GSourceFunc)sensors_applet_update_active_sensors, sensors_applet); + sensors_applet->timeout_id = g_timeout_add_seconds(mate_panel_applet_mateconf_get_int(sensors_applet->applet, TIMEOUT, NULL) / 1000, (GSourceFunc)sensors_applet_update_active_sensors, sensors_applet); } @@ -125,7 +125,7 @@ static void prefs_dialog_timeout_changed(GtkSpinButton *button, PrefsDialog *prefs_dialog) { gint value; value = (gint)(gtk_spin_button_get_value(button) * 1000); - panel_applet_gconf_set_int(prefs_dialog->sensors_applet->applet, TIMEOUT, value, NULL); + mate_panel_applet_mateconf_set_int(prefs_dialog->sensors_applet->applet, TIMEOUT, value, NULL); } static void prefs_dialog_display_mode_changed(GtkComboBox *display_mode_combo_box, @@ -149,7 +149,7 @@ static void prefs_dialog_display_mode_changed(GtkComboBox *display_mode_combo_bo gtk_widget_set_sensitive(GTK_WIDGET(prefs_dialog->graph_size_spinbutton), (display_mode == DISPLAY_GRAPH)); - panel_applet_gconf_set_int(prefs_dialog->sensors_applet->applet, + mate_panel_applet_mateconf_set_int(prefs_dialog->sensors_applet->applet, DISPLAY_MODE, gtk_combo_box_get_active(display_mode_combo_box), NULL); @@ -160,7 +160,7 @@ static void prefs_dialog_display_mode_changed(GtkComboBox *display_mode_combo_bo static void prefs_dialog_layout_mode_changed(GtkComboBox *layout_mode_combo_box, PrefsDialog *prefs_dialog) { - panel_applet_gconf_set_int(prefs_dialog->sensors_applet->applet, + mate_panel_applet_mateconf_set_int(prefs_dialog->sensors_applet->applet, LAYOUT_MODE, gtk_combo_box_get_active(layout_mode_combo_box), NULL); @@ -175,13 +175,13 @@ static void prefs_dialog_temperature_scale_changed(GtkComboBox *temperature_scal TemperatureScale scales[2]; GtkTreeModel *model; - scales[OLD_TEMP_SCALE] = (TemperatureScale)panel_applet_gconf_get_int(prefs_dialog->sensors_applet->applet, + scales[OLD_TEMP_SCALE] = (TemperatureScale)mate_panel_applet_mateconf_get_int(prefs_dialog->sensors_applet->applet, TEMPERATURE_SCALE, NULL); scales[NEW_TEMP_SCALE] = (TemperatureScale)gtk_combo_box_get_active(temperature_scale_combo_box); - panel_applet_gconf_set_int(prefs_dialog->sensors_applet->applet, + mate_panel_applet_mateconf_set_int(prefs_dialog->sensors_applet->applet, TEMPERATURE_SCALE, scales[NEW_TEMP_SCALE], NULL); @@ -198,14 +198,14 @@ static void prefs_dialog_temperature_scale_changed(GtkComboBox *temperature_scal } -#ifdef HAVE_LIBNOTIFY +#ifdef HAVE_LIBMATENOTIFY static void prefs_dialog_display_notifications_toggled(GtkCheckButton *display_notifications, PrefsDialog *prefs_dialog) { gboolean notify; notify = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(display_notifications)); - panel_applet_gconf_set_bool(prefs_dialog->sensors_applet->applet, + mate_panel_applet_mateconf_set_bool(prefs_dialog->sensors_applet->applet, DISPLAY_NOTIFICATIONS, notify, NULL); @@ -222,7 +222,7 @@ static void prefs_dialog_graph_size_changed(GtkSpinButton *button, PrefsDialog *prefs_dialog) { gint value; value = (gint)(gtk_spin_button_get_value(button)); - panel_applet_gconf_set_int(prefs_dialog->sensors_applet->applet, GRAPH_SIZE, value, NULL); + mate_panel_applet_mateconf_set_int(prefs_dialog->sensors_applet->applet, GRAPH_SIZE, value, NULL); /* notify change of number of samples */ sensors_applet_graph_size_changed(prefs_dialog->sensors_applet); @@ -472,7 +472,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { gtk_combo_box_append_text(prefs_dialog->display_mode_combo_box, _("graph only")); - display_mode = panel_applet_gconf_get_int(sensors_applet->applet, DISPLAY_MODE, NULL); + display_mode = mate_panel_applet_mateconf_get_int(sensors_applet->applet, DISPLAY_MODE, NULL); gtk_combo_box_set_active(prefs_dialog->display_mode_combo_box, display_mode); g_signal_connect(prefs_dialog->display_mode_combo_box, @@ -503,7 +503,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { gtk_combo_box_append_text(prefs_dialog->layout_mode_combo_box, _("beside labels / icons")); gtk_combo_box_append_text(prefs_dialog->layout_mode_combo_box, _("below labels / icons")); - gtk_combo_box_set_active(prefs_dialog->layout_mode_combo_box, panel_applet_gconf_get_int(sensors_applet->applet, LAYOUT_MODE, NULL)); + gtk_combo_box_set_active(prefs_dialog->layout_mode_combo_box, mate_panel_applet_mateconf_get_int(sensors_applet->applet, LAYOUT_MODE, NULL)); g_signal_connect(prefs_dialog->layout_mode_combo_box, "changed", @@ -528,7 +528,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { gtk_combo_box_append_text(prefs_dialog->temperature_scale_combo_box, _("Celsius")); gtk_combo_box_append_text(prefs_dialog->temperature_scale_combo_box, _("Fahrenheit")); - gtk_combo_box_set_active(prefs_dialog->temperature_scale_combo_box, panel_applet_gconf_get_int(sensors_applet->applet, TEMPERATURE_SCALE, NULL)); + gtk_combo_box_set_active(prefs_dialog->temperature_scale_combo_box, mate_panel_applet_mateconf_get_int(sensors_applet->applet, TEMPERATURE_SCALE, NULL)); g_signal_connect(prefs_dialog->temperature_scale_combo_box, "changed", @@ -543,7 +543,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { NULL); prefs_dialog->graph_size_adjust = g_object_new(GTK_TYPE_ADJUSTMENT, - "value", (gdouble)panel_applet_gconf_get_int(sensors_applet->applet, + "value", (gdouble)mate_panel_applet_mateconf_get_int(sensors_applet->applet, GRAPH_SIZE, NULL), "lower", 1.0, @@ -557,7 +557,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { "adjustment", prefs_dialog->graph_size_adjust, "climb-rate", 1.0, "digits", 0, - "value", (gdouble)panel_applet_gconf_get_int(sensors_applet->applet, + "value", (gdouble)mate_panel_applet_mateconf_get_int(sensors_applet->applet, GRAPH_SIZE, NULL), "width-chars", 4, @@ -604,7 +604,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { "adjustment", prefs_dialog->timeout_adjust, "climb-rate", 0.5, "digits", 1, - "value", (gdouble) panel_applet_gconf_get_int(sensors_applet->applet, TIMEOUT, NULL) / 1000.0, + "value", (gdouble) mate_panel_applet_mateconf_get_int(sensors_applet->applet, TIMEOUT, NULL) / 1000.0, "width-chars", 4, NULL); @@ -620,7 +620,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { G_CALLBACK(prefs_dialog_timeout_changed), prefs_dialog); -#ifdef HAVE_LIBNOTIFY +#ifdef HAVE_LIBMATENOTIFY header_text = g_markup_printf_escaped("<b>%s</b>", _("Notifications")); prefs_dialog->notifications_header = g_object_new(GTK_TYPE_LABEL, "use-markup", TRUE, @@ -635,7 +635,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { "label", _("Display _notifications"), NULL); gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(prefs_dialog->display_notifications), - panel_applet_gconf_get_bool(sensors_applet->applet, + mate_panel_applet_mateconf_get_bool(sensors_applet->applet, DISPLAY_NOTIFICATIONS, NULL)); g_signal_connect(prefs_dialog->display_notifications, @@ -665,7 +665,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { prefs_dialog->globals_table = g_object_new(GTK_TYPE_TABLE, "homogeneous", FALSE, "n-columns", 3, -#ifdef HAVE_LIBNOTIFY +#ifdef HAVE_LIBMATENOTIFY "n-rows", 9, #else "n-rows", 7, @@ -785,7 +785,7 @@ void prefs_dialog_open(SensorsApplet *sensors_applet) { 0); -#ifdef HAVE_LIBNOTIFY +#ifdef HAVE_LIBMATENOTIFY gtk_table_attach(prefs_dialog->globals_table, GTK_WIDGET(prefs_dialog->notifications_header), 0, 2, |