-rw-r--r-- | korganizer/calendarview.cpp | 20 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/journalentry.cpp | 22 | ||||
-rw-r--r-- | korganizer/journalentry.h | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 2 |
5 files changed, 46 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 940ea91..ccacc52 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -1453,4 +1453,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1453 | idS = inR->IDStr(); | 1453 | idS = inR->IDStr(); |
1454 | int calID = inR->calID(); | ||
1454 | remote->deleteIncidence( inR ); | 1455 | remote->deleteIncidence( inR ); |
1455 | inR = inL->clone(); | 1456 | inR = inL->clone(); |
1457 | inR->setCalID( calID ); | ||
1456 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1458 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
@@ -1465,4 +1467,6 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1465 | int pid = inL->pilotId(); | 1467 | int pid = inL->pilotId(); |
1468 | int calID = inL->calID(); | ||
1466 | local->deleteIncidence( inL ); | 1469 | local->deleteIncidence( inL ); |
1467 | inL = inR->clone(); | 1470 | inL = inR->clone(); |
1471 | inL->setCalID( calID ); | ||
1468 | if ( mSyncManager->syncWithDesktop() ) | 1472 | if ( mSyncManager->syncWithDesktop() ) |
@@ -1495,2 +1499,4 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1495 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); | 1499 | inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) ); |
1500 | |||
1501 | inL->setCalID( 0 );// add to default cal | ||
1496 | local->addIncidence( inL ); | 1502 | local->addIncidence( inL ); |
@@ -1504,2 +1510,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1504 | inL->setIDStr( ":" ); | 1510 | inL->setIDStr( ":" ); |
1511 | inL->setCalID( 0 );// add to default cal | ||
1505 | local->addIncidence( inL ); | 1512 | local->addIncidence( inL ); |
@@ -1561,2 +1568,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1561 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 1568 | inR->setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
1569 | inR->setCalID( 0 );// add to default cal | ||
1562 | remote->addIncidence( inR ); | 1570 | remote->addIncidence( inR ); |
@@ -1575,2 +1583,3 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int | |||
1575 | inR->setIDStr( ":" ); | 1583 | inR->setIDStr( ":" ); |
1584 | inR->setCalID( 0 );// add to default cal | ||
1576 | remote->addIncidence( inR ); | 1585 | remote->addIncidence( inR ); |
@@ -2145,2 +2154,11 @@ bool CalendarView::openCalendar(QString filename, bool merge) | |||
2145 | } | 2154 | } |
2155 | void CalendarView::mergeFile( QString fn ) | ||
2156 | { | ||
2157 | clearAllViews(); | ||
2158 | mCalendar->mergeCalendarFile( fn ); | ||
2159 | mCalendar->reInitAlarmSettings(); | ||
2160 | setSyncEventsReadOnly(); | ||
2161 | updateUnmanagedViews(); | ||
2162 | updateView(); | ||
2163 | } | ||
2146 | void CalendarView::showOpenError() | 2164 | void CalendarView::showOpenError() |
@@ -3360,2 +3378,3 @@ void CalendarView::newEvent() | |||
3360 | QDate date = mNavigator->selectedDates().first(); | 3378 | QDate date = mNavigator->selectedDates().first(); |
3379 | #if 0 | ||
3361 | QDateTime current = QDateTime::currentDateTime(); | 3380 | QDateTime current = QDateTime::currentDateTime(); |
@@ -3366,2 +3385,3 @@ void CalendarView::newEvent() | |||
3366 | } else | 3385 | } else |
3386 | #endif | ||
3367 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), | 3387 | newEvent( QDateTime( date, QTime( KOPrefs::instance()->mStartTime, 0, 0 ) ), |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 706d05d..799c297 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -140,2 +140,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
140 | void checkSuspendAlarm(); | 140 | void checkSuspendAlarm(); |
141 | void mergeFile( QString fn ); | ||
141 | 142 | ||
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp index b8a4cf2..f0e0f86 100644 --- a/korganizer/journalentry.cpp +++ b/korganizer/journalentry.cpp | |||
@@ -78,3 +78,4 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
78 | toggleJournal->setPixmap (iconp ) ; | 78 | toggleJournal->setPixmap (iconp ) ; |
79 | vb->setStretchFactor (new QLabel(" "+i18n("Title: "),vb),1); | 79 | QLabel* textLabel = new QLabel(" "+i18n("Title: "),vb); |
80 | vb->setStretchFactor (textLabel,1); | ||
80 | vb->setStretchFactor( toggleJournal, 1 ); | 81 | vb->setStretchFactor( toggleJournal, 1 ); |
@@ -114,2 +115,7 @@ JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) : | |||
114 | #endif | 115 | #endif |
116 | mMaxWidDiff = 3*size - 2*frameWidth() - textLabel->sizeHint().width(); | ||
117 | mDeskWid = QApplication::desktop()->width(); | ||
118 | int maxwid = mDeskWid - mMaxWidDiff; | ||
119 | mTitle->setMaximumWidth( maxwid/2 +20 ); | ||
120 | mCalendarBox->setMaximumWidth( maxwid/2 -20 ); | ||
115 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); | 121 | mEditor->setWordWrap( KTextEdit::WidgetWidth ); |
@@ -130,2 +136,16 @@ JournalEntry::~JournalEntry() | |||
130 | } | 136 | } |
137 | void JournalEntry::resizeEvent(QResizeEvent* e ) | ||
138 | { | ||
139 | #ifndef DESKTOP_VERSION | ||
140 | if ( mDeskWid != QApplication::desktop()->width() ) { | ||
141 | mDeskWid == QApplication::desktop()->width(); | ||
142 | int maxwid = mDeskWid - mMaxWidDiff; | ||
143 | mTitle->setMaximumWidth( maxwid/2 +20 ); | ||
144 | mCalendarBox->setMaximumWidth( maxwid/2 -20 ); | ||
145 | } | ||
146 | setMaximumWidth( QApplication::desktop()->width() ); | ||
147 | qDebug("MAXXX %d ", QApplication::desktop()->width()); | ||
148 | #endif | ||
149 | QFrame::resizeEvent( e ); | ||
150 | } | ||
131 | QSize JournalEntry::sizeHint() const | 151 | QSize JournalEntry::sizeHint() const |
diff --git a/korganizer/journalentry.h b/korganizer/journalentry.h index ed04b7c..a69846c 100644 --- a/korganizer/journalentry.h +++ b/korganizer/journalentry.h | |||
@@ -57,2 +57,3 @@ class JournalEntry : public QFrame { | |||
57 | void fillCalendar( int id = 0 ); | 57 | void fillCalendar( int id = 0 ); |
58 | void resizeEvent(QResizeEvent* e ) ; | ||
58 | protected slots: | 59 | protected slots: |
@@ -73,2 +74,4 @@ class JournalEntry : public QFrame { | |||
73 | private: | 74 | private: |
75 | int mMaxWidDiff; | ||
76 | int mDeskWid; | ||
74 | bool visibleMode; | 77 | bool visibleMode; |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 5249300..4bedb61 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -2546,3 +2546,3 @@ void MainWindow::getFile( bool success ) | |||
2546 | } | 2546 | } |
2547 | mView->openCalendar( sentSyncFile() ); | 2547 | mView->mergeFile( sentSyncFile() ); |
2548 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { | 2548 | if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { |