https://bugs.kde.org/show_bug.cgi?id=257790
Tobias Koenig <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #10 from Tobias Koenig <tokoe kde org> 2011-01-13 13:21:34 --- commit 48068ac956521cac309005b36ad2638c1a727b57 branch master Author: Tobias Koenig <[email protected]> Date: Thu Jan 13 13:24:25 2011 +0100 Use display name as filename suggestion for saving BUG: 257790 diff --git a/mobile/calendar/korganizer-mobile.qml b/mobile/calendar/korganizer-mobile.qml index c47b47e..2eb0a41 100644 --- a/mobile/calendar/korganizer-mobile.qml +++ b/mobile/calendar/korganizer-mobile.qml @@ -507,7 +507,7 @@ KPIM.MainView { } onSaveAttachment: { - application.saveAttachment(url); + application.saveAttachment(url, fileName); } } ] diff --git a/mobile/lib/AttachmentList.qml b/mobile/lib/AttachmentList.qml index 343f718..3f3be4a 100644 --- a/mobile/lib/AttachmentList.qml +++ b/mobile/lib/AttachmentList.qml @@ -34,7 +34,7 @@ Item { /** Emittted when an attachment has been selected. */ signal openAttachment(string url, string mimeType) - signal saveAttachment(string url) + signal saveAttachment(string url, string fileName) Component { id: attachmentDelegate @@ -63,6 +63,7 @@ Item { wrapper.ListView.view.currentIndex = model.index wrapper.ListView.view.currentMimeType = model.mimeType; wrapper.ListView.view.currentAttachmentUrl = model.attachmentUrl; + wrapper.ListView.view.currentFileName = model.display; } } } @@ -71,6 +72,7 @@ Item { KPIM.DecoratedListView { property string currentMimeType property string currentAttachmentUrl + property string currentFileName id: attachmentListView anchors.top: parent.top @@ -87,6 +89,7 @@ Item { attachmentListView.currentIndex = -1 attachmentListView.currentMimeType = ""; attachmentListView.currentAttachmentUrl = ""; + attachmentListView.currentFileName = ""; } } } @@ -119,7 +122,7 @@ Item { height: parent.height / 6 buttonText: KDE.i18n( "Save" ) onClicked: { - saveAttachment(attachmentListView.currentAttachmentUrl); + saveAttachment(attachmentListView.currentAttachmentUrl, attachmentListView.currentFileName); } } } @@ -154,7 +157,7 @@ Item { height: 48 icon: KDE.iconPath( "document-save", width ); onClicked: { - saveAttachment(attachmentListView.currentAttachmentUrl); + saveAttachment(attachmentListView.currentAttachmentUrl, attachmentListView.currentFileName); } states: [ State { diff --git a/mobile/lib/kdeclarativemainview.cpp b/mobile/lib/kdeclarativemainview.cpp index dbff324..fafe342 100644 --- a/mobile/lib/kdeclarativemainview.cpp +++ b/mobile/lib/kdeclarativemainview.cpp @@ -748,7 +748,7 @@ void KDeclarativeMainView::openAttachment( const QString &url, const QString &mi #endif } -void KDeclarativeMainView::saveAttachment( const QString &url , const QString &defaultFileName) +void KDeclarativeMainView::saveAttachment( const QString &url, const QString &defaultFileName ) { QString fileName = defaultFileName; if ( defaultFileName.isEmpty() ) { diff --git a/mobile/mail/kmail-mobile.qml b/mobile/mail/kmail-mobile.qml index 66fb2fd..fae1896 100644 --- a/mobile/mail/kmail-mobile.qml +++ b/mobile/mail/kmail-mobile.qml @@ -489,7 +489,7 @@ KPIM.MainView { } onSaveAttachment: { - application.saveAttachment(url); + application.saveAttachment(url, fileName); } } ] diff --git a/mobile/tasks/tasks.qml b/mobile/tasks/tasks.qml index ee0448e..10ec061 100644 --- a/mobile/tasks/tasks.qml +++ b/mobile/tasks/tasks.qml @@ -341,7 +341,7 @@ KPIM.MainView { } onSaveAttachment: { - application.saveAttachment(url); + application.saveAttachment(url, fileName); } } ] -- Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Kdepim-bugs mailing list [email protected] https://mail.kde.org/mailman/listinfo/kdepim-bugs
