-rw-r--r-- | kmicromail/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 0e4a64f..1dc374b 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -30,129 +30,129 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
30 | #ifdef DESKTOP_VERSION | 30 | #ifdef DESKTOP_VERSION |
31 | globalSstatusBarMainWindow = statusBar(); | 31 | globalSstatusBarMainWindow = statusBar(); |
32 | #endif | 32 | #endif |
33 | setCaption( i18n( "KOpieMail/Pi" ) ); | 33 | setCaption( i18n( "KOpieMail/Pi" ) ); |
34 | setToolBarsMovable( false ); | 34 | setToolBarsMovable( false ); |
35 | //KABC::StdAddressBook::self(); | 35 | //KABC::StdAddressBook::self(); |
36 | toolBar = new QToolBar( this ); | 36 | toolBar = new QToolBar( this ); |
37 | menuBar = new QPEMenuBar( toolBar ); | 37 | menuBar = new QPEMenuBar( toolBar ); |
38 | mailMenu = new QPopupMenu( menuBar ); | 38 | mailMenu = new QPopupMenu( menuBar ); |
39 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); | 39 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); |
40 | settingsMenu = new QPopupMenu( menuBar ); | 40 | settingsMenu = new QPopupMenu( menuBar ); |
41 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); | 41 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); |
42 | 42 | ||
43 | addToolBar( toolBar ); | 43 | addToolBar( toolBar ); |
44 | toolBar->setHorizontalStretchable( true ); | 44 | toolBar->setHorizontalStretchable( true ); |
45 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), | 45 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), |
46 | 0, 0, this ); | 46 | 0, 0, this ); |
47 | connect(getMail, SIGNAL( activated() ), | 47 | connect(getMail, SIGNAL( activated() ), |
48 | SLOT( slotGetAllMail() ) ); | 48 | SLOT( slotGetAllMail() ) ); |
49 | getMail->addTo( mailMenu ); | 49 | getMail->addTo( mailMenu ); |
50 | 50 | ||
51 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), | 51 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), |
52 | 0, 0, this ); | 52 | 0, 0, this ); |
53 | getMail->addTo( toolBar ); | 53 | getMail->addTo( toolBar ); |
54 | getMail->addTo( mailMenu ); | 54 | getMail->addTo( mailMenu ); |
55 | connect(getMail, SIGNAL( activated() ), | 55 | connect(getMail, SIGNAL( activated() ), |
56 | SLOT( slotGetMail() ) ); | 56 | SLOT( slotGetMail() ) ); |
57 | 57 | ||
58 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), | 58 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), |
59 | 0, 0, this ); | 59 | 0, 0, this ); |
60 | composeMail->addTo( toolBar ); | 60 | composeMail->addTo( toolBar ); |
61 | composeMail->addTo( mailMenu ); | 61 | composeMail->addTo( mailMenu ); |
62 | 62 | ||
63 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , | 63 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , |
64 | 0, 0, this ); | 64 | 0, 0, this ); |
65 | sendQueued->addTo( toolBar ); | 65 | sendQueued->addTo( toolBar ); |
66 | sendQueued->addTo( mailMenu ); | 66 | sendQueued->addTo( mailMenu ); |
67 | 67 | ||
68 | /* | 68 | /* |
69 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, | 69 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, |
70 | 0, 0, this ); | 70 | 0, 0, this ); |
71 | syncFolders->addTo( toolBar ); | 71 | syncFolders->addTo( toolBar ); |
72 | syncFolders->addTo( mailMenu ); | 72 | syncFolders->addTo( mailMenu ); |
73 | */ | 73 | */ |
74 | 74 | ||
75 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , | 75 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , |
76 | 0, 0, this, 0, true ); | 76 | 0, 0, this, 0, true ); |
77 | showFolders->addTo( toolBar ); | 77 | showFolders->addTo( toolBar ); |
78 | showFolders->addTo( mailMenu ); | 78 | showFolders->addTo( mailMenu ); |
79 | showFolders->setOn( true ); | 79 | showFolders->setOn( true ); |
80 | connect(showFolders, SIGNAL( toggled(bool) ), | 80 | connect(showFolders, SIGNAL( toggled(bool) ), |
81 | SLOT( slotShowFolders(bool) ) ); | 81 | SLOT( slotShowFolders(bool) ) ); |
82 | 82 | ||
83 | /* | 83 | /* |
84 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), | 84 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), |
85 | 0, 0, this ); | 85 | 0, 0, this ); |
86 | searchMails->addTo( toolBar ); | 86 | searchMails->addTo( toolBar ); |
87 | searchMails->addTo( mailMenu ); | 87 | searchMails->addTo( mailMenu ); |
88 | */ | 88 | */ |
89 | 89 | ||
90 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); | 90 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); |
91 | deleteMails->addTo( toolBar ); | 91 | deleteMails->addTo( toolBar ); |
92 | deleteMails->addTo( mailMenu ); | 92 | deleteMails->addTo( mailMenu ); |
93 | connect( deleteMails, SIGNAL( activated() ), | 93 | connect( deleteMails, SIGNAL( activated() ), |
94 | SLOT( slotDeleteMail() ) ); | 94 | SLOT( slotDeleteAllMail() ) ); |
95 | 95 | ||
96 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , | 96 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , |
97 | 0, 0, this ); | 97 | 0, 0, this ); |
98 | editSettings->addTo( settingsMenu ); | 98 | editSettings->addTo( settingsMenu ); |
99 | connect( editSettings, SIGNAL( activated() ), | 99 | connect( editSettings, SIGNAL( activated() ), |
100 | SLOT( slotEditSettings() ) ); | 100 | SLOT( slotEditSettings() ) ); |
101 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , | 101 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , |
102 | 0, 0, this ); | 102 | 0, 0, this ); |
103 | editAccounts->addTo( settingsMenu ); | 103 | editAccounts->addTo( settingsMenu ); |
104 | codecMenu = new QPopupMenu( menuBar ); | 104 | codecMenu = new QPopupMenu( menuBar ); |
105 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); | 105 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); |
106 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); | 106 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); |
107 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); | 107 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); |
108 | codecMenu->insertItem( "Chinese (big-5)",3,3); | 108 | codecMenu->insertItem( "Chinese (big-5)",3,3); |
109 | codecMenu->insertItem( "Unicode (utf-8)",4,4); | 109 | codecMenu->insertItem( "Unicode (utf-8)",4,4); |
110 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); | 110 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); |
111 | //disabled | 111 | //disabled |
112 | //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); | 112 | //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); |
113 | //setCentralWidget( view ); | 113 | //setCentralWidget( view ); |
114 | 114 | ||
115 | QVBox* wrapperBox = new QVBox( this ); | 115 | QVBox* wrapperBox = new QVBox( this ); |
116 | setCentralWidget( wrapperBox ); | 116 | setCentralWidget( wrapperBox ); |
117 | 117 | ||
118 | // QWidget *view = new QWidget( wrapperBox ); | 118 | // QWidget *view = new QWidget( wrapperBox ); |
119 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); | 119 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); |
120 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); | 120 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); |
121 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); | 121 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); |
122 | 122 | ||
123 | folderView = new AccountView( split ); | 123 | folderView = new AccountView( split ); |
124 | folderView->header()->hide(); | 124 | folderView->header()->hide(); |
125 | folderView->setRootIsDecorated( false ); | 125 | folderView->setRootIsDecorated( false ); |
126 | folderView->addColumn( i18n( "Mailbox" ) ); | 126 | folderView->addColumn( i18n( "Mailbox" ) ); |
127 | 127 | ||
128 | //layout->addWidget( folderView ); | 128 | //layout->addWidget( folderView ); |
129 | 129 | ||
130 | mailView = new QListView( split ); | 130 | mailView = new QListView( split ); |
131 | mailView->addColumn( i18n( " " ) ); | 131 | mailView->addColumn( i18n( " " ) ); |
132 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); | 132 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); |
133 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); | 133 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); |
134 | mailView->addColumn( i18n( "Size" ),QListView::Manual); | 134 | mailView->addColumn( i18n( "Size" ),QListView::Manual); |
135 | mailView->addColumn( i18n( "Date" ),QListView::Manual); | 135 | mailView->addColumn( i18n( "Date" ),QListView::Manual); |
136 | mailView->setAllColumnsShowFocus(true); | 136 | mailView->setAllColumnsShowFocus(true); |
137 | //mailView->setSorting(-1); | 137 | //mailView->setSorting(-1); |
138 | mailView->setRootIsDecorated( false ); | 138 | mailView->setRootIsDecorated( false ); |
139 | statusWidget = new StatusWidget( wrapperBox ); | 139 | statusWidget = new StatusWidget( wrapperBox ); |
140 | statusWidget->hide(); | 140 | statusWidget->hide(); |
141 | 141 | ||
142 | //layout->addWidget( mailView ); | 142 | //layout->addWidget( mailView ); |
143 | //layout->setStretchFactor( folderView, 1 ); | 143 | //layout->setStretchFactor( folderView, 1 ); |
144 | //layout->setStretchFactor( mailView, 2 ); | 144 | //layout->setStretchFactor( mailView, 2 ); |
145 | 145 | ||
146 | slotAdjustLayout(); | 146 | slotAdjustLayout(); |
147 | #ifndef DESKTOP_VERSION | 147 | #ifndef DESKTOP_VERSION |
148 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 148 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
149 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 149 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
150 | #endif | 150 | #endif |
151 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, | 151 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, |
152 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 152 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
153 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, | 153 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, |
154 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 154 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
155 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 155 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
156 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); | 156 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); |
157 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), | 157 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), |
158 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); | 158 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); |