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

List:       kde-commits
Subject:    KDE/kdepim/korganizer
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2010-11-22 17:52:54
Message-ID: 20101122175254.BC119AC8A2 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1199773 by tokoe:

Use email attachment settings object from IncidenceEditorNG


 M  +11 -10    actionmanager.cpp  
 M  +2 -1      koprefsdialog.cpp  
 M  +0 -23     korganizer.kcfg  


--- trunk/KDE/kdepim/korganizer/actionmanager.cpp #1199772:1199773
@@ -59,6 +59,7 @@
 #include <calendarsupport/kcalprefs.h>
 #include <calendarsupport/utils.h>
 
+#include <incidenceeditor-ng/globalsettings.h>
 #include <incidenceeditor-ng/groupwareintegration.h>
 
 #include <akonadi_next/kcheckableproxymodel.h>
@@ -1783,10 +1784,10 @@
                                      const QStringList &attendees,
                                      const QString &attachmentMimetype )
 {
-  int action = KOPrefs::instance()->defaultEmailAttachMethod();
+  int action = IncidenceEditorNG::GlobalSettings::self()->defaultEmailAttachMethod();
  if ( attachmentMimetype != "message/rfc822" ) {
-    action = KOPrefs::Link;
-  } else if ( KOPrefs::instance()->defaultEmailAttachMethod() == KOPrefs::Ask ) {
+    action = IncidenceEditorNG::GlobalSettings::Link;
+  } else if ( IncidenceEditorNG::GlobalSettings::self()->defaultEmailAttachMethod() \
== IncidenceEditorNG::GlobalSettings::Ask ) {  KMenu *menu = new KMenu( 0 );
     QAction *attachLink = menu->addAction( i18n( "Attach as &link" ) );
     QAction *attachInline = menu->addAction( i18n( "Attach &inline" ) );
@@ -1798,11 +1799,11 @@
     delete menu;
 
     if ( ret == attachLink ) {
-      action = KOPrefs::Link;
+      action = IncidenceEditorNG::GlobalSettings::Link;
     } else if ( ret == attachInline ) {
-      action = KOPrefs::InlineFull;
+      action = IncidenceEditorNG::GlobalSettings::InlineFull;
     } else if ( ret == attachBody ) {
-      action = KOPrefs::InlineBody;
+      action = IncidenceEditorNG::GlobalSettings::InlineBody;
     } else {
       return;
     }
@@ -1812,13 +1813,13 @@
   KTemporaryFile tf;
   tf.setAutoRemove( true );
   switch ( action ) {
-    case KOPrefs::Link:
+    case IncidenceEditorNG::GlobalSettings::Link:
       attData = uri;
       break;
-    case KOPrefs::InlineFull:
+    case IncidenceEditorNG::GlobalSettings::InlineFull:
       attData = file;
       break;
-    case KOPrefs::InlineBody:
+    case IncidenceEditorNG::GlobalSettings::InlineBody:
     {
       QFile f( file );
       if ( !f.open( QFile::ReadOnly ) ) {
@@ -1859,7 +1860,7 @@
 
   mCalendarView->newEvent( summary, description, QStringList(attData),
                            attendees, QStringList(attachmentMimetype),
-                           action != KOPrefs::Link );
+                           action != IncidenceEditorNG::GlobalSettings::Link );
 }
 
 void ActionManager::openTodoEditor( const QString &text )
--- trunk/KDE/kdepim/korganizer/koprefsdialog.cpp #1199772:1199773
@@ -32,6 +32,7 @@
 
 #include <calendarsupport/categoryconfig.h>
 #include <calendarsupport/kcalprefs.h>
+#include <incidenceeditor-ng/globalsettings.h>
 
 #include <libkdepim/ktimeedit.h>
 
@@ -118,7 +119,7 @@
   emailSettingsLayout->addRow ( s->label(), s->lineEdit() );
 
   KPrefsWidRadios *defaultEmailAttachMethod =
-    addWidRadios( KOPrefs::instance()->defaultEmailAttachMethodItem(), personalFrame \
); +    addWidRadios( \
IncidenceEditorNG::GlobalSettings::self()->defaultEmailAttachMethodItem(), \
personalFrame );  personalLayout->addWidget( defaultEmailAttachMethod->groupBox() );
   personalLayout->addStretch( 1 );
 
--- trunk/KDE/kdepim/korganizer/korganizer.kcfg #1199772:1199773
@@ -10,29 +10,6 @@
 
 <!-- PREFERENCES DIALOG -->
 
-<!-- General Page: Personal Tab -->
-  <group name="Personal Settings">
-    <entry type="Enum" name="DefaultEmailAttachMethod">
-      <label>Default Email Attachment Method</label>
-      <whatsthis>The default way of attaching dropped emails to an event</whatsthis>
-      <choices>
-        <choice name="Ask">
-          <label>Always ask</label>
-        </choice>
-        <choice name="Link">
-          <label>Only attach link to message</label>
-        </choice>
-        <choice name="InlineFull">
-          <label>Attach complete message</label>
-        </choice>
-        <choice name="InlineBody">
-          <label>Attach message without attachments</label>
-        </choice>
-      </choices>
-      <default>Ask</default>
-    </entry>
-  </group>
-
 <!-- General Page: Save Tab -->
   <group name="Save Settings">
     <entry type="Bool" key="Auto Export">


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

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