[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim
From:       Volker Krause <vkrause () kde ! org>
Date:       2008-08-18 16:17:48
Message-ID: 1219076268.166200.12804.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 848866 by vkrause:

Merged revisions 780250,780252-780285,780287-780296,780299-780452,780454-780495,780497,780499-78 \
0529,780531-781594,781596-782028,782030-782646,782648-782671,782673-782963,782965-782967,782969- \
783127,783129-783243,783245,783248-783302,783304-783477,783479-783566,783568-783846,783848-78412 \
8,784130-784380,784383-784426,784428-784546,784548-784691,784693-785053,785055-785315,785318-785478,785480-785558 \
via svnmerge from  https://vkrause@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim

........
  r780250 | moenicke | 2008-02-28 15:06:44 +0100 (Thu, 28 Feb 2008) | 3 lines
  
  * making attachment quick view foldable in enterprise style (kolab issue 2168)
........
  r780273 | moenicke | 2008-02-28 17:03:25 +0100 (Thu, 28 Feb 2008) | 3 lines
  
  * enabled by default
........
  r780333 | moenicke | 2008-02-28 21:33:21 +0100 (Thu, 28 Feb 2008) | 4 lines
  
  * realigned and resized div, so text in the header is now click- and selectable
  BUG: 151150
........
  r780520 | moenicke | 2008-02-29 12:38:11 +0100 (Fri, 29 Feb 2008) | 3 lines
  
  * made attachment quick view a bit more pretty
........
  r784743 | moenicke | 2008-03-12 10:16:37 +0100 (Wed, 12 Mar 2008) | 3 lines
  
  * removed the white line of the foldable attachment view (kolab issue 2168)
........
  r785558 | moenicke | 2008-03-14 12:14:44 +0100 (Fri, 14 Mar 2008) | 4 lines
  
  * dont jump to the top of the email when folding/unfolding the attachment quick view (kolab \
                issue 2168)
  * show/hide attachment button is not shown when email has no attachments (kolab issue 2529)
........


 _M            . (directory)  
 M  +1 -1      kmail/headerstyle.cpp  
 M  +37 -8     kmail/kmreaderwin.cpp  
 M  +7 -0      kmail/kmreaderwin.h  
 M  +3 -1      kmail/pics/Makefile.am  
 A             kmail/pics/attachmentQuicklistClosed.png   \
branches/kdepim/enterprise/kdepim/kmail/pics/attachmentQuicklistClosed.png#780250  A            \
kmail/pics/attachmentQuicklistOpened.png   \
branches/kdepim/enterprise/kdepim/kmail/pics/attachmentQuicklistOpened.png#780250  M  +14 -0    \
kmail/urlhandlermanager.cpp  


** branches/KDE/3.5/kdepim #property svnmerge-integrated
   - /branches/kdepim/enterprise/kdepim:1-767022,767033,767233-767554,767556,767558-767946,76794 \
8-769318,769320-769354,769356-771105,771107-771251,771253-772311,772313-772316,772318-775194,775 \
196-775202,775204,775207-775211,775213-778001,778003-778004,778007,778010-778011,778013-778029,7 \
78031-778727,778729-779448,779450-779482,779484-779505,779507-779852,779854-779994,780211,780251 \
,781595,782647-783127,783129-783243,783245,783248-783477,783479-783847,784129,784547,785316-7853 \
17,787827,788634,789925,790349-790352,793296,794734,800441,817568,817604,817710-818288,818312-81 \
9076,819078-820073,820075-821035,821037-821124,821126-821378,821380-821648,821650-821813,821815- \
821835,821837-822268,822270-823864,823866-824217,824219-824277,824279-824285,824287-824288,824290-824805,824807-825075,825077-825083,825085-826354,826356-827491,830100,830443
  + /branches/kdepim/enterprise/kdepim:1-767022,767033,767233-767554,767556,767558-767946,767948 \
-769318,769320-769354,769356-771105,771107-771251,771253-772311,772313-772316,772318-775194,7751 \
96-775202,775204,775207-775211,775213-778001,778003-778004,778007,778010-778011,778013-778029,77 \
8031-778727,778729-779448,779450-779482,779484-779505,779507-779852,779854-779994,780211,780250- \
780285,780287-780296,780299-780452,780454-780495,780497,780499-780529,780531-782028,782030-78312 \
7,783129-783243,783245,783248-783477,783479-784380,784382-784426,784428-784691,784693-785478,785 \
480-785558,787827,788634,789925,790349-790352,793296,794734,800441,817568,817604,817710-818288,8 \
18312-819076,819078-820073,820075-821035,821037-821124,821126-821378,821380-821648,821650-821813 \
,821815-821835,821837-822268,822270-823864,823866-824217,824219-824277,824279-824285,824287-8242 \
                88,824290-824805,824807-825075,825077-825083,825085-826354,826356-827491,830100,830443
                
--- branches/KDE/3.5/kdepim/kmail/headerstyle.cpp #848865:848866
@@ -894,7 +894,7 @@
     // kmail icon
     if(topLevel) {
         headerStr +=
-        "<div class=\"noprint\" style=\"position: absolute; top: -14px; left: 0px; width: 95%; \
height: 135px;\">\n" +        "<div class=\"noprint\" style=\"position: absolute; top: -14px; \
right: 30px; width: 91px; height: 91px;\">\n"  "<img style=\"float: right;\" \
src=\""+imgpath+"icon.png\">\n"  "</div>\n";
 
--- branches/KDE/3.5/kdepim/kmail/kmreaderwin.cpp #848865:848866
@@ -516,7 +516,8 @@
     mHtmlWriter( 0 ),
     mSavedRelativePosition( 0 ),
     mDecrytMessageOverwrite( false ),
-    mShowSignatureDetails( false )
+    mShowSignatureDetails( false ),
+    mShowAttachmentQuicklist( true )
 {
   mSplitterSizes << 180 << 100;
   mMimeTreeMode = 1;
@@ -2663,13 +2664,34 @@
   if ( injectionPoint.isNull() )
     return;
 
+  QString imgpath( locate("data","kmail/pics/") );
+  QString visibility;
+  QString urlHandle;
+  QString imgSrc;
+  if( !showAttachmentQuicklist() )
+    {
+      urlHandle.append( "kmail:showAttachmentQuicklist" );
+      imgSrc.append( "attachmentQuicklistClosed.png" );
+    } else {
+      urlHandle.append( "kmail:hideAttachmentQuicklist" );
+      imgSrc.append( "attachmentQuicklistOpened.png" );
+    }
+
   QString html = renderAttachments( mRootNode, QApplication::palette().active().background() \
);  if ( html.isEmpty() )
     return;
-  if ( headerStyle() == HeaderStyle::fancy() )
-    html.prepend( QString::fromLatin1("<div style=\"float:left;\">%1&nbsp;</div>" \
                ).arg(i18n("Attachments:")) );
-  assert( injectionPoint.tagName() == "div" );
-  static_cast<DOM::HTMLElement>( injectionPoint ).setInnerHTML( html );
+
+    if ( headerStyle() == HeaderStyle::fancy() )
+      html.prepend( QString::fromLatin1("<div style=\"float:left;\">%1&nbsp;</div>" \
).arg(i18n("Attachments:")) ); +
+    if ( headerStyle() == HeaderStyle::enterprise() ) {
+      QString link("");
+      link += "<div style=\"text-align: right;\"><a href=\""+urlHandle+"\"><img \
src=\""+imgpath+imgSrc+"\"/></a></div>"; +      html.prepend( link );
+    }
+
+    assert( injectionPoint.tagName() == "div" );
+    static_cast<DOM::HTMLElement>( injectionPoint ).setInnerHTML( html );  
 }
 
 static QColor nextColor( const QColor & c )
@@ -2688,12 +2710,19 @@
   if ( node->firstChild() ) {
     QString subHtml = renderAttachments( node->firstChild(), nextColor( bgColor ) );
     if ( !subHtml.isEmpty() ) {
+
+      QString visibility;
+      if( !showAttachmentQuicklist() )
+	{
+	  visibility.append( "display:none;" );
+	}
+
       QString margin;
       if ( node != mRootNode || headerStyle() != HeaderStyle::enterprise() )
         margin = "padding:2px; margin:2px; ";
       if ( node->msgPart().typeStr() == "message" || node == mRootNode )
         html += QString::fromLatin1("<div style=\"background:%1; %2"
-            "vertical-align:middle; float:left;\">").arg( bgColor.name() ).arg( margin );
+            "vertical-align:middle; float:left; %3\">").arg( bgColor.name() ).arg( margin \
).arg( visibility );  html += subHtml;
       if ( node->msgPart().typeStr() == "message" || node == mRootNode )
         html += "</div>";
@@ -2716,7 +2745,7 @@
     typeBlacklisted = typeBlacklisted || node == mRootNode;
     if ( !label.isEmpty() && !icon.isEmpty() && !typeBlacklisted ) {
       html += "<div style=\"float:left;\">";
-      html += "<span style=\"white-space:nowrap;\">";
+      html += QString::fromLatin1( "<span style=\"white-space:nowrap; border-width: 0px; \
border-left-width: 5px; border-color: %1; 2px; border-left-style: solid;\">" ).arg( \
                bgColor.name() );
       html += QString::fromLatin1( "<a href=\"#att%1\">" ).arg( node->nodeId() );
       html += "<img style=\"vertical-align:middle;\" src=\"" + icon + "\"/>&nbsp;";
       if ( headerStyle() == HeaderStyle::enterprise() ) {
@@ -2729,7 +2758,7 @@
     }
   }
 
-  html += renderAttachments( node->nextSibling(), bgColor );
+  html += renderAttachments( node->nextSibling(), nextColor ( bgColor ) );
   return html;
 }
 
--- branches/KDE/3.5/kdepim/kmail/kmreaderwin.h #848865:848866
@@ -296,6 +296,12 @@
   /** Show signature details. */
   void setShowSignatureDetails( bool showDetails = true ) { mShowSignatureDetails = \
showDetails; }  
+  /* show or hide the list that points to the attachments */
+  bool showAttachmentQuicklist() const { return mShowAttachmentQuicklist; }
+
+  /* show or hide the list that points to the attachments */
+  void setShowAttachmentQuicklist( bool showAttachmentQuicklist = true ) { \
mShowAttachmentQuicklist = showAttachmentQuicklist; } +
 signals:
   /** Emitted after parsing of a message to have it stored
       in unencrypted state in it's folder. */
@@ -532,6 +538,7 @@
 	int mLevelQuote;
   bool mDecrytMessageOverwrite;
   bool mShowSignatureDetails;
+  bool mShowAttachmentQuicklist;
 };
 
 
--- branches/KDE/3.5/kdepim/kmail/pics/Makefile.am #848865:848866
@@ -26,7 +26,9 @@
 	enterprise_top.png \
 	enterprise_top_right.png \
 	enterprise_sw.png \
-	enterprise_w.png
+	enterprise_w.png \
+	attachmentQuicklistClosed.png \
+	attachmentQuicklistOpened.png
 
 
 picsdir = $(kde_datadir)/kmail/pics
--- branches/KDE/3.5/kdepim/kmail/urlhandlermanager.cpp #848865:848866
@@ -391,6 +391,20 @@
         return true;
       }
 
+      if ( url.path() == "showAttachmentQuicklist" ) {
+	  w->saveRelativePosition();
+	  w->setShowAttachmentQuicklist( true );
+	  w->update( true );
+	  return true;
+      }
+
+      if ( url.path() == "hideAttachmentQuicklist" ) {
+	  w->saveRelativePosition();
+	  w->setShowAttachmentQuicklist( false );
+	  w->update( true );
+	  return true;
+      }
+
 //       if ( url.path() == "startIMApp" )
 //       {
 //         kmkernel->imProxy()->startPreferredApp();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic