[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/mobile/mail
From: Tobias Koenig <tokoe () kde ! org>
Date: 2010-11-11 10:39:10
Message-ID: 20101111103910.92FF2AC8A0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1195502 by tokoe:
Implement ACL viewing/editing in kmail-mobile
A AclEditor.qml [License: LGPL (v2+)]
M +2 -0 CMakeLists.txt
M +1 -0 KMailActions.qml
A acleditor.cpp [License: LGPL (v2+)]
A acleditor.h [License: LGPL (v2+)]
M +16 -0 kmail-mobile.qml
M +20 -0 mainview.cpp
M +3 -0 mainview.h
--- trunk/KDE/kdepim/mobile/mail/CMakeLists.txt #1195501:1195502
@@ -19,6 +19,7 @@
)
set(kmail_mobile_srcs
+ acleditor.cpp
attachmentproxymodel.cpp
composerautoresizer.cpp
composerview.cpp
@@ -82,6 +83,7 @@
install(FILES kmail-mobile.sh DESTINATION ${BIN_INSTALL_DIR})
install(PROGRAMS kmail-mobile.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(FILES
+ AclEditor.qml
ConfigDialog.qml
FilterActions.qml
FilterConfigDialog.qml
--- trunk/KDE/kdepim/mobile/mail/KMailActions.qml #1195501:1195502
@@ -86,6 +86,7 @@
ActionListItem { name : "akonadi_remove_duplicates" }
ActionListItem { name : "show_expire_properties" }
ActionListItem { name : "export_emails" }
+ ScriptActionItem { name : "edit_acls"; title : KDE.i18n( "Edit ACLs" ); visible: \
aclEditor.collectionHasAcls } }
ActionList {
--- trunk/KDE/kdepim/mobile/mail/kmail-mobile.qml #1195501:1195502
@@ -540,6 +540,13 @@
}
},
KPIM.ScriptAction {
+ name : "edit_acls"
+ script : {
+ actionPanel.collapse();
+ aclEditorView.visible = true;
+ }
+ },
+ KPIM.ScriptAction {
name : "to_selection_screen"
script : {
actionPanel.collapse();
@@ -727,4 +734,13 @@
onLoaded: { item.filterModel = _filterModel; }
source: visible ? "FilterConfigDialog.qml" : ""
}
+
+ QML.Loader {
+ anchors.fill: parent
+ id: aclEditorView
+ visible: false
+ focus: visible
+ onLoaded: item.load()
+ source: visible ? "AclEditor.qml" : ""
}
+}
--- trunk/KDE/kdepim/mobile/mail/mainview.cpp #1195501:1195502
@@ -22,6 +22,7 @@
#include "mainview.h"
+#include "acleditor.h"
#include "composerview.h"
#include "configwidget.h"
#include "declarativewidgetbase.h"
@@ -229,6 +230,9 @@
context->setContextProperty("_threadMailSelector", qmlThreadMailSelector );
+ connect( regularSelectionModel(), SIGNAL( selectionChanged( const QItemSelection&, \
const QItemSelection& ) ), + this, SLOT( collectionSelectionChanged() ) );
+
#if 0
{
QTreeView *view = new QTreeView;
@@ -273,6 +277,10 @@
mFilterModel = new FilterModel;
rootContext()->setContextProperty( "_filterModel", mFilterModel );
+ mAclEditor = new AclEditor( actionCollection(), this );
+ rootContext()->setContextProperty( "aclEditor", mAclEditor );
+ rootContext()->setContextProperty( "aclModel", mAclEditor->model() );
+
QTime time;
if ( debugTiming ) {
time.start();
@@ -1167,6 +1175,18 @@
}
}
+void MainView::collectionSelectionChanged()
+{
+ const QModelIndexList indexes = regularSelectionModel()->selectedIndexes();
+ if ( indexes.isEmpty() )
+ return;
+
+ const QModelIndex index = indexes.first();
+ const Collection collection = index.data( Akonadi::EntityTreeModel::CollectionRole \
).value<Akonadi::Collection>(); + if ( collection.isValid() )
+ mAclEditor->setCollection( collection );
+}
+
MessageViewer::MessageViewItem* MainView::messageViewerItem()
{
MessageViewer::MessageViewItem* item = 0;
--- trunk/KDE/kdepim/mobile/mail/mainview.h #1195501:1195502
@@ -41,6 +41,7 @@
class MessageViewItem;
}
+class AclEditor;
class AkonadiSender;
class ConfigWidget;
class FilterModel;
@@ -116,6 +117,7 @@
void itemSelectionChanged();
void itemActionModelChanged();
+ void collectionSelectionChanged();
protected:
virtual void setupStandardActionManager( QItemSelectionModel \
*collectionSelectionModel, @@ -163,6 +165,7 @@
ThreadModel *m_threadsModel;
FilterModel *mFilterModel;
Akonadi::QuotaColorProxyModel *mQuotaColorProxyModel;
+ AclEditor *mAclEditor;
};
Q_DECLARE_METATYPE( MainView::ForwardMode )
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic