- g_settings_bind (priv->gsettings_notify,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- priv->checkbutton_notifications_disabled_away,
- "sensitive",
- G_SETTINGS_BIND_GET);
- g_settings_bind (priv->gsettings_notify,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- priv->checkbutton_notifications_focus,
- "sensitive",
- G_SETTINGS_BIND_GET);
- g_settings_bind (priv->gsettings_notify,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- priv->checkbutton_notifications_contact_signin,
- "sensitive",
- G_SETTINGS_BIND_GET);
- g_settings_bind (priv->gsettings_notify,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- priv->checkbutton_notifications_contact_signout,
- "sensitive",
- G_SETTINGS_BIND_GET);
-
- g_settings_bind (priv->gsettings_sound,
- EMPATHY_PREFS_SOUNDS_ENABLED,
- priv->checkbutton_sounds_enabled,
- "active",
- G_SETTINGS_BIND_DEFAULT);
- g_settings_bind (priv->gsettings_sound,
- EMPATHY_PREFS_SOUNDS_DISABLED_AWAY,
- priv->checkbutton_sounds_disabled_away,
- "active",
- G_SETTINGS_BIND_DEFAULT);
-
- g_settings_bind (priv->gsettings_sound,
- EMPATHY_PREFS_SOUNDS_ENABLED,
- priv->checkbutton_sounds_disabled_away,
- "sensitive",
- G_SETTINGS_BIND_GET);
- g_settings_bind (priv->gsettings_sound,
- EMPATHY_PREFS_SOUNDS_ENABLED,
- priv->treeview_sounds,
- "sensitive",
+ BIND_ACTIVE (notify, NOTIFICATIONS_ENABLED,
+ "checkbutton_notifications_enabled");
+ BIND_ACTIVE (notify, NOTIFICATIONS_DISABLED_AWAY,
+ "checkbutton_notifications_disabled_away");
+ BIND_ACTIVE (notify, NOTIFICATIONS_FOCUS,
+ "checkbutton_notifications_focus");
+ BIND_ACTIVE (notify, NOTIFICATIONS_CONTACT_SIGNIN,
+ "checkbutton_notifications_contact_signin");
+ BIND_ACTIVE (notify, NOTIFICATIONS_CONTACT_SIGNOUT,
+ "checkbutton_notifications_contact_signout");
+
+ BIND_ACTIVE (sound, SOUNDS_ENABLED,
+ "checkbutton_sounds_enabled");
+ BIND_ACTIVE (sound, SOUNDS_DISABLED_AWAY,
+ "checkbutton_sounds_disabled_away");
+
+ BIND_ACTIVE (ui, UI_SHOW_OFFLINE,
+ "checkbutton_show_offline");
+ BIND_ACTIVE (ui, UI_SHOW_GROUPS,
+ "checkbutton_show_groups");
+ BIND_ACTIVE (ui, UI_SEPARATE_CHAT_WINDOWS,
+ "radiobutton_chats_new_windows");
+ BIND_ACTIVE (ui, UI_EVENTS_NOTIFY_AREA,
+ "checkbutton_events_notif_area");
+ BIND_ACTIVE (ui, UI_SHOW_BALANCES,
+ "checkbutton_show_balances");
+
+ BIND_ACTIVE (chat, CHAT_SHOW_SMILEYS,
+ "checkbutton_show_smileys");
+ BIND_ACTIVE (chat, CHAT_SHOW_CONTACTS_IN_ROOMS,
+ "checkbutton_show_contacts_in_rooms");
+
+ BIND_ACTIVE (call, CALL_ECHO_CANCELLATION,
+ "call_echo_cancellation");
+
+ BIND_ACTIVE (loc, LOCATION_PUBLISH,
+ "checkbutton_location_publish");
+ BIND_ACTIVE (loc, LOCATION_RESOURCE_NETWORK,
+ "checkbutton_location_resource_network");
+ BIND_ACTIVE (loc, LOCATION_RESOURCE_CELL,
+ "checkbutton_location_resource_cell");
+ BIND_ACTIVE (loc, LOCATION_RESOURCE_GPS,
+ "checkbutton_location_resource_gps");
+ BIND_ACTIVE (loc, LOCATION_REDUCE_ACCURACY,
+ "checkbutton_location_reduce_accuracy");
+
+ BIND_ACTIVE (logger, LOGGER_ENABLED,
+ "checkbutton_logging");
+
+#undef BIND_ACTIVE
+
+#define BIND_SENSITIVE(schema, key, widget) \
+ g_settings_bind (priv->gsettings_##schema, EMPATHY_PREFS_##key, \
+ gtk_builder_get_object (gui, widget), "sensitive", \