summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 3013931..8c0a4cb 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -62,97 +62,98 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
62 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 62 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
63 0, 0, this ); 63 0, 0, this );
64 sendQueued->addTo( toolBar ); 64 sendQueued->addTo( toolBar );
65 sendQueued->addTo( mailMenu ); 65 sendQueued->addTo( mailMenu );
66 66
67 /* 67 /*
68 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 68 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
69 0, 0, this ); 69 0, 0, this );
70 syncFolders->addTo( toolBar ); 70 syncFolders->addTo( toolBar );
71 syncFolders->addTo( mailMenu ); 71 syncFolders->addTo( mailMenu );
72 */ 72 */
73 73
74 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 74 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
75 0, 0, this, 0, true ); 75 0, 0, this, 0, true );
76 showFolders->addTo( toolBar ); 76 showFolders->addTo( toolBar );
77 showFolders->addTo( mailMenu ); 77 showFolders->addTo( mailMenu );
78 showFolders->setOn( true ); 78 showFolders->setOn( true );
79 connect(showFolders, SIGNAL( toggled(bool) ), 79 connect(showFolders, SIGNAL( toggled(bool) ),
80 SLOT( slotShowFolders(bool) ) ); 80 SLOT( slotShowFolders(bool) ) );
81 81
82 /* 82 /*
83 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 83 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
84 0, 0, this ); 84 0, 0, this );
85 searchMails->addTo( toolBar ); 85 searchMails->addTo( toolBar );
86 searchMails->addTo( mailMenu ); 86 searchMails->addTo( mailMenu );
87 */ 87 */
88 88
89 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 89 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
90 deleteMails->addTo( toolBar ); 90 deleteMails->addTo( toolBar );
91 deleteMails->addTo( mailMenu ); 91 deleteMails->addTo( mailMenu );
92 connect( deleteMails, SIGNAL( activated() ), 92 connect( deleteMails, SIGNAL( activated() ),
93 SLOT( slotDeleteMail() ) ); 93 SLOT( slotDeleteMail() ) );
94 94
95 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 95 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
96 0, 0, this ); 96 0, 0, this );
97 editSettings->addTo( settingsMenu ); 97 editSettings->addTo( settingsMenu );
98 connect( editSettings, SIGNAL( activated() ), 98 connect( editSettings, SIGNAL( activated() ),
99 SLOT( slotEditSettings() ) ); 99 SLOT( slotEditSettings() ) );
100 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 100 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
101 0, 0, this ); 101 0, 0, this );
102 editAccounts->addTo( settingsMenu ); 102 editAccounts->addTo( settingsMenu );
103 codecMenu = new QPopupMenu( menuBar ); 103 codecMenu = new QPopupMenu( menuBar );
104 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 104 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
105 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 105 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
106 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 106 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
107 codecMenu->insertItem( "Chinese (big-5)",3,3); 107 codecMenu->insertItem( "Chinese (big-5)",3,3);
108 codecMenu->insertItem( "Unicode (utf-8)",4,4); 108 codecMenu->insertItem( "Unicode (utf-8)",4,4);
109 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 109 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
110 settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 110 //disabled
111 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
111 //setCentralWidget( view ); 112 //setCentralWidget( view );
112 113
113 QVBox* wrapperBox = new QVBox( this ); 114 QVBox* wrapperBox = new QVBox( this );
114 setCentralWidget( wrapperBox ); 115 setCentralWidget( wrapperBox );
115 116
116 // QWidget *view = new QWidget( wrapperBox ); 117 // QWidget *view = new QWidget( wrapperBox );
117 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 118 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
118 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 119 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
119 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 120 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
120 121
121 folderView = new AccountView( split ); 122 folderView = new AccountView( split );
122 folderView->header()->hide(); 123 folderView->header()->hide();
123 folderView->setRootIsDecorated( false ); 124 folderView->setRootIsDecorated( false );
124 folderView->addColumn( i18n( "Mailbox" ) ); 125 folderView->addColumn( i18n( "Mailbox" ) );
125 126
126 //layout->addWidget( folderView ); 127 //layout->addWidget( folderView );
127 128
128 mailView = new QListView( split ); 129 mailView = new QListView( split );
129 mailView->addColumn( i18n( " " ) ); 130 mailView->addColumn( i18n( " " ) );
130 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 131 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
131 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 132 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
132 mailView->addColumn( i18n( "Size" ),QListView::Manual); 133 mailView->addColumn( i18n( "Size" ),QListView::Manual);
133 mailView->addColumn( i18n( "Date" ),QListView::Manual); 134 mailView->addColumn( i18n( "Date" ),QListView::Manual);
134 mailView->setAllColumnsShowFocus(true); 135 mailView->setAllColumnsShowFocus(true);
135 //mailView->setSorting(-1); 136 //mailView->setSorting(-1);
136 mailView->setRootIsDecorated( false ); 137 mailView->setRootIsDecorated( false );
137 statusWidget = new StatusWidget( wrapperBox ); 138 statusWidget = new StatusWidget( wrapperBox );
138 statusWidget->hide(); 139 statusWidget->hide();
139 140
140 //layout->addWidget( mailView ); 141 //layout->addWidget( mailView );
141 //layout->setStretchFactor( folderView, 1 ); 142 //layout->setStretchFactor( folderView, 1 );
142 //layout->setStretchFactor( mailView, 2 ); 143 //layout->setStretchFactor( mailView, 2 );
143 144
144 slotAdjustLayout(); 145 slotAdjustLayout();
145#ifndef DESKTOP_VERSION 146#ifndef DESKTOP_VERSION
146 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 147 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
147 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 148 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
148#endif 149#endif
149 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 150 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
150 SLOT( mailLeftClicked(QListViewItem*) ) ); 151 SLOT( mailLeftClicked(QListViewItem*) ) );
151 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 152 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
152 SLOT( mailLeftClicked(QListViewItem*) ) ); 153 SLOT( mailLeftClicked(QListViewItem*) ) );
153 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 154 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
154 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 155 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
155 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 156 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
156 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 157 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
157 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 158 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
158 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 159 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );