mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
plasma: setup drag for recent entries in launcher applet
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
36381cb9ec
commit
5e7422c5c7
1 changed files with 3 additions and 1 deletions
|
@ -1438,11 +1438,12 @@ void LauncherRecent::slotUpdateLayout()
|
||||||
const QSizeF iconsize = kIconSize();
|
const QSizeF iconsize = kIconSize();
|
||||||
foreach (const QString &recent, KRecentDocument::recentDocuments()) {
|
foreach (const QString &recent, KRecentDocument::recentDocuments()) {
|
||||||
KDesktopFile recentfile(recent);
|
KDesktopFile recentfile(recent);
|
||||||
|
const QString recenturl = recentfile.readUrl();
|
||||||
LauncherWidget* launcherwidget = new LauncherWidget(this);
|
LauncherWidget* launcherwidget = new LauncherWidget(this);
|
||||||
launcherwidget->setup(
|
launcherwidget->setup(
|
||||||
iconsize, kRecentIcon(recentfile.readIcon()), recentfile.readName(), recentfile.readComment()
|
iconsize, kRecentIcon(recentfile.readIcon()), recentfile.readName(), recentfile.readComment()
|
||||||
);
|
);
|
||||||
launcherwidget->setData(recentfile.readUrl());
|
launcherwidget->setData(recenturl);
|
||||||
QAction* recenteaction = new QAction(launcherwidget);
|
QAction* recenteaction = new QAction(launcherwidget);
|
||||||
recenteaction->setIcon(KIcon("edit-delete"));
|
recenteaction->setIcon(KIcon("edit-delete"));
|
||||||
recenteaction->setToolTip(i18n("Remove"));
|
recenteaction->setToolTip(i18n("Remove"));
|
||||||
|
@ -1453,6 +1454,7 @@ void LauncherRecent::slotUpdateLayout()
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
launcherwidget->addAction(recenteaction);
|
launcherwidget->addAction(recenteaction);
|
||||||
|
launcherwidget->setMimeData(kMakeMimeData(recenturl));
|
||||||
b_launcherwidgets.append(launcherwidget);
|
b_launcherwidgets.append(launcherwidget);
|
||||||
b_layout->addItem(launcherwidget);
|
b_layout->addItem(launcherwidget);
|
||||||
connect(
|
connect(
|
||||||
|
|
Loading…
Add table
Reference in a new issue