コード例 #1
0
ファイル: rl-presentity.cpp プロジェクト: brownsys/pane-ekiga
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;
}
コード例 #2
0
ファイル: local-presentity.cpp プロジェクト: Klom/ekiga
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;
}