Changeset View
Changeset View
Standalone View
Standalone View
containmentactions/contextmenu/menu.cpp
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Line(s) | 133 | } if (name == QLatin1String("_wallpaper")) { | |||
---|---|---|---|---|---|
134 | if (!c->wallpaper().isEmpty()) { | 134 | if (!c->wallpaper().isEmpty()) { | ||
135 | QObject *wallpaperGraphicsObject = c->property("wallpaperGraphicsObject").value<QObject *>(); | 135 | QObject *wallpaperGraphicsObject = c->property("wallpaperGraphicsObject").value<QObject *>(); | ||
136 | if (wallpaperGraphicsObject) { | 136 | if (wallpaperGraphicsObject) { | ||
137 | actions << wallpaperGraphicsObject->property("contextualActions").value<QList<QAction *> >(); | 137 | actions << wallpaperGraphicsObject->property("contextualActions").value<QList<QAction *> >(); | ||
138 | } | 138 | } | ||
139 | } | 139 | } | ||
140 | } else if (QAction *a = action(name)) { | 140 | } else if (QAction *a = action(name)) { | ||
141 | // Bug 364292: show "Remove this Panel" option only when panelcontroller is opened | 141 | // Bug 364292: show "Remove this Panel" option only when panelcontroller is opened | ||
142 | if (name != QLatin1String("remove") || c->isUserConfiguring() || | 142 | // Same for "Add Widgets..." | ||
143 | (c->containmentType() != Plasma::Types::PanelContainment | 143 | if ((name != QLatin1String("remove") && | ||
144 | && c->containmentType() != Plasma::Types::CustomPanelContainment)) { | 144 | name != QLatin1String("add widgets")) || | ||
145 | c->isUserConfiguring() || | ||||
146 | (c->containmentType() != Plasma::Types::PanelContainment && | ||||
147 | c->containmentType() != Plasma::Types::CustomPanelContainment)) { | ||||
145 | 148 | | |||
146 | actions << a; | 149 | actions << a; | ||
147 | } | 150 | } | ||
148 | } | 151 | } | ||
149 | } | 152 | } | ||
150 | 153 | | |||
151 | return actions; | 154 | return actions; | ||
152 | } | 155 | } | ||
▲ Show 20 Lines • Show All 163 Lines • Show Last 20 Lines |