option to enter new name in overwrite dialog
[case] / src / addressbar.cpp
index e0145a4..0bc1038 100644 (file)
@@ -1,5 +1,5 @@
 // case - file manager for N900
-// Copyright (C) 2010 Lukas Hrazky
+// Copyright (C) 2010 Lukas Hrazky <lukkash@email.cz>
 // 
 // This program is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -16,6 +16,7 @@
 
 
 #include "addressbar.h"
+#include "fileoperator.h"
 
 
 AddressBar::AddressBar(QWidget *parent) : QLineEdit(parent) {
@@ -26,6 +27,11 @@ AddressBar::AddressBar(QWidget *parent) : QLineEdit(parent) {
 }
 
 
+void AddressBar::setText(const QString &text) {
+    QLineEdit::setText(FileOperator::shortenPath(text));
+}
+
+
 void AddressBar::mousePressEvent(QMouseEvent *event) {
     emit mousePressed();
     QLineEdit::mousePressEvent(event);