static void
preferences_setup_widgets (EmpathyPreferences *preferences)
{
	guint id;

	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_string_combo (preferences,
					 EMPATHY_PREFS_CHAT_THEME,
					 preferences->combobox_chat_theme);

	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);

	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);
}
コード例 #2
0
/********************************************************************************
 *                  'Here be Dragons'...art, beauty, fun, & magic.              *
 ********************************************************************************/
static void preferences_setup_widgets(PreferencesDialog *prefs){
	debug("Binding widgets to preferences");
	
	preferences_hookup_toggle_button(prefs, PREFS_DISABLE_SYSTEM_BELL, FALSE, prefs->disable_system_bell);
	
	preferences_hookup_toggle_button(prefs, COMPACT_VIEW, FALSE, prefs->compact_entire_view_check_button);
	preferences_hookup_toggle_button(prefs, CONCATENATED_UPDATES, FALSE, prefs->concatenated_updates_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_UPDATE_VIEWER_COMPACT, FALSE, prefs->compact_view_toggle_button);
	preferences_hookup_toggle_button(prefs, PREFS_UPDATE_VIEWER_DIALOG, FALSE, prefs->use_dialog_toggle_button);
	
	preferences_hookup_toggle_button(prefs, PREFS_URLS_EXPANSION_USER_PROFILES, TRUE, prefs->expand_users_checkbutton);
	preferences_hookup_toggle_button(prefs, PREFS_URLS_EXPANSION_SELECTED_ONLY, TRUE, prefs->expand_urls_selected_only_checkbutton);
	preferences_hookup_toggle_button(prefs, PREFS_URLS_EXPANSION_REPLACE_WITH_TITLES, TRUE, prefs->titles_only_checkbutton);
	preferences_hookup_toggle_button(prefs, PREFS_URLS_EXPANSION_DISABLED, FALSE, prefs->expand_urls_disabled_checkbutton);
	
	preferences_hookup_toggle_button(prefs, PREFS_AUTOLOAD_BEST_FRIENDS, TRUE, prefs->autoload_best_friends_updates_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_AUTOLOAD_DMS, TRUE, prefs->autoload_dms_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_AUTOLOAD_REPLIES, TRUE, prefs->autoload_replies_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_AUTOLOAD_HOMEPAGE, TRUE, prefs->autoload_homepage_check_button);
	preferences_hookup_int_combo(prefs, PREFS_TIMELINE_RELOAD_MINUTES, 5, prefs->combo_reload);
	
	preferences_hookup_toggle_button(prefs, PREFS_NOTIFY_DMS, TRUE, prefs->notify_dms_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_NOTIFY_REPLIES, TRUE, prefs->notify_at_mentions_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_NOTIFY_FOLLOWING, TRUE, prefs->notify_following_updates_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_NOTIFY_BEST_FRIENDS, TRUE, prefs->notify_best_friends_updates_check_button);
	preferences_hookup_toggle_button(prefs, PREFS_NOTIFY_ALL, TRUE, prefs->notify_all_new_updates);
	preferences_hookup_toggle_button(prefs, PREFS_NOTIFY_BEEP, TRUE, prefs->notify_beep_updates_check_button);
	
	preferences_hookup_toggle_button(prefs, PREFS_DISABLE_UPDATE_LENGTH_ALERT, TRUE, prefs->disable_update_length_alert_check_button);
	
	preferences_hookup_toggle_button(prefs, PREFS_SWAP_OCTOTHORPES_AND_EXCLAIMATIONS, TRUE, prefs->swap_octothorpe_and_exclaimation);
	preferences_hookup_int_combo(prefs, PREFS_UPDATES_REPLACE_ME_W_NICK, 2, prefs->replace_me_with_combo_box);
	
	preferences_hookup_toggle_button(prefs, PREFS_UPDATES_ADD_PROFILE_LINK, FALSE, prefs->updates_add_profile_link_checkbutton);
	preferences_hookup_toggle_button(prefs, PREFS_UPDATES_DIRECT_REPLY_ONLY, FALSE, prefs->post_reply_to_service_only_checkbutton);
	
	preferences_hookup_string_combo(prefs, PREFS_UPDATES_HOME_TIMELINE, prefs->combo_default_timeline);
	
	preferences_hookup_toggle_button(prefs, PREFS_UPDATES_HISTORY_UNIQUE_ONLY, TRUE, prefs->previous_updates_uniq_check_button);
	preferences_hookup_int_combo(prefs, PREFS_UPDATES_HISTORY_MAXIMUM, 50, prefs->previous_updates_maximum_combo_box);
	
	preferences_hookup_toggle_button(prefs, PREFS_SEARCH_HISTORY_UNIQUE_ONLY, TRUE, prefs->search_history_uniq_check_button);
	preferences_hookup_int_combo(prefs, PREFS_SEARCH_HISTORY_MAXIMUM, 25, prefs->search_history_maximum_combo_box);
}/*preferences_setup_widgets(prefs);*/