- guint id;
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- preferences->checkbutton_notifications_enabled);
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_DISABLED_AWAY,
- preferences->checkbutton_notifications_disabled_away);
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_FOCUS,
- preferences->checkbutton_notifications_focus);
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN,
- preferences->checkbutton_notifications_contact_signin);
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT,
- preferences->checkbutton_notifications_contact_signout);
-
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- preferences->checkbutton_notifications_disabled_away);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- preferences->checkbutton_notifications_focus);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- preferences->checkbutton_notifications_contact_signin);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
- preferences->checkbutton_notifications_contact_signout);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_SOUNDS_ENABLED,
- preferences->checkbutton_sounds_enabled);
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_SOUNDS_DISABLED_AWAY,
- preferences->checkbutton_sounds_disabled_away);
-
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_SOUNDS_ENABLED,
- preferences->checkbutton_sounds_disabled_away);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_SOUNDS_ENABLED,
- preferences->treeview_sounds);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
- preferences->checkbutton_separate_chat_windows);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_UI_SHOW_AVATARS,
- preferences->checkbutton_show_avatars);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
- preferences->checkbutton_compact_contact_list);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_CHAT_SHOW_SMILEYS,
- preferences->checkbutton_show_smileys);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_CHAT_SHOW_CONTACTS_IN_ROOMS,
- preferences->checkbutton_show_contacts_in_rooms);
-
- preferences_hookup_radio_button (preferences,
- EMPATHY_PREFS_CONTACTS_SORT_CRITERIUM,
- preferences->radiobutton_contact_list_sort_by_name);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_AUTOCONNECT,
- preferences->checkbutton_autoconnect);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_LOCATION_PUBLISH,
- preferences->checkbutton_location_publish);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_LOCATION_RESOURCE_NETWORK,
- preferences->checkbutton_location_resource_network);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_LOCATION_PUBLISH,
- preferences->checkbutton_location_resource_network);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_LOCATION_RESOURCE_CELL,
- preferences->checkbutton_location_resource_cell);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_LOCATION_PUBLISH,
- preferences->checkbutton_location_resource_cell);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_LOCATION_RESOURCE_GPS,
- preferences->checkbutton_location_resource_gps);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_LOCATION_PUBLISH,
- preferences->checkbutton_location_resource_gps);
-
- preferences_hookup_toggle_button (preferences,
- EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY,
- preferences->checkbutton_location_reduce_accuracy);
- preferences_hookup_sensitivity (preferences,
- EMPATHY_PREFS_LOCATION_PUBLISH,
- preferences->checkbutton_location_reduce_accuracy);
-
- id = empathy_conf_notify_add (empathy_conf_get (),
- EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
- preferences_compact_contact_list_changed_cb,
- preferences);
- if (id) {
- preferences_add_id (preferences, id);
- }
- preferences_compact_contact_list_changed_cb (empathy_conf_get (),
- EMPATHY_PREFS_UI_COMPACT_CONTACT_LIST,
- preferences);
+ EmpathyPreferencesPriv *priv = GET_PRIV (preferences);
+
+ g_settings_bind (priv->gsettings_notify,
+ EMPATHY_PREFS_NOTIFICATIONS_ENABLED,
+ priv->checkbutton_notifications_enabled,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_notify,
+ EMPATHY_PREFS_NOTIFICATIONS_DISABLED_AWAY,
+ priv->checkbutton_notifications_disabled_away,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_notify,
+ EMPATHY_PREFS_NOTIFICATIONS_FOCUS,
+ priv->checkbutton_notifications_focus,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_notify,
+ EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNIN,
+ priv->checkbutton_notifications_contact_signin,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_notify,
+ EMPATHY_PREFS_NOTIFICATIONS_CONTACT_SIGNOUT,
+ priv->checkbutton_notifications_contact_signout,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ 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",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (priv->gsettings_ui,
+ EMPATHY_PREFS_UI_SEPARATE_CHAT_WINDOWS,
+ priv->checkbutton_separate_chat_windows,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (priv->gsettings_ui,
+ EMPATHY_PREFS_UI_EVENTS_NOTIFY_AREA,
+ priv->checkbutton_events_notif_area,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (priv->gsettings_chat,
+ EMPATHY_PREFS_CHAT_SHOW_SMILEYS,
+ priv->checkbutton_show_smileys,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_chat,
+ EMPATHY_PREFS_CHAT_SHOW_CONTACTS_IN_ROOMS,
+ priv->checkbutton_show_contacts_in_rooms,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (priv->gsettings_call,
+ EMPATHY_PREFS_CALL_ECHO_CANCELLATION,
+ priv->echo_cancellation,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (priv->gsettings,
+ EMPATHY_PREFS_AUTOCONNECT,
+ priv->checkbutton_autoconnect,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_PUBLISH,
+ priv->checkbutton_location_publish,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_RESOURCE_NETWORK,
+ priv->checkbutton_location_resource_network,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_PUBLISH,
+ priv->checkbutton_location_resource_network,
+ "sensitive",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_RESOURCE_CELL,
+ priv->checkbutton_location_resource_cell,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_PUBLISH,
+ priv->checkbutton_location_resource_cell,
+ "sensitive",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_RESOURCE_GPS,
+ priv->checkbutton_location_resource_gps,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_PUBLISH,
+ priv->checkbutton_location_resource_gps,
+ "sensitive",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_REDUCE_ACCURACY,
+ priv->checkbutton_location_reduce_accuracy,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);
+ g_settings_bind (priv->gsettings_loc,
+ EMPATHY_PREFS_LOCATION_PUBLISH,
+ priv->checkbutton_location_reduce_accuracy,
+ "sensitive",
+ G_SETTINGS_BIND_GET);
+
+ g_settings_bind (priv->gsettings_logger,
+ EMPATHY_PREFS_LOGGER_ENABLED,
+ priv->checkbutton_logging,
+ "active",
+ G_SETTINGS_BIND_DEFAULT);