void mate_panel_applet_mateconf_set_float (MatePanelApplet *applet, const gchar *key, gdouble the_float, GError **opt_error) { MateConfClient *client; gchar *full_key; GError **error = NULL; GError *our_error = NULL; g_return_if_fail (PANEL_IS_APPLET (applet)); if (opt_error) error = opt_error; else error = &our_error; full_key = mate_panel_applet_mateconf_get_full_key (applet, key); client = mate_panel_applet_mateconf_get_client (); mateconf_client_set_float (client, full_key, the_float, error); g_free (full_key); if (!opt_error && our_error) { g_warning (G_STRLOC ": mateconf error : '%s'", our_error->message); g_error_free (our_error); } }
static void dpi_value_changed (GtkSpinButton *spinner, MateConfClient *client) { /* Like any time when using a spin button with MateConf, there is * a race condition here. When we change, we send the new * value to MateConf, then restore to the old value until * we get a response to emulate the proper model/view behavior. * * If the user changes the value faster than responses are * received from MateConf, this may cause mildly strange effects. */ if (!in_change) { gdouble new_dpi = gtk_spin_button_get_value (spinner); mateconf_client_set_float (client, FONT_DPI_KEY, new_dpi, NULL); dpi_load (client, spinner); } }