static void panel_properties_dialog_background_notify (GSettings *settings, gchar *key, PanelPropertiesDialog *dialog) { if (!strcmp (key, "type")) { PanelBackgroundType type = g_settings_get_enum (settings, key); panel_properties_dialog_update_background_type (dialog, type); } else if (!strcmp (key, "color")) { char *color = g_settings_get_string (settings, key); panel_properties_dialog_update_background_color (dialog, color); g_free (color); } else if (!strcmp (key, "opacity")) { gint opacity = g_settings_get_int (settings, key); panel_properties_dialog_update_background_opacity (dialog, opacity); } else if (!strcmp (key, "image")) { char *image = g_settings_get_string (settings, key); panel_properties_dialog_update_background_image (dialog, image); g_free (image); } }
static void panel_properties_dialog_background_notify (GConfClient *client, guint cnxn_id, GConfEntry *entry, PanelPropertiesDialog *dialog) { GConfValue *value; const char *key; key = panel_gconf_basename (gconf_entry_get_key (entry)); if (!key) return; value = gconf_entry_get_value (entry); if (!strcmp (key, "type")) panel_properties_dialog_update_background_type (dialog, value); else if (!strcmp (key, "color")) panel_properties_dialog_update_background_color (dialog, value); else if (!strcmp (key, "opacity")) panel_properties_dialog_update_background_opacity (dialog, value); else if (!strcmp (key, "image")) panel_properties_dialog_update_background_image (dialog, value); }