<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.

     This file is part of Xabber project; you can redistribute it and/or
     modify it under the terms of the GNU General Public License, Version 3.

     Xabber is distributed in the hope that it will be useful, but
     WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     See the GNU General Public License for more details.

     You should have received a copy of the GNU General Public License,
     along with this program. If not, see http://www.gnu.org/licenses/.
-->
<PreferenceScreen
    xmlns:android="http://schemas.android.com/apk/res/android">
        <Preference
            android:title="@string/preference_accounts"
            android:key="@string/preference_accounts_key">
            <intent
                android:targetPackage="@string/application_package"
                android:targetClass="com.xabber.android.ui.preferences.AccountList"/>
        </Preference>

        <Preference
            android:title="@string/preference_interface"
            android:key="@string/preference_interface"
            >
            <intent
                android:targetPackage="@string/application_package"
                android:targetClass="com.xabber.android.ui.preferences.ThemeSettings"/>
        </Preference>
        <Preference
            android:title="@string/preference_contacts"
            android:key="@string/preference_contacts"
            >
            <intent
                android:targetPackage="@string/application_package"
                android:targetClass="com.xabber.android.ui.preferences.ContactListSettings"/>
        </Preference>
        <PreferenceScreen
            android:title="@string/preference_chats"
            android:key="@string/preference_chats"
            >
            <CheckBoxPreference
                android:title="@string/chats_show_avatars"
                android:key="@string/chats_show_avatars_key"
                android:defaultValue="@bool/chats_show_avatars_default"
                />
            <CheckBoxPreference
                android:title="@string/chats_send_by_enter"
                android:key="@string/chats_send_by_enter_key"
                android:defaultValue="@bool/chats_send_by_enter_default"
                />
            <ListPreference
                android:title="@string/chats_show_status_change"
                android:summary="@string/chats_show_status_change"
                android:key="@string/chats_show_status_change_key"
                android:entries="@array/chats_show_status_change_entries"
                android:entryValues="@array/chats_show_status_change_entryvalues"
                android:defaultValue="@string/chats_show_status_change_default"
                />
            <ListPreference
                android:title="@string/chats_hide_keyboard"
                android:key="@string/chats_hide_keyboard_key"
                android:entries="@array/chats_hide_keyboard_entries"
                android:entryValues="@array/chats_hide_keyboard_entryvalues"
                android:defaultValue="@string/chats_hide_keyboard_default"
                />
            <ListPreference
                android:title="@string/chats_font_size"
                android:key="@string/chats_font_size_key"
                android:entries="@array/chats_font_size_entries"
                android:entryValues="@array/chats_font_size_entryvalues"
                android:defaultValue="@string/chats_font_size_default"
                />
            <ListPreference
                android:title="@string/chats_divide"
                android:key="@string/chats_divide_key"
                android:entries="@array/chats_divide_entries"
                android:entryValues="@array/chats_divide_entryvalues"
                android:defaultValue="@string/chats_divide_default"
                />
            <CheckBoxPreference
                android:title="@string/chats_state_notification"
                android:key="@string/chats_state_notification_key"
                android:defaultValue="@bool/chats_state_notification_default"
                />
            <CheckBoxPreference
                android:title="@string/chats_attention"
                android:key="@string/chats_attention_key"
                android:defaultValue="@bool/chats_attention_default"
                />
            <RingtonePreference
                android:title="@string/chats_attention_sound"
                android:key="@string/chats_attention_sound_key"
                android:defaultValue="@string/chats_attention_sound_default"
                android:ringtoneType="ringtone"
                android:dependency="@string/chats_attention_key"
                android:showSilent="true"
                android:showDefault="true"
                />
        </PreferenceScreen>
        <PreferenceScreen
            android:title="@string/preference_events"
            android:key="@string/preference_events"
            >
            <RingtonePreference
                android:title="@string/events_sound"
                android:key="@string/events_sound_key"
                android:defaultValue="@string/events_sound_default"
                android:ringtoneType="notification"
                android:showSilent="true" 
                android:showDefault="true"
                />
            <CheckBoxPreference
                android:title="@string/events_vibro"
                android:key="@string/events_vibro_key"
                android:defaultValue="@bool/events_vibro_default"
                />
            <CheckBoxPreference
                android:title="@string/events_ignore_system_vibro"
                android:key="@string/events_ignore_system_vibro_key"
                android:defaultValue="@bool/events_ignore_system_vibro_default"
                android:dependency="@string/events_vibro_key"
                />
            <CheckBoxPreference
                android:title="@string/events_lightning"
                android:key="@string/events_lightning_key"
                android:defaultValue="@bool/events_lightning_default"
                />
            <CheckBoxPreference
                android:title="@string/events_persistent"
                android:key="@string/events_persistent_key"
                android:defaultValue="@bool/events_persistent_default"
                />
            <CheckBoxPreference
                android:title="@string/events_show_text"
                android:key="@string/events_show_text_key"
                android:defaultValue="@bool/events_show_text_default"
                />
            <ListPreference
                android:title="@string/events_message"
                android:key="@string/events_message_key"
                android:entries="@array/events_message_entries"
                android:entryValues="@array/events_message_entryvalues"
                android:defaultValue="@string/events_message_default"
                />
            <CheckBoxPreference
                android:title="@string/events_visible_chat"
                android:key="@string/events_visible_chat_key"
                android:defaultValue="@bool/events_visible_chat_default"
                />
            <CheckBoxPreference
                android:title="@string/events_first_only"
                android:key="@string/events_first_only_key"
                android:defaultValue="@bool/events_first_only_default"
                />
            <Preference
                android:title="@string/events_phrases"
                android:key="@string/events_phrases">
                <intent
                    android:targetPackage="@string/application_package"
                    android:targetClass="com.xabber.android.ui.preferences.PhraseList"/>
            </Preference>

        </PreferenceScreen>
        <PreferenceScreen
            android:title="@string/preference_connection"
            android:key="@string/preference_connection"
            >
            <CheckBoxPreference
                android:title="@string/connection_start_at_boot"
                android:key="@string/connection_start_at_boot_key"
                android:defaultValue="@bool/connection_start_at_boot_default"
                />
            <ListPreference
                android:title="@string/connection_go_away"
                android:key="@string/connection_go_away_key"
                android:entries="@array/connection_go_away_entries"
                android:entryValues="@array/connection_go_away_entryvalues"
                android:defaultValue="@string/connection_go_away_default"
                />
            <ListPreference
                android:title="@string/connection_go_xa"
                android:key="@string/connection_go_xa_key"
                android:entries="@array/connection_go_xa_entries"
                android:entryValues="@array/connection_go_xa_entryvalues"
                android:defaultValue="@string/connection_go_xa_default"
                />
            <CheckBoxPreference
                android:title="@string/connection_wifi_lock"
                android:key="@string/connection_wifi_lock_key"
                android:defaultValue="@bool/connection_wifi_lock_default"
                />
            <CheckBoxPreference
                android:title="@string/connection_wake_lock"
                android:key="@string/connection_wake_lock_key"
                android:defaultValue="@bool/connection_wake_lock_default"
                />
            <CheckBoxPreference
                android:title="@string/connection_load_vcard"
                android:key="@string/connection_load_vcard_key"
                android:defaultValue="@bool/connection_load_vcard_default"
                />
            <PreferenceCategory
                android:title="@string/connection_priority"
                >
                <CheckBoxPreference
                    android:title="@string/connection_adjust_priority"
                    android:key="@string/connection_adjust_priority_key"
                    android:defaultValue="@bool/connection_adjust_priority_default"
                    />
                <com.xabber.android.ui.widget.PriorityPreference
                    android:key="@string/connection_priority_chat_key"
                    android:defaultValue="@string/connection_priority_chat_default"
                    android:dependency="@string/connection_adjust_priority_key"
                    android:title="@string/chat"
                    android:singleLine="true"
                    />
                <com.xabber.android.ui.widget.PriorityPreference
                    android:key="@string/connection_priority_available_key"
                    android:defaultValue="@string/connection_priority_available_default"
                    android:dependency="@string/connection_adjust_priority_key"
                    android:title="@string/available"
                    android:singleLine="true"
                    />
                <com.xabber.android.ui.widget.PriorityPreference
                    android:key="@string/connection_priority_away_key"
                    android:defaultValue="@string/connection_priority_away_default"
                    android:dependency="@string/connection_adjust_priority_key"
                    android:title="@string/away"
                    android:singleLine="true"
                    />
                <com.xabber.android.ui.widget.PriorityPreference
                    android:key="@string/connection_priority_xa_key"
                    android:defaultValue="@string/connection_priority_xa_default"
                    android:dependency="@string/connection_adjust_priority_key"
                    android:title="@string/xa"
                    android:singleLine="true"
                    />
                <com.xabber.android.ui.widget.PriorityPreference
                    android:key="@string/connection_priority_dnd_key"
                    android:defaultValue="@string/connection_priority_dnd_default"
                    android:dependency="@string/connection_adjust_priority_key"
                    android:title="@string/dnd"
                    android:singleLine="true"
                    />
            </PreferenceCategory>
        </PreferenceScreen>
        <PreferenceScreen
            android:title="@string/preference_security"
            android:key="@string/preference_security"
            >
            <CheckBoxPreference
                android:title="@string/security_check_certificate"
                android:key="@string/security_check_certificate_key"
                android:defaultValue="@bool/security_check_certificate_default"
                />
            <PreferenceScreen
                android:title="@string/security_clear_certificate"
                android:key="@string/security_clear_certificate_key"
                />
            <ListPreference
                android:title="@string/security_otr_mode"
                android:key="@string/security_otr_mode_key"
                android:entries="@array/security_otr_mode_entries"
                android:entryValues="@array/security_otr_mode_entryvalues"
                android:defaultValue="@string/security_otr_mode_default"
                />
            <CheckBoxPreference
                android:title="@string/security_otr_history"
                android:key="@string/security_otr_history_key"
                android:defaultValue="@bool/security_otr_history_default"
                />
        </PreferenceScreen>
        <PreferenceScreen
            android:title="@string/preference_debug"
            android:key="@string/preference_debug"
            >
            <CheckBoxPreference
                android:title="@string/debug_log"
                android:key="@string/debug_log_key"
                android:defaultValue="@bool/debug_log_default"
                />
            <PreferenceScreen
                android:title="@string/cache_clear"
                android:key="@string/cache_clear_key"
                />
        </PreferenceScreen>
        <Preference
            android:title="@string/preference_about"
            android:key="@string/preference_about_key">
            <intent
                android:targetPackage="@string/application_package"
                android:targetClass="com.xabber.android.ui.preferences.AboutViewer"/>
            </Preference>
</PreferenceScreen>
