summaryrefslogtreecommitdiffabout
path: root/kaddressbook
Unidiff
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp3
-rw-r--r--kaddressbook/viewmanager.cpp2
-rw-r--r--kaddressbook/views/colorlistbox.cpp7
-rw-r--r--kaddressbook/views/colorlistbox.h1
-rw-r--r--kaddressbook/views/configurecardviewdialog.cpp4
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp4
6 files changed, 18 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 5ef61b1..e34951a 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -390,25 +390,25 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
390#endif //KAB_EMBEDDED 390#endif //KAB_EMBEDDED
391 391
392 mMessageTimer = new QTimer( this ); 392 mMessageTimer = new QTimer( this );
393 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 393 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
394 mEditorDialog = 0; 394 mEditorDialog = 0;
395 createAddresseeEditorDialog( this ); 395 createAddresseeEditorDialog( this );
396 setModified( false ); 396 setModified( false );
397 mBRdisabled = false; 397 mBRdisabled = false;
398#ifndef DESKTOP_VERSION 398#ifndef DESKTOP_VERSION
399 infrared = 0; 399 infrared = 0;
400#endif 400#endif
401 //toggleBeamReceive( ); 401 //toggleBeamReceive( );
402 //mMainWindow->toolBar()->show(); 402 mMainWindow->toolBar()->show();
403 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 403 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
404 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 404 QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
405} 405}
406 406
407void KABCore::updateToolBar() 407void KABCore::updateToolBar()
408{ 408{
409 static int iii = 0; 409 static int iii = 0;
410 ++iii; 410 ++iii;
411 mMainWindow->toolBar()->repaintMe(); 411 mMainWindow->toolBar()->repaintMe();
412 if ( iii < 4 ) 412 if ( iii < 4 )
413 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 413 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
414} 414}
@@ -2164,24 +2164,25 @@ void KABCore::addActionsManually()
2164 popupBarTB->insertItem( i18n("&Edit"), editMenu ); 2164 popupBarTB->insertItem( i18n("&Edit"), editMenu );
2165 popupBarTB->insertItem( i18n("&View"), viewMenu ); 2165 popupBarTB->insertItem( i18n("&View"), viewMenu );
2166 popupBarTB->insertItem( i18n("&Settings"), settingsMenu ); 2166 popupBarTB->insertItem( i18n("&Settings"), settingsMenu );
2167 popupBarTB->insertItem( i18n("Synchronize"), syncMenu ); 2167 popupBarTB->insertItem( i18n("Synchronize"), syncMenu );
2168 mViewManager->getFilterAction()->plug ( popupBarTB); 2168 mViewManager->getFilterAction()->plug ( popupBarTB);
2169 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu ); 2169 //popupBarTB->insertItem( i18n("&Change selected"), changeMenu );
2170 popupBarTB->insertItem( i18n("&Help"), helpMenu ); 2170 popupBarTB->insertItem( i18n("&Help"), helpMenu );
2171 if (QApplication::desktop()->width() > 320 ) { 2171 if (QApplication::desktop()->width() > 320 ) {
2172 // mViewManager->getFilterAction()->plug ( tb); 2172 // mViewManager->getFilterAction()->plug ( tb);
2173 } 2173 }
2174 } 2174 }
2175#endif 2175#endif
2176 mIncSearchWidget->setSize();
2176 // mActionQuit->plug ( mMainWindow->toolBar()); 2177 // mActionQuit->plug ( mMainWindow->toolBar());
2177 2178
2178 2179
2179 2180
2180 //US Now connect the actions with the menue entries. 2181 //US Now connect the actions with the menue entries.
2181#ifdef DESKTOP_VERSION 2182#ifdef DESKTOP_VERSION
2182 mActionPrint->plug( fileMenu ); 2183 mActionPrint->plug( fileMenu );
2183 mActionPrintDetails->plug( fileMenu ); 2184 mActionPrintDetails->plug( fileMenu );
2184 fileMenu->insertSeparator(); 2185 fileMenu->insertSeparator();
2185#endif 2186#endif
2186 mActionMail->plug( fileMenu ); 2187 mActionMail->plug( fileMenu );
2187 fileMenu->insertSeparator(); 2188 fileMenu->insertSeparator();
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 86f0f3d..0614d06 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -695,25 +695,25 @@ void ViewManager::initActions()
695#endif //KAB_EMBEDDED 695#endif //KAB_EMBEDDED
696 696
697#ifndef KAB_EMBEDDED 697#ifndef KAB_EMBEDDED
698 action = new KAction( i18n( "Refresh View" ), "reload", 0, this, 698 action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
699 SLOT( refreshView(const QString &) ), mCore->actionCollection(), 699 SLOT( refreshView(const QString &) ), mCore->actionCollection(),
700 "view_refresh" ); 700 "view_refresh" );
701 action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) ); 701 action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) );
702#else //KAB_EMBEDDED 702#else //KAB_EMBEDDED
703 action = new KAction( i18n( "Refresh View" ), "reload", 0, this, 703 action = new KAction( i18n( "Refresh View" ), "reload", 0, this,
704 SLOT( refreshView()), mCore->actionCollection(), 704 SLOT( refreshView()), mCore->actionCollection(),
705 "view_refresh" ); 705 "view_refresh" );
706 action->plug(viewmenu); 706 action->plug(viewmenu);
707 viewmenu->insertSeparator(); 707 //viewmenu->insertSeparator();
708#endif //KAB_EMBEDDED 708#endif //KAB_EMBEDDED
709 709
710 action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, 710 action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this,
711 SLOT( configureFilters() ), mCore->actionCollection(), 711 SLOT( configureFilters() ), mCore->actionCollection(),
712 "options_edit_filters" ); 712 "options_edit_filters" );
713 713
714 mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" ); 714 mActionSelectFilter = new KSelectAction( i18n( "Select Filter" ), "filter", mCore->actionCollection(), "select_filter" );
715#if KDE_VERSION >= 309 715#if KDE_VERSION >= 309
716 mActionSelectFilter->setMenuAccelsEnabled( false ); 716 mActionSelectFilter->setMenuAccelsEnabled( false );
717#endif 717#endif
718 connect( mActionSelectFilter, SIGNAL( activated( int ) ), 718 connect( mActionSelectFilter, SIGNAL( activated( int ) ),
719 SLOT( setActiveFilter( int ) ) ); 719 SLOT( setActiveFilter( int ) ) );
diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp
index c243fa0..7386207 100644
--- a/kaddressbook/views/colorlistbox.cpp
+++ b/kaddressbook/views/colorlistbox.cpp
@@ -23,24 +23,25 @@
23#include <kcolordialog.h> 23#include <kcolordialog.h>
24 24
25#ifndef KAB_EMBEDDED 25#ifndef KAB_EMBEDDED
26#include <kcolordrag.h> 26#include <kcolordrag.h>
27#endif //KAB_EMBEDDED 27#endif //KAB_EMBEDDED
28 28
29#include "colorlistbox.h" 29#include "colorlistbox.h"
30 30
31ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) 31ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f )
32 :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) 32 :KListBox( parent, name, f ), mCurrentOnDragEnter(-1)
33{ 33{
34 connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); 34 connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) );
35 connect( this, SIGNAL(clicked(QListBoxItem *)), this, SLOT(slotNewColor(QListBoxItem *)) );
35 setAcceptDrops( true); 36 setAcceptDrops( true);
36} 37}
37 38
38 39
39void ColorListBox::setEnabled( bool state ) 40void ColorListBox::setEnabled( bool state )
40{ 41{
41 if( state == isEnabled() ) 42 if( state == isEnabled() )
42 { 43 {
43 return; 44 return;
44 } 45 }
45 46
46 QListBox::setEnabled( state ); 47 QListBox::setEnabled( state );
@@ -65,25 +66,29 @@ void ColorListBox::setColor( uint index, const QColor &color )
65QColor ColorListBox::color( uint index ) const 66QColor ColorListBox::color( uint index ) const
66{ 67{
67 if( index < count() ) 68 if( index < count() )
68 { 69 {
69 ColorListItem *colorItem = (ColorListItem*)item(index); 70 ColorListItem *colorItem = (ColorListItem*)item(index);
70 return( colorItem->color() ); 71 return( colorItem->color() );
71 } 72 }
72 else 73 else
73 { 74 {
74 return( black ); 75 return( black );
75 } 76 }
76} 77}
77 78void ColorListBox::slotNewColor(QListBoxItem * i)
79{
80 if ( i )
81 newColor( index( i ) );
82}
78 83
79void ColorListBox::newColor( int index ) 84void ColorListBox::newColor( int index )
80{ 85{
81 if( isEnabled() == false ) 86 if( isEnabled() == false )
82 { 87 {
83 return; 88 return;
84 } 89 }
85 90
86 if( (uint)index < count() ) 91 if( (uint)index < count() )
87 { 92 {
88 QColor c = color( index ); 93 QColor c = color( index );
89#ifndef KAB_EMBEDDED 94#ifndef KAB_EMBEDDED
diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h
index 4a0e705..bb91484 100644
--- a/kaddressbook/views/colorlistbox.h
+++ b/kaddressbook/views/colorlistbox.h
@@ -39,24 +39,25 @@ class ColorListBox : public KListBox
39 39
40 public slots: 40 public slots:
41 virtual void setEnabled( bool state ); 41 virtual void setEnabled( bool state );
42 42
43 protected: 43 protected:
44 void dragEnterEvent( QDragEnterEvent *e ); 44 void dragEnterEvent( QDragEnterEvent *e );
45 void dragLeaveEvent( QDragLeaveEvent *e ); 45 void dragLeaveEvent( QDragLeaveEvent *e );
46 void dragMoveEvent( QDragMoveEvent *e ); 46 void dragMoveEvent( QDragMoveEvent *e );
47 void dropEvent( QDropEvent *e ); 47 void dropEvent( QDropEvent *e );
48 48
49 private slots: 49 private slots:
50 void newColor( int index ); 50 void newColor( int index );
51 void slotNewColor(QListBoxItem * i);
51 52
52 private: 53 private:
53 int mCurrentOnDragEnter; 54 int mCurrentOnDragEnter;
54 55
55}; 56};
56 57
57 58
58class ColorListItem : public QListBoxItem 59class ColorListItem : public QListBoxItem
59{ 60{
60 public: 61 public:
61 ColorListItem( const QString &text, const QColor &color=Qt::black ); 62 ColorListItem( const QString &text, const QColor &color=Qt::black );
62 const QColor &color( void ); 63 const QColor &color( void );
diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp
index 366e54c..e0fbd21 100644
--- a/kaddressbook/views/configurecardviewdialog.cpp
+++ b/kaddressbook/views/configurecardviewdialog.cpp
@@ -206,29 +206,33 @@ void CardViewLookNFeelPage::setHeaderFont()
206 updateFontLabel( f, lHeaderFont ); 206 updateFontLabel( f, lHeaderFont );
207#else //KAB_EMBEDDED 207#else //KAB_EMBEDDED
208 bool ok; 208 bool ok;
209 QFont fout = KFontDialog::getFont( f, ok); 209 QFont fout = KFontDialog::getFont( f, ok);
210 if ( ok ) 210 if ( ok )
211 updateFontLabel( fout, lHeaderFont ); 211 updateFontLabel( fout, lHeaderFont );
212#endif //KAB_EMBEDDED 212#endif //KAB_EMBEDDED
213} 213}
214 214
215void CardViewLookNFeelPage::enableFonts() 215void CardViewLookNFeelPage::enableFonts()
216{ 216{
217 vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); 217 vbFonts->setEnabled( cbEnableCustomFonts->isChecked() );
218 if ( cbEnableCustomFonts->isChecked() )
219 vbFonts->setFocus();
218} 220}
219 221
220void CardViewLookNFeelPage::enableColors() 222void CardViewLookNFeelPage::enableColors()
221{ 223{
222 lbColors->setEnabled( cbEnableCustomColors->isChecked() ); 224 lbColors->setEnabled( cbEnableCustomColors->isChecked() );
225 if ( cbEnableCustomColors->isChecked() )
226 lbColors->setFocus();
223} 227}
224 228
225void CardViewLookNFeelPage::initGUI() 229void CardViewLookNFeelPage::initGUI()
226{ 230{
227 int spacing = KDialog::spacingHint(); 231 int spacing = KDialog::spacingHint();
228 int margin = KDialog::marginHint(); 232 int margin = KDialog::marginHint();
229 233
230 QTabWidget *tabs = new QTabWidget( this ); 234 QTabWidget *tabs = new QTabWidget( this );
231 235
232 // Layout 236 // Layout
233 QVBox *loTab = new QVBox( this, "layouttab" ); 237 QVBox *loTab = new QVBox( this, "layouttab" );
234 238
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index 8bcceb2..0e36abd 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -201,29 +201,33 @@ void LookAndFeelPage::setHeaderFont()
201 updateFontLabel( f, lHeaderFont ); 201 updateFontLabel( f, lHeaderFont );
202#else //KAB_EMBEDDED 202#else //KAB_EMBEDDED
203 bool ok; 203 bool ok;
204 QFont fout = KFontDialog::getFont( f, ok); 204 QFont fout = KFontDialog::getFont( f, ok);
205 if ( ok ) 205 if ( ok )
206 updateFontLabel( fout, lHeaderFont ); 206 updateFontLabel( fout, lHeaderFont );
207#endif //KAB_EMBEDDED 207#endif //KAB_EMBEDDED
208} 208}
209 209
210void LookAndFeelPage::enableFonts() 210void LookAndFeelPage::enableFonts()
211{ 211{
212 vbFonts->setEnabled( cbEnableCustomFonts->isChecked() ); 212 vbFonts->setEnabled( cbEnableCustomFonts->isChecked() );
213 if ( cbEnableCustomFonts->isChecked() )
214 vbFonts->setFocus();
213} 215}
214 216
215void LookAndFeelPage::enableColors() 217void LookAndFeelPage::enableColors()
216{ 218{
217 lbColors->setEnabled( cbEnableCustomColors->isChecked() ); 219 lbColors->setEnabled( cbEnableCustomColors->isChecked() );
220 if ( cbEnableCustomColors->isChecked() )
221 lbColors->setFocus();
218} 222}
219 223
220void LookAndFeelPage::initGUI() 224void LookAndFeelPage::initGUI()
221{ 225{
222 int spacing = KDialog::spacingHint(); 226 int spacing = KDialog::spacingHint();
223 int margin = KDialog::marginHint(); 227 int margin = KDialog::marginHint();
224 228
225 QTabWidget *tabs = new QTabWidget( this ); 229 QTabWidget *tabs = new QTabWidget( this );
226 230
227 // General 231 // General
228 QVBox *generalTab = new QVBox( this, "generaltab" ); 232 QVBox *generalTab = new QVBox( this, "generaltab" );
229 233