-rw-r--r-- | noncore/net/linphone/qlinphone.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/accountview.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/composemail.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/editaccounts.cpp | 18 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mhwrapper.cpp | 8 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 16 | ||||
-rw-r--r-- | noncore/net/mail/viewmail.cpp | 6 | ||||
-rw-r--r-- | noncore/net/opieftp/opieftp.cpp | 46 | ||||
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opieirc/mainwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startdunconnection.cpp | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startpanconnection.cpp | 16 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 32 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/scandialog.cpp | 4 |
18 files changed, 92 insertions, 92 deletions
diff --git a/noncore/net/linphone/qlinphone.cpp b/noncore/net/linphone/qlinphone.cpp index 3cc2ebc..ba4ee5f 100644 --- a/noncore/net/linphone/qlinphone.cpp +++ b/noncore/net/linphone/qlinphone.cpp | |||
@@ -91,49 +91,49 @@ extern "C" { | |||
91 | void UpdateStatusBarTask::execute() { | 91 | void UpdateStatusBarTask::execute() { |
92 | static_cast<QLinphoneMainWidget*>(_w)->displayStatus(_msg); | 92 | static_cast<QLinphoneMainWidget*>(_w)->displayStatus(_msg); |
93 | } | 93 | } |
94 | 94 | ||
95 | void InviteReceivedTask::execute() { | 95 | void InviteReceivedTask::execute() { |
96 | static_cast<QLinphoneMainWidget*>(_w)->inviteReceived(_msg); | 96 | static_cast<QLinphoneMainWidget*>(_w)->inviteReceived(_msg); |
97 | } | 97 | } |
98 | 98 | ||
99 | void DisplayMessageTask::execute() { | 99 | void DisplayMessageTask::execute() { |
100 | switch(_msgtype) { | 100 | switch(_msgtype) { |
101 | case Info: | 101 | case Info: |
102 | QMessageBox::information(0,QObject::tr("Information"),_msg); | 102 | QMessageBox::information(0,QObject::tr("Information"),_msg); |
103 | break; | 103 | break; |
104 | case Warn: | 104 | case Warn: |
105 | QMessageBox::warning(0,QObject::tr("Warning"),_msg); | 105 | QMessageBox::warning(0,QObject::tr("Warning"),_msg); |
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | QLinphoneMainWidget::QLinphoneMainWidget(QWidget* parent , const char* name , WFlags fl ) : | 110 | QLinphoneMainWidget::QLinphoneMainWidget(QWidget* parent , const char* name , WFlags fl ) : |
111 | _QLinphoneMainWidget( parent, name, fl ) { | 111 | _QLinphoneMainWidget( parent, name, fl ) { |
112 | 112 | ||
113 | readConfig(); | 113 | readConfig(); |
114 | createLinphoneCore(); | 114 | createLinphoneCore(); |
115 | connect( CheckBox1, SIGNAL( toggled( bool ) ), this, SLOT( slotHide( bool ) ) ); | 115 | connect( CheckBox1, SIGNAL( toggled(bool) ), this, SLOT( slotHide(bool) ) ); |
116 | CheckBox1->setChecked( true ); | 116 | CheckBox1->setChecked( true ); |
117 | } | 117 | } |
118 | 118 | ||
119 | QLinphoneMainWidget::~QLinphoneMainWidget() { | 119 | QLinphoneMainWidget::~QLinphoneMainWidget() { |
120 | linphone_core_destroy(_core); | 120 | linphone_core_destroy(_core); |
121 | writeConfig(); | 121 | writeConfig(); |
122 | } | 122 | } |
123 | 123 | ||
124 | void QLinphoneMainWidget::slotHide( bool show ) { | 124 | void QLinphoneMainWidget::slotHide( bool show ) { |
125 | if ( show ) { | 125 | if ( show ) { |
126 | TabWidget2->show(); | 126 | TabWidget2->show(); |
127 | } else { | 127 | } else { |
128 | TabWidget2->hide(); | 128 | TabWidget2->hide(); |
129 | } | 129 | } |
130 | } | 130 | } |
131 | 131 | ||
132 | void QLinphoneMainWidget::callOrAccept() { | 132 | void QLinphoneMainWidget::callOrAccept() { |
133 | if (linphone_core_inc_invite_pending(_core)) { | 133 | if (linphone_core_inc_invite_pending(_core)) { |
134 | linphone_core_accept_dialog(_core,NULL); | 134 | linphone_core_accept_dialog(_core,NULL); |
135 | return; | 135 | return; |
136 | } | 136 | } |
137 | QString url=sip_url->text(); | 137 | QString url=sip_url->text(); |
138 | linphone_core_invite(_core,(char*)url.ascii()); | 138 | linphone_core_invite(_core,(char*)url.ascii()); |
139 | } | 139 | } |
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp index c2185f2..64557ee 100644 --- a/noncore/net/mail/accountview.cpp +++ b/noncore/net/mail/accountview.cpp | |||
@@ -1,47 +1,47 @@ | |||
1 | 1 | ||
2 | #include "accountview.h" | 2 | #include "accountview.h" |
3 | #include "accountitem.h" | 3 | #include "accountitem.h" |
4 | #include "selectstore.h" | 4 | #include "selectstore.h" |
5 | 5 | ||
6 | /* OPIE */ | 6 | /* OPIE */ |
7 | #include <libmailwrapper/settings.h> | 7 | #include <libmailwrapper/settings.h> |
8 | #include <libmailwrapper/mailwrapper.h> | 8 | #include <libmailwrapper/mailwrapper.h> |
9 | #include <libmailwrapper/mailtypes.h> | 9 | #include <libmailwrapper/mailtypes.h> |
10 | #include <libmailwrapper/abstractmail.h> | 10 | #include <libmailwrapper/abstractmail.h> |
11 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
12 | 12 | ||
13 | /* QT */ | 13 | /* QT */ |
14 | #include <qmessagebox.h> | 14 | #include <qmessagebox.h> |
15 | #include <qpopupmenu.h> | 15 | #include <qpopupmenu.h> |
16 | 16 | ||
17 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) | 17 | AccountView::AccountView( QWidget *parent, const char *name, WFlags flags ) |
18 | : QListView( parent, name, flags ) | 18 | : QListView( parent, name, flags ) |
19 | { | 19 | { |
20 | connect( this, SIGNAL( selectionChanged( QListViewItem * ) ), | 20 | connect( this, SIGNAL( selectionChanged(QListViewItem*) ), |
21 | SLOT( refresh( QListViewItem * ) ) ); | 21 | SLOT( refresh(QListViewItem*) ) ); |
22 | connect( this, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this, | 22 | connect( this, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
23 | SLOT( slotHold( int, QListViewItem *,const QPoint&,int ) ) ); | 23 | SLOT( slotHold(int,QListViewItem*,const QPoint&,int) ) ); |
24 | setSorting(0); | 24 | setSorting(0); |
25 | } | 25 | } |
26 | 26 | ||
27 | AccountView::~AccountView() | 27 | AccountView::~AccountView() |
28 | { | 28 | { |
29 | imapAccounts.clear(); | 29 | imapAccounts.clear(); |
30 | mhAccounts.clear(); | 30 | mhAccounts.clear(); |
31 | } | 31 | } |
32 | 32 | ||
33 | void AccountView::slotContextMenu(int id) | 33 | void AccountView::slotContextMenu(int id) |
34 | { | 34 | { |
35 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); | 35 | AccountViewItem *view = static_cast<AccountViewItem *>(currentItem()); |
36 | if (!view) return; | 36 | if (!view) return; |
37 | view->contextMenuSelected(id); | 37 | view->contextMenuSelected(id); |
38 | } | 38 | } |
39 | 39 | ||
40 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) | 40 | void AccountView::slotHold(int button, QListViewItem * item,const QPoint&,int) |
41 | { | 41 | { |
42 | if (button==1) {return;} | 42 | if (button==1) {return;} |
43 | if (!item) return; | 43 | if (!item) return; |
44 | AccountViewItem *view = static_cast<AccountViewItem *>(item); | 44 | AccountViewItem *view = static_cast<AccountViewItem *>(item); |
45 | QPopupMenu*m = view->getContextMenu(); | 45 | QPopupMenu*m = view->getContextMenu(); |
46 | if (!m) return; | 46 | if (!m) return; |
47 | connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); | 47 | connect(m,SIGNAL(activated(int)),this,SLOT(slotContextMenu(int))); |
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 6708779..f51a8fe 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -41,49 +41,49 @@ ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool m | |||
41 | 41 | ||
42 | attList->addColumn( tr( "Name" ) ); | 42 | attList->addColumn( tr( "Name" ) ); |
43 | attList->addColumn( tr( "Size" ) ); | 43 | attList->addColumn( tr( "Size" ) ); |
44 | 44 | ||
45 | QList<Account> accounts = settings->getAccounts(); | 45 | QList<Account> accounts = settings->getAccounts(); |
46 | 46 | ||
47 | Account *it; | 47 | Account *it; |
48 | for ( it = accounts.first(); it; it = accounts.next() ) { | 48 | for ( it = accounts.first(); it; it = accounts.next() ) { |
49 | if ( it->getType().compare( "SMTP" ) == 0 ) { | 49 | if ( it->getType().compare( "SMTP" ) == 0 ) { |
50 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); | 50 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); |
51 | smtpAccountBox->insertItem( smtp->getAccountName() ); | 51 | smtpAccountBox->insertItem( smtp->getAccountName() ); |
52 | smtpAccounts.append( smtp ); | 52 | smtpAccounts.append( smtp ); |
53 | } | 53 | } |
54 | } | 54 | } |
55 | 55 | ||
56 | if ( smtpAccounts.count() > 0 ) { | 56 | if ( smtpAccounts.count() > 0 ) { |
57 | fillValues( smtpAccountBox->currentItem() ); | 57 | fillValues( smtpAccountBox->currentItem() ); |
58 | } else { | 58 | } else { |
59 | QMessageBox::information( this, tr( "Problem" ), | 59 | QMessageBox::information( this, tr( "Problem" ), |
60 | tr( "<p>Please create an SMTP account first.</p>" ), | 60 | tr( "<p>Please create an SMTP account first.</p>" ), |
61 | tr( "Ok" ) ); | 61 | tr( "Ok" ) ); |
62 | return; | 62 | return; |
63 | } | 63 | } |
64 | 64 | ||
65 | connect( smtpAccountBox, SIGNAL( activated( int ) ), SLOT( fillValues( int ) ) ); | 65 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); |
66 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); | 66 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); |
67 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); | 67 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); |
68 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); | 68 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); |
69 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); | 69 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); |
70 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); | 70 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); |
71 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); | 71 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); |
72 | } | 72 | } |
73 | 73 | ||
74 | void ComposeMail::pickAddress( QLineEdit *line ) | 74 | void ComposeMail::pickAddress( QLineEdit *line ) |
75 | { | 75 | { |
76 | QString names = AddressPicker::getNames(); | 76 | QString names = AddressPicker::getNames(); |
77 | if ( line->text().isEmpty() ) { | 77 | if ( line->text().isEmpty() ) { |
78 | line->setText( names ); | 78 | line->setText( names ); |
79 | } else if ( !names.isEmpty() ) { | 79 | } else if ( !names.isEmpty() ) { |
80 | line->setText( line->text() + ", " + names ); | 80 | line->setText( line->text() + ", " + names ); |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | void ComposeMail::setTo( const QString & to ) | 85 | void ComposeMail::setTo( const QString & to ) |
86 | { | 86 | { |
87 | /* QString toline; | 87 | /* QString toline; |
88 | QStringList toEntry = to; | 88 | QStringList toEntry = to; |
89 | for ( QStringList::Iterator it = toEntry.begin(); it != toEntry.end(); ++it ) { | 89 | for ( QStringList::Iterator it = toEntry.begin(); it != toEntry.end(); ++it ) { |
diff --git a/noncore/net/mail/editaccounts.cpp b/noncore/net/mail/editaccounts.cpp index 60bffa5..edeb1de 100644 --- a/noncore/net/mail/editaccounts.cpp +++ b/noncore/net/mail/editaccounts.cpp | |||
@@ -263,68 +263,68 @@ void EditAccounts::slotAdjustColumns() | |||
263 | mailList->setColumnWidth( 1, 50 ); | 263 | mailList->setColumnWidth( 1, 50 ); |
264 | 264 | ||
265 | configTab->showPage( newsTab ); | 265 | configTab->showPage( newsTab ); |
266 | newsList->setColumnWidth( 0, newsList->visibleWidth() ); | 266 | newsList->setColumnWidth( 0, newsList->visibleWidth() ); |
267 | 267 | ||
268 | configTab->setCurrentPage( currPage ); | 268 | configTab->setCurrentPage( currPage ); |
269 | } | 269 | } |
270 | 270 | ||
271 | void EditAccounts::accept() | 271 | void EditAccounts::accept() |
272 | { | 272 | { |
273 | settings->saveAccounts(); | 273 | settings->saveAccounts(); |
274 | 274 | ||
275 | QDialog::accept(); | 275 | QDialog::accept(); |
276 | } | 276 | } |
277 | 277 | ||
278 | /** | 278 | /** |
279 | * SelectMailType | 279 | * SelectMailType |
280 | */ | 280 | */ |
281 | 281 | ||
282 | SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) | 282 | SelectMailType::SelectMailType( QString *selection, QWidget *parent, const char *name, bool modal, WFlags flags ) |
283 | : SelectMailTypeUI( parent, name, modal, flags ) | 283 | : SelectMailTypeUI( parent, name, modal, flags ) |
284 | { | 284 | { |
285 | selected = selection; | 285 | selected = selection; |
286 | selected->replace( 0, selected->length(), typeBox->currentText() ); | 286 | selected->replace( 0, selected->length(), typeBox->currentText() ); |
287 | connect( typeBox, SIGNAL( activated( const QString & ) ), SLOT( slotSelection( const QString & ) ) ); | 287 | connect( typeBox, SIGNAL( activated(const QString&) ), SLOT( slotSelection(const QString&) ) ); |
288 | } | 288 | } |
289 | 289 | ||
290 | void SelectMailType::slotSelection( const QString &sel ) | 290 | void SelectMailType::slotSelection( const QString &sel ) |
291 | { | 291 | { |
292 | selected->replace( 0, selected->length(), sel ); | 292 | selected->replace( 0, selected->length(), sel ); |
293 | } | 293 | } |
294 | 294 | ||
295 | /** | 295 | /** |
296 | * IMAPconfig | 296 | * IMAPconfig |
297 | */ | 297 | */ |
298 | 298 | ||
299 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 299 | IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
300 | : IMAPconfigUI( parent, name, modal, flags ) | 300 | : IMAPconfigUI( parent, name, modal, flags ) |
301 | { | 301 | { |
302 | data = account; | 302 | data = account; |
303 | 303 | ||
304 | fillValues(); | 304 | fillValues(); |
305 | 305 | ||
306 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); | 306 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
307 | ComboBox1->insertItem( "Only if available", 0 ); | 307 | ComboBox1->insertItem( "Only if available", 0 ); |
308 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 308 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
309 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 309 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
310 | ComboBox1->insertItem( "Run command instead", 3 ); | 310 | ComboBox1->insertItem( "Run command instead", 3 ); |
311 | CommandEdit->hide(); | 311 | CommandEdit->hide(); |
312 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 312 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
313 | } | 313 | } |
314 | 314 | ||
315 | void IMAPconfig::slotConnectionToggle( int index ) | 315 | void IMAPconfig::slotConnectionToggle( int index ) |
316 | { | 316 | { |
317 | if ( index == 2 ) | 317 | if ( index == 2 ) |
318 | { | 318 | { |
319 | portLine->setText( IMAP_SSL_PORT ); | 319 | portLine->setText( IMAP_SSL_PORT ); |
320 | } | 320 | } |
321 | else if ( index == 3 ) | 321 | else if ( index == 3 ) |
322 | { | 322 | { |
323 | portLine->setText( IMAP_PORT ); | 323 | portLine->setText( IMAP_PORT ); |
324 | CommandEdit->show(); | 324 | CommandEdit->show(); |
325 | } | 325 | } |
326 | else | 326 | else |
327 | { | 327 | { |
328 | portLine->setText( IMAP_PORT ); | 328 | portLine->setText( IMAP_PORT ); |
329 | } | 329 | } |
330 | } | 330 | } |
@@ -342,49 +342,49 @@ void IMAPconfig::fillValues() | |||
342 | 342 | ||
343 | void IMAPconfig::accept() | 343 | void IMAPconfig::accept() |
344 | { | 344 | { |
345 | data->setAccountName( accountLine->text() ); | 345 | data->setAccountName( accountLine->text() ); |
346 | data->setServer( serverLine->text() ); | 346 | data->setServer( serverLine->text() ); |
347 | data->setPort( portLine->text() ); | 347 | data->setPort( portLine->text() ); |
348 | data->setConnectionType( ComboBox1->currentItem() ); | 348 | data->setConnectionType( ComboBox1->currentItem() ); |
349 | data->setUser( userLine->text() ); | 349 | data->setUser( userLine->text() ); |
350 | data->setPassword( passLine->text() ); | 350 | data->setPassword( passLine->text() ); |
351 | data->setPrefix(prefixLine->text()); | 351 | data->setPrefix(prefixLine->text()); |
352 | 352 | ||
353 | QDialog::accept(); | 353 | QDialog::accept(); |
354 | } | 354 | } |
355 | 355 | ||
356 | /** | 356 | /** |
357 | * POP3config | 357 | * POP3config |
358 | */ | 358 | */ |
359 | 359 | ||
360 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 360 | POP3config::POP3config( POP3account *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
361 | : POP3configUI( parent, name, modal, flags ) | 361 | : POP3configUI( parent, name, modal, flags ) |
362 | { | 362 | { |
363 | data = account; | 363 | data = account; |
364 | fillValues(); | 364 | fillValues(); |
365 | 365 | ||
366 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); | 366 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
367 | ComboBox1->insertItem( "Only if available", 0 ); | 367 | ComboBox1->insertItem( "Only if available", 0 ); |
368 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 368 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
369 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 369 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
370 | ComboBox1->insertItem( "Run command instead", 3 ); | 370 | ComboBox1->insertItem( "Run command instead", 3 ); |
371 | CommandEdit->hide(); | 371 | CommandEdit->hide(); |
372 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 372 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
373 | } | 373 | } |
374 | 374 | ||
375 | void POP3config::slotConnectionToggle( int index ) | 375 | void POP3config::slotConnectionToggle( int index ) |
376 | { | 376 | { |
377 | // 2 is ssl connection | 377 | // 2 is ssl connection |
378 | if ( index == 2 ) | 378 | if ( index == 2 ) |
379 | { | 379 | { |
380 | portLine->setText( POP3_SSL_PORT ); | 380 | portLine->setText( POP3_SSL_PORT ); |
381 | } | 381 | } |
382 | else if ( index == 3 ) | 382 | else if ( index == 3 ) |
383 | { | 383 | { |
384 | portLine->setText( POP3_PORT ); | 384 | portLine->setText( POP3_PORT ); |
385 | CommandEdit->show(); | 385 | CommandEdit->show(); |
386 | } | 386 | } |
387 | else | 387 | else |
388 | { | 388 | { |
389 | portLine->setText( POP3_PORT ); | 389 | portLine->setText( POP3_PORT ); |
390 | } | 390 | } |
@@ -400,54 +400,54 @@ void POP3config::fillValues() | |||
400 | passLine->setText( data->getPassword() ); | 400 | passLine->setText( data->getPassword() ); |
401 | } | 401 | } |
402 | 402 | ||
403 | void POP3config::accept() | 403 | void POP3config::accept() |
404 | { | 404 | { |
405 | data->setAccountName( accountLine->text() ); | 405 | data->setAccountName( accountLine->text() ); |
406 | data->setServer( serverLine->text() ); | 406 | data->setServer( serverLine->text() ); |
407 | data->setPort( portLine->text() ); | 407 | data->setPort( portLine->text() ); |
408 | data->setConnectionType( ComboBox1->currentItem() ); | 408 | data->setConnectionType( ComboBox1->currentItem() ); |
409 | data->setUser( userLine->text() ); | 409 | data->setUser( userLine->text() ); |
410 | data->setPassword( passLine->text() ); | 410 | data->setPassword( passLine->text() ); |
411 | 411 | ||
412 | QDialog::accept(); | 412 | QDialog::accept(); |
413 | } | 413 | } |
414 | 414 | ||
415 | /** | 415 | /** |
416 | * SMTPconfig | 416 | * SMTPconfig |
417 | */ | 417 | */ |
418 | 418 | ||
419 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 419 | SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
420 | : SMTPconfigUI( parent, name, modal, flags ) | 420 | : SMTPconfigUI( parent, name, modal, flags ) |
421 | { | 421 | { |
422 | data = account; | 422 | data = account; |
423 | 423 | ||
424 | connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); | 424 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
425 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); | 425 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
426 | 426 | ||
427 | fillValues(); | 427 | fillValues(); |
428 | 428 | ||
429 | connect( ComboBox1, SIGNAL( activated( int ) ), SLOT( slotConnectionToggle( int ) ) ); | 429 | connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) ); |
430 | ComboBox1->insertItem( "Only if available", 0 ); | 430 | ComboBox1->insertItem( "Only if available", 0 ); |
431 | ComboBox1->insertItem( "Always, Negotiated", 1 ); | 431 | ComboBox1->insertItem( "Always, Negotiated", 1 ); |
432 | ComboBox1->insertItem( "Connect on secure port", 2 ); | 432 | ComboBox1->insertItem( "Connect on secure port", 2 ); |
433 | ComboBox1->insertItem( "Run command instead", 3 ); | 433 | ComboBox1->insertItem( "Run command instead", 3 ); |
434 | CommandEdit->hide(); | 434 | CommandEdit->hide(); |
435 | ComboBox1->setCurrentItem( data->ConnectionType() ); | 435 | ComboBox1->setCurrentItem( data->ConnectionType() ); |
436 | } | 436 | } |
437 | 437 | ||
438 | void SMTPconfig::slotConnectionToggle( int index ) | 438 | void SMTPconfig::slotConnectionToggle( int index ) |
439 | { | 439 | { |
440 | // 2 is ssl connection | 440 | // 2 is ssl connection |
441 | if ( index == 2 ) | 441 | if ( index == 2 ) |
442 | { | 442 | { |
443 | portLine->setText( SMTP_SSL_PORT ); | 443 | portLine->setText( SMTP_SSL_PORT ); |
444 | } | 444 | } |
445 | else if ( index == 3 ) | 445 | else if ( index == 3 ) |
446 | { | 446 | { |
447 | portLine->setText( SMTP_PORT ); | 447 | portLine->setText( SMTP_PORT ); |
448 | CommandEdit->show(); | 448 | CommandEdit->show(); |
449 | } | 449 | } |
450 | else | 450 | else |
451 | { | 451 | { |
452 | portLine->setText( SMTP_PORT ); | 452 | portLine->setText( SMTP_PORT ); |
453 | } | 453 | } |
@@ -465,54 +465,54 @@ void SMTPconfig::fillValues() | |||
465 | } | 465 | } |
466 | 466 | ||
467 | void SMTPconfig::accept() | 467 | void SMTPconfig::accept() |
468 | { | 468 | { |
469 | data->setAccountName( accountLine->text() ); | 469 | data->setAccountName( accountLine->text() ); |
470 | data->setServer( serverLine->text() ); | 470 | data->setServer( serverLine->text() ); |
471 | data->setPort( portLine->text() ); | 471 | data->setPort( portLine->text() ); |
472 | data->setConnectionType( ComboBox1->currentItem() ); | 472 | data->setConnectionType( ComboBox1->currentItem() ); |
473 | data->setLogin( loginBox->isChecked() ); | 473 | data->setLogin( loginBox->isChecked() ); |
474 | data->setUser( userLine->text() ); | 474 | data->setUser( userLine->text() ); |
475 | data->setPassword( passLine->text() ); | 475 | data->setPassword( passLine->text() ); |
476 | 476 | ||
477 | QDialog::accept(); | 477 | QDialog::accept(); |
478 | } | 478 | } |
479 | 479 | ||
480 | /** | 480 | /** |
481 | * NNTPconfig | 481 | * NNTPconfig |
482 | */ | 482 | */ |
483 | 483 | ||
484 | NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) | 484 | NNTPconfig::NNTPconfig( NNTPaccount *account, QWidget *parent, const char *name, bool modal, WFlags flags ) |
485 | : NNTPconfigUI( parent, name, modal, flags ) | 485 | : NNTPconfigUI( parent, name, modal, flags ) |
486 | { | 486 | { |
487 | data = account; | 487 | data = account; |
488 | 488 | ||
489 | connect( loginBox, SIGNAL( toggled( bool ) ), userLine, SLOT( setEnabled( bool ) ) ); | 489 | connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) ); |
490 | connect( loginBox, SIGNAL( toggled( bool ) ), passLine, SLOT( setEnabled( bool ) ) ); | 490 | connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) ); |
491 | 491 | ||
492 | fillValues(); | 492 | fillValues(); |
493 | 493 | ||
494 | connect( sslBox, SIGNAL( toggled( bool ) ), SLOT( slotSSL( bool ) ) ); | 494 | connect( sslBox, SIGNAL( toggled(bool) ), SLOT( slotSSL(bool) ) ); |
495 | } | 495 | } |
496 | 496 | ||
497 | void NNTPconfig::slotSSL( bool enabled ) | 497 | void NNTPconfig::slotSSL( bool enabled ) |
498 | { | 498 | { |
499 | if ( enabled ) | 499 | if ( enabled ) |
500 | { | 500 | { |
501 | portLine->setText( NNTP_SSL_PORT ); | 501 | portLine->setText( NNTP_SSL_PORT ); |
502 | } | 502 | } |
503 | else | 503 | else |
504 | { | 504 | { |
505 | portLine->setText( NNTP_PORT ); | 505 | portLine->setText( NNTP_PORT ); |
506 | } | 506 | } |
507 | } | 507 | } |
508 | 508 | ||
509 | void NNTPconfig::fillValues() | 509 | void NNTPconfig::fillValues() |
510 | { | 510 | { |
511 | accountLine->setText( data->getAccountName() ); | 511 | accountLine->setText( data->getAccountName() ); |
512 | serverLine->setText( data->getServer() ); | 512 | serverLine->setText( data->getServer() ); |
513 | portLine->setText( data->getPort() ); | 513 | portLine->setText( data->getPort() ); |
514 | sslBox->setChecked( data->getSSL() ); | 514 | sslBox->setChecked( data->getSSL() ); |
515 | loginBox->setChecked( data->getLogin() ); | 515 | loginBox->setChecked( data->getLogin() ); |
516 | userLine->setText( data->getUser() ); | 516 | userLine->setText( data->getUser() ); |
517 | passLine->setText( data->getPassword() ); | 517 | passLine->setText( data->getPassword() ); |
518 | } | 518 | } |
diff --git a/noncore/net/mail/libmailwrapper/mhwrapper.cpp b/noncore/net/mail/libmailwrapper/mhwrapper.cpp index dfc00d8..df7f773 100644 --- a/noncore/net/mail/libmailwrapper/mhwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mhwrapper.cpp | |||
@@ -301,52 +301,52 @@ int MHwrapper::deleteAllMail(const Folder*tfolder) | |||
301 | } | 301 | } |
302 | 302 | ||
303 | int MHwrapper::deleteMbox(const Folder*tfolder) | 303 | int MHwrapper::deleteMbox(const Folder*tfolder) |
304 | { | 304 | { |
305 | init_storage(); | 305 | init_storage(); |
306 | if (!m_storage) { | 306 | if (!m_storage) { |
307 | return 0; | 307 | return 0; |
308 | } | 308 | } |
309 | if (!tfolder) return 0; | 309 | if (!tfolder) return 0; |
310 | if (tfolder->getName()=="/" || tfolder->getName().isEmpty()) return 0; | 310 | if (tfolder->getName()=="/" || tfolder->getName().isEmpty()) return 0; |
311 | 311 | ||
312 | int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); | 312 | int r = mailsession_delete_folder(m_storage->sto_session,(char*)tfolder->getName().latin1()); |
313 | 313 | ||
314 | if (r != MAIL_NO_ERROR) { | 314 | if (r != MAIL_NO_ERROR) { |
315 | qDebug("error deleting mail box"); | 315 | qDebug("error deleting mail box"); |
316 | return 0; | 316 | return 0; |
317 | } | 317 | } |
318 | QString cmd = "rm -rf "+tfolder->getName(); | 318 | QString cmd = "rm -rf "+tfolder->getName(); |
319 | QStringList command; | 319 | QStringList command; |
320 | command << "/bin/sh"; | 320 | command << "/bin/sh"; |
321 | command << "-c"; | 321 | command << "-c"; |
322 | command << cmd.latin1(); | 322 | command << cmd.latin1(); |
323 | OProcess *process = new OProcess(); | 323 | OProcess *process = new OProcess(); |
324 | 324 | ||
325 | connect(process, SIGNAL(processExited(OProcess *)), | 325 | connect(process, SIGNAL(processExited(OProcess*)), |
326 | this, SLOT( processEnded(OProcess *))); | 326 | this, SLOT( processEnded(OProcess*))); |
327 | connect(process, SIGNAL( receivedStderr(OProcess *, char *, int)), | 327 | connect(process, SIGNAL( receivedStderr(OProcess*,char*,int)), |
328 | this, SLOT( oprocessStderr(OProcess *, char *, int))); | 328 | this, SLOT( oprocessStderr(OProcess*,char*,int))); |
329 | 329 | ||
330 | *process << command; | 330 | *process << command; |
331 | removeMboxfailed = false; | 331 | removeMboxfailed = false; |
332 | if(!process->start(OProcess::Block, OProcess::All) ) { | 332 | if(!process->start(OProcess::Block, OProcess::All) ) { |
333 | qDebug("could not start process"); | 333 | qDebug("could not start process"); |
334 | return 0; | 334 | return 0; |
335 | } | 335 | } |
336 | qDebug("mail box deleted"); | 336 | qDebug("mail box deleted"); |
337 | return 1; | 337 | return 1; |
338 | } | 338 | } |
339 | 339 | ||
340 | void MHwrapper::processEnded(OProcess *p) | 340 | void MHwrapper::processEnded(OProcess *p) |
341 | { | 341 | { |
342 | if (p) delete p; | 342 | if (p) delete p; |
343 | } | 343 | } |
344 | 344 | ||
345 | void MHwrapper::oprocessStderr(OProcess*, char *buffer, int ) | 345 | void MHwrapper::oprocessStderr(OProcess*, char *buffer, int ) |
346 | { | 346 | { |
347 | QString lineStr = buffer; | 347 | QString lineStr = buffer; |
348 | QMessageBox::warning( 0, tr("Error"), lineStr ,tr("Ok") ); | 348 | QMessageBox::warning( 0, tr("Error"), lineStr ,tr("Ok") ); |
349 | removeMboxfailed = true; | 349 | removeMboxfailed = true; |
350 | } | 350 | } |
351 | 351 | ||
352 | void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | 352 | void MHwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index a3c68ae..d75d52a 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -11,49 +11,49 @@ | |||
11 | #include <qpe/config.h> | 11 | #include <qpe/config.h> |
12 | #include <qpe/qcopenvelope_qws.h> | 12 | #include <qpe/qcopenvelope_qws.h> |
13 | 13 | ||
14 | #include <libetpan/libetpan.h> | 14 | #include <libetpan/libetpan.h> |
15 | 15 | ||
16 | #include "smtpwrapper.h" | 16 | #include "smtpwrapper.h" |
17 | #include "mailwrapper.h" | 17 | #include "mailwrapper.h" |
18 | #include "abstractmail.h" | 18 | #include "abstractmail.h" |
19 | #include "logindialog.h" | 19 | #include "logindialog.h" |
20 | #include "mailtypes.h" | 20 | #include "mailtypes.h" |
21 | #include "sendmailprogress.h" | 21 | #include "sendmailprogress.h" |
22 | 22 | ||
23 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; | 23 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.4"; |
24 | 24 | ||
25 | progressMailSend*SMTPwrapper::sendProgress = 0; | 25 | progressMailSend*SMTPwrapper::sendProgress = 0; |
26 | 26 | ||
27 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 27 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
28 | : QObject() | 28 | : QObject() |
29 | { | 29 | { |
30 | m_SmtpAccount = aSmtp; | 30 | m_SmtpAccount = aSmtp; |
31 | Config cfg( "mail" ); | 31 | Config cfg( "mail" ); |
32 | cfg.setGroup( "Status" ); | 32 | cfg.setGroup( "Status" ); |
33 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); | 33 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); |
34 | emit queuedMails( m_queuedMail ); | 34 | emit queuedMails( m_queuedMail ); |
35 | connect( this, SIGNAL( queuedMails( int ) ), this, SLOT( emitQCop( int ) ) ); | 35 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); |
36 | m_smtp = 0; | 36 | m_smtp = 0; |
37 | } | 37 | } |
38 | 38 | ||
39 | SMTPwrapper::~SMTPwrapper() | 39 | SMTPwrapper::~SMTPwrapper() |
40 | { | 40 | { |
41 | disc_server(); | 41 | disc_server(); |
42 | } | 42 | } |
43 | 43 | ||
44 | void SMTPwrapper::emitQCop( int queued ) { | 44 | void SMTPwrapper::emitQCop( int queued ) { |
45 | QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); | 45 | QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" ); |
46 | env << queued; | 46 | env << queued; |
47 | } | 47 | } |
48 | 48 | ||
49 | QString SMTPwrapper::mailsmtpError( int errnum ) { | 49 | QString SMTPwrapper::mailsmtpError( int errnum ) { |
50 | switch ( errnum ) { | 50 | switch ( errnum ) { |
51 | case MAILSMTP_NO_ERROR: | 51 | case MAILSMTP_NO_ERROR: |
52 | return tr( "No error" ); | 52 | return tr( "No error" ); |
53 | case MAILSMTP_ERROR_UNEXPECTED_CODE: | 53 | case MAILSMTP_ERROR_UNEXPECTED_CODE: |
54 | return tr( "Unexpected error code" ); | 54 | return tr( "Unexpected error code" ); |
55 | case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: | 55 | case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE: |
56 | return tr( "Service not available" ); | 56 | return tr( "Service not available" ); |
57 | case MAILSMTP_ERROR_STREAM: | 57 | case MAILSMTP_ERROR_STREAM: |
58 | return tr( "Stream error" ); | 58 | return tr( "Stream error" ); |
59 | case MAILSMTP_ERROR_HOSTNAME: | 59 | case MAILSMTP_ERROR_HOSTNAME: |
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index 2a1f90d..3f34fe7 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -34,50 +34,50 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
34 | toolBar->setStretchableWidget( spacer ); | 34 | toolBar->setStretchableWidget( spacer ); |
35 | 35 | ||
36 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, | 36 | composeMail = new QAction( tr( "Compose new mail" ), ICON_COMPOSEMAIL, |
37 | 0, 0, this ); | 37 | 0, 0, this ); |
38 | composeMail->addTo( toolBar ); | 38 | composeMail->addTo( toolBar ); |
39 | composeMail->addTo( mailMenu ); | 39 | composeMail->addTo( mailMenu ); |
40 | 40 | ||
41 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, | 41 | sendQueued = new QAction( tr( "Send queued mails" ), ICON_SENDQUEUED, |
42 | 0, 0, this ); | 42 | 0, 0, this ); |
43 | sendQueued->addTo( toolBar ); | 43 | sendQueued->addTo( toolBar ); |
44 | sendQueued->addTo( mailMenu ); | 44 | sendQueued->addTo( mailMenu ); |
45 | 45 | ||
46 | /* | 46 | /* |
47 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, | 47 | syncFolders = new QAction( tr( "Sync mailfolders" ), ICON_SYNC, |
48 | 0, 0, this ); | 48 | 0, 0, this ); |
49 | syncFolders->addTo( toolBar ); | 49 | syncFolders->addTo( toolBar ); |
50 | syncFolders->addTo( mailMenu ); | 50 | syncFolders->addTo( mailMenu ); |
51 | */ | 51 | */ |
52 | 52 | ||
53 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, | 53 | showFolders = new QAction( tr( "Show/Hide folders" ), ICON_SHOWFOLDERS, |
54 | 0, 0, this, 0, true ); | 54 | 0, 0, this, 0, true ); |
55 | showFolders->addTo( toolBar ); | 55 | showFolders->addTo( toolBar ); |
56 | showFolders->addTo( mailMenu ); | 56 | showFolders->addTo( mailMenu ); |
57 | showFolders->setOn( true ); | 57 | showFolders->setOn( true ); |
58 | connect(showFolders, SIGNAL( toggled( bool ) ), | 58 | connect(showFolders, SIGNAL( toggled(bool) ), |
59 | SLOT( slotShowFolders( bool ) ) ); | 59 | SLOT( slotShowFolders(bool) ) ); |
60 | 60 | ||
61 | /* | 61 | /* |
62 | searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), | 62 | searchMails = new QAction( tr( "Search mails" ), QIconSet( Resource::loadPixmap("find") ), |
63 | 0, 0, this ); | 63 | 0, 0, this ); |
64 | searchMails->addTo( toolBar ); | 64 | searchMails->addTo( toolBar ); |
65 | searchMails->addTo( mailMenu ); | 65 | searchMails->addTo( mailMenu ); |
66 | */ | 66 | */ |
67 | 67 | ||
68 | deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this); | 68 | deleteMails = new QAction(tr("Delete Mail"), QIconSet( Resource::loadPixmap("trash")), 0, 0, this); |
69 | deleteMails->addTo( toolBar ); | 69 | deleteMails->addTo( toolBar ); |
70 | deleteMails->addTo( mailMenu ); | 70 | deleteMails->addTo( mailMenu ); |
71 | connect( deleteMails, SIGNAL( activated() ), | 71 | connect( deleteMails, SIGNAL( activated() ), |
72 | SLOT( slotDeleteMail() ) ); | 72 | SLOT( slotDeleteMail() ) ); |
73 | 73 | ||
74 | editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , | 74 | editSettings = new QAction( tr( "Edit settings" ), QIconSet( Resource::loadPixmap("SettingsIcon") ) , |
75 | 0, 0, this ); | 75 | 0, 0, this ); |
76 | editSettings->addTo( settingsMenu ); | 76 | editSettings->addTo( settingsMenu ); |
77 | connect( editSettings, SIGNAL( activated() ), | 77 | connect( editSettings, SIGNAL( activated() ), |
78 | SLOT( slotEditSettings() ) ); | 78 | SLOT( slotEditSettings() ) ); |
79 | editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , | 79 | editAccounts = new QAction( tr( "Configure accounts" ), QIconSet( Resource::loadPixmap("mail/editaccounts") ) , |
80 | 0, 0, this ); | 80 | 0, 0, this ); |
81 | editAccounts->addTo( settingsMenu ); | 81 | editAccounts->addTo( settingsMenu ); |
82 | 82 | ||
83 | //setCentralWidget( view ); | 83 | //setCentralWidget( view ); |
@@ -96,62 +96,62 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
96 | 96 | ||
97 | layout->addWidget( folderView ); | 97 | layout->addWidget( folderView ); |
98 | 98 | ||
99 | mailView = new QListView( view ); | 99 | mailView = new QListView( view ); |
100 | mailView->addColumn( tr( "" ) ); | 100 | mailView->addColumn( tr( "" ) ); |
101 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); | 101 | mailView->addColumn( tr( "Subject" ),QListView::Manual ); |
102 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); | 102 | mailView->addColumn( tr( "Sender" ),QListView::Manual ); |
103 | mailView->addColumn( tr( "Size" ),QListView::Manual); | 103 | mailView->addColumn( tr( "Size" ),QListView::Manual); |
104 | mailView->addColumn( tr( "Date" )); | 104 | mailView->addColumn( tr( "Date" )); |
105 | mailView->setAllColumnsShowFocus(true); | 105 | mailView->setAllColumnsShowFocus(true); |
106 | mailView->setSorting(-1); | 106 | mailView->setSorting(-1); |
107 | 107 | ||
108 | statusWidget = new StatusWidget( wrapperBox ); | 108 | statusWidget = new StatusWidget( wrapperBox ); |
109 | statusWidget->hide(); | 109 | statusWidget->hide(); |
110 | 110 | ||
111 | layout->addWidget( mailView ); | 111 | layout->addWidget( mailView ); |
112 | layout->setStretchFactor( folderView, 1 ); | 112 | layout->setStretchFactor( folderView, 1 ); |
113 | layout->setStretchFactor( mailView, 2 ); | 113 | layout->setStretchFactor( mailView, 2 ); |
114 | 114 | ||
115 | slotAdjustLayout(); | 115 | slotAdjustLayout(); |
116 | 116 | ||
117 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 117 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
118 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 118 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
119 | 119 | ||
120 | connect( mailView, SIGNAL( mouseButtonClicked(int, QListViewItem *,const QPoint&,int ) ),this, | 120 | connect( mailView, SIGNAL( mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ),this, |
121 | SLOT( mailLeftClicked( int, QListViewItem *,const QPoint&,int ) ) ); | 121 | SLOT( mailLeftClicked(int,QListViewItem*,const QPoint&,int) ) ); |
122 | connect( mailView, SIGNAL( mouseButtonPressed(int, QListViewItem *,const QPoint&,int ) ),this, | 122 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
123 | SLOT( mailHold( int, QListViewItem *,const QPoint&,int ) ) ); | 123 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); |
124 | connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*))); | 124 | connect(folderView, SIGNAL(refreshMailview(QList<RecMail>*)),this,SLOT(refreshMailView(QList<RecMail>*))); |
125 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 125 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
126 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); | 126 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); |
127 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); | 127 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); |
128 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); | 128 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); |
129 | // Added by Stefan Eilers to allow starting by addressbook.. | 129 | // Added by Stefan Eilers to allow starting by addressbook.. |
130 | // copied from old mail2 | 130 | // copied from old mail2 |
131 | #if !defined(QT_NO_COP) | 131 | #if !defined(QT_NO_COP) |
132 | connect( qApp, SIGNAL( appMessage( const QCString&, const QByteArray& ) ), | 132 | connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), |
133 | this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); | 133 | this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); |
134 | #endif | 134 | #endif |
135 | 135 | ||
136 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); | 136 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); |
137 | } | 137 | } |
138 | 138 | ||
139 | MainWindow::~MainWindow() | 139 | MainWindow::~MainWindow() |
140 | { | 140 | { |
141 | } | 141 | } |
142 | 142 | ||
143 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 143 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
144 | { | 144 | { |
145 | qDebug("appMessage not reached"); | 145 | qDebug("appMessage not reached"); |
146 | } | 146 | } |
147 | 147 | ||
148 | void MainWindow::slotAdjustLayout() { | 148 | void MainWindow::slotAdjustLayout() { |
149 | 149 | ||
150 | QWidget *d = QApplication::desktop(); | 150 | QWidget *d = QApplication::desktop(); |
151 | 151 | ||
152 | if ( d->width() < d->height() ) { | 152 | if ( d->width() < d->height() ) { |
153 | layout->setDirection( QBoxLayout::TopToBottom ); | 153 | layout->setDirection( QBoxLayout::TopToBottom ); |
154 | } else { | 154 | } else { |
155 | layout->setDirection( QBoxLayout::LeftToRight ); | 155 | layout->setDirection( QBoxLayout::LeftToRight ); |
156 | } | 156 | } |
157 | } | 157 | } |
diff --git a/noncore/net/mail/viewmail.cpp b/noncore/net/mail/viewmail.cpp index f015228..8636957 100644 --- a/noncore/net/mail/viewmail.cpp +++ b/noncore/net/mail/viewmail.cpp | |||
@@ -264,53 +264,53 @@ void ViewMail::setMail( RecMail mail ) | |||
264 | m_recMail = mail; | 264 | m_recMail = mail; |
265 | 265 | ||
266 | m_mail[0] = mail.getFrom(); | 266 | m_mail[0] = mail.getFrom(); |
267 | m_mail[1] = mail.getSubject(); | 267 | m_mail[1] = mail.getSubject(); |
268 | m_mail[3] = mail.getDate(); | 268 | m_mail[3] = mail.getDate(); |
269 | m_mail[4] = mail.Msgid(); | 269 | m_mail[4] = mail.Msgid(); |
270 | 270 | ||
271 | m_mail2[0] = mail.To(); | 271 | m_mail2[0] = mail.To(); |
272 | m_mail2[1] = mail.CC(); | 272 | m_mail2[1] = mail.CC(); |
273 | m_mail2[2] = mail.Bcc(); | 273 | m_mail2[2] = mail.Bcc(); |
274 | 274 | ||
275 | setText(); | 275 | setText(); |
276 | } | 276 | } |
277 | 277 | ||
278 | 278 | ||
279 | 279 | ||
280 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) | 280 | ViewMail::ViewMail( QWidget *parent, const char *name, WFlags fl) |
281 | : ViewMailBase(parent, name, fl), _inLoop(false) | 281 | : ViewMailBase(parent, name, fl), _inLoop(false) |
282 | { | 282 | { |
283 | m_gotBody = false; | 283 | m_gotBody = false; |
284 | deleted = false; | 284 | deleted = false; |
285 | 285 | ||
286 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); | 286 | connect( reply, SIGNAL(activated()), SLOT(slotReply())); |
287 | connect( forward, SIGNAL(activated()), SLOT(slotForward())); | 287 | connect( forward, SIGNAL(activated()), SLOT(slotForward())); |
288 | connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail( ) ) ); | 288 | connect( deleteMail, SIGNAL( activated() ), SLOT( slotDeleteMail() ) ); |
289 | connect( showHtml, SIGNAL( toggled( bool ) ), SLOT( slotShowHtml( bool ) ) ); | 289 | connect( showHtml, SIGNAL( toggled(bool) ), SLOT( slotShowHtml(bool) ) ); |
290 | 290 | ||
291 | attachments->setEnabled(m_gotBody); | 291 | attachments->setEnabled(m_gotBody); |
292 | connect( attachments, SIGNAL( clicked ( QListViewItem *, const QPoint & , int ) ), SLOT( slotItemClicked( QListViewItem *, const QPoint & , int ) ) ); | 292 | connect( attachments, SIGNAL( clicked(QListViewItem*,const QPoint&, int) ), SLOT( slotItemClicked(QListViewItem*,const QPoint&, int) ) ); |
293 | 293 | ||
294 | readConfig(); | 294 | readConfig(); |
295 | attachments->setSorting(-1); | 295 | attachments->setSorting(-1); |
296 | } | 296 | } |
297 | 297 | ||
298 | void ViewMail::readConfig() | 298 | void ViewMail::readConfig() |
299 | { | 299 | { |
300 | Config cfg( "mail" ); | 300 | Config cfg( "mail" ); |
301 | cfg.setGroup( "Settings" ); | 301 | cfg.setGroup( "Settings" ); |
302 | m_showHtml = cfg.readBoolEntry( "showHtml", false ); | 302 | m_showHtml = cfg.readBoolEntry( "showHtml", false ); |
303 | showHtml->setOn( m_showHtml ); | 303 | showHtml->setOn( m_showHtml ); |
304 | } | 304 | } |
305 | 305 | ||
306 | void ViewMail::setText() | 306 | void ViewMail::setText() |
307 | { | 307 | { |
308 | 308 | ||
309 | QString toString; | 309 | QString toString; |
310 | QString ccString; | 310 | QString ccString; |
311 | QString bccString; | 311 | QString bccString; |
312 | 312 | ||
313 | for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) | 313 | for ( QStringList::Iterator it = ( m_mail2[0] ).begin(); it != ( m_mail2[0] ).end(); ++it ) |
314 | { | 314 | { |
315 | toString += (*it); | 315 | toString += (*it); |
316 | } | 316 | } |
diff --git a/noncore/net/opieftp/opieftp.cpp b/noncore/net/opieftp/opieftp.cpp index 4064549..4c39569 100644 --- a/noncore/net/opieftp/opieftp.cpp +++ b/noncore/net/opieftp/opieftp.cpp | |||
@@ -155,189 +155,189 @@ OpieFtp::OpieFtp( QWidget* parent, const char* name, WFlags fl) | |||
155 | // TabWidget->setTabShape(QTabWidget::Triangular); | 155 | // TabWidget->setTabShape(QTabWidget::Triangular); |
156 | 156 | ||
157 | tab = new QWidget( TabWidget, "tab" ); | 157 | tab = new QWidget( TabWidget, "tab" ); |
158 | tabLayout = new QGridLayout( tab ); | 158 | tabLayout = new QGridLayout( tab ); |
159 | tabLayout->setSpacing( 2); | 159 | tabLayout->setSpacing( 2); |
160 | tabLayout->setMargin( 2); | 160 | tabLayout->setMargin( 2); |
161 | 161 | ||
162 | Local_View = new QListView( tab, "Local_View" ); | 162 | Local_View = new QListView( tab, "Local_View" ); |
163 | // Local_View->setResizePolicy( QListView::AutoOneFit ); | 163 | // Local_View->setResizePolicy( QListView::AutoOneFit ); |
164 | Local_View->addColumn( tr("File"),150); | 164 | Local_View->addColumn( tr("File"),150); |
165 | Local_View->addColumn( tr("Date"),-1); | 165 | Local_View->addColumn( tr("Date"),-1); |
166 | Local_View->setColumnAlignment(1,QListView::AlignRight); | 166 | Local_View->setColumnAlignment(1,QListView::AlignRight); |
167 | Local_View->addColumn( tr("Size"),-1); | 167 | Local_View->addColumn( tr("Size"),-1); |
168 | Local_View->setColumnAlignment(2,QListView::AlignRight); | 168 | Local_View->setColumnAlignment(2,QListView::AlignRight); |
169 | Local_View->setAllColumnsShowFocus(TRUE); | 169 | Local_View->setAllColumnsShowFocus(TRUE); |
170 | 170 | ||
171 | Local_View->setMultiSelection( TRUE); | 171 | Local_View->setMultiSelection( TRUE); |
172 | Local_View->setSelectionMode(QListView::Extended); | 172 | Local_View->setSelectionMode(QListView::Extended); |
173 | Local_View->setFocusPolicy(QWidget::ClickFocus); | 173 | Local_View->setFocusPolicy(QWidget::ClickFocus); |
174 | 174 | ||
175 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); | 175 | QPEApplication::setStylusOperation( Local_View->viewport(),QPEApplication::RightOnHold); |
176 | 176 | ||
177 | tabLayout->addWidget( Local_View, 0, 0 ); | 177 | tabLayout->addWidget( Local_View, 0, 0 ); |
178 | 178 | ||
179 | connect( Local_View, SIGNAL( clicked( QListViewItem*)), | 179 | connect( Local_View, SIGNAL( clicked(QListViewItem*)), |
180 | this,SLOT( localListClicked(QListViewItem *)) ); | 180 | this,SLOT( localListClicked(QListViewItem*)) ); |
181 | // connect( Local_View, SIGNAL( doubleClicked( QListViewItem*)), | 181 | // connect( Local_View, SIGNAL( doubleClicked(QListViewItem*)), |
182 | // this,SLOT( localListClicked(QListViewItem *)) ); | 182 | // this,SLOT( localListClicked(QListViewItem*)) ); |
183 | connect( Local_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 183 | connect( Local_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
184 | this,SLOT( ListPressed(int, QListViewItem *, const QPoint&, int)) ); | 184 | this,SLOT( ListPressed(int,QListViewItem*,const QPoint&,int)) ); |
185 | 185 | ||
186 | TabWidget->insertTab( tab, tr( "Local" ) ); | 186 | TabWidget->insertTab( tab, tr( "Local" ) ); |
187 | 187 | ||
188 | tab_2 = new QWidget( TabWidget, "tab_2" ); | 188 | tab_2 = new QWidget( TabWidget, "tab_2" ); |
189 | tabLayout_2 = new QGridLayout( tab_2 ); | 189 | tabLayout_2 = new QGridLayout( tab_2 ); |
190 | tabLayout_2->setSpacing( 2); | 190 | tabLayout_2->setSpacing( 2); |
191 | tabLayout_2->setMargin( 2); | 191 | tabLayout_2->setMargin( 2); |
192 | 192 | ||
193 | Remote_View = new QListView( tab_2, "Remote_View" ); | 193 | Remote_View = new QListView( tab_2, "Remote_View" ); |
194 | Remote_View->addColumn( tr("File"),150); | 194 | Remote_View->addColumn( tr("File"),150); |
195 | Remote_View->addColumn( tr("Date"),-1); | 195 | Remote_View->addColumn( tr("Date"),-1); |
196 | // Remote_View->setColumnAlignment(1,QListView::AlignRight); | 196 | // Remote_View->setColumnAlignment(1,QListView::AlignRight); |
197 | Remote_View->addColumn( tr("Size"),-1); | 197 | Remote_View->addColumn( tr("Size"),-1); |
198 | Remote_View->setColumnAlignment(2,QListView::AlignRight); | 198 | Remote_View->setColumnAlignment(2,QListView::AlignRight); |
199 | Remote_View->setColumnAlignment(3,QListView::AlignCenter); | 199 | Remote_View->setColumnAlignment(3,QListView::AlignCenter); |
200 | Remote_View->addColumn( tr("Dir"),-1); | 200 | Remote_View->addColumn( tr("Dir"),-1); |
201 | Remote_View->setColumnAlignment(4,QListView::AlignRight); | 201 | Remote_View->setColumnAlignment(4,QListView::AlignRight); |
202 | Remote_View->setAllColumnsShowFocus(TRUE); | 202 | Remote_View->setAllColumnsShowFocus(TRUE); |
203 | 203 | ||
204 | Remote_View->setMultiSelection( FALSE); | 204 | Remote_View->setMultiSelection( FALSE); |
205 | Remote_View->setSelectionMode(QListView::Extended); | 205 | Remote_View->setSelectionMode(QListView::Extended); |
206 | Remote_View->setFocusPolicy(QWidget::ClickFocus); | 206 | Remote_View->setFocusPolicy(QWidget::ClickFocus); |
207 | 207 | ||
208 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); | 208 | QPEApplication::setStylusOperation( Remote_View->viewport(),QPEApplication::RightOnHold); |
209 | 209 | ||
210 | connect( Remote_View, SIGNAL( clicked( QListViewItem*)), | 210 | connect( Remote_View, SIGNAL( clicked(QListViewItem*)), |
211 | this,SLOT( remoteListClicked(QListViewItem *)) ); | 211 | this,SLOT( remoteListClicked(QListViewItem*)) ); |
212 | connect( Remote_View, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), | 212 | connect( Remote_View, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
213 | this,SLOT( RemoteListPressed(int, QListViewItem *, const QPoint&, int)) ); | 213 | this,SLOT( RemoteListPressed(int,QListViewItem*,const QPoint&,int)) ); |
214 | 214 | ||
215 | tabLayout_2->addWidget( Remote_View, 0, 0 ); | 215 | tabLayout_2->addWidget( Remote_View, 0, 0 ); |
216 | 216 | ||
217 | TabWidget->insertTab( tab_2, tr( "Remote" ) ); | 217 | TabWidget->insertTab( tab_2, tr( "Remote" ) ); |
218 | 218 | ||
219 | tab_3 = new QWidget( TabWidget, "tab_3" ); | 219 | tab_3 = new QWidget( TabWidget, "tab_3" ); |
220 | tabLayout_3 = new QGridLayout( tab_3 ); | 220 | tabLayout_3 = new QGridLayout( tab_3 ); |
221 | tabLayout_3->setSpacing( 2); | 221 | tabLayout_3->setSpacing( 2); |
222 | tabLayout_3->setMargin( 2); | 222 | tabLayout_3->setMargin( 2); |
223 | 223 | ||
224 | TextLabel1 = new QLabel( tab_3, "TextLabel1" ); | 224 | TextLabel1 = new QLabel( tab_3, "TextLabel1" ); |
225 | TextLabel1->setText( tr( "Username" ) ); | 225 | TextLabel1->setText( tr( "Username" ) ); |
226 | tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); | 226 | tabLayout_3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 ); |
227 | 227 | ||
228 | UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); | 228 | UsernameComboBox = new QComboBox( FALSE, tab_3, "UsernameComboBox" ); |
229 | UsernameComboBox->setEditable(TRUE); | 229 | UsernameComboBox->setEditable(TRUE); |
230 | tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); | 230 | tabLayout_3->addMultiCellWidget( UsernameComboBox, 1, 1, 0, 1 ); |
231 | 231 | ||
232 | connect( UsernameComboBox,SIGNAL(textChanged(const QString &)),this, | 232 | connect( UsernameComboBox,SIGNAL(textChanged(const QString&)),this, |
233 | SLOT( UsernameComboBoxEdited(const QString & ) )); | 233 | SLOT( UsernameComboBoxEdited(const QString&) )); |
234 | 234 | ||
235 | TextLabel2 = new QLabel( tab_3, "TextLabel2" ); | 235 | TextLabel2 = new QLabel( tab_3, "TextLabel2" ); |
236 | TextLabel2->setText( tr( "Password" ) ); | 236 | TextLabel2->setText( tr( "Password" ) ); |
237 | tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); | 237 | tabLayout_3->addMultiCellWidget( TextLabel2, 0, 0, 2, 3 ); |
238 | 238 | ||
239 | PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); | 239 | PasswordEdit = new QLineEdit( "", tab_3, "PasswordComboBox" ); |
240 | PasswordEdit->setEchoMode(QLineEdit::Password); | 240 | PasswordEdit->setEchoMode(QLineEdit::Password); |
241 | tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); | 241 | tabLayout_3->addMultiCellWidget( PasswordEdit, 1, 1, 2, 3 ); |
242 | 242 | ||
243 | connect( PasswordEdit,SIGNAL(textChanged(const QString &)),this, | 243 | connect( PasswordEdit,SIGNAL(textChanged(const QString&)),this, |
244 | SLOT( PasswordEditEdited(const QString & ) )); | 244 | SLOT( PasswordEditEdited(const QString&) )); |
245 | 245 | ||
246 | //PasswordEdit->setFixedWidth(85); | 246 | //PasswordEdit->setFixedWidth(85); |
247 | TextLabel3 = new QLabel( tab_3, "TextLabel3" ); | 247 | TextLabel3 = new QLabel( tab_3, "TextLabel3" ); |
248 | TextLabel3->setText( tr( "Remote server" ) ); | 248 | TextLabel3->setText( tr( "Remote server" ) ); |
249 | tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); | 249 | tabLayout_3->addMultiCellWidget( TextLabel3, 2, 2, 0, 1 ); |
250 | 250 | ||
251 | ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); | 251 | ServerComboBox = new QComboBox( FALSE, tab_3, "ServerComboBox" ); |
252 | ServerComboBox->setEditable(TRUE); | 252 | ServerComboBox->setEditable(TRUE); |
253 | tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); | 253 | tabLayout_3->addMultiCellWidget( ServerComboBox, 3, 3, 0, 1 ); |
254 | 254 | ||
255 | connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int ) )); | 255 | connect(ServerComboBox,SIGNAL(activated(int)),this,SLOT(serverComboSelected(int) )); |
256 | connect(ServerComboBox,SIGNAL(textChanged(const QString &)),this, | 256 | connect(ServerComboBox,SIGNAL(textChanged(const QString&)),this, |
257 | SLOT(serverComboEdited(const QString & ) )); | 257 | SLOT(serverComboEdited(const QString&) )); |
258 | 258 | ||
259 | QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); | 259 | QLabel *TextLabel5 = new QLabel( tab_3, "TextLabel5" ); |
260 | TextLabel5->setText( tr( "Remote path" ) ); | 260 | TextLabel5->setText( tr( "Remote path" ) ); |
261 | tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); | 261 | tabLayout_3->addMultiCellWidget( TextLabel5, 2, 2, 2, 3 ); |
262 | 262 | ||
263 | 263 | ||
264 | remotePath = new QLineEdit( "/", tab_3, "remotePath" ); | 264 | remotePath = new QLineEdit( "/", tab_3, "remotePath" ); |
265 | tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); | 265 | tabLayout_3->addMultiCellWidget( remotePath, 3, 3, 2, 3 ); |
266 | TextLabel4 = new QLabel( tab_3, "TextLabel4" ); | 266 | TextLabel4 = new QLabel( tab_3, "TextLabel4" ); |
267 | TextLabel4->setText( tr( "Port" ) ); | 267 | TextLabel4->setText( tr( "Port" ) ); |
268 | tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); | 268 | tabLayout_3->addMultiCellWidget( TextLabel4, 4, 4, 0, 1 ); |
269 | 269 | ||
270 | PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); | 270 | PortSpinBox = new QSpinBox( tab_3, "PortSpinBox" ); |
271 | PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); | 271 | PortSpinBox->setButtonSymbols( QSpinBox::UpDownArrows ); |
272 | PortSpinBox->setMaxValue(32786); | 272 | PortSpinBox->setMaxValue(32786); |
273 | tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); | 273 | tabLayout_3->addMultiCellWidget( PortSpinBox, 4, 4, 1, 1); |
274 | 274 | ||
275 | serverListView = new QListBox( tab_3, "ServerListView" ); | 275 | serverListView = new QListBox( tab_3, "ServerListView" ); |
276 | tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5); | 276 | tabLayout_3->addMultiCellWidget( serverListView , 5, 5, 0, 5); |
277 | 277 | ||
278 | connect( serverListView, SIGNAL( highlighted( const QString &)), | 278 | connect( serverListView, SIGNAL( highlighted(const QString&)), |
279 | this,SLOT( serverListClicked( const QString &) ) ); | 279 | this,SLOT( serverListClicked(const QString&) ) ); |
280 | 280 | ||
281 | connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); | 281 | connectServerBtn = new QPushButton( tr("Connect"), tab_3 , "ConnectButton" ); |
282 | tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); | 282 | tabLayout_3->addMultiCellWidget( connectServerBtn, 6, 6, 0, 1); |
283 | connectServerBtn->setToggleButton(TRUE); | 283 | connectServerBtn->setToggleButton(TRUE); |
284 | connect(connectServerBtn,SIGNAL( toggled( bool)),SLOT( connectorBtnToggled(bool) )); | 284 | connect(connectServerBtn,SIGNAL( toggled(bool)),SLOT( connectorBtnToggled(bool) )); |
285 | 285 | ||
286 | newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); | 286 | newServerButton= new QPushButton( tr("Add"), tab_3 , "NewServerButton" ); |
287 | tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); | 287 | tabLayout_3->addMultiCellWidget( newServerButton, 6, 6, 2, 2); |
288 | connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() )); | 288 | connect( newServerButton,SIGNAL( clicked()),SLOT( NewServer() )); |
289 | 289 | ||
290 | QPushButton *deleteServerBtn; | 290 | QPushButton *deleteServerBtn; |
291 | deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); | 291 | deleteServerBtn = new QPushButton( tr("Delete"), tab_3 , "OpenButton" ); |
292 | tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); | 292 | tabLayout_3->addMultiCellWidget( deleteServerBtn, 6, 6, 3, 3); |
293 | 293 | ||
294 | connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer())); | 294 | connect(deleteServerBtn,SIGNAL(clicked()),SLOT(deleteServer())); |
295 | 295 | ||
296 | 296 | ||
297 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); | 297 | QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); |
298 | tabLayout_3->addItem( spacer, 5, 0 ); | 298 | tabLayout_3->addItem( spacer, 5, 0 ); |
299 | 299 | ||
300 | TabWidget->insertTab( tab_3, tr( "Config" ) ); | 300 | TabWidget->insertTab( tab_3, tr( "Config" ) ); |
301 | 301 | ||
302 | #if 0 | 302 | #if 0 |
303 | connect(TabWidget,SIGNAL(currentChanged(QWidget *)), | 303 | connect(TabWidget,SIGNAL(currentChanged(QWidget*)), |
304 | this,SLOT(tabChanged(QWidget*))); | 304 | this,SLOT(tabChanged(QWidget*))); |
305 | #endif | 305 | #endif |
306 | 306 | ||
307 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); | 307 | currentDir.setFilter( QDir::Files | QDir::Dirs/* | QDir::Hidden*/ | QDir::All); |
308 | currentDir.setPath( QDir::currentDirPath()); | 308 | currentDir.setPath( QDir::currentDirPath()); |
309 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); | 309 | // currentDir.setSorting(/* QDir::Size*/ /*| QDir::Reversed | */QDir::DirsFirst); |
310 | 310 | ||
311 | currentPathCombo = new QComboBox( FALSE, view, "currentPathCombo" ); | 311 | currentPathCombo = new QComboBox( FALSE, view, "currentPathCombo" ); |
312 | layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); | 312 | layout->addMultiCellWidget( currentPathCombo, 3, 3, 0, 4); |
313 | currentPathCombo ->setFixedWidth(220); | 313 | currentPathCombo ->setFixedWidth(220); |
314 | currentPathCombo->setEditable(TRUE); | 314 | currentPathCombo->setEditable(TRUE); |
315 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); | 315 | currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); |
316 | 316 | ||
317 | #if 0 | 317 | #if 0 |
318 | connect( currentPathCombo, SIGNAL( activated( const QString & ) ), | 318 | connect( currentPathCombo, SIGNAL( activated(const QString&) ), |
319 | this, SLOT( currentPathComboActivated( const QString & ) ) ); | 319 | this, SLOT( currentPathComboActivated(const QString&) ) ); |
320 | 320 | ||
321 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), | 321 | connect( currentPathCombo->lineEdit(),SIGNAL(returnPressed()), |
322 | this,SLOT(currentPathComboChanged())); | 322 | this,SLOT(currentPathComboChanged())); |
323 | #endif | 323 | #endif |
324 | ProgressBar = new QProgressBar( view, "ProgressBar" ); | 324 | ProgressBar = new QProgressBar( view, "ProgressBar" ); |
325 | layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); | 325 | layout->addMultiCellWidget( ProgressBar, 4, 4, 0, 4); |
326 | ProgressBar->setMaximumHeight(10); | 326 | ProgressBar->setMaximumHeight(10); |
327 | filterStr="*"; | 327 | filterStr="*"; |
328 | b=FALSE; | 328 | b=FALSE; |
329 | #if 0 | 329 | #if 0 |
330 | populateLocalView(); | 330 | populateLocalView(); |
331 | #endif | 331 | #endif |
332 | readConfig(); | 332 | readConfig(); |
333 | 333 | ||
334 | // ServerComboBox->setCurrentItem(currentServerConfig); | 334 | // ServerComboBox->setCurrentItem(currentServerConfig); |
335 | 335 | ||
336 | TabWidget->setCurrentPage(2); | 336 | TabWidget->setCurrentPage(2); |
337 | qDebug("Constructor done"); | 337 | qDebug("Constructor done"); |
338 | } | 338 | } |
339 | 339 | ||
340 | OpieFtp::~OpieFtp() | 340 | OpieFtp::~OpieFtp() |
341 | { | 341 | { |
342 | } | 342 | } |
343 | 343 | ||
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index b0771f6..667e977 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp | |||
@@ -7,49 +7,49 @@ | |||
7 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 7 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
8 | m_mainWindow = mainWindow; | 8 | m_mainWindow = mainWindow; |
9 | m_parentTab = parentTab; | 9 | m_parentTab = parentTab; |
10 | m_channel = channel; | 10 | m_channel = channel; |
11 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); | 11 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); |
12 | QHBox *hbox = new QHBox(this); | 12 | QHBox *hbox = new QHBox(this); |
13 | m_textview = new QTextView(hbox); | 13 | m_textview = new QTextView(hbox); |
14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
16 | m_listVisible = TRUE; | 16 | m_listVisible = TRUE; |
17 | m_listButton = new QPushButton(">", m_textview); | 17 | m_listButton = new QPushButton(">", m_textview); |
18 | m_textview->setCornerWidget(m_listButton); | 18 | m_textview->setCornerWidget(m_listButton); |
19 | m_textview->setTextFormat(RichText); | 19 | m_textview->setTextFormat(RichText); |
20 | QWhatsThis::add(m_textview, tr("Channel discussion")); | 20 | QWhatsThis::add(m_textview, tr("Channel discussion")); |
21 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); | 21 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); |
22 | m_list = new IRCChannelList(m_channel, hbox); | 22 | m_list = new IRCChannelList(m_channel, hbox); |
23 | m_list->update(); | 23 | m_list->update(); |
24 | m_list->setMaximumWidth(LISTWIDTH); | 24 | m_list->setMaximumWidth(LISTWIDTH); |
25 | m_field = new IRCHistoryLineEdit(this); | 25 | m_field = new IRCHistoryLineEdit(this); |
26 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); | 26 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); |
27 | m_popup = new QPopupMenu(m_list); | 27 | m_popup = new QPopupMenu(m_list); |
28 | m_lines = 0; | 28 | m_lines = 0; |
29 | /* Required so that embedded-style "right" clicks work */ | 29 | /* Required so that embedded-style "right" clicks work */ |
30 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); | 30 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); |
31 | connect(m_list, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint&)), this, SLOT(mouseButtonPressed(int, QListBoxItem *, const QPoint &))); | 31 | connect(m_list, SIGNAL(mouseButtonPressed(int,QListBoxItem*,const QPoint&)), this, SLOT(mouseButtonPressed(int,QListBoxItem*,const QPoint&))); |
32 | /* Construct the popup menu */ | 32 | /* Construct the popup menu */ |
33 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); | 33 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); |
34 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); | 34 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); |
35 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); | 35 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); |
36 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); | 36 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); |
37 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); | 37 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); |
38 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); | 38 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); |
39 | connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); | 39 | connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); |
40 | m_layout->add(hbox); | 40 | m_layout->add(hbox); |
41 | hbox->show(); | 41 | hbox->show(); |
42 | m_layout->add(m_field); | 42 | m_layout->add(m_field); |
43 | m_field->setFocus(); | 43 | m_field->setFocus(); |
44 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 44 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
45 | settingsChanged(); | 45 | settingsChanged(); |
46 | } | 46 | } |
47 | 47 | ||
48 | void IRCChannelTab::scrolling(){ | 48 | void IRCChannelTab::scrolling(){ |
49 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 49 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
50 | } | 50 | } |
51 | 51 | ||
52 | void IRCChannelTab::appendText(QString text) { | 52 | void IRCChannelTab::appendText(QString text) { |
53 | /* not using append because it creates layout problems */ | 53 | /* not using append because it creates layout problems */ |
54 | QString txt = m_textview->text() + text + "\n"; | 54 | QString txt = m_textview->text() + text + "\n"; |
55 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 55 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp index 6404d71..3b176d0 100644 --- a/noncore/net/opieirc/ircsession.cpp +++ b/noncore/net/opieirc/ircsession.cpp | |||
@@ -1,33 +1,33 @@ | |||
1 | #include "ircsession.h" | 1 | #include "ircsession.h" |
2 | #include "ircmessageparser.h" | 2 | #include "ircmessageparser.h" |
3 | #include "ircversion.h" | 3 | #include "ircversion.h" |
4 | 4 | ||
5 | IRCSession::IRCSession(IRCServer *server) { | 5 | IRCSession::IRCSession(IRCServer *server) { |
6 | m_server = server; | 6 | m_server = server; |
7 | m_connection = new IRCConnection(m_server); | 7 | m_connection = new IRCConnection(m_server); |
8 | m_parser = new IRCMessageParser(this); | 8 | m_parser = new IRCMessageParser(this); |
9 | connect(m_connection, SIGNAL(messageArrived(IRCMessage *)), this, SLOT(handleMessage(IRCMessage *))); | 9 | connect(m_connection, SIGNAL(messageArrived(IRCMessage*)), this, SLOT(handleMessage(IRCMessage*))); |
10 | connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); | 10 | connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); |
11 | connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); | 11 | connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); |
12 | } | 12 | } |
13 | 13 | ||
14 | IRCSession::~IRCSession() { | 14 | IRCSession::~IRCSession() { |
15 | /* We want this to get deleted automatically */ | 15 | /* We want this to get deleted automatically */ |
16 | m_channels.setAutoDelete(TRUE); | 16 | m_channels.setAutoDelete(TRUE); |
17 | m_people.setAutoDelete(TRUE); | 17 | m_people.setAutoDelete(TRUE); |
18 | 18 | ||
19 | delete m_parser; | 19 | delete m_parser; |
20 | delete m_connection; | 20 | delete m_connection; |
21 | } | 21 | } |
22 | 22 | ||
23 | void IRCSession::beginSession() { | 23 | void IRCSession::beginSession() { |
24 | m_connection->doConnect(); | 24 | m_connection->doConnect(); |
25 | } | 25 | } |
26 | 26 | ||
27 | void IRCSession::join(QString channelname) { | 27 | void IRCSession::join(QString channelname) { |
28 | m_connection->sendLine("JOIN "+channelname); | 28 | m_connection->sendLine("JOIN "+channelname); |
29 | } | 29 | } |
30 | 30 | ||
31 | void IRCSession::quit(){ | 31 | void IRCSession::quit(){ |
32 | m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); | 32 | m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); |
33 | } | 33 | } |
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp index 7414154..0923a11 100644 --- a/noncore/net/opieirc/mainwindow.cpp +++ b/noncore/net/opieirc/mainwindow.cpp | |||
@@ -1,78 +1,78 @@ | |||
1 | #include <qmenubar.h> | 1 | #include <qmenubar.h> |
2 | #include <qpe/resource.h> | 2 | #include <qpe/resource.h> |
3 | #include <qwhatsthis.h> | 3 | #include <qwhatsthis.h> |
4 | 4 | ||
5 | #include "mainwindow.h" | 5 | #include "mainwindow.h" |
6 | #include "ircservertab.h" | 6 | #include "ircservertab.h" |
7 | #include "ircserverlist.h" | 7 | #include "ircserverlist.h" |
8 | #include "ircsettings.h" | 8 | #include "ircsettings.h" |
9 | 9 | ||
10 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { | 10 | MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { |
11 | setCaption(tr("IRC Client")); | 11 | setCaption(tr("IRC Client")); |
12 | m_tabWidget = new IRCTabWidget(this); | 12 | m_tabWidget = new IRCTabWidget(this); |
13 | QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); | 13 | QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here")); |
14 | connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *))); | 14 | connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(selected(QWidget*))); |
15 | setCentralWidget(m_tabWidget); | 15 | setCentralWidget(m_tabWidget); |
16 | setToolBarsMovable(FALSE); | 16 | setToolBarsMovable(FALSE); |
17 | QMenuBar *menuBar = new QMenuBar(this); | 17 | QMenuBar *menuBar = new QMenuBar(this); |
18 | QPopupMenu *irc = new QPopupMenu(this); | 18 | QPopupMenu *irc = new QPopupMenu(this); |
19 | menuBar->insertItem(tr("IRC"), irc); | 19 | menuBar->insertItem(tr("IRC"), irc); |
20 | QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); | 20 | QAction *a = new QAction(tr("New connection"), Resource::loadPixmap("pass"), QString::null, 0, this, 0); |
21 | connect(a, SIGNAL(activated()), this, SLOT(newConnection())); | 21 | connect(a, SIGNAL(activated()), this, SLOT(newConnection())); |
22 | a->setWhatsThis(tr("Create a new connection to an IRC server")); | 22 | a->setWhatsThis(tr("Create a new connection to an IRC server")); |
23 | a->addTo(irc); | 23 | a->addTo(irc); |
24 | a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); | 24 | a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); |
25 | a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); | 25 | a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance")); |
26 | connect(a, SIGNAL(activated()), this, SLOT(settings())); | 26 | connect(a, SIGNAL(activated()), this, SLOT(settings())); |
27 | a->addTo(irc); | 27 | a->addTo(irc); |
28 | loadSettings(); | 28 | loadSettings(); |
29 | } | 29 | } |
30 | 30 | ||
31 | /*IRCTabWidget MainWindow::getTabWidget(){ | 31 | /*IRCTabWidget MainWindow::getTabWidget(){ |
32 | return m_tabWidget; | 32 | return m_tabWidget; |
33 | } */ | 33 | } */ |
34 | 34 | ||
35 | void MainWindow::loadSettings() { | 35 | void MainWindow::loadSettings() { |
36 | Config config("OpieIRC"); | 36 | Config config("OpieIRC"); |
37 | config.setGroup("OpieIRC"); | 37 | config.setGroup("OpieIRC"); |
38 | IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); | 38 | IRCTab::m_backgroundColor = config.readEntry("BackgroundColor", "#FFFFFF"); |
39 | IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); | 39 | IRCTab::m_textColor = config.readEntry("TextColor", "#000000"); |
40 | IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); | 40 | IRCTab::m_errorColor = config.readEntry("ErrorColor", "#FF0000"); |
41 | IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); | 41 | IRCTab::m_selfColor = config.readEntry("SelfColor", "#CC0000"); |
42 | IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); | 42 | IRCTab::m_otherColor = config.readEntry("OtherColor", "#0000BB"); |
43 | IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); | 43 | IRCTab::m_serverColor = config.readEntry("ServerColor", "#0000FF"); |
44 | IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); | 44 | IRCTab::m_notificationColor = config.readEntry("NotificationColor", "#AA3300"); |
45 | IRCTab::m_maxLines = config.readNumEntry("Lines", 100); | 45 | IRCTab::m_maxLines = config.readNumEntry("Lines", 100); |
46 | } | 46 | } |
47 | 47 | ||
48 | void MainWindow::selected(QWidget *) { | 48 | void MainWindow::selected(QWidget *) { |
49 | m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); | 49 | m_tabWidget->setTabColor(m_tabWidget->currentPageIndex(), black); |
50 | emit updateScroll(); | 50 | emit updateScroll(); |
51 | } | 51 | } |
52 | 52 | ||
53 | void MainWindow::addTab(IRCTab *tab) { | 53 | void MainWindow::addTab(IRCTab *tab) { |
54 | connect(tab, SIGNAL(changed(IRCTab *)), this, SLOT(changeEvent(IRCTab *))); | 54 | connect(tab, SIGNAL(changed(IRCTab*)), this, SLOT(changeEvent(IRCTab*))); |
55 | m_tabWidget->addTab(tab, tab->title()); | 55 | m_tabWidget->addTab(tab, tab->title()); |
56 | m_tabWidget->showPage(tab); | 56 | m_tabWidget->showPage(tab); |
57 | tab->setID(m_tabWidget->currentPageIndex()); | 57 | tab->setID(m_tabWidget->currentPageIndex()); |
58 | m_tabs.append(tab); | 58 | m_tabs.append(tab); |
59 | } | 59 | } |
60 | 60 | ||
61 | void MainWindow::changeEvent(IRCTab *tab) { | 61 | void MainWindow::changeEvent(IRCTab *tab) { |
62 | if (tab->id() != m_tabWidget->currentPageIndex()) | 62 | if (tab->id() != m_tabWidget->currentPageIndex()) |
63 | m_tabWidget->setTabColor(tab->id(), blue); | 63 | m_tabWidget->setTabColor(tab->id(), blue); |
64 | } | 64 | } |
65 | 65 | ||
66 | void MainWindow::killTab(IRCTab *tab) { | 66 | void MainWindow::killTab(IRCTab *tab) { |
67 | m_tabWidget->removePage(tab); | 67 | m_tabWidget->removePage(tab); |
68 | m_tabs.remove(tab); | 68 | m_tabs.remove(tab); |
69 | /* there might be nicer ways to do this .. */ | 69 | /* there might be nicer ways to do this .. */ |
70 | delete tab; | 70 | delete tab; |
71 | } | 71 | } |
72 | 72 | ||
73 | void MainWindow::newConnection() { | 73 | void MainWindow::newConnection() { |
74 | IRCServerList list(this, "ServerList", TRUE); | 74 | IRCServerList list(this, "ServerList", TRUE); |
75 | if (list.exec() == QDialog::Accepted && list.hasServer()) { | 75 | if (list.exec() == QDialog::Accepted && list.hasServer()) { |
76 | IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget); | 76 | IRCServerTab *serverTab = new IRCServerTab(list.server(), this, m_tabWidget); |
77 | addTab(serverTab); | 77 | addTab(serverTab); |
78 | serverTab->doConnect(); | 78 | serverTab->doConnect(); |
diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index 6b6d247..c3850eb 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp | |||
@@ -18,50 +18,50 @@ StartDunConnection::StartDunConnection( QString mac ) { | |||
18 | m_mac = mac; | 18 | m_mac = mac; |
19 | setConnectionType(); | 19 | setConnectionType(); |
20 | } | 20 | } |
21 | 21 | ||
22 | void StartDunConnection::setName( QString name ) { | 22 | void StartDunConnection::setName( QString name ) { |
23 | m_name = name; | 23 | m_name = name; |
24 | } | 24 | } |
25 | 25 | ||
26 | QString StartDunConnection::name() { | 26 | QString StartDunConnection::name() { |
27 | return m_name; | 27 | return m_name; |
28 | } | 28 | } |
29 | 29 | ||
30 | void StartDunConnection::setConnectionType() { | 30 | void StartDunConnection::setConnectionType() { |
31 | m_connectionType = Pan; | 31 | m_connectionType = Pan; |
32 | } | 32 | } |
33 | 33 | ||
34 | StartConnection::ConnectionType StartDunConnection::type() { | 34 | StartConnection::ConnectionType StartDunConnection::type() { |
35 | return m_connectionType; | 35 | return m_connectionType; |
36 | } | 36 | } |
37 | 37 | ||
38 | void StartDunConnection::start() { | 38 | void StartDunConnection::start() { |
39 | m_dunConnect = new OProcess(); | 39 | m_dunConnect = new OProcess(); |
40 | *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; | 40 | *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; |
41 | 41 | ||
42 | connect( m_dunConnect, SIGNAL( processExited( OProcess* ) ) , | 42 | connect( m_dunConnect, SIGNAL( processExited(OProcess*) ) , |
43 | this, SLOT( slotExited( OProcess* ) ) ); | 43 | this, SLOT( slotExited(OProcess*) ) ); |
44 | connect( m_dunConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), | 44 | connect( m_dunConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), |
45 | this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); | 45 | this, SLOT( slotStdOut(OProcess*,char*,int) ) ); |
46 | if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 46 | if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
47 | qWarning( "could not start" ); | 47 | qWarning( "could not start" ); |
48 | delete m_dunConnect; | 48 | delete m_dunConnect; |
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | 52 | ||
53 | void StartDunConnection::slotExited( OProcess* proc ) { | 53 | void StartDunConnection::slotExited( OProcess* proc ) { |
54 | delete m_dunConnect; | 54 | delete m_dunConnect; |
55 | } | 55 | } |
56 | 56 | ||
57 | void StartDunConnection::slotStdOut(OProcess* proc, char* chars, int len) | 57 | void StartDunConnection::slotStdOut(OProcess* proc, char* chars, int len) |
58 | {} | 58 | {} |
59 | 59 | ||
60 | 60 | ||
61 | void StartDunConnection::stop() { | 61 | void StartDunConnection::stop() { |
62 | if ( m_dunConnect ) { | 62 | if ( m_dunConnect ) { |
63 | delete m_dunConnect; | 63 | delete m_dunConnect; |
64 | m_dunConnect = 0l; | 64 | m_dunConnect = 0l; |
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index 6e0ab7e..a42b407 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp | |||
@@ -19,64 +19,64 @@ StartPanConnection::StartPanConnection( QString mac ) { | |||
19 | setConnectionType(); | 19 | setConnectionType(); |
20 | } | 20 | } |
21 | 21 | ||
22 | void StartPanConnection::setName( QString name ) { | 22 | void StartPanConnection::setName( QString name ) { |
23 | m_name = name; | 23 | m_name = name; |
24 | } | 24 | } |
25 | 25 | ||
26 | QString StartPanConnection::name() { | 26 | QString StartPanConnection::name() { |
27 | return m_name; | 27 | return m_name; |
28 | } | 28 | } |
29 | 29 | ||
30 | void StartPanConnection::setConnectionType() { | 30 | void StartPanConnection::setConnectionType() { |
31 | m_connectionType = Pan; | 31 | m_connectionType = Pan; |
32 | } | 32 | } |
33 | 33 | ||
34 | StartConnection::ConnectionType StartPanConnection::type() { | 34 | StartConnection::ConnectionType StartPanConnection::type() { |
35 | return m_connectionType; | 35 | return m_connectionType; |
36 | } | 36 | } |
37 | 37 | ||
38 | void StartPanConnection::start() { | 38 | void StartPanConnection::start() { |
39 | m_panConnect = new OProcess(); | 39 | m_panConnect = new OProcess(); |
40 | qDebug( "IM START " + m_mac ); | 40 | qDebug( "IM START " + m_mac ); |
41 | *m_panConnect << "pand" << "--connect" << m_mac; | 41 | *m_panConnect << "pand" << "--connect" << m_mac; |
42 | 42 | ||
43 | connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) , | 43 | connect( m_panConnect, SIGNAL( processExited(OProcess*) ) , |
44 | this, SLOT( slotExited( OProcess* ) ) ); | 44 | this, SLOT( slotExited(OProcess*) ) ); |
45 | connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), | 45 | connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), |
46 | this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); | 46 | this, SLOT( slotStdOut(OProcess*,char*,int) ) ); |
47 | if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 47 | if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
48 | qWarning( "could not start" ); | 48 | qWarning( "could not start" ); |
49 | delete m_panConnect; | 49 | delete m_panConnect; |
50 | } | 50 | } |
51 | } | 51 | } |
52 | 52 | ||
53 | 53 | ||
54 | void StartPanConnection::slotExited( OProcess* proc ) { | 54 | void StartPanConnection::slotExited( OProcess* proc ) { |
55 | delete m_panConnect; | 55 | delete m_panConnect; |
56 | m_panConnect = 0l; | 56 | m_panConnect = 0l; |
57 | } | 57 | } |
58 | 58 | ||
59 | void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len) | 59 | void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len) |
60 | {} | 60 | {} |
61 | 61 | ||
62 | 62 | ||
63 | void StartPanConnection::stop() { | 63 | void StartPanConnection::stop() { |
64 | if ( m_panConnect ) { | 64 | if ( m_panConnect ) { |
65 | delete m_panConnect; | 65 | delete m_panConnect; |
66 | m_panConnect = 0l; | 66 | m_panConnect = 0l; |
67 | } | 67 | } |
68 | m_panConnect = new OProcess(); | 68 | m_panConnect = new OProcess(); |
69 | qDebug("IM STOP " + m_mac); | 69 | qDebug("IM STOP " + m_mac); |
70 | 70 | ||
71 | *m_panConnect << "pand" << "--kill" << m_mac; | 71 | *m_panConnect << "pand" << "--kill" << m_mac; |
72 | 72 | ||
73 | connect( m_panConnect, SIGNAL( processExited( OProcess* ) ) , | 73 | connect( m_panConnect, SIGNAL( processExited(OProcess*) ) , |
74 | this, SLOT( slotExited( OProcess* ) ) ); | 74 | this, SLOT( slotExited(OProcess*) ) ); |
75 | connect( m_panConnect, SIGNAL( receivedStdout( OProcess*, char*, int ) ), | 75 | connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), |
76 | this, SLOT( slotStdOut( OProcess*, char*, int ) ) ); | 76 | this, SLOT( slotStdOut(OProcess*,char*,int) ) ); |
77 | if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { | 77 | if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { |
78 | qWarning( "could not stop" ); | 78 | qWarning( "could not stop" ); |
79 | delete m_panConnect; | 79 | delete m_panConnect; |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 0ea45d2..29030ab 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -44,62 +44,62 @@ | |||
44 | #include <qlistview.h> | 44 | #include <qlistview.h> |
45 | #include <qdir.h> | 45 | #include <qdir.h> |
46 | #include <qpopupmenu.h> | 46 | #include <qpopupmenu.h> |
47 | #include <qtimer.h> | 47 | #include <qtimer.h> |
48 | #include <qlist.h> | 48 | #include <qlist.h> |
49 | 49 | ||
50 | /* STD */ | 50 | /* STD */ |
51 | #include <remotedevice.h> | 51 | #include <remotedevice.h> |
52 | #include <services.h> | 52 | #include <services.h> |
53 | #include <stdlib.h> | 53 | #include <stdlib.h> |
54 | 54 | ||
55 | using namespace OpieTooth; | 55 | using namespace OpieTooth; |
56 | 56 | ||
57 | BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | 57 | BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) |
58 | : BluetoothBase( parent, name, fl ) | 58 | : BluetoothBase( parent, name, fl ) |
59 | { | 59 | { |
60 | 60 | ||
61 | m_localDevice = new Manager( "hci0" ); | 61 | m_localDevice = new Manager( "hci0" ); |
62 | 62 | ||
63 | connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); | 63 | connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); |
64 | connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); | 64 | connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); |
65 | 65 | ||
66 | connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); | 66 | connect( rfcommBindButton, SIGNAL( clicked() ), this, SLOT( rfcommDialog() ) ); |
67 | // not good since lib is async | 67 | // not good since lib is async |
68 | // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), | 68 | // connect( ListView2, SIGNAL( expanded(QListViewItem*) ), |
69 | // this, SLOT( addServicesToDevice( QListViewItem * ) ) ); | 69 | // this, SLOT( addServicesToDevice(QListViewItem*) ) ); |
70 | connect( ListView2, SIGNAL( clicked( QListViewItem* )), | 70 | connect( ListView2, SIGNAL( clicked(QListViewItem*)), |
71 | this, SLOT( startServiceActionClicked( QListViewItem* ) ) ); | 71 | this, SLOT( startServiceActionClicked(QListViewItem*) ) ); |
72 | connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ), | 72 | connect( ListView2, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), |
73 | this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) ); | 73 | this, SLOT(startServiceActionHold(QListViewItem*,const QPoint&,int) ) ); |
74 | connect( m_localDevice , SIGNAL( foundServices( const QString& , Services::ValueList ) ), | 74 | connect( m_localDevice , SIGNAL( foundServices(const QString&,Services::ValueList) ), |
75 | this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); | 75 | this, SLOT( addServicesToDevice(const QString&,Services::ValueList) ) ); |
76 | connect( m_localDevice, SIGNAL( available( const QString&, bool ) ), | 76 | connect( m_localDevice, SIGNAL( available(const QString&,bool) ), |
77 | this, SLOT( deviceActive( const QString& , bool ) ) ); | 77 | this, SLOT( deviceActive(const QString&,bool) ) ); |
78 | connect( m_localDevice, SIGNAL( connections( ConnectionState::ValueList ) ), | 78 | connect( m_localDevice, SIGNAL( connections(ConnectionState::ValueList) ), |
79 | this, SLOT( addConnectedDevices( ConnectionState::ValueList ) ) ); | 79 | this, SLOT( addConnectedDevices(ConnectionState::ValueList) ) ); |
80 | connect( m_localDevice, SIGNAL( signalStrength( const QString&, const QString& ) ), | 80 | connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ), |
81 | this, SLOT( addSignalStrength( const QString&, const QString& ) ) ); | 81 | this, SLOT( addSignalStrength(const QString&,const QString&) ) ); |
82 | 82 | ||
83 | 83 | ||
84 | // let hold be rightButtonClicked() | 84 | // let hold be rightButtonClicked() |
85 | QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold); | 85 | QPEApplication::setStylusOperation( ListView2->viewport(), QPEApplication::RightOnHold); |
86 | QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold); | 86 | QPEApplication::setStylusOperation( ListView4->viewport(), QPEApplication::RightOnHold); |
87 | 87 | ||
88 | //Load all icons needed | 88 | //Load all icons needed |
89 | m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); | 89 | m_offPix = Resource::loadPixmap( "opietooth/notconnected" ); |
90 | m_onPix = Resource::loadPixmap( "opietooth/connected" ); | 90 | m_onPix = Resource::loadPixmap( "opietooth/connected" ); |
91 | m_findPix = Resource::loadPixmap( "opietooth/find" ); | 91 | m_findPix = Resource::loadPixmap( "opietooth/find" ); |
92 | 92 | ||
93 | QPalette pal = this->palette(); | 93 | QPalette pal = this->palette(); |
94 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); | 94 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); |
95 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); | 95 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); |
96 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); | 96 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); |
97 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); | 97 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); |
98 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); | 98 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); |
99 | this->setPalette( pal ); | 99 | this->setPalette( pal ); |
100 | 100 | ||
101 | setCaption( tr( "Bluetooth Manager" ) ); | 101 | setCaption( tr( "Bluetooth Manager" ) ); |
102 | 102 | ||
103 | readConfig(); | 103 | readConfig(); |
104 | initGui(); | 104 | initGui(); |
105 | 105 | ||
@@ -616,50 +616,50 @@ void BlueBase::deviceActive( const QString& device, bool connected ) | |||
616 | return; | 616 | return; |
617 | 617 | ||
618 | BTDeviceItem* deviceItem = it.data(); | 618 | BTDeviceItem* deviceItem = it.data(); |
619 | 619 | ||
620 | 620 | ||
621 | if ( connected ) | 621 | if ( connected ) |
622 | { | 622 | { |
623 | deviceItem->setPixmap( 1, m_onPix ); | 623 | deviceItem->setPixmap( 1, m_onPix ); |
624 | } | 624 | } |
625 | else | 625 | else |
626 | { | 626 | { |
627 | deviceItem->setPixmap( 1, m_offPix ); | 627 | deviceItem->setPixmap( 1, m_offPix ); |
628 | } | 628 | } |
629 | m_deviceList.remove( it ); | 629 | m_deviceList.remove( it ); |
630 | } | 630 | } |
631 | 631 | ||
632 | 632 | ||
633 | /** | 633 | /** |
634 | * Open the "scan for devices" dialog | 634 | * Open the "scan for devices" dialog |
635 | */ | 635 | */ |
636 | void BlueBase::startScan() | 636 | void BlueBase::startScan() |
637 | { | 637 | { |
638 | ScanDialog *scan = new ScanDialog( this, "ScanDialog", | 638 | ScanDialog *scan = new ScanDialog( this, "ScanDialog", |
639 | true, WDestructiveClose ); | 639 | true, WDestructiveClose ); |
640 | QObject::connect( scan, SIGNAL( selectedDevices( const QValueList<RemoteDevice>& ) ), | 640 | QObject::connect( scan, SIGNAL( selectedDevices(const QValueList<RemoteDevice>&) ), |
641 | this, SLOT( addSearchedDevices( const QValueList<RemoteDevice>& ) ) ); | 641 | this, SLOT( addSearchedDevices(const QValueList<RemoteDevice>&) ) ); |
642 | 642 | ||
643 | QPEApplication::showDialog( scan ); | 643 | QPEApplication::showDialog( scan ); |
644 | } | 644 | } |
645 | 645 | ||
646 | 646 | ||
647 | /** | 647 | /** |
648 | * Set the informations about the local device in information Tab | 648 | * Set the informations about the local device in information Tab |
649 | */ | 649 | */ |
650 | void BlueBase::setInfo() | 650 | void BlueBase::setInfo() |
651 | { | 651 | { |
652 | StatusLabel->setText( status() ); | 652 | StatusLabel->setText( status() ); |
653 | } | 653 | } |
654 | 654 | ||
655 | 655 | ||
656 | /** | 656 | /** |
657 | * Decontructor | 657 | * Decontructor |
658 | */ | 658 | */ |
659 | BlueBase::~BlueBase() | 659 | BlueBase::~BlueBase() |
660 | { | 660 | { |
661 | writeSavedDevices(); | 661 | writeSavedDevices(); |
662 | delete m_iconLoader; | 662 | delete m_iconLoader; |
663 | } | 663 | } |
664 | 664 | ||
665 | 665 | ||
diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index 15973d4..46a0e3d 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp | |||
@@ -24,49 +24,49 @@ ObexDialog::ObexDialog( QWidget* parent, const char* name, bool modal, WFlags f | |||
24 | m_device = device; | 24 | m_device = device; |
25 | 25 | ||
26 | layout = new QVBoxLayout( this ); | 26 | layout = new QVBoxLayout( this ); |
27 | 27 | ||
28 | QLabel* info = new QLabel( this ); | 28 | QLabel* info = new QLabel( this ); |
29 | info->setText( tr("Which file should be beamed?") ); | 29 | info->setText( tr("Which file should be beamed?") ); |
30 | 30 | ||
31 | cmdLine = new QLineEdit( this ); | 31 | cmdLine = new QLineEdit( this ); |
32 | 32 | ||
33 | QPushButton *browserButton; | 33 | QPushButton *browserButton; |
34 | browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); | 34 | browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); |
35 | connect( browserButton, SIGNAL(released() ), this , SLOT(browse() ) ); | 35 | connect( browserButton, SIGNAL(released() ), this , SLOT(browse() ) ); |
36 | 36 | ||
37 | chNameLine = new QLineEdit( this ); | 37 | chNameLine = new QLineEdit( this ); |
38 | 38 | ||
39 | sendButton = new QPushButton( this ); | 39 | sendButton = new QPushButton( this ); |
40 | sendButton->setText( tr( "Send" ) ); | 40 | sendButton->setText( tr( "Send" ) ); |
41 | 41 | ||
42 | layout->addWidget(info); | 42 | layout->addWidget(info); |
43 | layout->addWidget(cmdLine); | 43 | layout->addWidget(cmdLine); |
44 | layout->addWidget(browserButton); | 44 | layout->addWidget(browserButton); |
45 | layout->addWidget(chNameLine); | 45 | layout->addWidget(chNameLine); |
46 | layout->addWidget(sendButton); | 46 | layout->addWidget(sendButton); |
47 | 47 | ||
48 | connect( sendButton, SIGNAL( clicked() ), this, SLOT( sendData() ) ); | 48 | connect( sendButton, SIGNAL( clicked() ), this, SLOT( sendData() ) ); |
49 | 49 | ||
50 | } | 50 | } |
51 | 51 | ||
52 | ObexDialog::~ObexDialog() { | 52 | ObexDialog::~ObexDialog() { |
53 | } | 53 | } |
54 | 54 | ||
55 | void ObexDialog::browse() { | 55 | void ObexDialog::browse() { |
56 | 56 | ||
57 | MimeTypes types; | 57 | MimeTypes types; |
58 | QStringList all; | 58 | QStringList all; |
59 | all << "*/*"; | 59 | all << "*/*"; |
60 | types.insert("All Files", all ); | 60 | types.insert("All Files", all ); |
61 | 61 | ||
62 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); | 62 | QString str = OFileDialog::getOpenFileName( 1,"/","", types, 0 ); |
63 | cmdLine->setText( str ); | 63 | cmdLine->setText( str ); |
64 | 64 | ||
65 | } | 65 | } |
66 | 66 | ||
67 | void ObexDialog::sendData() { | 67 | void ObexDialog::sendData() { |
68 | QString fileURL = cmdLine->text(); | 68 | QString fileURL = cmdLine->text(); |
69 | QString file = QFileInfo( fileURL ).fileName(); | 69 | QString file = QFileInfo( fileURL ).fileName(); |
70 | QString modifiedName = chNameLine->text(); | 70 | QString modifiedName = chNameLine->text(); |
71 | 71 | ||
72 | // vom popupmenu beziehen | 72 | // vom popupmenu beziehen |
diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 1f347ce..4e58552 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp | |||
@@ -18,51 +18,51 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, | |||
18 | 18 | ||
19 | m_device = device; | 19 | m_device = device; |
20 | 20 | ||
21 | layout = new QVBoxLayout( this ); | 21 | layout = new QVBoxLayout( this ); |
22 | 22 | ||
23 | QLabel* info = new QLabel( this ); | 23 | QLabel* info = new QLabel( this ); |
24 | info->setText( tr("Enter an ppp script name:") ); | 24 | info->setText( tr("Enter an ppp script name:") ); |
25 | 25 | ||
26 | cmdLine = new QLineEdit( this ); | 26 | cmdLine = new QLineEdit( this ); |
27 | 27 | ||
28 | outPut = new QMultiLineEdit( this ); | 28 | outPut = new QMultiLineEdit( this ); |
29 | QFont outPut_font( outPut->font() ); | 29 | QFont outPut_font( outPut->font() ); |
30 | outPut_font.setPointSize( 8 ); | 30 | outPut_font.setPointSize( 8 ); |
31 | outPut->setFont( outPut_font ); | 31 | outPut->setFont( outPut_font ); |
32 | outPut->setWordWrap( QMultiLineEdit::WidgetWidth ); | 32 | outPut->setWordWrap( QMultiLineEdit::WidgetWidth ); |
33 | 33 | ||
34 | connectButton = new QPushButton( this ); | 34 | connectButton = new QPushButton( this ); |
35 | connectButton->setText( tr( "Connect" ) ); | 35 | connectButton->setText( tr( "Connect" ) ); |
36 | 36 | ||
37 | layout->addWidget(info); | 37 | layout->addWidget(info); |
38 | layout->addWidget(cmdLine); | 38 | layout->addWidget(cmdLine); |
39 | layout->addWidget(outPut); | 39 | layout->addWidget(outPut); |
40 | layout->addWidget(connectButton); | 40 | layout->addWidget(connectButton); |
41 | 41 | ||
42 | connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); | 42 | connect( connectButton, SIGNAL( clicked() ), this, SLOT( connectToDevice() ) ); |
43 | 43 | ||
44 | } | 44 | } |
45 | 45 | ||
46 | PPPDialog::~PPPDialog() { | 46 | PPPDialog::~PPPDialog() { |
47 | } | 47 | } |
48 | 48 | ||
49 | void PPPDialog::connectToDevice() { | 49 | void PPPDialog::connectToDevice() { |
50 | outPut->clear(); | 50 | outPut->clear(); |
51 | // vom popupmenu beziehen | 51 | // vom popupmenu beziehen |
52 | QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); | 52 | QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); |
53 | OProcess* pppDial = new OProcess(); | 53 | OProcess* pppDial = new OProcess(); |
54 | *pppDial << "pppd" << m_device << "call" << connectScript; | 54 | *pppDial << "pppd" << m_device << "call" << connectScript; |
55 | connect( pppDial, SIGNAL(receivedStdout(OProcess*, char*, int ) ), | 55 | connect( pppDial, SIGNAL(receivedStdout(OProcess*,char*,int) ), |
56 | this, SLOT(fillOutPut(OProcess*, char*, int ) ) ); | 56 | this, SLOT(fillOutPut(OProcess*,char*,int) ) ); |
57 | if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { | 57 | if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { |
58 | qWarning("could not start"); | 58 | qWarning("could not start"); |
59 | delete pppDial; | 59 | delete pppDial; |
60 | } | 60 | } |
61 | } | 61 | } |
62 | 62 | ||
63 | void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { | 63 | void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) { |
64 | QCString str(cha, len ); | 64 | QCString str(cha, len ); |
65 | outPut->insertLine( str ); | 65 | outPut->insertLine( str ); |
66 | delete pppDial; | 66 | delete pppDial; |
67 | } | 67 | } |
68 | 68 | ||
diff --git a/noncore/net/opietooth/manager/scandialog.cpp b/noncore/net/opietooth/manager/scandialog.cpp index de4f742..c8ea3e3 100644 --- a/noncore/net/opietooth/manager/scandialog.cpp +++ b/noncore/net/opietooth/manager/scandialog.cpp | |||
@@ -45,50 +45,50 @@ namespace OpieTooth { | |||
45 | 45 | ||
46 | Layout11 = new QVBoxLayout( this ); | 46 | Layout11 = new QVBoxLayout( this ); |
47 | Layout11->setSpacing( 6 ); | 47 | Layout11->setSpacing( 6 ); |
48 | Layout11->setMargin( 0 ); | 48 | Layout11->setMargin( 0 ); |
49 | 49 | ||
50 | progress = new QProgressBar( this, "progbar"); | 50 | progress = new QProgressBar( this, "progbar"); |
51 | progress->setTotalSteps(20); | 51 | progress->setTotalSteps(20); |
52 | 52 | ||
53 | StartStopButton = new QPushButton( this, "StartButton" ); | 53 | StartStopButton = new QPushButton( this, "StartButton" ); |
54 | StartStopButton->setText( tr( "Start scan" ) ); | 54 | StartStopButton->setText( tr( "Start scan" ) ); |
55 | 55 | ||
56 | ListView1 = new QListView( this, "ListView1" ); | 56 | ListView1 = new QListView( this, "ListView1" ); |
57 | 57 | ||
58 | //ListView1->addColumn( tr( "Add" ) ); | 58 | //ListView1->addColumn( tr( "Add" ) ); |
59 | ListView1->addColumn( tr( "Add Device" ) ); | 59 | ListView1->addColumn( tr( "Add Device" ) ); |
60 | //ListView1->addColumn( tr( "Type" ) ); | 60 | //ListView1->addColumn( tr( "Type" ) ); |
61 | 61 | ||
62 | Layout11->addWidget( ListView1 ); | 62 | Layout11->addWidget( ListView1 ); |
63 | Layout11->addWidget( progress ); | 63 | Layout11->addWidget( progress ); |
64 | Layout11->addWidget( StartStopButton ); | 64 | Layout11->addWidget( StartStopButton ); |
65 | 65 | ||
66 | localDevice = new Manager( "hci0" ); | 66 | localDevice = new Manager( "hci0" ); |
67 | 67 | ||
68 | connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); | 68 | connect( StartStopButton, SIGNAL( clicked() ), this, SLOT( startSearch() ) ); |
69 | connect( localDevice, SIGNAL( foundDevices( const QString& , RemoteDevice::ValueList ) ), | 69 | connect( localDevice, SIGNAL( foundDevices(const QString&,RemoteDevice::ValueList) ), |
70 | this, SLOT( fillList( const QString& , RemoteDevice::ValueList ) ) ) ; | 70 | this, SLOT( fillList(const QString&,RemoteDevice::ValueList) ) ) ; |
71 | 71 | ||
72 | progressStat = 0; | 72 | progressStat = 0; |
73 | m_search = false; | 73 | m_search = false; |
74 | } | 74 | } |
75 | 75 | ||
76 | // hack, make cleaner later | 76 | // hack, make cleaner later |
77 | void ScanDialog::progressTimer() { | 77 | void ScanDialog::progressTimer() { |
78 | 78 | ||
79 | progressStat++; | 79 | progressStat++; |
80 | if ( progressStat++ < 20 && m_search ) { | 80 | if ( progressStat++ < 20 && m_search ) { |
81 | QTimer::singleShot( 2000, this, SLOT( progressTimer() ) ); | 81 | QTimer::singleShot( 2000, this, SLOT( progressTimer() ) ); |
82 | progress->setProgress( progressStat++ ); | 82 | progress->setProgress( progressStat++ ); |
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | ||
86 | void ScanDialog::accept() { | 86 | void ScanDialog::accept() { |
87 | emitToManager(); | 87 | emitToManager(); |
88 | QDialog::accept(); | 88 | QDialog::accept(); |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | ||
92 | void ScanDialog::startSearch() { | 92 | void ScanDialog::startSearch() { |
93 | if ( m_search ) { | 93 | if ( m_search ) { |
94 | stopSearch(); | 94 | stopSearch(); |