-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 2b5870a..391b55e 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -52,64 +52,65 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
52 | 0, 0, this, 0, true ); | 52 | 0, 0, this, 0, true ); |
53 | showFolders->addTo( toolBar ); | 53 | showFolders->addTo( toolBar ); |
54 | showFolders->addTo( mailMenu ); | 54 | showFolders->addTo( mailMenu ); |
55 | connect(showFolders, SIGNAL( toggled( bool ) ), | 55 | connect(showFolders, SIGNAL( toggled( bool ) ), |
56 | SLOT( slotShowFolders( bool ) ) ); | 56 | SLOT( slotShowFolders( bool ) ) ); |
57 | 57 | ||
58 | searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, | 58 | searchMails = new QAction( tr( "Search mails" ), ICON_SEARCHMAILS, |
59 | 0, 0, this ); | 59 | 0, 0, this ); |
60 | searchMails->addTo( toolBar ); | 60 | searchMails->addTo( toolBar ); |
61 | searchMails->addTo( mailMenu ); | 61 | searchMails->addTo( mailMenu ); |
62 | 62 | ||
63 | deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); | 63 | deleteMails = new QAction(tr("Delete Mail"), QIconSet(Resource::loadPixmap("mail/delete")), 0, 0, this); |
64 | deleteMails->addTo( toolBar ); | 64 | deleteMails->addTo( toolBar ); |
65 | deleteMails->addTo( mailMenu ); | 65 | deleteMails->addTo( mailMenu ); |
66 | connect( deleteMails, SIGNAL( activated() ), | 66 | connect( deleteMails, SIGNAL( activated() ), |
67 | SLOT( slotDeleteMail() ) ); | 67 | SLOT( slotDeleteMail() ) ); |
68 | 68 | ||
69 | editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS, | 69 | editSettings = new QAction( tr( "Edit settings" ), ICON_EDITSETTINGS, |
70 | 0, 0, this ); | 70 | 0, 0, this ); |
71 | editSettings->addTo( settingsMenu ); | 71 | editSettings->addTo( settingsMenu ); |
72 | 72 | ||
73 | editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS, | 73 | editAccounts = new QAction( tr( "Configure accounts" ), ICON_EDITACCOUNTS, |
74 | 0, 0, this ); | 74 | 0, 0, this ); |
75 | editAccounts->addTo( settingsMenu ); | 75 | editAccounts->addTo( settingsMenu ); |
76 | 76 | ||
77 | QWidget *view = new QWidget( this ); | 77 | QWidget *view = new QWidget( this ); |
78 | setCentralWidget( view ); | 78 | setCentralWidget( view ); |
79 | 79 | ||
80 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); | 80 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); |
81 | 81 | ||
82 | folderView = new AccountView( view ); | 82 | folderView = new AccountView( view ); |
83 | folderView->header()->hide(); | 83 | folderView->header()->hide(); |
84 | folderView->setRootIsDecorated( false ); | ||
84 | folderView->addColumn( tr( "Mailbox" ) ); | 85 | folderView->addColumn( tr( "Mailbox" ) ); |
85 | folderView->hide(); | 86 | folderView->hide(); |
86 | 87 | ||
87 | layout->addWidget( folderView ); | 88 | layout->addWidget( folderView ); |
88 | 89 | ||
89 | mailView = new QListView( view ); | 90 | mailView = new QListView( view ); |
90 | mailView->addColumn( tr( "" ) ); | 91 | mailView->addColumn( tr( "" ) ); |
91 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); | 92 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); |
92 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); | 93 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); |
93 | mailView->addColumn( tr( "Date" )); | 94 | mailView->addColumn( tr( "Date" )); |
94 | mailView->setAllColumnsShowFocus(true); | 95 | mailView->setAllColumnsShowFocus(true); |
95 | mailView->setSorting(-1); | 96 | mailView->setSorting(-1); |
96 | 97 | ||
97 | layout->addWidget( mailView ); | 98 | layout->addWidget( mailView ); |
98 | layout->setStretchFactor( folderView, 1 ); | 99 | layout->setStretchFactor( folderView, 1 ); |
99 | layout->setStretchFactor( mailView, 2 ); | 100 | layout->setStretchFactor( mailView, 2 ); |
100 | 101 | ||
101 | slotAdjustLayout(); | 102 | slotAdjustLayout(); |
102 | 103 | ||
103 | connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, | 104 | connect( mailView, SIGNAL( clicked( QListViewItem * ) ),this, |
104 | SLOT( displayMail( QListViewItem * ) ) ); | 105 | SLOT( displayMail( QListViewItem * ) ) ); |
105 | 106 | ||
106 | connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*))); | 107 | connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*))); |
107 | 108 | ||
108 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); | 109 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); |
109 | } | 110 | } |
110 | 111 | ||
111 | 112 | ||
112 | void MainWindow::slotAdjustLayout() { | 113 | void MainWindow::slotAdjustLayout() { |
113 | 114 | ||
114 | QWidget *d = QApplication::desktop(); | 115 | QWidget *d = QApplication::desktop(); |
115 | 116 | ||