[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/utils/krusader/krusader
From: Jan Lepper <dehtris () yahoo ! de>
Date: 2010-09-30 13:28:47
Message-ID: 20100930132847.603C6AC88E () svn ! kde ! org
[Download RAW message or body]
SVN commit 1181228 by janlepper:
implement forward/backward in history - part5: refresh actions; KrView: don't handle \
left/right key press if alt is pressed (default shortcuts for back/forward)
M +6 -0 GUI/dirhistoryqueue.h
M +4 -2 Panel/krview.cpp
M +2 -0 Panel/panelfunc.cpp
--- trunk/extragear/utils/krusader/krusader/GUI/dirhistoryqueue.h #1181227:1181228
@@ -44,6 +44,12 @@
bool gotoPos(int pos);
bool goBack();
bool goForward();
+ bool canGoBack() {
+ return _currentPos < count() - 1;
+ }
+ bool canGoForward() {
+ return _currentPos > 0;
+ }
public slots: // Public slots
/** No descriptions */
--- trunk/extragear/utils/krusader/krusader/Panel/krview.cpp #1181227:1181228
@@ -762,14 +762,16 @@
}
case Qt::Key_Backspace : // Terminal Emulator bugfix
case Qt::Key_Left :
- if (e->modifiers() == Qt::ControlModifier || e->modifiers() == \
Qt::ShiftModifier) { // let the panel handle it + if (e->modifiers() == \
Qt::ControlModifier || e->modifiers() == Qt::ShiftModifier || + \
e->modifiers() == Qt::AltModifier) { // let the panel handle it e->ignore();
} else { // a normal click - do a lynx-like moving thing
op()->emitDirUp(); // ask krusader to move up a directory
}
return true; // safety
case Qt::Key_Right :
- if (e->modifiers() == Qt::ControlModifier || e->modifiers() == \
Qt::ShiftModifier) { // let the panel handle it + if (e->modifiers() == \
Qt::ControlModifier || e->modifiers() == Qt::ShiftModifier || + \
e->modifiers() == Qt::AltModifier) { // let the panel handle it e->ignore();
} else { // just a normal click - do a lynx-like moving thing
KrViewItem *i = getCurrentKrViewItem();
--- trunk/extragear/utils/krusader/krusader/Panel/panelfunc.cpp #1181227:1181228
@@ -1290,6 +1290,8 @@
krExecFiles->setEnabled(true); // show only \
executables
*/
// krBack->setEnabled(canGoBack()); // go back
+ KrActions::actHistoryBackward->setEnabled(history->canGoBack());
+ KrActions::actHistoryForward->setEnabled(history->canGoForward());
KrActions::actTogglePreviews->setChecked(panel->view->previewsShown());
panel->view->refreshActions();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic