summaryrefslogtreecommitdiff
path: root/src/dropshortcut.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-03 02:57:47 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-03 02:57:47 +0300
commitb1d2dc573da58236e8a972bbab7a52345aeee8c1 (patch)
tree6493c7de529b6cce7a3cee38b23b58b7e2da3711 /src/dropshortcut.cpp
parent51ff8587d3a008e9c4867b18034640f58063d4a8 (diff)
downloadplus-b1d2dc573da58236e8a972bbab7a52345aeee8c1.tar.gz
plus-b1d2dc573da58236e8a972bbab7a52345aeee8c1.tar.bz2
plus-b1d2dc573da58236e8a972bbab7a52345aeee8c1.tar.xz
plus-b1d2dc573da58236e8a972bbab7a52345aeee8c1.zip
Add option clear to context menu in drops window.
Diffstat (limited to 'src/dropshortcut.cpp')
-rw-r--r--src/dropshortcut.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/dropshortcut.cpp b/src/dropshortcut.cpp
index 4deb8901d..c3ba98a27 100644
--- a/src/dropshortcut.cpp
+++ b/src/dropshortcut.cpp
@@ -43,9 +43,7 @@ DropShortcut::DropShortcut():
mItemSelected(-1),
mItemColorSelected(1)
{
- for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++)
- mItems[i] = -1;
-
+ clear();
load();
mLastDropIndex = 0;
}
@@ -225,3 +223,12 @@ void DropShortcut::setItem(int index)
mItemColors[index] = mItemColorSelected;
save();
}
+
+void DropShortcut::clear()
+{
+ for (int i = 0; i < DROP_SHORTCUT_ITEMS; i++)
+ {
+ mItems[i] = -1;
+ mItemColors[i] = 1;
+ }
+}