┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-02-07 07:27:06 +0000
committerPeter Penz <[email protected]>2008-02-07 07:27:06 +0000
commit368e7d615a0c32aae84956c35d97ca987e7d728c (patch)
tree3ad48a15ffe09c7e372bb56147540a9ddaa262d3
parentd38bb6891a4048dd666cad27a38d7b7a2463dfb5 (diff)
Fixed issue that the "Show Full Location" action is not synchronized with the editable state of the URL navigator (thanks to David Benjamin for the patch).
BUG: 156891 svn path=/trunk/KDE/kdebase/apps/; revision=771918
-rw-r--r--src/dolphinmainwindow.cpp13
-rw-r--r--src/dolphinmainwindow.h5
2 files changed, 14 insertions, 4 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 4c32e623e..afabdf983 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -259,6 +259,13 @@ void DolphinMainWindow::slotAdditionalInfoChanged()
view->updateAdditionalInfoActions(actionCollection());
}
+void DolphinMainWindow::slotEditableStateChanged(bool editable)
+{
+ KToggleAction* editableLocationAction =
+ static_cast<KToggleAction*>(actionCollection()->action("editable_location"));
+ editableLocationAction->setChecked(editable);
+}
+
void DolphinMainWindow::slotSelectionChanged(const KFileItemList& selection)
{
updateEditActions();
@@ -1058,9 +1065,7 @@ void DolphinMainWindow::setupActions()
stop->setIcon(KIcon("process-stop"));
connect(stop, SIGNAL(triggered()), this, SLOT(stopLoading()));
- // TODO: the URL navigator must emit a signal if the editable state has been
- // changed, so that the corresponding showFullLocation action is updated. Also
- // the naming "Show full Location" is currently confusing...
+ // TODO: the naming "Show full Location" is currently confusing...
KToggleAction* showFullLocation = actionCollection()->add<KToggleAction>("editable_location");
showFullLocation->setText(i18nc("@action:inmenu Navigation Bar", "Show Full Location"));
showFullLocation->setShortcut(Qt::CTRL | Qt::Key_L);
@@ -1328,6 +1333,8 @@ void DolphinMainWindow::connectViewSignals(int viewIndex)
this, SLOT(changeUrl(const KUrl&)));
connect(navigator, SIGNAL(historyChanged()),
this, SLOT(slotHistoryChanged()));
+ connect(navigator, SIGNAL(editableStateChanged(bool)),
+ this, SLOT(slotEditableStateChanged(bool)));
}
void DolphinMainWindow::updateSplitAction()
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h
index 37cdcb43e..edc5c1bd6 100644
--- a/src/dolphinmainwindow.h
+++ b/src/dolphinmainwindow.h
@@ -312,7 +312,7 @@ private slots:
void zoomOut();
/**
- * Toggles between edit and brose mode of the navigation bar.
+ * Toggles between edit and browse mode of the navigation bar.
*/
void toggleEditLocation();
@@ -376,6 +376,9 @@ private slots:
/** Updates the state of the 'Additional Information' actions. */
void slotAdditionalInfoChanged();
+ /** Updates the state of the 'Show Full Location' action. */
+ void slotEditableStateChanged(bool editable);
+
/**
* Updates the state of the 'Edit' menu actions and emits
* the signal selectionChanged().