summaryrefslogtreecommitdiff
path: root/noncore/net/mail/mainwindow.cpp
authoralwin <alwin>2005-03-07 23:12:51 (UTC)
committer alwin <alwin>2005-03-07 23:12:51 (UTC)
commit2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce (patch) (unidiff)
treed0ff8c035e34a83fbc935c8f3f6ab926ed432559 /noncore/net/mail/mainwindow.cpp
parenta1fab1e1abd009a6a64c7ea3957bdb5587f4be81 (diff)
downloadopie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.zip
opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.tar.gz
opie-2ba21de3fce9ca9fe9a70474a1927f0106d1d7ce.tar.bz2
beauty
hopefull some speedups obsolete stuff removed fixed a crasher
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/mainwindow.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp
index 93d80d9..0a45445 100644
--- a/noncore/net/mail/mainwindow.cpp
+++ b/noncore/net/mail/mainwindow.cpp
@@ -78,18 +78,15 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
78 connect( editSettings, SIGNAL( activated() ), 78 connect( editSettings, SIGNAL( activated() ),
79 SLOT( slotEditSettings() ) ); 79 SLOT( slotEditSettings() ) );
80 editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , 80 editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) ,
81 0, 0, this ); 81 0, 0, this );
82 editAccounts->addTo( settingsMenu ); 82 editAccounts->addTo( settingsMenu );
83 83
84 //setCentralWidget( view );
85 84
86 QVBox* wrapperBox = new QVBox( this ); 85 QWidget *view = new QWidget( this );
87 setCentralWidget( wrapperBox ); 86 setCentralWidget( view );
88
89 QWidget *view = new QWidget( wrapperBox );
90 layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); 87 layout = new QBoxLayout ( view, QBoxLayout::LeftToRight );
91 88
92 folderView = new AccountView( view ); 89 folderView = new AccountView( view );
93 folderView->header()->hide(); 90 folderView->header()->hide();
94 folderView->setRootIsDecorated( true ); 91 folderView->setRootIsDecorated( true );
95 folderView->addColumn( tr( "Mailbox" ) ); 92 folderView->addColumn( tr( "Mailbox" ) );
@@ -103,15 +100,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
103 mailView->addColumn( tr( "Size" ),QListView::Manual); 100 mailView->addColumn( tr( "Size" ),QListView::Manual);
104 mailView->addColumn( tr( "Date" )); 101 mailView->addColumn( tr( "Date" ));
105 mailView->setAllColumnsShowFocus(true); 102 mailView->setAllColumnsShowFocus(true);
106 mailView->setShowSortIndicator(true); 103 mailView->setShowSortIndicator(true);
107 mailView->setSorting(4,false); 104 mailView->setSorting(4,false);
108 105
109 statusWidget = new StatusWidget( wrapperBox );
110 statusWidget->hide();
111
112 layout->addWidget( mailView ); 106 layout->addWidget( mailView );
113 layout->setStretchFactor( folderView, 1 ); 107 layout->setStretchFactor( folderView, 1 );
114 layout->setStretchFactor( mailView, 2 ); 108 layout->setStretchFactor( mailView, 2 );
115 109
116 m_Rotate = (QApplication::desktop()->width() > QApplication::desktop()->height()?0:90); 110 m_Rotate = (QApplication::desktop()->width() > QApplication::desktop()->height()?0:90);
117 111
@@ -121,29 +115,33 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
121 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 115 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
122 116
123 connect( mailView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),this, 117 connect( mailView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),this,
124 SLOT( mailLeftClicked(int,QListViewItem*,const QPoint&,int) ) ); 118 SLOT( mailLeftClicked(int,QListViewItem*,const QPoint&,int) ) );
125 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 119 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
126 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 120 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
121
127 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 122 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
128 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 123 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
124
129 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 125 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
130 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 126 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
127
131// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 128// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
132 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 129 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
133 // Added by Stefan Eilers to allow starting by addressbook.. 130 // Added by Stefan Eilers to allow starting by addressbook..
134 // copied from old mail2 131 // copied from old mail2
132
135#if !defined(QT_NO_COP) 133#if !defined(QT_NO_COP)
136 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), 134 connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ),
137 this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); 135 this, SLOT( appMessage(const QCString&,const QByteArray&) ) );
138 m_sysChannel = new QCopChannel( "QPE/System", this ); 136 m_sysChannel = new QCopChannel( "QPE/System", this );
139 connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), 137 connect( m_sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
140 this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); 138 this, SLOT( systemMessage(const QCString&,const QByteArray&) ) );
141#endif 139#endif
142 140
143 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 141 QTimer::singleShot( 10, this, SLOT( slotAdjustColumns() ) );
144} 142}
145 143
146MainWindow::~MainWindow() 144MainWindow::~MainWindow()
147{ 145{
148} 146}
149 147