summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-01-29 07:48:23 (UTC)
committer zautrix <zautrix>2005-01-29 07:48:23 (UTC)
commitef1d97a243957180f5ffc3c3b055ffd8bf52e157 (patch) (unidiff)
tree57ebf97cfd0d324ffcecbfb0c9814745f73d54a5 /korganizer
parent0850ade22908615389800c6ee973f5906154d980 (diff)
downloadkdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.zip
kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.tar.gz
kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.tar.bz2
many stribg fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/filteredit_base.cpp13
-rw-r--r--korganizer/koeditordetails.cpp3
-rw-r--r--korganizer/koeditorgeneral.cpp8
-rw-r--r--korganizer/koprefsdialog.cpp6
4 files changed, 18 insertions, 12 deletions
diff --git a/korganizer/filteredit_base.cpp b/korganizer/filteredit_base.cpp
index 15a4aaa..505edf6 100644
--- a/korganizer/filteredit_base.cpp
+++ b/korganizer/filteredit_base.cpp
@@ -1,145 +1,152 @@
1/**************************************************************************** 1/****************************************************************************
2** Form implementation generated from reading ui file 'filteredit_base.ui' 2** Form implementation generated from reading ui file 'filteredit_base.ui'
3** 3**
4** Created: Fr Jan 21 21:25:30 2005 4** Created: Fr Jan 21 21:25:30 2005
5** by: The User Interface Compiler ($Id$) 5** by: The User Interface Compiler ($Id$)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9 9
10#include "filteredit_base.h" 10#include "filteredit_base.h"
11 11
12#include <qvariant.h> 12#include <qvariant.h>
13#include <qpushbutton.h> 13#include <qpushbutton.h>
14#include <qframe.h> 14#include <qframe.h>
15#include <qbuttongroup.h> 15#include <qbuttongroup.h>
16#include <qapplication.h>
16#include <qradiobutton.h> 17#include <qradiobutton.h>
17#include <qlistbox.h> 18#include <qlistbox.h>
18#include <qlabel.h> 19#include <qlabel.h>
19#include <qcheckbox.h> 20#include <qcheckbox.h>
20#include <qlayout.h> 21#include <qlayout.h>
21#include <qtooltip.h> 22#include <qtooltip.h>
22#include <qwhatsthis.h> 23#include <qwhatsthis.h>
23#include "tr.h" 24#include "tr.h"
24 25
25/* 26/*
26 * Constructs a FilterEdit_base as a child of 'parent', with the 27 * Constructs a FilterEdit_base as a child of 'parent', with the
27 * name 'name' and widget flags set to 'f'. 28 * name 'name' and widget flags set to 'f'.
28 */ 29 */
29FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl ) 30FilterEdit_base::FilterEdit_base( QWidget* parent, const char* name, WFlags fl )
30 : QWidget( parent, name, fl ) 31 : QWidget( parent, name, fl )
31{ 32{
32 if ( !name ) 33 if ( !name )
33 setName( "FilterEdit_base" ); 34 setName( "FilterEdit_base" );
34 FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout"); 35 FilterEdit_baseLayout = new QVBoxLayout( this, 0, 0, "FilterEdit_baseLayout");
35 36
36 mCriteriaFrame = new QFrame( this, "mCriteriaFrame" ); 37 mCriteriaFrame = new QFrame( this, "mCriteriaFrame" );
37 mCriteriaFrame->setFrameShape( QFrame::StyledPanel ); 38 mCriteriaFrame->setFrameShape( QFrame::StyledPanel );
38 mCriteriaFrame->setFrameShadow( QFrame::Raised ); 39 mCriteriaFrame->setFrameShadow( QFrame::Raised );
39 mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout"); 40 mCriteriaFrameLayout = new QVBoxLayout( mCriteriaFrame, 3, 2, "mCriteriaFrameLayout");
40 41
41 ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" ); 42 ButtonGroup1 = new QButtonGroup( mCriteriaFrame, "ButtonGroup1" );
42 ButtonGroup1->setColumnLayout(0, Qt::Vertical ); 43 ButtonGroup1->setColumnLayout(0, Qt::Vertical );
43 ButtonGroup1->layout()->setSpacing( 6 ); 44 ButtonGroup1->layout()->setSpacing( 6 );
44 ButtonGroup1->layout()->setMargin( 6 ); 45 ButtonGroup1->layout()->setMargin( 6 );
45 ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() ); 46 ButtonGroup1Layout = new QGridLayout( ButtonGroup1->layout() );
46 ButtonGroup1Layout->setAlignment( Qt::AlignTop ); 47 ButtonGroup1Layout->setAlignment( Qt::AlignTop );
47 48
48 layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 49 layout4 = new QHBoxLayout( 0, 0, 6, "layout4");
49 50
50 mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" ); 51 mCatShowCheck = new QRadioButton( ButtonGroup1, "mCatShowCheck" );
51 layout4->addWidget( mCatShowCheck ); 52 layout4->addWidget( mCatShowCheck );
52 53
53 mCatHideCheck = new QRadioButton( ButtonGroup1, "mCatHideCheck" ); 54 mCatHideCheck = new QRadioButton( ButtonGroup1, "mCatHideCheck" );
54 layout4->addWidget( mCatHideCheck ); 55 layout4->addWidget( mCatHideCheck );
55 56
56 mCatEditButton = new QPushButton( ButtonGroup1, "mCatEditButton" ); 57 mCatEditButton = new QPushButton( ButtonGroup1, "mCatEditButton" );
57 layout4->addWidget( mCatEditButton ); 58 layout4->addWidget( mCatEditButton );
58 59
59 ButtonGroup1Layout->addLayout( layout4, 0, 0 ); 60 ButtonGroup1Layout->addLayout( layout4, 0, 0 );
60 61
61 mCatList = new QListBox( ButtonGroup1, "mCatList" ); 62 mCatList = new QListBox( ButtonGroup1, "mCatList" );
62 63
63 ButtonGroup1Layout->addWidget( mCatList, 1, 0 ); 64 ButtonGroup1Layout->addWidget( mCatList, 1, 0 );
64 mCriteriaFrameLayout->addWidget( ButtonGroup1 ); 65 mCriteriaFrameLayout->addWidget( ButtonGroup1 );
65 66
66 layout7 = new QHBoxLayout( 0, 0, 6, "layout7"); 67 layout7 = new QHBoxLayout( 0, 0, 6, "layout7");
67 68
68 textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" ); 69 textLabel1 = new QLabel( mCriteriaFrame, "textLabel1" );
69 layout7->addWidget( textLabel1 ); 70 layout7->addWidget( textLabel1 );
70 71
71 mRecurringCheck = new QCheckBox( mCriteriaFrame, "mRecurringCheck" ); 72 mRecurringCheck = new QCheckBox( mCriteriaFrame, "mRecurringCheck" );
72 layout7->addWidget( mRecurringCheck ); 73 layout7->addWidget( mRecurringCheck );
73 74
74 mCompletedCheck = new QCheckBox( mCriteriaFrame, "mCompletedCheck" ); 75 mCompletedCheck = new QCheckBox( mCriteriaFrame, "mCompletedCheck" );
75 layout7->addWidget( mCompletedCheck ); 76 layout7->addWidget( mCompletedCheck );
76 mCriteriaFrameLayout->addLayout( layout7 ); 77 mCriteriaFrameLayout->addLayout( layout7 );
77 78
78 layout9 = new QHBoxLayout( 0, 0, 6, "layout9"); 79 layout9 = new QHBoxLayout( 0, 0, 6, "layout9");
79 80
80 textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" ); 81 textLabel1_2 = new QLabel( mCriteriaFrame, "textLabel1_2" );
81 layout9->addWidget( textLabel1_2 ); 82 layout9->addWidget( textLabel1_2 );
82 83
83 mEventCheck = new QCheckBox( mCriteriaFrame, "mEventCheck" ); 84 mEventCheck = new QCheckBox( mCriteriaFrame, "mEventCheck" );
84 layout9->addWidget( mEventCheck ); 85 layout9->addWidget( mEventCheck );
85 86
86 mTodoCheck = new QCheckBox( mCriteriaFrame, "mTodoCheck" ); 87 mTodoCheck = new QCheckBox( mCriteriaFrame, "mTodoCheck" );
87 layout9->addWidget( mTodoCheck ); 88 layout9->addWidget( mTodoCheck );
88 89
89 mJournalCheck = new QCheckBox( mCriteriaFrame, "mJournalCheck" ); 90 mJournalCheck = new QCheckBox( mCriteriaFrame, "mJournalCheck" );
90 layout9->addWidget( mJournalCheck ); 91 layout9->addWidget( mJournalCheck );
91 mCriteriaFrameLayout->addLayout( layout9 ); 92 mCriteriaFrameLayout->addLayout( layout9 );
92 93
93 layout2 = new QHBoxLayout( 0, 0, 0, "layout2"); 94 layout2 = new QHBoxLayout( 0, 0, 0, "layout2");
94 95
95 textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" ); 96 textLabel2 = new QLabel( mCriteriaFrame, "textLabel2" );
96 layout2->addWidget( textLabel2 ); 97 layout2->addWidget( textLabel2 );
97 98
98 mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" ); 99 mPublicCheck = new QCheckBox( mCriteriaFrame, "mPublicCheck" );
99 layout2->addWidget( mPublicCheck ); 100 layout2->addWidget( mPublicCheck );
100 101
101 mPrivateCheck = new QCheckBox( mCriteriaFrame, "mPrivateCheck" ); 102 mPrivateCheck = new QCheckBox( mCriteriaFrame, "mPrivateCheck" );
102 layout2->addWidget( mPrivateCheck ); 103 layout2->addWidget( mPrivateCheck );
103 104
104 mConfidentialCheck = new QCheckBox( mCriteriaFrame, "mConfidentialCheck" ); 105 mConfidentialCheck = new QCheckBox( mCriteriaFrame, "mConfidentialCheck" );
105 mConfidentialCheck->setChecked( FALSE ); 106 mConfidentialCheck->setChecked( FALSE );
106 layout2->addWidget( mConfidentialCheck ); 107 layout2->addWidget( mConfidentialCheck );
107 mCriteriaFrameLayout->addLayout( layout2 ); 108 mCriteriaFrameLayout->addLayout( layout2 );
108 FilterEdit_baseLayout->addWidget( mCriteriaFrame ); 109 FilterEdit_baseLayout->addWidget( mCriteriaFrame );
109 languageChange(); 110 languageChange();
110 resize( QSize(324, 281).expandedTo(minimumSizeHint()) ); 111 resize( QSize(300, 200).expandedTo(minimumSizeHint()) );
111 clearWState( WState_Polished ); 112 clearWState( WState_Polished );
112} 113}
113 114
114/* 115/*
115 * Destroys the object and frees any allocated resources 116 * Destroys the object and frees any allocated resources
116 */ 117 */
117FilterEdit_base::~FilterEdit_base() 118FilterEdit_base::~FilterEdit_base()
118{ 119{
119 // no need to delete child widgets, Qt does it all for us 120 // no need to delete child widgets, Qt does it all for us
120} 121}
121 122
122/* 123/*
123 * Sets the strings of the subwidgets using the current 124 * Sets the strings of the subwidgets using the current
124 * language. 125 * language.
125 */ 126 */
126void FilterEdit_base::languageChange() 127void FilterEdit_base::languageChange()
127{ 128{
128 setCaption( tr( "FilterEditor" ) ); 129 setCaption( tr( "FilterEditor" ) );
129 ButtonGroup1->setTitle( tr( "Categories" ) ); 130 ButtonGroup1->setTitle( tr( "Categories" ) );
130 mCatShowCheck->setText( tr( "Include" ) ); 131 mCatShowCheck->setText( tr( "Include" ) );
131 mCatHideCheck->setText( tr( "Exclude" ) ); 132 mCatHideCheck->setText( tr( "Exclude" ) );
132 mCatEditButton->setText( tr( "Edit Selection..." ) ); 133 mCatEditButton->setText( tr( "Edit Selection..." ) );
133 textLabel1->setText( tr( "Exclude" ) ); 134 textLabel1->setText( tr( "Exclude" ) );
134 mRecurringCheck->setText( tr( "recurring events" ) ); 135 if (QApplication::desktop()->width() > 480 ) {
135 mCompletedCheck->setText( tr( "completed to-dos" ) ); 136 mCompletedCheck->setText( tr( "completed to-dos" ) );
137 mRecurringCheck->setText( tr( "recurring events" ) );
138 }
139 else {
140 mCompletedCheck->setText( tr( "compl.todos" ) );
141 mRecurringCheck->setText( tr( "recurr. events" ) );
142 }
136 textLabel1_2->setText( tr( "Exclude" ) ); 143 textLabel1_2->setText( tr( "Exclude" ) );
137 mEventCheck->setText( tr( "events" ) ); 144 mEventCheck->setText( tr( "events" ) );
138 mTodoCheck->setText( tr( "todos" ) ); 145 mTodoCheck->setText( tr( "todos" ) );
139 mJournalCheck->setText( tr( "journals" ) ); 146 mJournalCheck->setText( tr( "journals" ) );
140 textLabel2->setText( tr( "Include" ) ); 147 textLabel2->setText( tr( "Include" ) );
141 mPublicCheck->setText( tr( "public" ) ); 148 mPublicCheck->setText( tr( "public" ) );
142 mPrivateCheck->setText( tr( "private" ) ); 149 mPrivateCheck->setText( tr( "private" ) );
143 mConfidentialCheck->setText( tr( "confidential" ) ); 150 mConfidentialCheck->setText( tr( "confidential" ) );
144} 151}
145 152
diff --git a/korganizer/koeditordetails.cpp b/korganizer/koeditordetails.cpp
index b73d22f..cf0a458 100644
--- a/korganizer/koeditordetails.cpp
+++ b/korganizer/koeditordetails.cpp
@@ -19,257 +19,258 @@
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qfiledialog.h> 25#include <qfiledialog.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qvbox.h> 27#include <qvbox.h>
28#include <qbuttongroup.h> 28#include <qbuttongroup.h>
29#include <qvgroupbox.h> 29#include <qvgroupbox.h>
30#include <qwidgetstack.h> 30#include <qwidgetstack.h>
31#include <qdatetime.h> 31#include <qdatetime.h>
32#include <qapp.h> 32#include <qapp.h>
33 33
34#include <klocale.h> 34#include <klocale.h>
35#include <kglobal.h> 35#include <kglobal.h>
36#include <kiconloader.h> 36#include <kiconloader.h>
37#include <kstandarddirs.h> 37#include <kstandarddirs.h>
38#include <kmessagebox.h> 38#include <kmessagebox.h>
39#ifndef KORG_NOKABC 39#ifndef KORG_NOKABC
40 40
41#ifdef DESKTOP_VERSION 41#ifdef DESKTOP_VERSION
42#include <kabc/addresseedialog.h> 42#include <kabc/addresseedialog.h>
43#else //DESKTOP_VERSION 43#else //DESKTOP_VERSION
44#include <externalapphandler.h> 44#include <externalapphandler.h>
45#endif //DESKTOP_VERSION 45#endif //DESKTOP_VERSION
46 46
47#endif 47#endif
48 48
49#include <libkcal/incidence.h> 49#include <libkcal/incidence.h>
50 50
51#include "koprefs.h" 51#include "koprefs.h"
52 52
53#include "koeditordetails.h" 53#include "koeditordetails.h"
54 54
55template <> 55template <>
56CustomListViewItem<class Attendee *>::~CustomListViewItem() 56CustomListViewItem<class Attendee *>::~CustomListViewItem()
57{ 57{
58 delete mData; 58 delete mData;
59} 59}
60 60
61template <> 61template <>
62void CustomListViewItem<class Attendee *>::updateItem() 62void CustomListViewItem<class Attendee *>::updateItem()
63{ 63{
64 setText(0,mData->name()); 64 setText(0,mData->name());
65 setText(1,mData->email()); 65 setText(1,mData->email());
66 setText(2,mData->roleStr()); 66 setText(2,mData->roleStr());
67 setText(3,mData->statusStr()); 67 setText(3,mData->statusStr());
68 if (mData->RSVP() && !mData->email().isEmpty()) 68 if (mData->RSVP() && !mData->email().isEmpty())
69 setPixmap(4,SmallIcon("mailappt")); 69 setPixmap(4,SmallIcon("mailappt"));
70 else 70 else
71 setPixmap(4,SmallIcon("nomailappt")); 71 setPixmap(4,SmallIcon("nomailappt"));
72} 72}
73 73
74 74
75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name) 75KOEditorDetails::KOEditorDetails (int spacing,QWidget* parent,const char* name)
76 : QWidget( parent, name), mDisableItemUpdate( false ) 76 : QWidget( parent, name), mDisableItemUpdate( false )
77{ 77{
78 QGridLayout *topLayout = new QGridLayout(this); 78 QGridLayout *topLayout = new QGridLayout(this);
79 topLayout->setSpacing(spacing); 79 topLayout->setSpacing(spacing);
80 80
81 QString organizer = KOPrefs::instance()->email(); 81 QString organizer = KOPrefs::instance()->email();
82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this); 82 mOrganizerLabel = new QLabel(i18n("Organizer: %1").arg(organizer),this);
83 83
84 mListView = new KListView(this,"mListView"); 84 mListView = new KListView(this,"mListView");
85 mListView->addColumn(i18n("Name"),180); 85 mListView->addColumn(i18n("Name"),180);
86 mListView->addColumn(i18n("Email"),180); 86 mListView->addColumn(i18n("Email"),180);
87 mListView->addColumn(i18n("Role"),60); 87 mListView->addColumn(i18n("Role"),60);
88 mListView->addColumn(i18n("Status"),100); 88 mListView->addColumn(i18n("Status"),100);
89 mListView->addColumn(i18n("RSVP"),35); 89 mListView->addColumn(i18n("RSVP"),35);
90 if ( KOPrefs::instance()->mCompactDialogs ) { 90 if ( KOPrefs::instance()->mCompactDialogs ) {
91 //mListView->setFixedHeight(78); 91 //mListView->setFixedHeight(78);
92 } 92 }
93 93
94 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)), 94 connect(mListView,SIGNAL(selectionChanged(QListViewItem *)),
95 SLOT(updateAttendeeInput())); 95 SLOT(updateAttendeeInput()));
96 96
97 QLabel *attendeeLabel = new QLabel(this); 97 QLabel *attendeeLabel = new QLabel(this);
98 attendeeLabel->setText(i18n("Name:")); 98 attendeeLabel->setText(i18n("Name:"));
99 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() ); 99 attendeeLabel->setFixedSize( attendeeLabel->sizeHint() );
100 mNameEdit = new QLineEdit(this); 100 mNameEdit = new QLineEdit(this);
101 connect(mNameEdit,SIGNAL(textChanged(const QString &)), 101 connect(mNameEdit,SIGNAL(textChanged(const QString &)),
102 SLOT(updateAttendeeItem())); 102 SLOT(updateAttendeeItem()));
103 103
104 mUidEdit = new QLineEdit(0); 104 mUidEdit = new QLineEdit(0);
105 mUidEdit->setText(""); 105 mUidEdit->setText("");
106 106
107 QLabel *emailLabel = new QLabel(this); 107 QLabel *emailLabel = new QLabel(this);
108 emailLabel->setText(i18n("Email:")); 108 emailLabel->setText(i18n("Email:"));
109 mEmailEdit = new QLineEdit(this); 109 mEmailEdit = new QLineEdit(this);
110 connect(mEmailEdit,SIGNAL(textChanged(const QString &)), 110 connect(mEmailEdit,SIGNAL(textChanged(const QString &)),
111 SLOT(updateAttendeeItem())); 111 SLOT(updateAttendeeItem()));
112 112
113 QLabel *attendeeRoleLabel = new QLabel(this); 113 QLabel *attendeeRoleLabel = new QLabel(this);
114 attendeeRoleLabel->setText(i18n("Role:")); 114 attendeeRoleLabel->setText(i18n("Role:"));
115 mRoleCombo = new QComboBox(false,this); 115 mRoleCombo = new QComboBox(false,this);
116 mRoleCombo->insertStringList(Attendee::roleList()); 116 mRoleCombo->insertStringList(Attendee::roleList());
117 connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 117 connect(mRoleCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
118 118
119 QLabel *statusLabel = new QLabel(this); 119 QLabel *statusLabel = new QLabel(this);
120 statusLabel->setText( i18n("Status:") ); 120 statusLabel->setText( i18n("Status:") );
121 121
122 mStatusCombo = new QComboBox(false,this); 122 mStatusCombo = new QComboBox(false,this);
123 mStatusCombo->insertStringList(Attendee::statusList()); 123 mStatusCombo->insertStringList(Attendee::statusList());
124 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem())); 124 connect(mStatusCombo,SIGNAL(activated(int)),SLOT(updateAttendeeItem()));
125 125
126 mRsvpButton = new QCheckBox(this); 126 mRsvpButton = new QCheckBox(this);
127 mRsvpButton->setText(i18n("Request response")); 127 mRsvpButton->setText(i18n("Request response"));
128 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem())); 128 connect(mRsvpButton,SIGNAL(clicked()),SLOT(updateAttendeeItem()));
129 QWidget *buttonBox = new QWidget(this); 129 QWidget *buttonBox = new QWidget(this);
130 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox); 130 QVBoxLayout *buttonLayout = new QVBoxLayout(buttonBox);
131 131
132 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox); 132 QPushButton *newButton = new QPushButton(i18n("&New"),buttonBox);
133 buttonLayout->addWidget(newButton); 133 buttonLayout->addWidget(newButton);
134 connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee())); 134 connect(newButton,SIGNAL(clicked()),SLOT(addNewAttendee()));
135 135
136 mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox); 136 mRemoveButton = new QPushButton(i18n("&Remove"),buttonBox);
137 buttonLayout->addWidget(mRemoveButton); 137 buttonLayout->addWidget(mRemoveButton);
138 connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee())); 138 connect(mRemoveButton, SIGNAL(clicked()),SLOT(removeAttendee()));
139 139
140 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this); 140 mAddressBookButton = new QPushButton(i18n("Address &Book..."),this);
141 // buttonLayout->addWidget(mAddressBookButton); 141 // buttonLayout->addWidget(mAddressBookButton);
142 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook())); 142 connect(mAddressBookButton,SIGNAL(clicked()),SLOT(openAddressBook()));
143 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () ); 143 //mRoleCombo->setFixedSize( mRoleCombo->sizeHint () );
144 144
145 if (qApp->desktop()->width() < 640 ) { 145 if (qApp->desktop()->width() < 640 ) {
146 if ( qApp->desktop()->width() < 300 ) 146 if ( qApp->desktop()->width() < 300 )
147 mListView->setFixedHeight(80); 147 topLayout->setSpacing(1);
148 ;//mListView->setFixedHeight(80);
148 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3); 149 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,3);
149 topLayout->addMultiCellWidget(mListView,1,1,0,3); 150 topLayout->addMultiCellWidget(mListView,1,1,0,3);
150 topLayout->addWidget(attendeeLabel,3,0); 151 topLayout->addWidget(attendeeLabel,3,0);
151 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2); 152 topLayout->addMultiCellWidget(mNameEdit,3,3,1,2);
152 topLayout->addWidget(emailLabel,4,0); 153 topLayout->addWidget(emailLabel,4,0);
153 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2); 154 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,2);
154 topLayout->addWidget(attendeeRoleLabel,5,0); 155 topLayout->addWidget(attendeeRoleLabel,5,0);
155 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3); 156 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,3);
156 topLayout->addWidget(statusLabel,6,0); 157 topLayout->addWidget(statusLabel,6,0);
157 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3); 158 topLayout->addMultiCellWidget(mStatusCombo,6,6,1,3);
158 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3); 159 topLayout->addMultiCellWidget(mAddressBookButton,2,2,2,3);
159 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 160 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
160 topLayout->addMultiCellWidget(buttonBox,3,4,3,3); 161 topLayout->addMultiCellWidget(buttonBox,3,4,3,3);
161 topLayout->setRowStretch(1,2); 162 topLayout->setRowStretch(1,2);
162 topLayout->setColStretch(0,0); 163 topLayout->setColStretch(0,0);
163 topLayout->setColStretch(1,2); 164 topLayout->setColStretch(1,2);
164 topLayout->setColStretch(2,1); 165 topLayout->setColStretch(2,1);
165 topLayout->setColStretch(3,1); 166 topLayout->setColStretch(3,1);
166 167
167 } else { 168 } else {
168 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5); 169 topLayout->addMultiCellWidget(mOrganizerLabel,0,0,0,5);
169 topLayout->addMultiCellWidget(mListView,1,1,0,5); 170 topLayout->addMultiCellWidget(mListView,1,1,0,5);
170 topLayout->addWidget(attendeeLabel,3,0); 171 topLayout->addWidget(attendeeLabel,3,0);
171 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4); 172 topLayout->addMultiCellWidget(mNameEdit,3,3,1,4);
172 topLayout->addWidget(emailLabel,4,0); 173 topLayout->addWidget(emailLabel,4,0);
173 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4); 174 topLayout->addMultiCellWidget(mEmailEdit,4,4,1,4);
174 topLayout->addWidget(attendeeRoleLabel,5,0); 175 topLayout->addWidget(attendeeRoleLabel,5,0);
175 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2); 176 topLayout->addMultiCellWidget(mRoleCombo,5,5,1,2);
176 topLayout->addWidget(statusLabel,5,3); 177 topLayout->addWidget(statusLabel,5,3);
177 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5); 178 topLayout->addMultiCellWidget(mStatusCombo,5,5,4,5);
178 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5); 179 topLayout->addMultiCellWidget(mAddressBookButton,2,2,4,5);
179 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1); 180 topLayout->addMultiCellWidget(mRsvpButton,2,2,0,1);
180 topLayout->addMultiCellWidget(buttonBox,3,4,5,5); 181 topLayout->addMultiCellWidget(buttonBox,3,4,5,5);
181 topLayout->setRowStretch(1,5); 182 topLayout->setRowStretch(1,5);
182 topLayout->setColStretch(0,0); 183 topLayout->setColStretch(0,0);
183 } 184 }
184// #if 0 185// #if 0
185// topLayout->setColStretch(2,1); 186// topLayout->setColStretch(2,1);
186// topLayout->addWidget(statusLabel,3,3); 187// topLayout->addWidget(statusLabel,3,3);
187// topLayout->addWidget(mStatusCombo,3,4); 188// topLayout->addWidget(mStatusCombo,3,4);
188// #else 189// #else
189// topLayout->addWidget(statusLabel,4,3); 190// topLayout->addWidget(statusLabel,4,3);
190// // topLayout->addWidget(mStatusCombo,4,3); 191// // topLayout->addWidget(mStatusCombo,4,3);
191// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5); 192// topLayout->addMultiCellWidget(mStatusCombo,4,4,4,5);
192 193
193// #endif 194// #endif
194// // topLayout->setRowStretch(5,1); 195// // topLayout->setRowStretch(5,1);
195// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1); 196// topLayout->addMultiCellWidget(mRsvpButton,5,5,0,1);
196// topLayout->addMultiCellWidget(buttonBox,2,3,5,5); 197// topLayout->addMultiCellWidget(buttonBox,2,3,5,5);
197// topLayout->setRowStretch(1,5); 198// topLayout->setRowStretch(1,5);
198// topLayout->setColStretch(0,0); 199// topLayout->setColStretch(0,0);
199 200
200#ifdef KORG_NOKABC 201#ifdef KORG_NOKABC
201 mAddressBookButton->hide(); 202 mAddressBookButton->hide();
202#endif 203#endif
203 204
204 updateAttendeeInput(); 205 updateAttendeeInput();
205#ifndef DESKTOP_VERSION 206#ifndef DESKTOP_VERSION
206//US listen for arriving address resultsets 207//US listen for arriving address resultsets
207 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)), 208 connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
208 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&))); 209 this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
209#endif 210#endif
210 211
211} 212}
212 213
213KOEditorDetails::~KOEditorDetails() 214KOEditorDetails::~KOEditorDetails()
214{ 215{
215} 216}
216 217
217void KOEditorDetails::removeAttendee() 218void KOEditorDetails::removeAttendee()
218{ 219{
219 AttendeeListItem *aItem = (AttendeeListItem *)mListView->selectedItem(); 220 AttendeeListItem *aItem = (AttendeeListItem *)mListView->selectedItem();
220 if (!aItem) return; 221 if (!aItem) return;
221 222
222 Attendee *delA = new Attendee(aItem->data()->name(),aItem->data()->email(), 223 Attendee *delA = new Attendee(aItem->data()->name(),aItem->data()->email(),
223 aItem->data()->RSVP(),aItem->data()->status(),aItem->data()->role(), 224 aItem->data()->RSVP(),aItem->data()->status(),aItem->data()->role(),
224 aItem->data()->uid()); 225 aItem->data()->uid());
225 mdelAttendees.append(delA); 226 mdelAttendees.append(delA);
226 227
227 delete aItem; 228 delete aItem;
228 229
229 updateAttendeeInput(); 230 updateAttendeeInput();
230} 231}
231 232
232 233
233void KOEditorDetails::openAddressBook() 234void KOEditorDetails::openAddressBook()
234{ 235{
235#ifndef KORG_NOKABC 236#ifndef KORG_NOKABC
236 237
237#ifdef DESKTOP_VERSION 238#ifdef DESKTOP_VERSION
238 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this); 239 KABC::Addressee::List list = KABC::AddresseeDialog::getAddressees(this);
239 uint i=0; 240 uint i=0;
240 for (i=0; i < list.count(); i++) { 241 for (i=0; i < list.count(); i++) {
241 insertAttendee( new Attendee( list[i].realName(), list[i].preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,list[i].uid()) ); 242 insertAttendee( new Attendee( list[i].realName(), list[i].preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,list[i].uid()) );
242 } 243 }
243#else 244#else
244 bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/); 245 bool res = ExternalAppHandler::instance()->requestNameEmailUidListFromKAPI("QPE/Application/kopi", this->name() /* name is here the unique uid*/);
245 // the result should now arrive through method insertAttendees 246 // the result should now arrive through method insertAttendees
246#endif 247#endif
247 248
248 249
249#if 0 250#if 0
250 KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this); 251 KABC::Addressee a = KABC::AddresseeDialog::getAddressee(this);
251 if (!a.isEmpty()) { 252 if (!a.isEmpty()) {
252 insertAttendee( new Attendee( a.realName(), a.preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,a.uid()) ); 253 insertAttendee( new Attendee( a.realName(), a.preferredEmail(),false,KCal::Attendee::NeedsAction,KCal::Attendee::ReqParticipant,a.uid()) );
253 } 254 }
254#endif 255#endif
255#endif 256#endif
256} 257}
257 258
258 259
259void KOEditorDetails::addNewAttendee() 260void KOEditorDetails::addNewAttendee()
260{ 261{
261#if 0 262#if 0
262 // this is cool. If they didn't enter an email address, 263 // this is cool. If they didn't enter an email address,
263 // try to look it up in the address book and fill it in for them. 264 // try to look it up in the address book and fill it in for them.
264 if (QString(mEmailEdit->text()).stripWhiteSpace().isEmpty()) { 265 if (QString(mEmailEdit->text()).stripWhiteSpace().isEmpty()) {
265 KabAPI addrBook; 266 KabAPI addrBook;
266 QString name; 267 QString name;
267 std::list<AddressBook::Entry> entries; 268 std::list<AddressBook::Entry> entries;
268 name = mNameEdit->text(); 269 name = mNameEdit->text();
269 if (addrBook.init() == AddressBook::NoError) { 270 if (addrBook.init() == AddressBook::NoError) {
270 if (addrBook.getEntryByName(name, entries, 1) == AddressBook::NoError) { 271 if (addrBook.getEntryByName(name, entries, 1) == AddressBook::NoError) {
271 kdDebug() << "positive match" << endl; 272 kdDebug() << "positive match" << endl;
272 // take first email address 273 // take first email address
273 if (!entries.front().emails.isEmpty() && 274 if (!entries.front().emails.isEmpty() &&
274 entries.front().emails.first().length()>0) 275 entries.front().emails.first().length()>0)
275 mEmailEdit->setText(entries.front().emails.first()); 276 mEmailEdit->setText(entries.front().emails.first());
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index b4fe965..f5eb52e 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -124,287 +124,287 @@ void KOEditorGeneral::editCategories()
124 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) ); 124 csd->setSelected( QStringList::split (",", mCategoriesLabel->text()) );
125 csd->exec(); 125 csd->exec();
126 delete csd; 126 delete csd;
127} 127}
128void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout) 128void KOEditorGeneral::initCategories(QWidget *parent, QBoxLayout *topLayout)
129{ 129{
130 QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout ); 130 QBoxLayout *categoriesLayout = new QHBoxLayout( topLayout );
131 131
132 mCategoriesButton = new QPushButton(parent); 132 mCategoriesButton = new QPushButton(parent);
133 mCategoriesButton->setText(i18n("Categories...")); 133 mCategoriesButton->setText(i18n("Categories..."));
134 connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() )); 134 connect(mCategoriesButton,SIGNAL(clicked()),this, SLOT(editCategories() ));
135 categoriesLayout->addWidget(mCategoriesButton); 135 categoriesLayout->addWidget(mCategoriesButton);
136 136
137 mCategoriesLabel = new QLabel(parent); 137 mCategoriesLabel = new QLabel(parent);
138 mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken); 138 mCategoriesLabel->setFrameStyle(QFrame::Panel|QFrame::Sunken);
139 categoriesLayout->addWidget(mCategoriesLabel,1); 139 categoriesLayout->addWidget(mCategoriesLabel,1);
140} 140}
141 141
142void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout) 142void KOEditorGeneral::initSecrecy(QWidget *parent, QBoxLayout *topLayout)
143{ 143{
144 QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout ); 144 QBoxLayout *secrecyLayout = new QHBoxLayout( topLayout );
145 145
146 QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent); 146 QLabel *secrecyLabel = new QLabel(i18n("Access:"),parent);
147 mCancelBox = new QCheckBox ( i18n("Cancelled"), parent); 147 mCancelBox = new QCheckBox ( i18n("Cancelled"), parent);
148 secrecyLayout->addWidget(mCancelBox); 148 secrecyLayout->addWidget(mCancelBox);
149 secrecyLayout->addWidget(secrecyLabel); 149 secrecyLayout->addWidget(secrecyLabel);
150 150
151 mSecrecyCombo = new QComboBox(parent); 151 mSecrecyCombo = new QComboBox(parent);
152 mSecrecyCombo->insertStringList(Incidence::secrecyList()); 152 mSecrecyCombo->insertStringList(Incidence::secrecyList());
153 secrecyLayout->addWidget(mSecrecyCombo); 153 secrecyLayout->addWidget(mSecrecyCombo);
154} 154}
155 155
156void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout) 156void KOEditorGeneral::initDescription(QWidget *parent,QBoxLayout *topLayout)
157{ 157{
158 mDescriptionEdit = new KTextEdit(parent); 158 mDescriptionEdit = new KTextEdit(parent);
159 mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont ); 159 mDescriptionEdit->setFont(KOPrefs::instance()->mEditBoxFont );
160 mDescriptionEdit->append(""); 160 mDescriptionEdit->append("");
161 mDescriptionEdit->setReadOnly(false); 161 mDescriptionEdit->setReadOnly(false);
162 mDescriptionEdit->setOverwriteMode(false); 162 mDescriptionEdit->setOverwriteMode(false);
163 mDescriptionEdit->setWordWrap( KTextEdit::WidgetWidth ); 163 mDescriptionEdit->setWordWrap( KTextEdit::WidgetWidth );
164 topLayout->addWidget(mDescriptionEdit); 164 topLayout->addWidget(mDescriptionEdit);
165#ifndef DESKTOP_VERSION 165#ifndef DESKTOP_VERSION
166 QPEApplication::setStylusOperation( mDescriptionEdit, QPEApplication::RightOnHold ); 166 QPEApplication::setStylusOperation( mDescriptionEdit, QPEApplication::RightOnHold );
167#endif 167#endif
168 168
169} 169}
170 170
171void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) 171void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
172{ 172{
173 QBoxLayout *alarmLayout = new QHBoxLayout(topLayout); 173 QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
174 174
175 //mAlarmBell = new QLabel(parent); 175 //mAlarmBell = new QLabel(parent);
176 //mAlarmBell->setPixmap(SmallIcon("bell")); 176 //mAlarmBell->setPixmap(SmallIcon("bell"));
177 //alarmLayout->addWidget(mAlarmBell); 177 //alarmLayout->addWidget(mAlarmBell);
178 if ( QApplication::desktop()->width() < 320 ) 178 if ( QApplication::desktop()->width() < 320 )
179 mAlarmButton = new QCheckBox(i18n("Rem."),parent); 179 mAlarmButton = new QCheckBox(i18n("Rem."),parent);
180 else 180 else
181 mAlarmButton = new QCheckBox(i18n("Reminder:"),parent); 181 mAlarmButton = new QCheckBox(i18n("Reminder:"),parent);
182 182
183 connect(mAlarmButton, SIGNAL(toggled(bool)), SLOT(enableAlarmEdit(bool))); 183 connect(mAlarmButton, SIGNAL(toggled(bool)), SLOT(enableAlarmEdit(bool)));
184 alarmLayout->addWidget(mAlarmButton); 184 alarmLayout->addWidget(mAlarmButton);
185 185
186 mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ; 186 mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ;
187 alarmLayout->addWidget(mAlarmTimeEdit); 187 alarmLayout->addWidget(mAlarmTimeEdit);
188 mAlarmIncrCombo = new QComboBox(false, parent); 188 mAlarmIncrCombo = new QComboBox(false, parent);
189 if ( QApplication::desktop()->width() < 320 ) { 189 if ( QApplication::desktop()->width() < 320 ) {
190 mAlarmIncrCombo->insertItem(i18n("min")); 190 mAlarmIncrCombo->insertItem(i18n("min"));
191 mAlarmIncrCombo->insertItem(i18n("hou")); 191 mAlarmIncrCombo->insertItem(i18n("hou"));
192 mAlarmIncrCombo->insertItem(i18n("day")); 192 mAlarmIncrCombo->insertItem(i18n("day"));
193 mAlarmTimeEdit->setMaximumWidth( mAlarmTimeEdit->sizeHint().width() ); 193 mAlarmTimeEdit->setMaximumWidth( mAlarmTimeEdit->sizeHint().width() );
194 mAlarmIncrCombo->setMaximumWidth( mAlarmIncrCombo->sizeHint().width() ); 194 mAlarmIncrCombo->setMaximumWidth( mAlarmIncrCombo->sizeHint().width() );
195 } else { 195 } else {
196 mAlarmIncrCombo->insertItem(i18n("minute(s)")); 196 mAlarmIncrCombo->insertItem(i18n("minute(s)"));
197 mAlarmIncrCombo->insertItem(i18n("hour(s)")); 197 mAlarmIncrCombo->insertItem(i18n("hour(s)"));
198 mAlarmIncrCombo->insertItem(i18n("day(s)")); 198 mAlarmIncrCombo->insertItem(i18n("day(s)"));
199 } 199 }
200 200
201 // mAlarmIncrCombo->setMinimumHeight(20); 201 // mAlarmIncrCombo->setMinimumHeight(20);
202 alarmLayout->addWidget(mAlarmIncrCombo); 202 alarmLayout->addWidget(mAlarmIncrCombo);
203 mAlarmSoundButton = new QPushButton(parent); 203 mAlarmSoundButton = new QPushButton(parent);
204 mAlarmSoundButton->setPixmap(SmallIcon("playsound")); 204 mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
205 mAlarmSoundButton->setToggleButton(true); 205 mAlarmSoundButton->setToggleButton(true);
206 QToolTip::add(mAlarmSoundButton, i18n("No sound set")); 206 QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
207 connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); 207 connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound()));
208 alarmLayout->addWidget(mAlarmSoundButton); 208 alarmLayout->addWidget(mAlarmSoundButton);
209 209
210 mAlarmProgramButton = new QPushButton(parent); 210 mAlarmProgramButton = new QPushButton(parent);
211 mAlarmProgramButton->setPixmap(SmallIcon("run")); 211 mAlarmProgramButton->setPixmap(SmallIcon("run"));
212 mAlarmProgramButton->setToggleButton(true); 212 mAlarmProgramButton->setToggleButton(true);
213 QToolTip::add(mAlarmProgramButton, i18n("No program set")); 213 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
214 connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); 214 connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram()));
215 alarmLayout->addWidget(mAlarmProgramButton); 215 alarmLayout->addWidget(mAlarmProgramButton);
216 mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); 216 mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 );
217 mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); 217 mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 );
218 // if ( KOPrefs::instance()->mCompactDialogs ) { 218 // if ( KOPrefs::instance()->mCompactDialogs ) {
219 // mAlarmSoundButton->hide(); 219 // mAlarmSoundButton->hide();
220 // mAlarmProgramButton->hide(); 220 // mAlarmProgramButton->hide();
221 // } 221 // }
222} 222}
223 223
224void KOEditorGeneral::pickAlarmSound() 224void KOEditorGeneral::pickAlarmSound()
225{ 225{
226 226
227 //QString prefix = mAlarmSound; 227 //QString prefix = mAlarmSound;
228 if (!mAlarmSoundButton->isOn()) { 228 if (!mAlarmSoundButton->isOn()) {
229 //mAlarmSound = ""; 229 //mAlarmSound = "";
230 QToolTip::remove(mAlarmSoundButton); 230 QToolTip::remove(mAlarmSoundButton);
231 QToolTip::add(mAlarmSoundButton, i18n("No sound set")); 231 QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
232 mAlarmProgramButton->setOn(true); 232 mAlarmProgramButton->setOn(true);
233 mAlarmSoundButton->setOn(false); 233 mAlarmSoundButton->setOn(false);
234 } else { 234 } else {
235 QString fileName(KFileDialog::getOpenFileName(mAlarmSound, 235 QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
236 i18n("*.wav|Wav Files"), 0)); 236 i18n("*.wav|Wav Files"), 0));
237 if (!fileName.isEmpty()) { 237 if (!fileName.isEmpty()) {
238 mAlarmSound = fileName; 238 mAlarmSound = fileName;
239 QToolTip::remove(mAlarmSoundButton); 239 QToolTip::remove(mAlarmSoundButton);
240 QString dispStr = i18n("Playing '%1'").arg(fileName); 240 QString dispStr = i18n("Playing '%1'").arg(fileName);
241 QToolTip::add(mAlarmSoundButton, dispStr); 241 QToolTip::add(mAlarmSoundButton, dispStr);
242 mAlarmProgramButton->setOn(false); 242 mAlarmProgramButton->setOn(false);
243 mAlarmSoundButton->setOn(true); 243 mAlarmSoundButton->setOn(true);
244 } else { 244 } else {
245 mAlarmProgramButton->setOn(true); 245 mAlarmProgramButton->setOn(true);
246 mAlarmSoundButton->setOn(false); 246 mAlarmSoundButton->setOn(false);
247 247
248 } 248 }
249 } 249 }
250 250
251 if (mAlarmProgramButton->isOn()) 251 if (mAlarmProgramButton->isOn())
252 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram ); 252 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
253 if ( mAlarmSoundButton->isOn()) 253 if ( mAlarmSoundButton->isOn())
254 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + mAlarmSound ); 254 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) );
255} 255}
256 256
257void KOEditorGeneral::pickAlarmProgram() 257void KOEditorGeneral::pickAlarmProgram()
258{ 258{
259 if (!mAlarmProgramButton->isOn()) { 259 if (!mAlarmProgramButton->isOn()) {
260 //mAlarmProgram = ""; 260 //mAlarmProgram = "";
261 QToolTip::remove(mAlarmProgramButton); 261 QToolTip::remove(mAlarmProgramButton);
262 QToolTip::add(mAlarmProgramButton, i18n("No program set")); 262 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
263 mAlarmProgramButton->setOn(false); 263 mAlarmProgramButton->setOn(false);
264 mAlarmSoundButton->setOn(true); 264 mAlarmSoundButton->setOn(true);
265 } else { 265 } else {
266 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); 266 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0));
267 if (!fileName.isEmpty()) { 267 if (!fileName.isEmpty()) {
268 mAlarmProgram = fileName; 268 mAlarmProgram = fileName;
269 QToolTip::remove(mAlarmProgramButton); 269 QToolTip::remove(mAlarmProgramButton);
270 QString dispStr = i18n("Running '%1'").arg(fileName); 270 QString dispStr = i18n("Running '%1'").arg(fileName);
271 QToolTip::add(mAlarmProgramButton, dispStr); 271 QToolTip::add(mAlarmProgramButton, dispStr);
272 mAlarmSoundButton->setOn(false); 272 mAlarmSoundButton->setOn(false);
273 mAlarmProgramButton->setOn(true); 273 mAlarmProgramButton->setOn(true);
274 } else { 274 } else {
275 mAlarmProgramButton->setOn(false); 275 mAlarmProgramButton->setOn(false);
276 mAlarmSoundButton->setOn(true); 276 mAlarmSoundButton->setOn(true);
277 } 277 }
278 } 278 }
279 if (mAlarmProgramButton->isOn()) 279 if (mAlarmProgramButton->isOn())
280 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram ); 280 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
281 if ( mAlarmSoundButton->isOn()) 281 if ( mAlarmSoundButton->isOn())
282 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + mAlarmSound ); 282 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) );
283} 283}
284 284
285 285
286QString KOEditorGeneral::getFittingPath( const QString s ) 286QString KOEditorGeneral::getFittingPath( const QString s )
287{ 287{
288 int maxlen = 50; 288 int maxlen = 50;
289 if ( QApplication::desktop()->width() < 640 ) { 289 if ( QApplication::desktop()->width() < 640 ) {
290 if ( QApplication::desktop()->width() < 320 ) 290 if ( QApplication::desktop()->width() < 320 )
291 maxlen = 22; 291 maxlen = 22;
292 else 292 else
293 maxlen = 35; 293 maxlen = 35;
294 } 294 }
295 if ( s.length() > maxlen ) { 295 if ( s.length() > maxlen ) {
296 return "..."+s.right(maxlen -3); 296 return "..."+s.right(maxlen -3);
297 } 297 }
298 return s; 298 return s;
299} 299}
300 300
301void KOEditorGeneral::enableAlarmEdit(bool enable) 301void KOEditorGeneral::enableAlarmEdit(bool enable)
302{ 302{
303 if ( enable ) { 303 if ( enable ) {
304 if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) { 304 if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) {
305 mAlarmSoundButton->setOn( true ); 305 mAlarmSoundButton->setOn( true );
306 if ( mAlarmSound.isEmpty() ) 306 if ( mAlarmSound.isEmpty() )
307 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; 307 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
308 else { 308 else {
309 if ( ! QFile::exists( mAlarmSound ) ) 309 if ( ! QFile::exists( mAlarmSound ) )
310 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; 310 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
311 } 311 }
312 } 312 }
313 if (mAlarmProgramButton->isOn()) 313 if (mAlarmProgramButton->isOn())
314 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); 314 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
315 if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) 315 if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn())
316 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); 316 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
317 } 317 }
318 else { 318 else {
319 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item")); 319 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item"));
320 320
321 } 321 }
322 mAlarmTimeEdit->setEnabled(enable); 322 mAlarmTimeEdit->setEnabled(enable);
323 mAlarmSoundButton->setEnabled(enable); 323 mAlarmSoundButton->setEnabled(enable);
324 mAlarmProgramButton->setEnabled(enable); 324 mAlarmProgramButton->setEnabled(enable);
325 mAlarmIncrCombo->setEnabled(enable); 325 mAlarmIncrCombo->setEnabled(enable);
326} 326}
327 327
328void KOEditorGeneral::disableAlarmEdit(bool disable) 328void KOEditorGeneral::disableAlarmEdit(bool disable)
329{ 329{
330 enableAlarmEdit( !disable ); 330 enableAlarmEdit( !disable );
331} 331}
332 332
333void KOEditorGeneral::enableAlarm( bool enable ) 333void KOEditorGeneral::enableAlarm( bool enable )
334{ 334{
335 enableAlarmEdit( enable ); 335 enableAlarmEdit( enable );
336} 336}
337 337
338void KOEditorGeneral::alarmDisable(bool disable) 338void KOEditorGeneral::alarmDisable(bool disable)
339{ 339{
340 if (!disable) { 340 if (!disable) {
341 //mAlarmBell->setEnabled(true); 341 //mAlarmBell->setEnabled(true);
342 mAlarmButton->setEnabled(true); 342 mAlarmButton->setEnabled(true);
343 } else { 343 } else {
344 //mAlarmBell->setEnabled(false); 344 //mAlarmBell->setEnabled(false);
345 mAlarmButton->setEnabled(false); 345 mAlarmButton->setEnabled(false);
346 mAlarmButton->setChecked(false); 346 mAlarmButton->setChecked(false);
347 mAlarmTimeEdit->setEnabled(false); 347 mAlarmTimeEdit->setEnabled(false);
348 mAlarmSoundButton->setEnabled(false); 348 mAlarmSoundButton->setEnabled(false);
349 mAlarmProgramButton->setEnabled(false); 349 mAlarmProgramButton->setEnabled(false);
350 mAlarmIncrCombo->setEnabled(false); 350 mAlarmIncrCombo->setEnabled(false);
351 } 351 }
352} 352}
353 353
354void KOEditorGeneral::setCategories(const QString &str) 354void KOEditorGeneral::setCategories(const QString &str)
355{ 355{
356 mCategoriesLabel->setText(str); 356 mCategoriesLabel->setText(str);
357} 357}
358 358
359void KOEditorGeneral::setDefaults(bool allDay) 359void KOEditorGeneral::setDefaults(bool allDay)
360{ 360{
361#if 0 361#if 0
362 mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); 362 mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName());
363#endif 363#endif
364 364
365 enableAlarmEdit( !allDay ); 365 enableAlarmEdit( !allDay );
366 366
367 // TODO: Implement a KPrefsComboItem to solve this in a clean way. 367 // TODO: Implement a KPrefsComboItem to solve this in a clean way.
368 int alarmTime; 368 int alarmTime;
369 int a[] = { 1,5,10,15,30,60,180, 1440 }; 369 int a[] = { 1,5,10,15,30,60,180, 1440 };
370 int index = KOPrefs::instance()->mAlarmTime; 370 int index = KOPrefs::instance()->mAlarmTime;
371 if (index < 0 || index > 7) { 371 if (index < 0 || index > 7) {
372 alarmTime = 15; 372 alarmTime = 15;
373 } else { 373 } else {
374 alarmTime = a[index]; 374 alarmTime = a[index];
375 } 375 }
376 mAlarmButton ->setChecked( false ); 376 mAlarmButton ->setChecked( false );
377 mAlarmTimeEdit->setValue(alarmTime); 377 mAlarmTimeEdit->setValue(alarmTime);
378 mAlarmIncrCombo->setCurrentItem(0); 378 mAlarmIncrCombo->setCurrentItem(0);
379 enableAlarmEdit( false ); 379 enableAlarmEdit( false );
380 //alarmDisable (false); 380 //alarmDisable (false);
381 mSecrecyCombo->setCurrentItem(Incidence::SecrecyPublic); 381 mSecrecyCombo->setCurrentItem(Incidence::SecrecyPublic);
382 mCancelBox->setChecked( false ); 382 mCancelBox->setChecked( false );
383 mSummaryEdit->setEditText(""); 383 mSummaryEdit->setEditText("");
384 mLocationEdit->setEditText(""); 384 mLocationEdit->setEditText("");
385 mDescriptionEdit->setText(""); 385 mDescriptionEdit->setText("");
386 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; 386 mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile;
387 setCategories(""); 387 setCategories("");
388} 388}
389void KOEditorGeneral::setSecrecy( int num ) 389void KOEditorGeneral::setSecrecy( int num )
390{ 390{
391 mSecrecyCombo->setCurrentItem(num); 391 mSecrecyCombo->setCurrentItem(num);
392} 392}
393void KOEditorGeneral::readIncidence(Incidence *event) 393void KOEditorGeneral::readIncidence(Incidence *event)
394{ 394{
395 395
396 mAlarmIncrCombo->setCurrentItem(0); 396 mAlarmIncrCombo->setCurrentItem(0);
397 mSummaryEdit->setEditText(event->summary()); 397 mSummaryEdit->setEditText(event->summary());
398 mLocationEdit->setEditText(event->location()); 398 mLocationEdit->setEditText(event->location());
399 mDescriptionEdit->setText(event->description()); 399 mDescriptionEdit->setText(event->description());
400 400
401#if 0 401#if 0
402 // organizer information 402 // organizer information
403 mOwnerLabel->setText(i18n("Owner: ") + event->organizer()); 403 mOwnerLabel->setText(i18n("Owner: ") + event->organizer());
404#endif 404#endif
405 405
406 enableAlarmEdit( event->isAlarmEnabled() ); 406 enableAlarmEdit( event->isAlarmEnabled() );
407 //qDebug("KOEditorGeneral::readIncidence(Incidence *event) "); 407 //qDebug("KOEditorGeneral::readIncidence(Incidence *event) ");
408 if(!event->isAlarmEnabled()) { 408 if(!event->isAlarmEnabled()) {
409 // TODO: Implement a KPrefsComboItem to solve this in a clean way. 409 // TODO: Implement a KPrefsComboItem to solve this in a clean way.
410 int alarmTime; 410 int alarmTime;
diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp
index ea73fd0..1b24f56 100644
--- a/korganizer/koprefsdialog.cpp
+++ b/korganizer/koprefsdialog.cpp
@@ -591,279 +591,277 @@ void KOPrefsDialog::setupViewsTab()
591// dayBeginsLayout->addWidget(dayBegins->label()); 591// dayBeginsLayout->addWidget(dayBegins->label());
592// dayBeginsLayout->addStretch(1); 592// dayBeginsLayout->addStretch(1);
593// dayBeginsLayout->addWidget(dayBegins->spinBox()); 593// dayBeginsLayout->addWidget(dayBegins->spinBox());
594 594
595// QBoxLayout *nextDaysLayout = new QHBoxLayout; 595// QBoxLayout *nextDaysLayout = new QHBoxLayout;
596// topLayout->addLayout(nextDaysLayout,1,0); 596// topLayout->addLayout(nextDaysLayout,1,0);
597// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame)); 597// nextDaysLayout->addWidget(new QLabel(i18n("Days to show in Next-X-Days view:"),topFrame));
598// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame); 598// mNextXDaysSpin = new QSpinBox(2,14,1,topFrame);
599// nextDaysLayout->addStretch(1); 599// nextDaysLayout->addStretch(1);
600// nextDaysLayout->addWidget(mNextXDaysSpin); 600// nextDaysLayout->addWidget(mNextXDaysSpin);
601 601
602 602
603 int ii = 0; 603 int ii = 0;
604 KPrefsDialogWidBool *dummy = 604 KPrefsDialogWidBool *dummy =
605 addWidBool(i18n("Edit item on doubleclick (if not, show)"), 605 addWidBool(i18n("Edit item on doubleclick (if not, show)"),
606 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame); 606 &(KOPrefs::instance()->mEditOnDoubleClick),topFrame);
607 topLayout->addWidget(dummy->checkBox(),ii++,0); 607 topLayout->addWidget(dummy->checkBox(),ii++,0);
608 608
609 dummy = 609 dummy =
610 addWidBool(i18n("Show time in agenda items"), 610 addWidBool(i18n("Show time in agenda items"),
611 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame); 611 &(KOPrefs::instance()->mShowTimeInAgenda),topFrame);
612 topLayout->addWidget(dummy->checkBox(),ii++,0); 612 topLayout->addWidget(dummy->checkBox(),ii++,0);
613 613
614 dummy = 614 dummy =
615 addWidBool(i18n("Highlight current day in agenda"), 615 addWidBool(i18n("Highlight current day in agenda"),
616 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame); 616 &(KOPrefs::instance()->mHighlightCurrentDay),topFrame);
617 topLayout->addWidget(dummy->checkBox(),ii++,0); 617 topLayout->addWidget(dummy->checkBox(),ii++,0);
618 618
619 dummy = 619 dummy =
620 addWidBool(i18n("Use light color for highlight current day"), 620 addWidBool(i18n("Use light color for highlight current day"),
621 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame); 621 &(KOPrefs::instance()->mUseHighlightLightColor),topFrame);
622 topLayout->addWidget(dummy->checkBox(),ii++,0); 622 topLayout->addWidget(dummy->checkBox(),ii++,0);
623 623
624 KPrefsDialogWidBool *dailyRecur = 624 KPrefsDialogWidBool *dailyRecur =
625 addWidBool(i18n("Show events that recur daily in date nav."), 625 addWidBool(i18n("Show events that recur daily in date nav."),
626 &(KOPrefs::instance()->mDailyRecur),topFrame); 626 &(KOPrefs::instance()->mDailyRecur),topFrame);
627 topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 627 topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
628 628
629 KPrefsDialogWidBool *weeklyRecur = 629 KPrefsDialogWidBool *weeklyRecur =
630 addWidBool(i18n("Show ev. that recur weekly in date nav."), 630 addWidBool(i18n("Show ev. that recur weekly in date nav."),
631 &(KOPrefs::instance()->mWeeklyRecur),topFrame); 631 &(KOPrefs::instance()->mWeeklyRecur),topFrame);
632 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); 632 topLayout->addWidget(weeklyRecur->checkBox(),ii++,0);
633 if ( QApplication::desktop()->width() > 640 ) { 633 if ( QApplication::desktop()->width() > 640 ) {
634 634
635 KPrefsDialogWidBool *enableToolTips = 635 KPrefsDialogWidBool *enableToolTips =
636 addWidBool(i18n("Enable tooltips displaying summary of ev."), 636 addWidBool(i18n("Enable tooltips displaying summary of ev."),
637 &(KOPrefs::instance()->mEnableToolTips),topFrame); 637 &(KOPrefs::instance()->mEnableToolTips),topFrame);
638 topLayout->addWidget(enableToolTips->checkBox(),ii++,0); 638 topLayout->addWidget(enableToolTips->checkBox(),ii++,0);
639 639
640 } 640 }
641 641
642 KPrefsDialogWidBool *marcusBainsEnabled = 642 KPrefsDialogWidBool *marcusBainsEnabled =
643 addWidBool(i18n("Show Marcus Bains line"), 643 addWidBool(i18n("Show Marcus Bains line"),
644 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame); 644 &(KOPrefs::instance()->mMarcusBainsEnabled),topFrame);
645 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0); 645 topLayout->addWidget(marcusBainsEnabled->checkBox(),ii++,0);
646 646
647 647
648 // topLayout->addWidget(hourSizeGroup,ii++,0); 648 // topLayout->addWidget(hourSizeGroup,ii++,0);
649 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0); 649 // topLayout->addMultiCellWidget(hourSizeGroup,ii,ii,0,0);
650 //topLayout->setRowStretch(11,1); 650 //topLayout->setRowStretch(11,1);
651 651
652 652
653 653
654 654
655 655
656 656
657 topFrame = addPage(i18n("ViewChange"),0,0); 657 topFrame = addPage(i18n("ViewChange"),0,0);
658 // DesktopIcon("viewmag",KIcon::SizeMedium)); 658 // DesktopIcon("viewmag",KIcon::SizeMedium));
659 659
660 topLayout = new QGridLayout(topFrame,6,1); 660 topLayout = new QGridLayout(topFrame,6,1);
661 topLayout->setSpacing(spacingHint()); 661 topLayout->setSpacing(spacingHint());
662 topLayout->setMargin(marginHint()); 662 topLayout->setMargin(marginHint());
663 ii = 0; 663 ii = 0;
664 664
665 665
666 dummy = 666 dummy =
667 addWidBool(i18n("Hold fullscreen on view change"), 667 addWidBool(i18n("Hold fullscreen on view change"),
668 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame); 668 &(KOPrefs::instance()->mViewChangeHoldFullscreen),topFrame);
669 topLayout->addWidget(dummy->checkBox(),ii++,0); 669 topLayout->addWidget(dummy->checkBox(),ii++,0);
670 670
671 dummy = 671 dummy =
672 addWidBool(i18n("Hold non-fullscreen on view change"), 672 addWidBool(i18n("Hold non-fullscreen on view change"),
673 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame); 673 &(KOPrefs::instance()->mViewChangeHoldNonFullscreen),topFrame);
674 topLayout->addWidget(dummy->checkBox(),ii++,0); 674 topLayout->addWidget(dummy->checkBox(),ii++,0);
675 675
676 676
677 KPrefsDialogWidBool *fullViewTodo = 677 KPrefsDialogWidBool *fullViewTodo =
678 addWidBool(i18n("Event list view uses full window"), 678 addWidBool(i18n("Event list view uses full window"),
679 &(KOPrefs::instance()->mFullViewTodo),topFrame); 679 &(KOPrefs::instance()->mFullViewTodo),topFrame);
680 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0); 680 topLayout->addWidget(fullViewTodo->checkBox(),ii++,0);
681 681
682 KPrefsDialogWidBool *fullViewMonth = 682 KPrefsDialogWidBool *fullViewMonth =
683 addWidBool(i18n("Next days view uses full window"), 683 addWidBool(i18n("Next days view uses full window"),
684 &(KOPrefs::instance()->mFullViewMonth),topFrame); 684 &(KOPrefs::instance()->mFullViewMonth),topFrame);
685 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0); 685 topLayout->addWidget(fullViewMonth->checkBox(),ii++,0);
686 686
687 dummy = 687 dummy =
688 addWidBool(i18n("Set agenda to DayBeginsAt on change"), 688 addWidBool(i18n("Set agenda to DayBeginsAt on change"),
689 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame); 689 &(KOPrefs::instance()->mSetTimeToDayStartAt),topFrame);
690 topLayout->addWidget(dummy->checkBox(),ii++,0); 690 topLayout->addWidget(dummy->checkBox(),ii++,0);
691 691
692 dummy = 692 dummy =
693 addWidBool(i18n("Set agenda to current time on change"), 693 addWidBool(i18n("Set agenda to current time on change"),
694 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame); 694 &(KOPrefs::instance()->mCenterOnCurrentTime),topFrame);
695 topLayout->addWidget(dummy->checkBox(),ii++,0); 695 topLayout->addWidget(dummy->checkBox(),ii++,0);
696 696
697 dummy = 697 dummy =
698 addWidBool(i18n("Listview uses monthly timespan"), 698 addWidBool(i18n("Listview uses monthly timespan"),
699 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame); 699 &(KOPrefs::instance()->mListViewMonthTimespan),topFrame);
700 topLayout->addWidget(dummy->checkBox(),ii++,0); 700 topLayout->addWidget(dummy->checkBox(),ii++,0);
701 dummy = 701 dummy =
702 addWidBool(i18n("Highlight selection in Time Edit"), 702 addWidBool(i18n("Highlight selection in Time Edit"),
703 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame); 703 &(KOPrefs::instance()->mHightlightDateTimeEdit),topFrame);
704 topLayout->addWidget( dummy->checkBox(), ii++,0); 704 topLayout->addWidget( dummy->checkBox(), ii++,0);
705 705
706 706
707 707
708 708
709 709
710 topFrame = addPage(i18n("Month View"),0,0); 710 topFrame = addPage(i18n("Month View"),0,0);
711 // DesktopIcon("viewmag",KIcon::SizeMedium)); 711 // DesktopIcon("viewmag",KIcon::SizeMedium));
712 712
713 topLayout = new QGridLayout(topFrame,5,1); 713 topLayout = new QGridLayout(topFrame,5,1);
714 topLayout->setSpacing(spacingHint()); 714 topLayout->setSpacing(spacingHint());
715 topLayout->setMargin(marginHint()); 715 topLayout->setMargin(marginHint());
716 ii = 0; 716 ii = 0;
717 QLabel *lab; 717 QLabel *lab;
718 QHBox *habo = new QHBox( topFrame ); 718 QHBox *habo = new QHBox( topFrame );
719 if ( QApplication::desktop()->width() < 320 ) { 719 if ( QApplication::desktop()->width() <= 480 ) {
720 lab = new QLabel ( i18n("Show events that recur "), topFrame ); 720 lab = new QLabel ( i18n("Show events that recur "), topFrame );
721 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 721 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
722 ii++; 722 ii++;
723
724 } else { 723 } else {
725 new QLabel ( i18n("Show events that recur "), habo ); 724 new QLabel ( i18n("Show events that recur "), habo );
726
727 } 725 }
728 dailyRecur = 726 dailyRecur =
729 addWidBool(i18n("daily"), 727 addWidBool(i18n("daily"),
730 &(KOPrefs::instance()->mMonthDailyRecur),habo); 728 &(KOPrefs::instance()->mMonthDailyRecur),habo);
731 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0); 729 // topLayout->addWidget(dailyRecur->checkBox(),ii++,0);
732 730
733 weeklyRecur = 731 weeklyRecur =
734 addWidBool(i18n("weekly"), 732 addWidBool(i18n("weekly"),
735 &(KOPrefs::instance()->mMonthWeeklyRecur),habo); 733 &(KOPrefs::instance()->mMonthWeeklyRecur),habo);
736 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 734 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
737 ii++; 735 ii++;
738 736
739 737
740 habo = new QHBox( topFrame ); 738 habo = new QHBox( topFrame );
741 if ( QApplication::desktop()->width() < 320 ) { 739 if ( QApplication::desktop()->width() <= 480 ) {
742 lab = new QLabel (i18n("Show in every cell ") , topFrame ); 740 lab = new QLabel (i18n("Show in every cell ") , topFrame );
743 topLayout->addMultiCellWidget(lab,ii, ii,0,1); 741 topLayout->addMultiCellWidget(lab,ii, ii,0,1);
744 ii++; 742 ii++;
745 743
746 } else { 744 } else {
747 new QLabel ( i18n("Show in every cell "), habo ); 745 new QLabel ( i18n("Show in every cell "), habo );
748 } 746 }
749 weeklyRecur = 747 weeklyRecur =
750 addWidBool(i18n("short month"), 748 addWidBool(i18n("short month"),
751 &(KOPrefs::instance()->mMonthShowShort),habo); 749 &(KOPrefs::instance()->mMonthShowShort),habo);
752 weeklyRecur = 750 weeklyRecur =
753 addWidBool(i18n("icons"), 751 addWidBool(i18n("icons"),
754 &(KOPrefs::instance()->mMonthShowIcons),habo); 752 &(KOPrefs::instance()->mMonthShowIcons),habo);
755 753
756 topLayout->addMultiCellWidget(habo,ii, ii,0,1); 754 topLayout->addMultiCellWidget(habo,ii, ii,0,1);
757 ii++; 755 ii++;
758#ifdef DESKTOP_VERSION 756#ifdef DESKTOP_VERSION
759 KPrefsDialogWidBool *enableMonthScroll = 757 KPrefsDialogWidBool *enableMonthScroll =
760 addWidBool(i18n("Enable scrollbars in month view cells"), 758 addWidBool(i18n("Enable scrollbars in month view cells"),
761 &(KOPrefs::instance()->mEnableMonthScroll),topFrame); 759 &(KOPrefs::instance()->mEnableMonthScroll),topFrame);
762 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0); 760 topLayout->addWidget(enableMonthScroll->checkBox(),ii++,0);
763#endif 761#endif
764 762
765 dummy = 763 dummy =
766 addWidBool(i18n("Show Sat/Sun together"), 764 addWidBool(i18n("Show Sat/Sun together"),
767 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame); 765 &(KOPrefs::instance()->mMonthViewSatSunTog),topFrame);
768 topLayout->addWidget(dummy->checkBox(),ii++,0); 766 topLayout->addWidget(dummy->checkBox(),ii++,0);
769 767
770 KPrefsDialogWidBool *coloredCategoriesInMonthView = 768 KPrefsDialogWidBool *coloredCategoriesInMonthView =
771 addWidBool(i18n("Month view uses category colors"), 769 addWidBool(i18n("Month view uses category colors"),
772 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame); 770 &(KOPrefs::instance()->mMonthViewUsesCategoryColor),topFrame);
773 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 771 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
774 772
775 dummy = 773 dummy =
776 addWidBool(i18n("Categorie colors are applied to text"), 774 addWidBool(i18n("Categorie colors are applied to text"),
777 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame); 775 &(KOPrefs::instance()->mMonthViewUsesForegroundColor),topFrame);
778 topLayout->addWidget(dummy->checkBox(),ii++,0); 776 topLayout->addWidget(dummy->checkBox(),ii++,0);
779 coloredCategoriesInMonthView = 777 coloredCategoriesInMonthView =
780 addWidBool(i18n("Month view uses day colors"), 778 addWidBool(i18n("Month view uses day colors"),
781 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame); 779 &(KOPrefs::instance()->mMonthViewUsesDayColors),topFrame);
782 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0); 780 topLayout->addWidget(coloredCategoriesInMonthView->checkBox(),ii++,0);
783 781
784 KPrefsDialogWidColor *holidayColor = 782 KPrefsDialogWidColor *holidayColor =
785 addWidColor(i18n("Day color odd months"), 783 addWidColor(i18n("Day color odd months"),
786 &(KOPrefs::instance()->mMonthViewOddColor),topFrame); 784 &(KOPrefs::instance()->mMonthViewOddColor),topFrame);
787 topLayout->addWidget(holidayColor->label(),ii,0); 785 topLayout->addWidget(holidayColor->label(),ii,0);
788 topLayout->addWidget(holidayColor->button(),ii++,1); 786 topLayout->addWidget(holidayColor->button(),ii++,1);
789 787
790 holidayColor = 788 holidayColor =
791 addWidColor(i18n("Day color even months"), 789 addWidColor(i18n("Day color even months"),
792 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame); 790 &(KOPrefs::instance()->mMonthViewEvenColor),topFrame);
793 topLayout->addWidget(holidayColor->label(),ii,0); 791 topLayout->addWidget(holidayColor->label(),ii,0);
794 topLayout->addWidget(holidayColor->button(),ii++,1); 792 topLayout->addWidget(holidayColor->button(),ii++,1);
795 793
796 794
797 holidayColor = 795 holidayColor =
798 addWidColor(i18n("Color for Sundays + category \"Holiday\""), 796 addWidColor(i18n("Color for Sundays + category \"Holiday\""),
799 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame); 797 &(KOPrefs::instance()->mMonthViewHolidayColor),topFrame);
800 topLayout->addWidget(holidayColor->label(),ii,0); 798 topLayout->addWidget(holidayColor->label(),ii,0);
801 topLayout->addWidget(holidayColor->button(),ii++,1); 799 topLayout->addWidget(holidayColor->button(),ii++,1);
802 // *********************** What'sNext View 800 // *********************** What'sNext View
803 topFrame = addPage(i18n("What's Next View"),0,0); 801 topFrame = addPage(i18n("What's Next View"),0,0);
804 // DesktopIcon("viewmag",KIcon::SizeMedium)); 802 // DesktopIcon("viewmag",KIcon::SizeMedium));
805 803
806 topLayout = new QGridLayout(topFrame,4,1); 804 topLayout = new QGridLayout(topFrame,4,1);
807 topLayout->setSpacing(spacingHint()); 805 topLayout->setSpacing(spacingHint());
808 topLayout->setMargin(marginHint()); 806 topLayout->setMargin(marginHint());
809 ii = 0; 807 ii = 0;
810 KPrefsDialogWidBool *passwdk = 808 KPrefsDialogWidBool *passwdk =
811 809
812 addWidBool(i18n("Show events, that are done in \nWhat's Next view"), 810 addWidBool(i18n("Show events, that are done in \nWhat's Next view"),
813 &(KOPrefs::instance()->mWNViewShowsPast),topFrame); 811 &(KOPrefs::instance()->mWNViewShowsPast),topFrame);
814 topLayout->addWidget(passwdk->checkBox(), ii++,0); 812 topLayout->addWidget(passwdk->checkBox(), ii++,0);
815 passwdk = 813 passwdk =
816 addWidBool(i18n("Show parent To-Do's in What's Next view"), 814 addWidBool(i18n("Show parent To-Do's in What's Next view"),
817 &(KOPrefs::instance()->mWNViewShowsParents),topFrame); 815 &(KOPrefs::instance()->mWNViewShowsParents),topFrame);
818 topLayout->addWidget(passwdk->checkBox(), ii++,0); 816 topLayout->addWidget(passwdk->checkBox(), ii++,0);
819 817
820 passwdk = 818 passwdk =
821 addWidBool(i18n("Show location in What's Next view"), 819 addWidBool(i18n("Show location in What's Next view"),
822 &(KOPrefs::instance()->mWNViewShowLocation),topFrame); 820 &(KOPrefs::instance()->mWNViewShowLocation),topFrame);
823 topLayout->addWidget(passwdk->checkBox(), ii++,0); 821 topLayout->addWidget(passwdk->checkBox(), ii++,0);
824 822
825 passwdk = 823 passwdk =
826 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"), 824 addWidBool(i18n("Show Sync Events in \nWhat's Next/Agenda view"),
827 &(KOPrefs::instance()->mShowSyncEvents),topFrame); 825 &(KOPrefs::instance()->mShowSyncEvents),topFrame);
828 topLayout->addWidget(passwdk->checkBox(), ii++,0); 826 topLayout->addWidget(passwdk->checkBox(), ii++,0);
829 passwdk = 827 passwdk =
830 addWidBool(i18n("Use short date in \nWhat's Next/Event view"), 828 addWidBool(i18n("Use short date in \nWhat's Next/Event view"),
831 &(KOPrefs::instance()->mShortDateInViewer),topFrame); 829 &(KOPrefs::instance()->mShortDateInViewer),topFrame);
832 topLayout->addWidget(passwdk->checkBox(), ii++,0); 830 topLayout->addWidget(passwdk->checkBox(), ii++,0);
833 831
834 832
835 833
836 834
837 // *********************** Todo View 835 // *********************** Todo View
838 836
839 topFrame = addPage(i18n("Todo View"),0,0); 837 topFrame = addPage(i18n("Todo View"),0,0);
840 // DesktopIcon("viewmag",KIcon::SizeMedium)); 838 // DesktopIcon("viewmag",KIcon::SizeMedium));
841 839
842 topLayout = new QGridLayout(topFrame,4,1); 840 topLayout = new QGridLayout(topFrame,4,1);
843 topLayout->setSpacing(spacingHint()); 841 topLayout->setSpacing(spacingHint());
844 topLayout->setMargin(marginHint()); 842 topLayout->setMargin(marginHint());
845 ii = 0; 843 ii = 0;
846dummy = 844dummy =
847 addWidBool(i18n("Hide not running Todos in To-do view"), 845 addWidBool(i18n("Hide not running Todos in To-do view"),
848 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame); 846 &(KOPrefs::instance()->mHideNonStartedTodos),topFrame);
849 topLayout->addWidget(dummy->checkBox(),ii++,0); 847 topLayout->addWidget(dummy->checkBox(),ii++,0);
850 848
851 849
852 KPrefsDialogWidBool *showCompletedTodo = 850 KPrefsDialogWidBool *showCompletedTodo =
853 addWidBool(i18n("To-do view shows completed Todos"), 851 addWidBool(i18n("To-do view shows completed Todos"),
854 &(KOPrefs::instance()->mShowCompletedTodo),topFrame); 852 &(KOPrefs::instance()->mShowCompletedTodo),topFrame);
855 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0); 853 topLayout->addWidget(showCompletedTodo->checkBox(),ii++,0);
856 dummy = 854 dummy =
857 addWidBool(i18n("To-do view shows complete as 'xx %'"), 855 addWidBool(i18n("To-do view shows complete as 'xx %'"),
858 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame); 856 &(KOPrefs::instance()->mTodoViewShowsPercentage),topFrame);
859 topLayout->addWidget(dummy->checkBox(),ii++,0); 857 topLayout->addWidget(dummy->checkBox(),ii++,0);
860 858
861 dummy = 859 dummy =
862 addWidBool(i18n("Small To-do view uses smaller font"), 860 addWidBool(i18n("Small To-do view uses smaller font"),
863 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame); 861 &(KOPrefs::instance()->mTodoViewUsesSmallFont),topFrame);
864 topLayout->addWidget(dummy->checkBox(),ii++,0); 862 topLayout->addWidget(dummy->checkBox(),ii++,0);
865 863
866 864
867 865
868 dummy = 866 dummy =
869 addWidBool(i18n("Todo view uses category colors"), 867 addWidBool(i18n("Todo view uses category colors"),