summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt22
-rw-r--r--kmicromail/libetpan/maildir/maildir.c25
-rw-r--r--kmicromail/libetpan/mh/mailmh.c12
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/kotodoview.cpp1
-rw-r--r--korganizer/kotodoviewitem.cpp2
-rw-r--r--libkcal/sharpformat.cpp7
-rw-r--r--version2
8 files changed, 60 insertions, 15 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 4905631..eb7cf13 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,26 +1,48 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 1.9.14 ************
+
+Fixed some problems with the dialog sizes when switching
+portrait/landscape mode on 640x480 PDA display.
+
+Fixed some other small bugs.
+
+Fixed an ugly bug in KOpieMail:
+KOpieMail was not able to write files (mails) to MSDOS file system,
+like on an usual preformatted SD card. That should work now.
+To save your mail data on the Sd card do the following:
+Create a dir on the SD card:
+mkdir /mnt/card/localmail
+Go to your home dir:
+cd
+Go to kopiemail data storage dir:
+cd kdepim/apps/kopiemail
+Create a symlink to the SD card:
+ls -s /mnt/card/localmail
+Now KOpieMail will store all mails on the SD card.
+
+
********** VERSION 1.9.13 ************
Fixed nasty PwM/Pi file reading bug, when
the used hash algo of file is different then the global
hash algo.
Added KA/Pi support for opie mailit mailapplication.
Fixed some bugs in OM/Pi.
Now character conversion tables are available for the Zaurus
to make OM/Pi working properly.
To get the character conversion in OM/Pi working, please download
at the sourceforge project site the package
sr-character-conversion_SharpROM_arm.ipk.zip
(or oz-character-conversion_OZ-gcc3xx_arm.ipk.zip for OZ roms)
from the section "general files for KDE/Pim"
Instructions how to install this package are in a ReadMe in this file.
Fixed the orientation change problem in KA/Pi when switching
portrait/landscape mode.
French translation available for KA/Pi and OM/Pi.
diff --git a/kmicromail/libetpan/maildir/maildir.c b/kmicromail/libetpan/maildir/maildir.c
index 0e038b1..1ef0b7a 100644
--- a/kmicromail/libetpan/maildir/maildir.c
+++ b/kmicromail/libetpan/maildir/maildir.c
@@ -87,67 +87,72 @@ struct maildir * maildir_new(const char * path)
err:
return NULL;
}
static void maildir_flush(struct maildir * md, int msg_new);
void maildir_free(struct maildir * md)
{
maildir_flush(md, 0);
maildir_flush(md, 1);
chash_free(md->mdir_msg_hash);
carray_free(md->mdir_msg_list);
free(md);
}
#define MAX_TRY_ALLOC 32
static char * maildir_get_new_message_filename(struct maildir * md,
char * tmpfile)
{
char filename[PATH_MAX];
char basename[PATH_MAX];
int k;
time_t now;
-
+ struct stat f_stat;
now = time(NULL);
k = 0;
+
+ fprintf(stderr,"maildir_get_new_message_filename: %s \n", tmpfile);
while (k < MAX_TRY_ALLOC) {
snprintf(basename, sizeof(basename), "%lu.%u_%u.%s",
(unsigned long) now, md->mdir_pid, md->mdir_counter, md->mdir_hostname);
snprintf(filename, sizeof(filename), "%s/tmp/%s",
md->mdir_path, basename);
-
- if (link(tmpfile, filename) == 0) {
+ fprintf(stderr,"filename %s \n", filename);
+ // LR changed following lines
+ if ( stat( filename, &f_stat ) == -1 ) {
+ //if (link(tmpfile, filename) == 0) {
char * dup_filename;
dup_filename = strdup(filename);
if (dup_filename == NULL) {
- unlink(filename);
+ //unlink(filename);
return NULL;
}
-
- unlink(tmpfile);
+ fprintf(stderr,"filename %s %s \n", tmpfile,dup_filename);
+ //unlink(tmpfile);
+ rename (tmpfile,dup_filename );
md->mdir_counter ++;
return dup_filename;
}
md->mdir_counter ++;
k ++;
}
return NULL;
}
static void msg_free(struct maildir_msg * msg)
{
free(msg->msg_uid);
free(msg->msg_filename);
free(msg);
}
/*
msg_new()
filename is given without path
@@ -251,48 +256,49 @@ static void maildir_flush(struct maildir * md, int msg_new)
key.data = msg->msg_uid;
key.len = strlen(msg->msg_uid);
chash_delete(md->mdir_msg_hash, &key, NULL);
carray_delete(md->mdir_msg_list, i);
msg_free(msg);
}
else {
i ++;
}
}
}
static int add_message(struct maildir * md,
char * filename, int is_new)
{
struct maildir_msg * msg;
chashdatum key;
chashdatum value;
unsigned int i;
int res;
int r;
+ fprintf(stderr,"add_message filename: %s \n", filename);
msg = msg_new(filename, is_new);
if (msg == NULL) {
res = MAILDIR_ERROR_MEMORY;
goto err;
}
r = carray_add(md->mdir_msg_list, msg, &i);
if (r < 0) {
res = MAILDIR_ERROR_MEMORY;
goto free_msg;
}
key.data = msg->msg_uid;
key.len = strlen(msg->msg_uid);
value.data = msg;
value.len = 0;
r = chash_set(md->mdir_msg_hash, &key, &value, NULL);
if (r < 0) {
res = MAILDIR_ERROR_MEMORY;
goto delete;
}
return MAILDIR_NO_ERROR;
@@ -425,48 +431,49 @@ static char * libetpan_basename(char * filename)
return filename;
else
return p + 1;
}
#else
#define libetpan_basename(a) basename(a)
#endif
int maildir_message_add_uid(struct maildir * md,
const char * message, size_t size,
char * uid, size_t max_uid_len)
{
char path_new[PATH_MAX];
char tmpname[PATH_MAX];
int fd;
int r;
char * mapping;
char * delivery_tmp_name;
char * delivery_tmp_basename;
char delivery_new_name[PATH_MAX];
char * delivery_new_basename;
int res;
struct stat stat_info;
+ fprintf(stderr,"maildir_message_add_uid for uid: %s \n", uid);
r = maildir_update(md);
if (r != MAILDIR_NO_ERROR) {
res = r;
goto err;
}
/* write to tmp/ with a classic temporary file */
snprintf(tmpname, sizeof(tmpname), "%s/tmp/etpan-maildir-XXXXXX",
md->mdir_path);
fd = mkstemp(tmpname);
if (fd < 0) {
res = MAILDIR_ERROR_FILE;
goto err;
}
r = ftruncate(fd, size);
if (r < 0) {
res = MAILDIR_ERROR_FILE;
goto close;
}
mapping = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (mapping == MAP_FAILED) {
@@ -537,153 +544,157 @@ int maildir_message_add_uid(struct maildir * md,
free(delivery_tmp_name);
goto err;
close:
close(fd);
unlink:
unlink(tmpname);
err:
return res;
}
int maildir_message_add(struct maildir * md,
const char * message, size_t size)
{
return maildir_message_add_uid(md, message, size,
NULL, 0);
}
int maildir_message_add_file_uid(struct maildir * md, int fd,
char * uid, size_t max_uid_len)
{
char * message;
struct stat buf;
int r;
+ fprintf(stderr,"maildir_message_add_file_uid: %s \n", uid);
if (fstat(fd, &buf) == -1)
return MAILDIR_ERROR_FILE;
message = mmap(NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
if (message == MAP_FAILED)
return MAILDIR_ERROR_FILE;
r = maildir_message_add_uid(md, message, buf.st_size, uid, max_uid_len);
munmap(message, buf.st_size);
return r;
}
int maildir_message_add_file(struct maildir * md, int fd)
{
+ fprintf(stderr,"maildir_message_add_file \n");
return maildir_message_add_file_uid(md, fd,
NULL, 0);
}
char * maildir_message_get(struct maildir * md, const char * uid)
{
chashdatum key;
chashdatum value;
char filename[PATH_MAX];
char * dup_filename;
struct maildir_msg * msg;
char * dir;
int r;
+ fprintf(stderr,"maildir_message_get for uid: %s \n", uid);
key.data = (void *) uid;
key.len = strlen(uid);
r = chash_get(md->mdir_msg_hash, &key, &value);
if (r < 0)
return NULL;
msg = value.data;
if ((msg->msg_flags & MAILDIR_FLAG_NEW) != 0)
dir = "new";
else
dir = "cur";
snprintf(filename, sizeof(filename), "%s/%s/%s",
md->mdir_path, dir, msg->msg_filename);
dup_filename = strdup(filename);
if (dup_filename == NULL)
return NULL;
return dup_filename;
}
int maildir_message_remove(struct maildir * md, const char * uid)
{
chashdatum key;
chashdatum value;
char filename[PATH_MAX];
struct maildir_msg * msg;
char * dir;
int r;
int res;
+ fprintf(stderr,"maildir_message_remove for uid: %s \n", uid);
key.data = (void *) uid;
key.len = strlen(uid);
r = chash_get(md->mdir_msg_hash, &key, &value);
if (r < 0) {
res = MAILDIR_ERROR_NOT_FOUND;
goto err;
}
msg = value.data;
if ((msg->msg_flags & MAILDIR_FLAG_NEW) != 0)
dir = "new";
else
dir = "cur";
snprintf(filename, sizeof(filename), "%s/%s/%s",
md->mdir_path, dir, msg->msg_filename);
r = unlink(filename);
if (r < 0) {
res = MAILDIR_ERROR_FILE;
goto err;
}
return MAILDIR_NO_ERROR;
err:
return res;
}
int maildir_message_change_flags(struct maildir * md,
const char * uid, int new_flags)
{
chashdatum key;
chashdatum value;
char filename[PATH_MAX];
struct maildir_msg * msg;
char * dir;
int r;
char new_filename[PATH_MAX];
char flag_str[5];
size_t i;
int res;
-
+ fprintf(stderr,"maildir_message_change_flags for uid: %s \n", uid);
key.data = (void *) uid;
key.len = strlen(uid);
r = chash_get(md->mdir_msg_hash, &key, &value);
if (r < 0) {
res = MAILDIR_ERROR_NOT_FOUND;
goto err;
}
msg = value.data;
if ((msg->msg_flags & MAILDIR_FLAG_NEW) != 0)
dir = "new";
else
dir = "cur";
snprintf(filename, sizeof(filename), "%s/%s/%s",
md->mdir_path, dir, msg->msg_filename);
if ((new_flags & MAILDIR_FLAG_NEW) != 0)
dir = "new";
else
dir = "cur";
i = 0;
if ((new_flags & MAILDIR_FLAG_SEEN) != 0) {
diff --git a/kmicromail/libetpan/mh/mailmh.c b/kmicromail/libetpan/mh/mailmh.c
index 119f217..5e2b4cc 100644
--- a/kmicromail/libetpan/mh/mailmh.c
+++ b/kmicromail/libetpan/mh/mailmh.c
@@ -586,66 +586,70 @@ int mailmh_folder_rename_subfolder(struct mailmh_folder * src_folder,
folder = mailmh_folder_new(dst_folder, new_name);
if (folder == NULL)
return MAILMH_ERROR_MEMORY;
r = carray_add(parent->fl_subfolders_tab, folder, NULL);
if (r < 0) {
mailmh_folder_free(folder);
return MAILMH_ERROR_MEMORY;
}
return MAILMH_NO_ERROR;
}
#define MAX_TRY_ALLOC 32
/* initial file MUST be in the same directory */
static int mailmh_folder_alloc_msg(struct mailmh_folder * folder,
char * filename, uint32_t * result)
{
uint32_t max;
uint32_t k;
char * new_filename;
size_t len;
+ struct stat f_stat;
len = strlen(folder->fl_filename) + 20;
new_filename = malloc(len);
if (new_filename == NULL)
return MAILMH_ERROR_MEMORY;
max = folder->fl_max_index + 1;
+ //fprintf(stderr,"mailmh_folder_alloc_msg filename: %s \n", filename);
k = 0;
while (k < MAX_TRY_ALLOC) {
snprintf(new_filename, len, "%s%c%lu", folder->fl_filename,
MAIL_DIR_SEPARATOR, (unsigned long) (max + k));
-
- if (link(filename, new_filename) == 0) {
+ //fprintf(stderr,"mailmh_folder_alloc_msg new_filename: %s \n", new_filename);
+ if ( stat( new_filename, &f_stat ) == -1 ) {
+ // if (link(filename, new_filename) == 0) {
int r;
-
+ //fprintf(stderr,"filename found \n");
+ //unlink(filename);
+ rename (filename,new_filename );
free(new_filename);
- unlink(filename);
if (k > MAX_TRY_ALLOC / 2) {
r = mailmh_folder_update(folder);
/* ignore errors */
}
* result = max + k;
folder->fl_max_index = max + k;
return MAILMH_NO_ERROR;
}
else if (errno == EXDEV) {
free(filename);
return MAILMH_ERROR_FOLDER;
}
k ++;
}
free(new_filename);
return MAILMH_ERROR_FOLDER;
}
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 2321087..3908dbb 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2426,56 +2426,60 @@ void CalendarView::moveIncidence(Incidence * inc )
mDatePicker->setDate( da );
}
void CalendarView::showDatePicker( )
{
//qDebug("CalendarView::showDatePicker( ) ");
if ( mDateFrame->isVisible() )
mDateFrame->hide();
else {
int w =mDatePicker->sizeHint().width() ;
int h = mDatePicker->sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
mDateFrame->show();
}
mDatePickerMode = 1;
mDatePicker->setDate( mNavigator->selectedDates().first() );
}
void CalendarView::showEventEditor()
{
#ifdef DESKTOP_VERSION
mEventEditor->show();
#else
+ if ( mEventEditor->width() != QApplication::desktop()->width() )
+ mEventEditor->hide();
mEventEditor->showMaximized();
#endif
}
void CalendarView::showTodoEditor()
{
#ifdef DESKTOP_VERSION
mTodoEditor->show();
#else
+ if ( mTodoEditor->width() != QApplication::desktop()->width() )
+ mTodoEditor->hide();
mTodoEditor->showMaximized();
#endif
}
void CalendarView::cloneIncidence()
{
Incidence *incidence = currentSelection();
if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
if ( incidence ) {
cloneIncidence(incidence);
}
}
void CalendarView::moveIncidence()
{
Incidence *incidence = currentSelection();
if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
if ( incidence ) {
moveIncidence(incidence);
}
}
void CalendarView::beamIncidence()
{
Incidence *incidence = currentSelection();
if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index a12acd1..9cafc60 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -353,48 +353,49 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
mTodoListView->setColumnAlignment(1,AlignHCenter);
mTodoListView->addColumn(i18n("Complete"));
mTodoListView->setColumnAlignment(2,AlignHCenter);
mTodoListView->addColumn(i18n("Due Date"));
mTodoListView->setColumnAlignment(3,AlignLeft);
mTodoListView->addColumn(i18n("Due Time"));
mTodoListView->setColumnAlignment(4,AlignHCenter);
mTodoListView->addColumn(i18n("Cancelled"));
mTodoListView->addColumn(i18n("Categories"));
#if 0
mTodoListView->addColumn(i18n("Sort Id"));
mTodoListView->setColumnAlignment(4,AlignHCenter);
#endif
mTodoListView->setMinimumHeight( 60 );
mTodoListView->setItemsRenameable( true );
mTodoListView->setRenameable( 0 );
mTodoListView->setColumnWidth( 0, 120 );
mTodoListView->setColumnWidthMode(0, QListView::Manual);
mTodoListView->setColumnWidthMode(1, QListView::Manual);
mTodoListView->setColumnWidthMode(2, QListView::Manual);
mTodoListView->setColumnWidthMode(3, QListView::Manual);
mTodoListView->setColumnWidthMode(4, QListView::Manual);
mTodoListView->setColumnWidthMode(5, QListView::Manual);
+ mTodoListView->setColumnWidthMode(6, QListView::Manual);
mTodoListView->setColumnAlignment( 2, AlignCenter );
#if 0
mTodoListView->setColumnWidthMode(6, QListView::Manual);
#endif
mPriorityPopupMenu = new QPopupMenu(this);
for (int i = 1; i <= 5; i++) {
QString label = QString ("%1").arg (i);
mPriority[mPriorityPopupMenu->insertItem (label)] = i;
}
connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int)));
mPercentageCompletedPopupMenu = new QPopupMenu(this);
for (int i = 0; i <= 100; i+=20) {
QString label = QString ("%1 %").arg (i);
mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i;
}
connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int)));
mItemPopupMenu = new QPopupMenu(this);
mItemPopupMenu->insertItem(i18n("Show..."), this,
SLOT (showTodo()));
diff --git a/korganizer/kotodoviewitem.cpp b/korganizer/kotodoviewitem.cpp
index 85647b1..ae0b334 100644
--- a/korganizer/kotodoviewitem.cpp
+++ b/korganizer/kotodoviewitem.cpp
@@ -21,49 +21,49 @@
#include <kdebug.h>
#include <qapp.h>
#include <kiconloader.h>
#include "kotodoviewitem.h"
#include "kotodoview.h"
#include "koprefs.h"
KOTodoViewItem::KOTodoViewItem( QListView *parent, Todo *todo, KOTodoView *kotodo)
: QCheckListItem( parent , "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
KOTodoViewItem::KOTodoViewItem( KOTodoViewItem *parent, Todo *todo, KOTodoView *kotodo )
: QCheckListItem( parent, "", CheckBox ), mTodo( todo ), mTodoView( kotodo )
{
construct();
}
QString KOTodoViewItem::key(int column,bool) const
{
QMap<int,QString>::ConstIterator it = mKeyMap.find(column);
if (it == mKeyMap.end()) {
- return text(column);
+ return text(column).lower();
} else {
return *it;
}
}
void KOTodoViewItem:: setup()
{
int h = 20;
if ( listView () ) {
QFontMetrics fm ( listView ()->font () );
h = fm.height();
}
setHeight( h );
}
void KOTodoViewItem::setSortKey(int column,const QString &key)
{
mKeyMap.insert(column,key);
}
#if QT_VERSION >= 300
void KOTodoViewItem::paintBranches(QPainter *p,const QColorGroup & cg,int w,
int y,int h)
diff --git a/libkcal/sharpformat.cpp b/libkcal/sharpformat.cpp
index 24b8349..c2ee2c9 100644
--- a/libkcal/sharpformat.cpp
+++ b/libkcal/sharpformat.cpp
@@ -233,50 +233,53 @@ class SharpParser : public QObject
todo->setDtDue( QDateTime(fromString( hasDateStr, false ).date(), QTime(0,0,0 )) );
todo->setFloats( true );
}
else {
todo->setDtDue( fromString( hasDateStr ) );
todo->setFloats( false );
}
todo->setHasDueDate( true );
}
hasDateStr = attList[2];//start
if ( !hasDateStr.isEmpty() ) {
todo->setDtStart( fromString( hasDateStr ) );
todo->setHasStartDate( true);
} else
todo->setHasStartDate( false );
hasDateStr = attList[4];//completed
if ( !hasDateStr.isEmpty() ) {
todo->setCompleted(fromString( hasDateStr ) );
}
QString completedStr = attList[5];
if ( completedStr == "0" )
todo->setCompleted( true );
- else
- todo->setCompleted( false );
+ else {
+ // do not change percent complete
+ if ( todo->isCompleted() )
+ todo->setCompleted( false );
+ }
mCalendar->addTodo( todo );
} else if ( qName == "Category" ) {
/*
QString id = attributes.value( "id" );
QString name = attributes.value( "name" );
setCategory( id, name );
*/
}
//qDebug("end ");
return true;
}
QDateTime fromString ( QString s, bool useTz = true ) {
QDateTime dt;
int y,m,t,h,min,sec;
y = s.mid(0,4).toInt();
m = s.mid(4,2).toInt();
t = s.mid(6,2).toInt();
h = s.mid(9,2).toInt();
min = s.mid(11,2).toInt();
sec = s.mid(13,2).toInt();
dt = QDateTime(QDate(y,m,t), QTime(h,min,sec));
diff --git a/version b/version
index c4fe6e2..0343cbb 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "1.9.13";
+version = "1.9.14";