当前位置: 首页>>代码示例>>C++>>正文


C++ MenuBuilder::add_separator方法代码示例

本文整理汇总了C++中ekiga::MenuBuilder::add_separator方法的典型用法代码示例。如果您正苦于以下问题:C++ MenuBuilder::add_separator方法的具体用法?C++ MenuBuilder::add_separator怎么用?C++ MenuBuilder::add_separator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ekiga::MenuBuilder的用法示例。


在下文中一共展示了MenuBuilder::add_separator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: status

bool
LM::Presentity::populate_menu (Ekiga::MenuBuilder& builder)
{
  const gchar* subscription = lm_message_node_get_attribute (item, "subscription");
  const gchar* ask = lm_message_node_get_attribute (item, "ask");

  if ( !has_chat) {

    builder.add_action ("im-message-new", _("Start chat"), boost::ref (chat_requested));
  } else {

    builder.add_action ("im-message-new", _("Continue chat"), boost::ref (chat_requested));
  }
  builder.add_separator ();

  builder.add_action ("edit", _("_Edit"),
		      boost::bind (&LM::Presentity::edit_presentity, this));

  if (g_strcmp0 (subscription, "none") == 0) {

    builder.add_action ("ask", _("Ask him/her to see his/her status"), boost::bind (&LM::Presentity::ask_to, this));
  }
  if (g_strcmp0 (subscription, "from") == 0) {

    builder.add_action ("stop", _("Forbid him/her to see my status"), boost::bind (&LM::Presentity::revoke_from, this));
    if (ask == NULL)
      builder.add_action ("ask", _("Ask him/her to see his/her status"), boost::bind (&LM::Presentity::ask_to, this));
    else
      builder.add_ghost ("ask", _("Ask him/her to see his/her status (pending)"));
  }
  if (g_strcmp0 (subscription, "to") == 0) {

    builder.add_action ("stop", _("Stop getting his/her status"), boost::bind (&LM::Presentity::stop_to, this));
  }
  if (g_strcmp0 (subscription, "both") == 0) {

    builder.add_action ("stop", _("Forbid him/her to see my status"), boost::bind (&LM::Presentity::revoke_from, this));
    builder.add_action ("stop", _("Stop getting his/her status"), boost::bind (&LM::Presentity::stop_to, this));
  }

  builder.add_action ("remove", _("_Remove"),
		      boost::bind (&LM::Presentity::remove_presentity, this));
  return true;
}
开发者ID:UIKit0,项目名称:ekiga,代码行数:44,代码来源:loudmouth-presentity.cpp

示例2:

bool
RL::Presentity::populate_menu (Ekiga::MenuBuilder &builder)
{
    bool populated = false;
    boost::shared_ptr<Ekiga::PresenceCore> presence_core(services.get<Ekiga::PresenceCore> ("presence-core"));

    populated = presence_core->populate_presentity_menu (PresentityPtr (this, null_deleter ()), uri, builder);

    if (writable) {

        if (populated)
            builder.add_separator ();

        builder.add_action ("edit", _("_Edit"),
                            boost::bind (&RL::Presentity::edit_presentity, this));
        builder.add_action ("remove", _("_Remove"),
                            boost::bind (&RL::Presentity::remove, this));
    }

    return true;
}
开发者ID:brownsys,项目名称:pane-ekiga,代码行数:21,代码来源:rl-presentity.cpp

示例3:

bool
LM::Account::populate_menu (Ekiga::MenuBuilder& builder)
{
  if (lm_connection_is_open (connection)) {

    builder.add_action ("user-offline", _("_Disable"),
			boost::bind (&LM::Account::disable, this));
  } else {

    builder.add_action ("user-available", _("_Enable"),
			boost::bind (&LM::Account::enable, this));
  }

  builder.add_separator ();

  builder.add_action ("gtk-edit", _("Edit"),
		      boost::bind (&LM::Account::edit, this));
  builder.add_action ("gtk-remove", _("_Remove"),
		      boost::bind (&LM::Account::remove, this));

  return true;
}
开发者ID:Pobegunchik,项目名称:ekiga,代码行数:22,代码来源:loudmouth-account.cpp

示例4:

bool
Local::Presentity::populate_menu (Ekiga::MenuBuilder &builder)
{
  bool populated = false;
  boost::shared_ptr<Ekiga::PresenceCore> pcore = presence_core.lock ();

  if (!pcore)
    return false;

  populated
    = pcore->populate_presentity_menu (PresentityPtr(this, null_deleter ()),
				       get_uri (), builder);

  if (populated)
    builder.add_separator ();

  builder.add_action ("edit", _("_Edit"),
		      boost::bind (&Local::Presentity::edit_presentity, this));
  builder.add_action ("remove", _("_Remove"),
		      boost::bind (&Local::Presentity::remove, this));

  return true;
}
开发者ID:Klom,项目名称:ekiga,代码行数:23,代码来源:local-presentity.cpp

示例5: populate_menu

 bool populate_menu (Ekiga::MenuBuilder& builder)
 {
   builder.add_separator ();
   return false;
 }
开发者ID:Klom,项目名称:ekiga,代码行数:5,代码来源:menu-builder-tools.cpp


注:本文中的ekiga::MenuBuilder::add_separator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。