- fix enabling/disabling of attachment rmb items in composer

- add kiosk settings for attachment editing and deletion

svn path=/branches/kdepim/enterprise/kdepim/; revision=691388
wilder-work
Volker Krause 19 years ago
parent f2a7053f3c
commit a0b08ff299
  1. 9
      kmail.kcfg
  2. 9
      kmcomposewin.cpp
  3. 2
      kmcomposewin.h
  4. 9
      kmreaderwin.cpp

@ -509,6 +509,15 @@
<whatsthis>Enable this option to get the User-Agent and X-Mailer header lines displayed when using fancy headers.</whatsthis>
</entry>
<entry name="AllowAttachmentDeletion" type="Bool">
<default>true</default>
<label>Allow to delete attachments of existing mails.</label>
</entry>
<entry name="AllowAttachmentEditing" type="Bool">
<default>false</default>
<label>Allow to edit attachments of existing mails.</label>
</entry>
</group>
<group name="TextIndex">

@ -3022,7 +3022,6 @@ void KMComposeWin::slotInsertPublicKey()
//-----------------------------------------------------------------------------
void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int)
{
int editId, editWithId;
if (!mAttachMenu)
{
mAttachMenu = new QPopupMenu(this);
@ -3033,8 +3032,8 @@ void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int)
SLOT(slotAttachOpenWith()));
mViewId = mAttachMenu->insertItem(i18n("to view", "View"), this,
SLOT(slotAttachView()));
editId = mAttachMenu->insertItem( i18n("Edit"), this, SLOT(slotAttachEdit()) );
editWithId = mAttachMenu->insertItem( i18n("Edit With..."), this,
mEditId = mAttachMenu->insertItem( i18n("Edit"), this, SLOT(slotAttachEdit()) );
mEditWithId = mAttachMenu->insertItem( i18n("Edit With..."), this,
SLOT(slotAttachEditWith()) );
mRemoveId = mAttachMenu->insertItem(i18n("Remove"), this, SLOT(slotAttachRemove()));
mSaveAsId = mAttachMenu->insertItem( SmallIconSet("filesaveas"), i18n("Save As..."), this,
@ -3055,8 +3054,8 @@ void KMComposeWin::slotAttachPopupMenu(QListViewItem *, const QPoint &, int)
mAttachMenu->setItemEnabled( mOpenId, selectedCount > 0 );
mAttachMenu->setItemEnabled( mOpenWithId, selectedCount > 0 );
mAttachMenu->setItemEnabled( mViewId, selectedCount > 0 );
mAttachMenu->setItemEnabled( editId, selectedCount == 1 );
mAttachMenu->setItemEnabled( editWithId, selectedCount == 1 );
mAttachMenu->setItemEnabled( mEditId, selectedCount == 1 );
mAttachMenu->setItemEnabled( mEditWithId, selectedCount == 1 );
mAttachMenu->setItemEnabled( mRemoveId, selectedCount > 0 );
mAttachMenu->setItemEnabled( mSaveAsId, selectedCount == 1 );
mAttachMenu->setItemEnabled( mPropertiesId, selectedCount == 1 );

@ -727,7 +727,7 @@ private:
QPtrList<QListViewItem> mAtmItemList;
QPtrList<KMMessagePart> mAtmList;
QPopupMenu *mAttachMenu;
int mOpenId, mOpenWithId, mViewId, mRemoveId, mSaveAsId, mPropertiesId;
int mOpenId, mOpenWithId, mViewId, mRemoveId, mSaveAsId, mPropertiesId, mEditId, mEditWithId;
bool mAutoDeleteMsg;
bool mSigningAndEncryptionExplicitlyDisabled;
bool mLastSignActionState, mLastEncryptActionState;

@ -1922,11 +1922,10 @@ void KMReaderWin::showAttachmentPopup( int id, const QString & name, const QPoin
menu->insertItem(i18n("Open With..."), 2);
menu->insertItem(i18n("to view something", "View"), 3);
menu->insertItem(SmallIcon("filesaveas"),i18n("Save As..."), 4);
// FIXME: make this a KIOSK option
#if 0
menu->insertItem(SmallIcon("edit"), i18n("Edit Attachment"), 8 );
#endif
menu->insertItem(SmallIcon("editdelete"), i18n("Delete Attachment"), 7 );
if ( GlobalSettings::self()->allowAttachmentEditing() )
menu->insertItem(SmallIcon("edit"), i18n("Edit Attachment"), 8 );
if ( GlobalSettings::self()->allowAttachmentDeletion() )
menu->insertItem(SmallIcon("editdelete"), i18n("Delete Attachment"), 7 );
if ( name.endsWith( ".xia", false ) &&
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" ) )
menu->insertItem( i18n( "Decrypt With Chiasmus..." ), 6 );

Loading…
Cancel
Save