[Bug 257790] Cannot save a png attachment

2011-01-20 Thread Ludwig Reiter
https://bugs.kde.org/show_bug.cgi?id=257790


Ludwig Reiter ludwig.rei...@intevation.de changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED




--- Comment #11 from Ludwig Reiter ludwig reiter intevation de  2011-01-20 
14:16:36 ---
Calendar Touch (Windows CE) 2011-01-16
Test of the description: passed
Closed.

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2011-01-13 Thread Andre Heinecke
https://bugs.kde.org/show_bug.cgi?id=257790





--- Comment #9 from Andre Heinecke aheinecke intevation de  2011-01-13 
11:28:22 ---
To reproduce Comment #8 
- Attach a file to an incidence
- Pull out the attachment flap when looking at that incidence
- hit the save icon in the bottom right corner

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2011-01-13 Thread Tobias Koenig
https://bugs.kde.org/show_bug.cgi?id=257790


Tobias Koenig to...@kde.org 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 to...@kde.org
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2011-01-05 Thread Andre Heinecke
https://bugs.kde.org/show_bug.cgi?id=257790





--- Comment #6 from Andre Heinecke aheinecke intevation de  2011-01-05 
15:26:31 ---
commit 523864bd8dc0d928b549a59fe6cf6ccde66953b1
branch master
Author: Andre Heinecke aheine...@intevation.de
Date:   Wed Jan 5 13:46:18 2011 +

Modifiy attachment save function.

  Allow to supply a defaultFileName for saveAttachment that is
  independend ot the Url and will be preselected in the FileDialog.
  Also check if the MimeType of the attachment can be determined and
  if so use the patterns of this mimetype as a filter so that the
  file Suffix is correctly set.
  CCBUG: 257790

diff --git a/mobile/lib/kdeclarativemainview.cpp
b/mobile/lib/kdeclarativemainview.cpp
index e713b16..094b1f6 100644
--- a/mobile/lib/kdeclarativemainview.cpp
+++ b/mobile/lib/kdeclarativemainview.cpp
@@ -738,15 +738,23 @@ void KDeclarativeMainView::openAttachment( const QString
url, const QString mi
 #endif
 }

-void KDeclarativeMainView::saveAttachment( const QString url )
+void KDeclarativeMainView::saveAttachment( const QString url , const QString
defaultFileName)
 {
-  QString fileName = KUrl( url ).fileName();
-  if ( fileName.isEmpty() ) {
-fileName = i18nc( filename for an unnamed attachment, attachment.1 );
+  QString fileName = defaultFileName;
+  if ( defaultFileName.isEmpty() ) {
+fileName = KUrl( url ).fileName();
+if ( fileName.isEmpty() ) {
+  fileName = i18nc( filename for an unnamed attachment, attachment.1
);
+}
+  }
+  QStringList patterns = KMimeType::findByUrl( url, 0, true, true, 0
)-patterns();
+  QString filter = QString();
+  if ( !patterns.isEmpty() ) {
+filter += patterns.join( QLatin1String( \n ) );
+filter += i18n( \n*|all files );
   }
-
   const QString targetFile = KFileDialog::getSaveFileName( KUrl(
kfiledialog:///saveAttachment/ + fileName ),
-   QString(),
+   filter,
this,
i18n( Save
Attachment ) );
   if ( targetFile.isEmpty() ) {
diff --git a/mobile/lib/kdeclarativemainview.h
b/mobile/lib/kdeclarativemainview.h
index dad6f03..672f177 100644
--- a/mobile/lib/kdeclarativemainview.h
+++ b/mobile/lib/kdeclarativemainview.h
@@ -172,7 +172,7 @@ class MOBILEUI_EXPORT KDeclarativeMainView : public
KDeclarativeFullScreenView
 void openManual();

 void openAttachment( const QString url, const QString mimeType );
-void saveAttachment( const QString url );
+void saveAttachment( const QString url, const QString defaultFileName =
QString() );

 void reportBug();

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2011-01-05 Thread Andre Heinecke
https://bugs.kde.org/show_bug.cgi?id=257790





--- Comment #8 from Andre Heinecke aheinecke intevation de  2011-01-05 
15:32:33 ---
Issue that remains is that when saving a single file from the attachment menu
the filename is something like korganizer-mobile301570.
Because the filename is there directly taken from the url which is a temporary
file and not from the label as it should be.

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2011-01-04 Thread Andre Heinecke
https://bugs.kde.org/show_bug.cgi?id=257790


Andre Heinecke aheine...@intevation.de changed:

   What|Removed |Added

 CC||aheine...@intevation.de
 OS/Version|Linux   |Windows CE




--- Comment #4 from Andre Heinecke aheinecke intevation de  2011-01-04 
10:00:17 ---
Wince:
Looking at the attachment shows a fine preview of the png,
Test 1: 
- Actions - save all attachments
 - Save attachment dialog comes up
 - Filter ist set for all files
 - Filename is the filename for all attachments

- Added .png suffig to the filename - Hit save
 - MessageBox: Prozess kann nicht gestartet werden: Keine Verbindung zu
klauncher: The name org.kde.klauncher was not provided by any .service files
 - File is not saved

Test 2:
- Hit save icon in the attachment flap
 - File Dialog comes up, filename is not the filename of the attachment but
korganizer-mobile301570
- save
 - file is created but without .png suffix can not be opened

Test 3
- Hit save icon in the attachment flap
 - File Dialog comes up, filename is not the filename of the attachment but
korganizer-mobile301570
- Change name to korganizer-mobile301570.png
 - save
 - file is there correctly

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2011-01-04 Thread Andre Heinecke
https://bugs.kde.org/show_bug.cgi?id=257790





--- Comment #5 from Andre Heinecke aheinecke intevation de  2011-01-04 
10:04:16 ---
The Test in Comment #4 was with version -gitfc6a857 from 2011-01-01

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2010-12-09 Thread Tobias Koenig
https://bugs.kde.org/show_bug.cgi?id=257790





--- Comment #3 from Tobias Koenig tokoe kde org  2010-12-09 11:56:25 ---
Works fine on desktop, so it must be a plain Maemo/WinCE problem...

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2010-12-01 Thread Ludwig Reiter
https://bugs.kde.org/show_bug.cgi?id=257790


Ludwig Reiter ludwig.rei...@intevation.de changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Comment #2 from Ludwig Reiter ludwig reiter intevation de  2010-12-01 
15:13:54 ---
version: 20101201.1202511

A file dialog opens. ok
But it has preconfigured Document as file name. (failure)
Save. 
The saved file has the size 0. (failure)

-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[Bug 257790] Cannot save a png attachment

2010-11-24 Thread Ludwig Reiter
https://bugs.kde.org/show_bug.cgi?id=257790


Ludwig Reiter ludwig.rei...@intevation.de changed:

   What|Removed |Added

   Keywords||komo3




-- 
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
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs