summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-06-30 08:04:41 (UTC)
committer zautrix <zautrix>2005-06-30 08:04:41 (UTC)
commit00e631189f1dca0d596b6ce5816f2fcde9124bd7 (patch) (side-by-side diff)
treea6e770eef02b128663b3090ec4b3f9c3ac22715f /korganizer
parent0bcf4379652b763423d0c1843cb8ab8945b798bd (diff)
downloadkdepimpi-00e631189f1dca0d596b6ce5816f2fcde9124bd7.zip
kdepimpi-00e631189f1dca0d596b6ce5816f2fcde9124bd7.tar.gz
kdepimpi-00e631189f1dca0d596b6ce5816f2fcde9124bd7.tar.bz2
j fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/journalentry.cpp2
-rw-r--r--korganizer/koeventviewer.cpp14
2 files changed, 8 insertions, 8 deletions
diff --git a/korganizer/journalentry.cpp b/korganizer/journalentry.cpp
index 3c01eeb..9e2c902 100644
--- a/korganizer/journalentry.cpp
+++ b/korganizer/journalentry.cpp
@@ -23,97 +23,97 @@
//
// Journal Entry
#include <qlabel.h>
#include <qlayout.h>
#include <qvbox.h>
#include <qfile.h>
#include <qdir.h>
#include <qtextstream.h>
#include <qtextcodec.h>
#include <qpixmap.h>
#include <qpushbutton.h>
#include <qapplication.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <ktextedit.h>
#include <kfiledialog.h>
#include <kmessagebox.h>
#include "koprefs.h"
#include <klineedit.h>
#include <libkcal/journal.h>
#include <libkcal/calendarresources.h>
#include <libkcal/resourcecalendar.h>
#include <kresources/resourceselectdialog.h>
#include "journalentry.h"
//#include "journalentry.moc"
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#endif
JournalEntry::JournalEntry(Calendar *calendar,QWidget *parent) :
QFrame(parent)
{
heiHint = QApplication::desktop()->height() / 5 ;
showOnlyMode = false;
mCalendar = calendar;
mJournal = 0;
visibleMode = true;
QHBox * vb = new QHBox ( this );
QPixmap iconp;
QPushButton * toggleJournal = new QPushButton( vb );
iconp = SmallIcon("1updownarrow");
toggleJournal->setPixmap (iconp ) ;
- new QLabel(i18n(" Title: "),vb);
+ new QLabel(" "+i18n("Title: "),vb);
mTitle = new KLineEdit ( vb );
mTitleLabel = new QLabel(i18n("Title"),vb);
mTitleLabel->setMargin(0);
mTitleLabel->setAlignment(AlignCenter);
QPushButton * loadTemplate = new QPushButton( vb );
QPushButton * saveTemplate = new QPushButton( vb );
if ( QApplication::desktop()->width() < 321 )
iconp = SmallIcon("fileexport16");
else
iconp = SmallIcon("fileexport");
saveTemplate->setPixmap (iconp ) ;
int size = saveTemplate->sizeHint().height();
if ( QApplication::desktop()->width() < 321 )
iconp = SmallIcon("fileimport16");
else
iconp = SmallIcon("fileimport");
loadTemplate->setPixmap (iconp ) ;
loadTemplate->setFixedSize( size, size );
saveTemplate->setFixedSize( size, size );
toggleJournal->setFixedSize( size , size );
mEditor = new KTextEdit(this);
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( mEditor, QPEApplication::RightOnHold );
#endif
mEditor->setWordWrap( KTextEdit::WidgetWidth );
QBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->addWidget(vb);
topLayout->addWidget(mEditor);
mEditor->installEventFilter(this);
connect( saveTemplate, SIGNAL( clicked() ), this , SLOT( slotSaveTemplate() ) );
connect( loadTemplate, SIGNAL( clicked() ), this , SLOT( slotLoadTemplate() ) );
connect( toggleJournal, SIGNAL( clicked() ), this , SLOT( toggleShowJournal() ) );
}
JournalEntry::~JournalEntry()
{
//qDebug("JournalEntry::~JournalEntry() ");
}
QSize JournalEntry::sizeHint() const
{
return QSize ( 240, heiHint );
}
void JournalEntry::slotSaveTemplate()
{
QString fileName =locateLocal( "templates", "journals" );
QDir t_dir;
if ( !t_dir.exists(fileName) )
t_dir.mkdir ( fileName );
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 52c5247..d3b2ccf 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -643,113 +643,113 @@ void KOEventViewer::formatAttendees(Incidence *event)
mText += "</a>\n";
#endif
if (!a->email().isEmpty()) {
if (iconPath) {
mText += "<a href=\"mailto:" + a->name() +" <" + a->email() + ">:" + mMailSubject + "\">";
if ( a->RSVP() ) {
++a_count_nr;
mText += "<IMG src=\"" + iconPath + "\">";
}
else {
++a_count;
mText += "<IMG src=\"" + NOiconPath + "\">";
}
mText += "</a>\n";
}
}
if (a->status() != Attendee::NeedsAction )
mText +="[" + a->statusStr() + "] ";
if (a->role() == Attendee::Chair )
mText +="(" + a->roleStr().left(1) + ".)";
}
mText.append("</li></ul>");
if ( (a_count+a_count_nr) > 1 ) {
mText += "<a href=\"mailto:ALL\">";
mText += i18n( "Mail to all" );
mText += "</a> ( ";
mText += "<IMG src=\"" + iconPath + "\">";
mText += i18n( " and " );
mText += "<IMG src=\"" + NOiconPath + "\"> )";
mText += "<br>\n";
}
if ( a_count_nr > 1 ) {
mText += "<a href=\"mailto:RSVP\">";
mText += i18n( "Mail to selected" );
mText += "</a> ( ";
mText += i18n( "<IMG src=\"%1\"> only )").arg ( iconPath );
mText += "<br>\n";
}
}
}
void KOEventViewer::appendJournal(Journal *jour, int mode )
{
bool shortDate = KOPrefs::instance()->mShortDateInViewer;
+ QString text_d = i18n("Journal from: ");
+ if ( !jour->summary().isEmpty() )
+ text_d = jour->summary();
if (mode == 0 ) {
- addTag("h2",i18n("Journal from: "));
+ addTag("h2", text_d );
}
else {
if ( mode == 1 ) {
- addTag("h2",i18n( "Local: " ) +i18n("Journal from: "));
+ addTag("h3",i18n( "Local: " ) + text_d );
} else {
- addTag("h2",i18n( "Remote: " ) +i18n("Journal from: "));
+ addTag("h3",i18n( "Remote: " ) + text_d );
}
}
topLevelWidget()->setCaption("Journal Viewer");
mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer)));
- if (!jour->summary().isEmpty()) {
- addTag("b",i18n(" Title: ") + deTag(jour->summary()));
- }
formatReadOnly(jour);
- addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) );
+ addTag("p","<b>"+i18n( "Last modified: " ) + "</b>"+KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) );
if (!jour->description().isEmpty()) {
addTag("p",deTag(jour->description()));
}
setText(mText);
}
void KOEventViewer::formatReadOnly(Incidence *event)
{
int id = event->calID();
if ( id > 1 ) {
addTag("p", "<em>("+i18n("Calendar:")+" " + KOPrefs::instance()->getCalendar( id )->mName + ")</em>");
}
if (event->isReadOnly()) {
addTag("p","<em>(" + i18n("read-only") + ")</em>");
}
}
void KOEventViewer::setSyncMode( bool b )
{
mSyncMode = b;
}
void KOEventViewer::setTodo(Todo *event, bool clearV )
{
if ( clearV )
clearEvents();
if ( mSyncMode ) {
if ( clearV )
appendTodo(event,1 );
else
appendTodo(event,2);
} else
appendTodo(event);
}
void KOEventViewer::setJournal(Journal *event, bool clearV )
{
if ( clearV )
clearEvents();
if ( mSyncMode ) {
if ( clearV )
appendJournal(event, 1);
else
appendJournal(event, 2);
} else
appendJournal(event);
}
void KOEventViewer::setEvent(Event *event)