Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 3689352..b587424 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -42,53 +42,59 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
42 | } | 42 | } |
43 | serverMenu->insertItem(tr("Disconnect"),SERVER_MENU_DISCONNECT); | 43 | serverMenu->insertItem(tr("Disconnect"),SERVER_MENU_DISCONNECT); |
44 | serverMenu->insertItem(tr("Set on/offline"),SERVER_MENU_OFFLINE); | 44 | serverMenu->insertItem(tr("Set on/offline"),SERVER_MENU_OFFLINE); |
45 | serverMenu->insertSeparator(); | 45 | serverMenu->insertSeparator(); |
46 | serverMenu->insertItem(tr("Refresh folder list"),SERVER_MENU_REFRESH_FOLDER); | 46 | serverMenu->insertItem(tr("Refresh folder list"),SERVER_MENU_REFRESH_FOLDER); |
47 | serverMenu->insertItem(tr("Create new folder"),SERVER_MENU_CREATE_FOLDER); | 47 | serverMenu->insertItem(tr("Create new folder"),SERVER_MENU_CREATE_FOLDER); |
48 | serverMenu->insertSeparator(); | 48 | serverMenu->insertSeparator(); |
49 | serverMenu->insertItem(tr("(Un-)Subscribe groups"),SERVER_MENU_SUBSCRIBE); | 49 | serverMenu->insertItem(tr("(Un-)Subscribe groups"),SERVER_MENU_SUBSCRIBE); |
50 | 50 | ||
51 | folderMenu->insertItem(tr("Refresh headerlist"),FOLDER_MENU_REFRESH_HEADER); | 51 | folderMenu->insertItem(tr("Refresh headerlist"),FOLDER_MENU_REFRESH_HEADER); |
52 | folderMenu->insertItem(tr("Delete all mails"),FOLDER_MENU_DELETE_ALL_MAILS); | 52 | folderMenu->insertItem(tr("Delete all mails"),FOLDER_MENU_DELETE_ALL_MAILS); |
53 | folderMenu->insertItem(tr("New subfolder"),FOLDER_MENU_NEW_SUBFOLDER); | 53 | folderMenu->insertItem(tr("New subfolder"),FOLDER_MENU_NEW_SUBFOLDER); |
54 | folderMenu->insertItem(tr("Delete folder"),FOLDER_MENU_DELETE_FOLDER); | 54 | folderMenu->insertItem(tr("Delete folder"),FOLDER_MENU_DELETE_FOLDER); |
55 | folderMenu->insertItem(tr("Move/Copie all mails"),FOLDER_MENU_MOVE_MAILS); | 55 | folderMenu->insertItem(tr("Move/Copie all mails"),FOLDER_MENU_MOVE_MAILS); |
56 | menuBar->setItemEnabled(m_ServerMenuId,false); | 56 | menuBar->setItemEnabled(m_ServerMenuId,false); |
57 | menuBar->setItemEnabled(m_FolderMenuId,false); | 57 | menuBar->setItemEnabled(m_FolderMenuId,false); |
58 | 58 | ||
59 | addToolBar( toolBar ); | 59 | addToolBar( toolBar ); |
60 | toolBar->setHorizontalStretchable( true ); | 60 | toolBar->setHorizontalStretchable( true ); |
61 | 61 | ||
62 | QLabel *spacer = new QLabel( toolBar ); | 62 | QLabel *spacer = new QLabel( toolBar ); |
63 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 63 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
64 | toolBar->setStretchableWidget( spacer ); | 64 | toolBar->setStretchableWidget( spacer ); |
65 | 65 | ||
66 | readMail = new QAction(tr("Read current mail"),ICON_READMAIL,0,0,this); | ||
67 | readMail->addTo(toolBar); | ||
68 | readMail->addTo(mailMenu); | ||
69 | connect(readMail,SIGNAL(activated()),this,SLOT(displayMail())); | ||
70 | |||
66 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, | 71 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, |
67 | 0, 0, this ); | 72 | 0, 0, this ); |
68 | composeMail->addTo( toolBar ); | 73 | composeMail->addTo( toolBar ); |
69 | composeMail->addTo( mailMenu ); | 74 | composeMail->addTo( mailMenu ); |
70 | 75 | ||
76 | |||
71 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, | 77 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, |
72 | 0, 0, this ); | 78 | 0, 0, this ); |
73 | sendQueued->addTo( toolBar ); | 79 | sendQueued->addTo( toolBar ); |
74 | sendQueued->addTo( mailMenu ); | 80 | sendQueued->addTo( mailMenu ); |
75 | 81 | ||
76 | /* | 82 | /* |
77 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, | 83 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, |
78 | 0, 0, this ); | 84 | 0, 0, this ); |
79 | syncFolders->addTo( toolBar ); | 85 | syncFolders->addTo( toolBar ); |
80 | syncFolders->addTo( mailMenu ); | 86 | syncFolders->addTo( mailMenu ); |
81 | */ | 87 | */ |
82 | 88 | ||
83 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, | 89 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, |
84 | 0, 0, this, 0, true ); | 90 | 0, 0, this, 0, true ); |
85 | showFolders->addTo( toolBar ); | 91 | showFolders->addTo( toolBar ); |
86 | showFolders->addTo( mailMenu ); | 92 | showFolders->addTo( mailMenu ); |
87 | showFolders->setOn( true ); | 93 | showFolders->setOn( true ); |
88 | connect(showFolders, SIGNAL( toggled(bool) ), | 94 | connect(showFolders, SIGNAL( toggled(bool) ), |
89 | SLOT( slotShowFolders(bool) ) ); | 95 | SLOT( slotShowFolders(bool) ) ); |
90 | 96 | ||
91 | /* | 97 | /* |
92 | searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), | 98 | searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), |
93 | 0, 0, this ); | 99 | 0, 0, this ); |
94 | searchMails->addTo( toolBar ); | 100 | searchMails->addTo( toolBar ); |
@@ -101,48 +107,49 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
101 | connect( deleteMails, SIGNAL( activated() ), | 107 | connect( deleteMails, SIGNAL( activated() ), |
102 | SLOT( slotDeleteMail() ) ); | 108 | SLOT( slotDeleteMail() ) ); |
103 | 109 | ||
104 | editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , | 110 | editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , |
105 | 0, 0, this ); | 111 | 0, 0, this ); |
106 | editSettings->addTo( settingsMenu ); | 112 | editSettings->addTo( settingsMenu ); |
107 | connect( editSettings, SIGNAL( activated() ), | 113 | connect( editSettings, SIGNAL( activated() ), |
108 | SLOT( slotEditSettings() ) ); | 114 | SLOT( slotEditSettings() ) ); |
109 | editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , | 115 | editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , |
110 | 0, 0, this ); | 116 | 0, 0, this ); |
111 | editAccounts->addTo( settingsMenu ); | 117 | editAccounts->addTo( settingsMenu ); |
112 | 118 | ||
113 | 119 | ||
114 | QWidget *view = new QWidget( this ); | 120 | QWidget *view = new QWidget( this ); |
115 | setCentralWidget( view ); | 121 | setCentralWidget( view ); |
116 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); | 122 | layout = new QBoxLayout ( view, QBoxLayout::LeftToRight ); |
117 | 123 | ||
118 | folderView = new AccountView( view ); | 124 | folderView = new AccountView( view ); |
119 | folderView->header()->hide(); | 125 | folderView->header()->hide(); |
120 | folderView->setRootIsDecorated( true ); | 126 | folderView->setRootIsDecorated( true ); |
121 | folderView->addColumn( tr( "Mailbox" ) ); | 127 | folderView->addColumn( tr( "Mailbox" ) ); |
122 | connect(folderView,SIGNAL(serverSelected(int)),this,SLOT(serverSelected(int))); | 128 | connect(folderView,SIGNAL(serverSelected(int)),this,SLOT(serverSelected(int))); |
123 | connect(serverMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); | 129 | connect(serverMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); |
124 | connect(folderMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); | 130 | connect(folderMenu,SIGNAL(activated(int)),folderView,SLOT(slotContextMenu(int))); |
131 | connect(this,SIGNAL(settingsChanged()),folderView,SLOT(readSettings())); | ||
125 | 132 | ||
126 | 133 | ||
127 | layout->addWidget( folderView ); | 134 | layout->addWidget( folderView ); |
128 | 135 | ||
129 | mailView = new QListView( view ); | 136 | mailView = new QListView( view ); |
130 | mailView->addColumn( "" ); | 137 | mailView->addColumn( "" ); |
131 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); | 138 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); |
132 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); | 139 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); |
133 | mailView->addColumn( tr( "Size" ),QListView::Manual); | 140 | mailView->addColumn( tr( "Size" ),QListView::Manual); |
134 | mailView->addColumn( tr( "Date" )); | 141 | mailView->addColumn( tr( "Date" )); |
135 | mailView->setAllColumnsShowFocus(true); | 142 | mailView->setAllColumnsShowFocus(true); |
136 | mailView->setShowSortIndicator(true); | 143 | mailView->setShowSortIndicator(true); |
137 | mailView->setSorting(4,false); | 144 | mailView->setSorting(4,false); |
138 | 145 | ||
139 | layout->addWidget( mailView ); | 146 | layout->addWidget( mailView ); |
140 | layout->setStretchFactor( folderView, 1 ); | 147 | layout->setStretchFactor( folderView, 1 ); |
141 | layout->setStretchFactor( mailView, 2 ); | 148 | layout->setStretchFactor( mailView, 2 ); |
142 | 149 | ||
143 | m_Rotate = (QApplication::desktop()->width() > QApplication::desktop()->height()?0:90); | 150 | m_Rotate = (QApplication::desktop()->width() > QApplication::desktop()->height()?0:90); |
144 | 151 | ||
145 | slotAdjustLayout(); | 152 | slotAdjustLayout(); |
146 | 153 | ||
147 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 154 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
148 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 155 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |