Version: (using KDE Devel) OS: Linux By right-clicking an item of the KMenu you get a context menu wich - among others - has the option to add the selected item to the main panel. However, this does not work if the panels are locked which might be confusing for new users. There are (at least) two possibilities to change this: a) remove/disable the "Add to Main Panel" entry if the panels are locked b) just ignore the lock and always put the icon in the panel I'd prefer b) because otherwise you sometimes have an option in the context menu and sometimes not. Users might need some time to figure out when it is disabled/hidden and when not. Anyways, I hope I reported this one in the right section (there was none for the kmenu)
SVN commit 466830 by aseigo: don't show the context menu if we are locked or if there is nothing to show due to kiosk restrictions BUG:113647 M +14 -4 service_mnu.cpp --- branches/KDE/3.5/kdebase/kicker/kicker/ui/service_mnu.cpp #466829:466830 @@ -504,7 +504,7 @@ void PanelServiceMenu::mouseReleaseEvent(QMouseEvent * ev) { - if (ev->button()==RightButton) + if (ev->button() == RightButton && !Kicker::the()->isImmutable()) { int id = idAt( ev->pos() ); @@ -524,27 +524,32 @@ delete popupMenu_; popupMenu_ = new KPopupMenu(this); connect(popupMenu_, SIGNAL(activated(int)), SLOT(slotContextMenu(int))); + bool hasEntries = false; switch (contextKSycocaEntry_->sycocaType()) { case KST_KService: if (kapp->authorize("editable_desktop_icons")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("desktop"), i18n("Add Item to Desktop"), AddItemToDesktop); } if (kapp->authorizeKAction("kicker_rmb")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("kicker"), i18n("Add Item to Main Panel"), AddItemToPanel); } if (kapp->authorizeKAction("menuedit")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("kmenuedit"), i18n("Edit Item"), EditItem); } if (kapp->authorize("run_command")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("run"), i18n("Put Into Run Dialog"), PutIntoRunDialog); } @@ -553,28 +558,33 @@ case KST_KServiceGroup: if (kapp->authorize("editable_desktop_icons")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("desktop"), i18n("Add Menu to Desktop"), AddMenuToDesktop); } if (kapp->authorizeKAction("kicker_rmb")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("kicker"), i18n("Add Menu to Main Panel"), AddMenuToPanel); } if (kapp->authorizeKAction("menuedit")) { + hasEntries = true; popupMenu_->insertItem(SmallIconSet("kmenuedit"), i18n("Edit Menu"), EditMenu); } break; default: - return; break; } - popupMenu_->popup(this->mapToGlobal(ev->pos())); - return; + if (hasEntries) + { + popupMenu_->popup(this->mapToGlobal(ev->pos())); + return; + } } delete popupMenu_;