summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index e601eef..92e5a0f 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -105,51 +105,52 @@ void KOEditorGeneral::initHeader(QWidget *parent,QBoxLayout *topLayout)
105 else 105 else
106 headerLayout->addWidget(locationLabel,1,0); 106 headerLayout->addWidget(locationLabel,1,0);
107 107
108 mLocationEdit = new KOLocationBox(TRUE,parent,30); 108 mLocationEdit = new KOLocationBox(TRUE,parent,30);
109 mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); 109 mLocationEdit->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
110 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->height() > 240 ) 110 if ( QApplication::desktop()->width() > 320 && QApplication::desktop()->height() > 240 )
111 mLocationEdit->setMaximumHeight( hei + 6); 111 mLocationEdit->setMaximumHeight( hei + 6);
112 112
113 // mLocationEdit = new QLineEdit(parent); 113 // mLocationEdit = new QLineEdit(parent);
114 connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) ); 114 connect ( mLocationEdit->lineEdit(), SIGNAL ( returnPressed() ), this, SIGNAL (allAccepted () ) );
115 115
116 mCalendarBox = new QComboBox ( parent ); 116 mCalendarBox = new QComboBox ( parent );
117 mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) ); 117 mCalendarBox->setSizePolicy( QSizePolicy( QSizePolicy::Preferred ,QSizePolicy::MinimumExpanding ,FALSE) );
118 if ( QApplication::desktop()->height() < 320 ) { 118 if ( QApplication::desktop()->height() < 320 ) {
119 headerLayout->addWidget(mLocationEdit,0,3); 119 headerLayout->addWidget(mLocationEdit,0,3);
120 headerLayout->addWidget(mCalendarBox,0,4); 120 headerLayout->addWidget(mCalendarBox,0,4);
121 headerLayout->setColStretch( 1, 10); 121 headerLayout->setColStretch( 1, 10);
122 headerLayout->setColStretch( 3, 10); 122 headerLayout->setColStretch( 3, 10);
123 mCalendarBox->setMaximumWidth( 64 ); 123 mCalendarBox->setMaximumWidth( 64 );
124 } 124 }
125 else { 125 else {
126 headerLayout->addWidget(mLocationEdit,1,1); 126 headerLayout->addWidget(mLocationEdit,1,1);
127 headerLayout->addWidget(mCalendarBox,1,2); 127 headerLayout->addWidget(mCalendarBox,1,2);
128 int str = 3; 128 int str = 3;
129 if ( QApplication::desktop()->width() < 320 ) { 129 if ( QApplication::desktop()->width() < 640 ) {
130 --str;
131 --str; 130 --str;
131 if ( QApplication::desktop()->width() < 320 )
132 --str;
132 } 133 }
133 headerLayout->setColStretch( 1, str); 134 headerLayout->setColStretch( 1, str);
134 headerLayout->setColStretch( 2, 1); 135 headerLayout->setColStretch( 2, 1);
135 } 136 }
136 137
137} 138}
138void KOEditorGeneral::setFocusOn( int i ) 139void KOEditorGeneral::setFocusOn( int i )
139{ 140{
140 mNextFocus = i; 141 mNextFocus = i;
141 QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() )); 142 QTimer::singleShot( 0, this, SLOT ( slotSetFocusOn() ));
142} 143}
143void KOEditorGeneral::slotSetFocusOn() 144void KOEditorGeneral::slotSetFocusOn()
144{ 145{
145 mNextFocus; 146 mNextFocus;
146 if ( mNextFocus == 1 ) { 147 if ( mNextFocus == 1 ) {
147 mDescriptionEdit->setFocus(); 148 mDescriptionEdit->setFocus();
148 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); 149 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
149 } 150 }
150 if ( mNextFocus == 2 ) { 151 if ( mNextFocus == 2 ) {
151 mSummaryEdit->setFocus(); 152 mSummaryEdit->setFocus();
152 } 153 }
153} 154}
154void KOEditorGeneral::editCategories() 155void KOEditorGeneral::editCategories()
155{ 156{