本文整理汇总了C++中AccountHandler::allowsManualBuddies方法的典型用法代码示例。如果您正苦于以下问题:C++ AccountHandler::allowsManualBuddies方法的具体用法?C++ AccountHandler::allowsManualBuddies怎么用?C++ AccountHandler::allowsManualBuddies使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AccountHandler
的用法示例。
在下文中一共展示了AccountHandler::allowsManualBuddies方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _populateWindowData
void AP_UnixDialog_CollaborationAddBuddy::_populateWindowData()
{
// populate the account combobox
GtkListStore* store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
GtkTreeIter iter;
AbiCollabSessionManager* pManager = AbiCollabSessionManager::getManager();
for (UT_uint32 i = 0; i < pManager->getAccounts().size(); i++)
{
AccountHandler* pHandler = pManager->getAccounts()[i];
if (pHandler && pHandler->allowsManualBuddies())
{
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
DESC_COLUMN, pHandler->getDescription().utf8_str(),
HANDLER_COLUMN, pHandler,
-1);
}
}
m_model = GTK_TREE_MODEL (store);
gtk_combo_box_set_model(GTK_COMBO_BOX(m_wAccount), m_model);
// if we have at least one account, then make sure the first one is selected
if (pManager->getAccounts().size() > 0)
{
gtk_combo_box_set_active(GTK_COMBO_BOX(m_wAccount), 0);
}
else
{
// nope, we don't have any account :'-(
gtk_combo_box_set_active(GTK_COMBO_BOX(m_wAccount), -1);
}
}