/** * initizialises the default options for a new profile */ bool PsiOptions::newProfile() { bool ok = true; if (!load(":/options/newprofile.xml")) { ok = false; } StatusPreset(tr("Away from desk"), tr("I am away from my desk. Leave a message."), XMPP::Status::Away ).toOptions(this); StatusPreset(tr("Showering"), tr("I'm in the shower. You'll have to wait for me to get out."), XMPP::Status::Away ).toOptions(this); StatusPreset(tr("Eating"), tr("Out eating. Mmmm.. food."), XMPP::Status::Away ).toOptions(this); StatusPreset(tr("Sleep"), tr("Sleep is good. Zzzzz"), XMPP::Status::DND ).toOptions(this); StatusPreset(tr("Work"), tr("Can't chat. Gotta work."), XMPP::Status::DND ).toOptions(this); StatusPreset(tr("Air"), tr("Stepping out to get some fresh air."), XMPP::Status::Away ).toOptions(this); StatusPreset(tr("Movie"), tr("Out to a movie. Is that OK with you?"), XMPP::Status::Away ).toOptions(this); StatusPreset(tr("Secret"), tr("I'm not available right now and that's all you need to know."), XMPP::Status::XA ).toOptions(this); StatusPreset(tr("Out for the night"), tr("Out for the night."), XMPP::Status::Away ).toOptions(this); StatusPreset(tr("Greece"), tr("I have gone to a far away place. I will be back someday!"), XMPP::Status::XA ).toOptions(this); { QStringList pluginsKeys; #ifdef PSI_PLUGINS PluginManager *pm = PluginManager::instance(); QStringList plugins = pm->availablePlugins(); foreach (const QString &plugin, plugins) { pluginsKeys << pm->shortName(plugin) + "-plugin"; } #endif ToolbarPrefs chatToolbar; chatToolbar.on = true; chatToolbar.name = "Chat"; chatToolbar.keys << "chat_clear" << "chat_find" << "chat_html_text" << "chat_add_contact"; chatToolbar.keys += pluginsKeys; chatToolbar.keys << "spacer" << "chat_icon" << "chat_file" << "chat_pgp" << "chat_info" << "chat_history" << "chat_voice" << "chat_active_contacts"; ToolbarPrefs groupchatToolbar; groupchatToolbar.on = true; groupchatToolbar.name = "Groupchat"; groupchatToolbar.keys << "gchat_clear" << "gchat_find" << "gchat_html_text" << "gchat_configure"; groupchatToolbar.keys += pluginsKeys; groupchatToolbar.keys << "spacer" << "gchat_icon" ; ToolbarPrefs buttons; buttons.name = tr("Buttons"); #ifndef Q_OS_MAC buttons.on = true; #endif buttons.keys << "button_options" << "button_status"; buttons.dock = Qt3Dock_Bottom; ToolbarPrefs showContacts; showContacts.name = tr("Show contacts"); showContacts.keys << "show_offline" << "show_hidden" << "show_agents" << "show_self" << "show_statusmsg"; ToolbarPrefs eventNotifier; eventNotifier.name = tr("Event notifier"); eventNotifier.keys << "event_notifier"; eventNotifier.dock = Qt3Dock_Bottom; QList<ToolbarPrefs> toolbars; toolbars << chatToolbar << groupchatToolbar << buttons << showContacts << eventNotifier; foreach(ToolbarPrefs tb, toolbars) { tb.locked = true; PsiToolBar::structToOptions(this, tb); }