summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-23 16:22:03 (UTC)
committer zautrix <zautrix>2005-01-23 16:22:03 (UTC)
commitec69f34e62250f95a1f8757c5d58da0bf330678a (patch) (unidiff)
treea487425ea28b2dfe706dbca22c1351baddc52549
parentabe5f73892c123110faec5648b484628b3265fd6 (diff)
downloadkdepimpi-ec69f34e62250f95a1f8757c5d58da0bf330678a.zip
kdepimpi-ec69f34e62250f95a1f8757c5d58da0bf330678a.tar.gz
kdepimpi-ec69f34e62250f95a1f8757c5d58da0bf330678a.tar.bz2
xxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/imapwrapper.cpp1
-rw-r--r--kmicromail/mainwindow.cpp2
-rw-r--r--kmicromail/mainwindow.h1
3 files changed, 2 insertions, 2 deletions
diff --git a/kmicromail/libmailwrapper/imapwrapper.cpp b/kmicromail/libmailwrapper/imapwrapper.cpp
index b890725..d9496af 100644
--- a/kmicromail/libmailwrapper/imapwrapper.cpp
+++ b/kmicromail/libmailwrapper/imapwrapper.cpp
@@ -38,49 +38,48 @@ int IMAPwrapper::selectMbox(const QString&mbox)
38 } 38 }
39 int err = mailimap_select( m_imap, (char*)mbox.latin1()); 39 int err = mailimap_select( m_imap, (char*)mbox.latin1());
40 if ( err != MAILIMAP_NO_ERROR ) { 40 if ( err != MAILIMAP_NO_ERROR ) {
41 m_Lastmbox = ""; 41 m_Lastmbox = "";
42 return err; 42 return err;
43 } 43 }
44 m_Lastmbox = mbox; 44 m_Lastmbox = mbox;
45 return err; 45 return err;
46} 46}
47 47
48void IMAPwrapper::imap_progress( size_t current, size_t maximum ) 48void IMAPwrapper::imap_progress( size_t current, size_t maximum )
49{ 49{
50 qApp->processEvents(); 50 qApp->processEvents();
51 return; 51 return;
52 //qDebug("imap progress %d of %d ",current,maximum ); 52 //qDebug("imap progress %d of %d ",current,maximum );
53 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum)); 53 //Global::statusMessage(i18n("Downloading message %1 of %2").arg( current).arg(maximum));
54 //qApp->processEvents() 54 //qApp->processEvents()
55 static unsigned int last = 0; 55 static unsigned int last = 0;
56 if ( last != current ) 56 if ( last != current )
57 IMAPwrapper::progress(); 57 IMAPwrapper::progress();
58 last = current; 58 last = current;
59} 59}
60void IMAPwrapper::progress( QString m ) 60void IMAPwrapper::progress( QString m )
61{ 61{
62
63 static QString mProgrMess; 62 static QString mProgrMess;
64 if ( m != QString::null ) { 63 if ( m != QString::null ) {
65 mProgrMess = m; 64 mProgrMess = m;
66 mCurrent = 1; 65 mCurrent = 1;
67 return; 66 return;
68 } 67 }
69 QString mess; 68 QString mess;
70 //qDebug("progress "); 69 //qDebug("progress ");
71 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax); 70 if ( mMax ) mess = mProgrMess +i18n(" message %1 of %2").arg( mCurrent++).arg(mMax);
72 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++); 71 else mess = mProgrMess +i18n(" message %1").arg( mCurrent++);
73 Global::statusMessage(mess); 72 Global::statusMessage(mess);
74 //qDebug("Progress %s %s", mess.latin1(), m.latin1()); 73 //qDebug("Progress %s %s", mess.latin1(), m.latin1());
75 qApp->processEvents(); 74 qApp->processEvents();
76} 75}
77bool IMAPwrapper::start_tls(bool force_tls) 76bool IMAPwrapper::start_tls(bool force_tls)
78{ 77{
79 int err; 78 int err;
80 bool try_tls = force_tls; 79 bool try_tls = force_tls;
81 mailimap_capability_data * cap_data = 0; 80 mailimap_capability_data * cap_data = 0;
82 81
83 err = mailimap_capability(m_imap,&cap_data); 82 err = mailimap_capability(m_imap,&cap_data);
84 if (err != MAILIMAP_NO_ERROR) { 83 if (err != MAILIMAP_NO_ERROR) {
85 Global::statusMessage("error getting capabilities!"); 84 Global::statusMessage("error getting capabilities!");
86 return false; 85 return false;
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 0e4a64f..1dc374b 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -70,49 +70,49 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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 );
diff --git a/kmicromail/mainwindow.h b/kmicromail/mainwindow.h
index d0a5caf..016e44c 100644
--- a/kmicromail/mainwindow.h
+++ b/kmicromail/mainwindow.h
@@ -24,46 +24,47 @@
24class RecMail; 24class RecMail;
25 25
26class MainWindow : public QMainWindow 26class MainWindow : public QMainWindow
27{ 27{
28 Q_OBJECT 28 Q_OBJECT
29 29
30public: 30public:
31 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 ); 31 MainWindow( QWidget *parent = 0, const char *name = 0, WFlags flags = 0 );
32 virtual ~MainWindow(); 32 virtual ~MainWindow();
33 33
34public slots: 34public slots:
35 virtual void slotAdjustColumns(); 35 virtual void slotAdjustColumns();
36 virtual void appMessage(const QCString &msg, const QByteArray &data); 36 virtual void appMessage(const QCString &msg, const QByteArray &data);
37 virtual void slotComposeMail(); 37 virtual void slotComposeMail();
38 38
39protected slots: 39protected slots:
40 virtual void slotSendQueued(); 40 virtual void slotSendQueued();
41 virtual void slotEditAccounts(); 41 virtual void slotEditAccounts();
42 virtual void slotShowFolders( bool show ); 42 virtual void slotShowFolders( bool show );
43 virtual void refreshMailView(const QValueList<RecMailP>&); 43 virtual void refreshMailView(const QValueList<RecMailP>&);
44 virtual void displayMail(); 44 virtual void displayMail();
45 virtual void slotGetMail() = 0; 45 virtual void slotGetMail() = 0;
46 virtual void slotGetAllMail() = 0; 46 virtual void slotGetAllMail() = 0;
47 virtual void slotDeleteMail(); 47 virtual void slotDeleteMail();
48 virtual void slotDeleteAllMail() = 0;
48 virtual void slotSetCodec(int); 49 virtual void slotSetCodec(int);
49 virtual void mailHold(int, QListViewItem *,const QPoint&,int); 50 virtual void mailHold(int, QListViewItem *,const QPoint&,int);
50 virtual void slotAdjustLayout(); 51 virtual void slotAdjustLayout();
51 virtual void slotEditSettings(); 52 virtual void slotEditSettings();
52 virtual void mailLeftClicked( QListViewItem * ); 53 virtual void mailLeftClicked( QListViewItem * );
53 void showLicence(); 54 void showLicence();
54 void showAbout(); 55 void showAbout();
55 void showEtpanLicence(); 56 void showEtpanLicence();
56 57
57protected: 58protected:
58 QToolBar *toolBar; 59 QToolBar *toolBar;
59 StatusWidget *statusWidget; 60 StatusWidget *statusWidget;
60 QPEMenuBar *menuBar; 61 QPEMenuBar *menuBar;
61 QPopupMenu *mailMenu, *settingsMenu, *codecMenu; 62 QPopupMenu *mailMenu, *settingsMenu, *codecMenu;
62 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails, 63 QAction *composeMail, *sendQueued, *showFolders, *searchMails, *deleteMails,
63 *editSettings, *editAccounts, *syncFolders; 64 *editSettings, *editAccounts, *syncFolders;
64 AccountView *folderView; 65 AccountView *folderView;
65 QListView *mailView; 66 QListView *mailView;
66 //QBoxLayout *layout; 67 //QBoxLayout *layout;
67}; 68};
68 69
69#endif 70#endif