// add services
/* This item should be at the top of the menu...
char *user = getlogin();
if (user == 0) user = getenv("LOGNAME");
QString username(user);
insertItem(SmallIconSet("kuser"), username, this, SLOT( slotEditUserContact() ) );
*/
PanelServiceMenu::initialize();
int id;
id = insertItem(new PopupMenuTitle(i18n("All Applications"), font()), -1 /* id */, 0);
setItemEnabled( id, false );
id = insertItem(new PopupMenuTitle(i18n("Actions"), font()), -1 /* id */, -1);
setItemEnabled( id, false )
这一段是kmenu实现的部分,上面注释掉的那一段是取系统用户名的。
最新评论