summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt10
-rw-r--r--kaddressbook/kabcore.cpp7
-rw-r--r--kaddressbook/viewmanager.cpp11
-rw-r--r--kmicromail/libmailwrapper/settings.cpp2
-rw-r--r--kmicromail/opiemail.cpp27
-rw-r--r--kmicromail/opiemail.h2
-rw-r--r--kmicromail/viewmail.cpp5
-rw-r--r--kmicromail/viewmail.h1
-rw-r--r--korganizer/calendarview.cpp24
-rw-r--r--qtcompat/qinputdialog.cpp7
10 files changed, 78 insertions, 18 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 46d59a3..ec75fad 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -2,24 +2,34 @@ Info about the changes in new versions of KDE-Pim/Pi
********** VERSION 1.9.15 ************
Usebilty enhancements in KO/Pi:
When clicking on the date in a month view cell, the day view is shown.
Old behaviour was, that the "new event" dialog popped up.
Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu).
That means, you can restore the latest
event/todo/journal you have deleted.
A journal is deleted, if you clear all the text of the journal.
+Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14.
+
+KA/Pi starting in 480x640 resolution:
+Hide the filter action in toolbar
+and added icons for undo/delete/redo in toolbar.
+
+Change in OM/Pi ViewMail dialog:
+When clicking on the "delete" icon the mail is deleted after confirmation as usual. But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any).
+
+Fixed a crash when deleting mail-accounts in OM/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 in KA/Pi KO/Pi and OM/Pi and PwM/Pi.
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.
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index b7edccd..f6bdda4 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -778,24 +778,25 @@ void KABCore::beamMySelf()
}
}
void KABCore::updateMainWindow()
{
mMainWindow->showMaximized();
mMainWindow->update();
}
void KABCore::resizeEvent(QResizeEvent* e )
{
if ( !mMiniSplitter )
return;
+ //qDebug("KABCore::resizeEvent(QResizeEvent* e ) ");
if ( QApplication::desktop()->width() >= 480 ) {
if (QApplication::desktop()->width() == 640 ) { // e.g. 640x480
if ( mMiniSplitter->orientation() == Qt::Vertical ) {
mMiniSplitter->setOrientation( Qt::Horizontal);
mMiniSplitter->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
if ( QApplication::desktop()->width() <= 640 ) {
//mMainWindow->setMaximumSize( QApplication::desktop()->size() );
mViewManager->getFilterAction()->setComboWidth( 150 );
QTimer::singleShot( 1, this , SLOT ( updateMainWindow()));
}
}
} else if (QApplication::desktop()->width() == 480 ){// e.g. 480x640
@@ -2183,29 +2184,31 @@ void KABCore::addActionsManually()
mActionWN->plug( helpMenu );
mActionSyncHowto->plug( helpMenu );
mActionKdeSyncHowto->plug( helpMenu );
mActionMultiSyncHowto->plug( helpMenu );
mActionFaq->plug( helpMenu );
mActionLicence->plug( helpMenu );
mActionAboutKAddressbook->plug( helpMenu );
if (KGlobal::getDesktopSize() > KGlobal::Small ) {
mActionSave->plug( tb );
mViewManager->getFilterAction()->plug ( tb);
- if (KGlobal::getDesktopSize() == KGlobal::Desktop ) {
+ //LR hide filteraction on started in 480x640
+ if (QApplication::desktop()->width() == 480 ) {
+ mViewManager->getFilterAction()->setComboWidth( 0 );
+ }
mActionUndo->plug( tb );
mActionDelete->plug( tb );
mActionRedo->plug( tb );
- }
} else {
mActionSave->plug( tb );
tb->enableMoving(false);
}
//mActionQuit->plug ( tb );
// tb->insertWidget(-1, 0, mIncSearchWidget, 6);
//US link the searchwidget first to this.
// The real linkage to the toolbar happens later.
//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
//US tb->insertItem( mIncSearchWidget );
/*US
diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp
index 0d91c12..33bef5a 100644
--- a/kaddressbook/viewmanager.cpp
+++ b/kaddressbook/viewmanager.cpp
@@ -51,24 +51,25 @@ $Id$
#include <qaction.h>
#include <qmessagebox.h>
#include <qpopupmenu.h>
#include <kconfigbase.h>
#endif //KAB_EMBEDDED
#include <kdebug.h>
#include <kactionclasses.h>
#include <qlayout.h>
+#include <qapplication.h>
#include <qwidgetstack.h>
#include <kabc/addressbook.h>
#include "filtereditdialog.h"
#include "addviewdialog.h"
#include "kabcore.h"
#include "kabprefs.h"
#include "viewmanager.h"
ViewManager::ViewManager( KABCore *core, QWidget *parent, const char *name )
: QWidget( parent, name ), mCore( core ), mActiveView( 0 )
{
@@ -97,25 +98,28 @@ void ViewManager::scrollDOWN()
}
void ViewManager::restoreSettings()
{
mViewNameList = KABPrefs::instance()->mViewNames;
QString activeViewName = KABPrefs::instance()->mCurrentView;
mActionSelectView->setItems( mViewNameList );
// Filter
mFilterList = Filter::restore( mCore->config(), "Filter" );
mActionSelectFilter->setItems( filterNames() );
mActionSelectFilter->setCurrentItem( KABPrefs::instance()->mCurrentFilter );
- mActionSelectFilter->setComboWidth( 150 );
+ int cw = 150;
+ if (QApplication::desktop()->width() == 480 )
+ cw = 0;
+ mActionSelectFilter->setComboWidth( cw );
// Tell the views to reread their config, since they may have
// been modified by global settings
QString _oldgroup = mCore->config()->group();
QDictIterator<KAddressBookView> it( mViewDict );
for ( it.toFirst(); it.current(); ++it ) {
KConfigGroupSaver saver( mCore->config(), it.currentKey() );
it.current()->readConfig( mCore->config() );
}
setActiveView( activeViewName );
mActionDeleteView->setEnabled( mViewNameList.count() > 1 );
@@ -588,25 +592,28 @@ void ViewManager::configureFilters()
{
FilterDialog dlg( this );
dlg.setFilters( mFilterList );
if ( dlg.exec() )
mFilterList = dlg.filters();
uint pos = mActionSelectFilter->currentItem();
mActionSelectFilter->setItems( filterNames() );
mActionSelectFilter->setCurrentItem( pos );
setActiveFilter( pos );
- mActionSelectFilter->setComboWidth( 150 );
+ int cw = 150;
+ if (QApplication::desktop()->width() == 480 )
+ cw = 0;
+ mActionSelectFilter->setComboWidth( cw );
}
QStringList ViewManager::filterNames() const
{
QStringList names( i18n( "No Filter" ) );
Filter::List::ConstIterator it;
for ( it = mFilterList.begin(); it != mFilterList.end(); ++it )
names.append( (*it).name() );
return names;
}
diff --git a/kmicromail/libmailwrapper/settings.cpp b/kmicromail/libmailwrapper/settings.cpp
index 04afe7c..19093b1 100644
--- a/kmicromail/libmailwrapper/settings.cpp
+++ b/kmicromail/libmailwrapper/settings.cpp
@@ -41,26 +41,26 @@ void Settings::checkDirectory()
QList<Account> Settings::getAccounts()
{
return accounts;
}
void Settings::addAccount( Account *account )
{
accounts.append( account );
}
void Settings::delAccount( Account *account )
{
- accounts.remove( account );
account->remove();
+ accounts.remove( account );
}
void Settings::updateAccounts()
{
accounts.clear();
QDir dir( locateLocal("data", "kopiemail" ) );
QStringList::Iterator it;
QStringList imap = dir.entryList( "imap-*" );
for ( it = imap.begin(); it != imap.end(); it++ ) {
IMAPaccount *account = new IMAPaccount( (*it).replace(0, 5, "") );
accounts.append( account );
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index ec192ea..915b3e8 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -290,28 +290,53 @@ void OpieMail::replyMail()
}
composer.setSubject( prefix + mail->getSubject());
composer.setMessage( rtext );
composer.setInReplyTo( mail->Msgid());
composer.setCharset( body->getCharset() );
if ( QDialog::Accepted == KApplication::execDialog( &composer ) )
{
mail->Wrapper()->answeredMail(mail);
}
delete settings;
}
+void OpieMail::closeViewMail(ViewMail * vm)
+{
+ vm->hide();
+}
+void OpieMail::deleteAndDisplayNextMail(ViewMail * vm)
+{
+ QListViewItem*item = mailView->currentItem();
+ if (!item ) {
+ closeViewMail(vm);
+ return;
+ }
+ RecMailP mail = ((MailListViewItem*)item)->data();
+ mail->Wrapper()->deleteMail( mail );
+ item = item->itemBelow();
+ if (!item ) {
+ closeViewMail(vm);
+ return;
+ }
+ mailView->setCurrentItem(item);
+ mail = ((MailListViewItem*)item)->data();
+ RecBodyP body = folderView->fetchBody(mail);
+ vm->setBody( body );
+ vm->setMail( mail );
+}
void OpieMail::displayNextMail(ViewMail * vm)
{
QListViewItem*item = mailView->currentItem();
if (!item) return;
+ ( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
item = item->itemBelow();
if (!item) {
vm->setCaption(i18n("End of List" ));
return;
}
mailView->setCurrentItem(item);
RecMailP mail = ((MailListViewItem*)item)->data();
RecBodyP body = folderView->fetchBody(mail);
vm->setBody( body );
vm->setMail( mail );
}
void OpieMail::displayMail()
@@ -320,24 +345,26 @@ void OpieMail::displayMail()
if (!item) return;
RecMailP mail = ((MailListViewItem*)item)->data();
RecBodyP body = folderView->fetchBody(mail);
ViewMail readMail( this,"", Qt::WType_Modal );
readMail.setBody( body );
readMail.setMail( mail );
#ifndef DESKTOP_VERSION
readMail.showMaximized();
#else
readMail.resize( 640, 480);
#endif
connect( &readMail,SIGNAL( showNextMail(ViewMail *) ), this, SLOT( displayNextMail(ViewMail *) ) );
+ connect( &readMail,SIGNAL( deleteAndDisplayNextMail(ViewMail *) ), this, SLOT(deleteAndDisplayNextMail(ViewMail *) ) );
+
readMail.exec();
if ( readMail.deleted )
{
folderView->refreshCurrent();
}
else
{
( (MailListViewItem*)item )->setPixmap( 0, QPixmap() );
}
}
void OpieMail::slotGetAllMail()
diff --git a/kmicromail/opiemail.h b/kmicromail/opiemail.h
index 30968a7..a81a34c 100644
--- a/kmicromail/opiemail.h
+++ b/kmicromail/opiemail.h
@@ -17,42 +17,44 @@ public:
OpieMail( QWidget *parent = 0, const char *name = 0 );
virtual ~OpieMail();
static QString appName() { return QString::fromLatin1("kopiemail"); }
public slots:
virtual void slotwriteMail(const QString&name,const QString&email);
virtual void slotwriteMail2(const QString&nameemail);
virtual void slotComposeMail();
virtual void slotExtAppHandler();
virtual void appMessage(const QCString &msg, const QByteArray &data);
virtual void message(const QCString &msg, const QByteArray &data);
protected slots:
+ virtual void deleteAndDisplayNextMail(ViewMail * vm);
virtual void displayNextMail(ViewMail * vm);
virtual void slotSendQueued();
virtual void slotSearchMails();
virtual void slotEditSettings();
virtual void slotEditAccounts();
virtual void displayMail();
virtual void replyMail();
virtual void slotDeleteMail();
virtual void slotGetMail();
virtual void slotGetAllMail();
virtual void slotDeleteAllMail();
virtual void mailHold(int, QListViewItem *,const QPoint&,int);
virtual void slotShowFolders( bool show );
virtual void refreshMailView(const QValueList<RecMailP>&);
virtual void mailLeftClicked( QListViewItem * );
virtual void slotMoveCopyMail();
virtual void slotMoveCopyAllMail();
virtual void reEditMail();
void clearSelection();
private:
+ void closeViewMail(ViewMail * vm);
QString mPendingEmail;
QString mPendingName;
QByteArray mPendingData;
QCString mPendingMessage;
Settings *settings;
};
#endif
diff --git a/kmicromail/viewmail.cpp b/kmicromail/viewmail.cpp
index 60c764c..6d88cad 100644
--- a/kmicromail/viewmail.cpp
+++ b/kmicromail/viewmail.cpp
@@ -497,26 +497,27 @@ void ViewMail::slotForward()
ComposeMail composer( settings ,this, 0, true);
composer.setSubject( "Fwd: " + m_mail[1] );
composer.setMessage( ftext );
if ( QDialog::Accepted == KApplication::execDialog( &composer ))
{
}
}
void ViewMail::slotDeleteMail( )
{
if ( QMessageBox::warning(this, i18n("Delete Mail"), QString( i18n("<p>Do you really want to delete this mail? <br><br>" ) + m_mail[0] + " - " + m_mail[1] ) , QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
- m_recMail->Wrapper()->deleteMail( m_recMail );
- hide();
+ emit deleteAndDisplayNextMail( this);
+ //m_recMail->Wrapper()->deleteMail( m_recMail );
+ //hide();
deleted = true;
}
}
MailImageDlg::MailImageDlg(const QString&fname,QWidget *parent, const char *name, bool modal, WFlags f)
: QDialog(parent,name,modal)
{
QVBoxLayout*dlglayout = new QVBoxLayout(this);
dlglayout->setSpacing(2);
dlglayout->setMargin(1);
//m_imageview = new Opie::MM::OImageScrollView(this);
//dlglayout->addWidget(m_imageview);
diff --git a/kmicromail/viewmail.h b/kmicromail/viewmail.h
index c2c2ce3..d85b8b2 100644
--- a/kmicromail/viewmail.h
+++ b/kmicromail/viewmail.h
@@ -35,24 +35,25 @@ class ViewMail : public ViewMailBase
public:
ViewMail( QWidget *parent = 0, const char *name = 0, WFlags fl = 0);
~ViewMail();
void hide();
void exec();
void setMail(const RecMailP&mail );
void setBody(const RecBodyP&body);
bool deleted;
signals:
void showNextMail(ViewMail*);
+ void deleteAndDisplayNextMail(ViewMail *);
protected:
QString deHtml(const QString &string);
AttachItem* searchParent(const QValueList<int>&path);
AttachItem* lastChild(AttachItem*parent);
protected slots:
void slotNextMail() { emit showNextMail(this); };
void slotReply();
void slotForward();
void setText();
void slotItemClicked( QListViewItem * item , const QPoint & point, int c );
void slotDeleteMail( );
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 15c5dd9..a46cd87 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2464,39 +2464,41 @@ void CalendarView::showDatePicker( )
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() ) {
- qDebug("CalendarView: recreate mEventEditor ");
+ if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
+ topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
+ qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
delete mEventEditor;
mEventEditor = mDialogManager->getEventEditor();
}
mEventEditor->showMaximized();
#endif
}
void CalendarView::showTodoEditor()
{
#ifdef DESKTOP_VERSION
mTodoEditor->show();
#else
- if ( mTodoEditor->width() != QApplication::desktop()->width() ) {
- qDebug("CalendarView: recreate mTodoEditor ");
+ if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
+ topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
+ qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
delete mTodoEditor;
mTodoEditor = mDialogManager->getTodoEditor();
}
mTodoEditor->showMaximized();
#endif
}
void CalendarView::cloneIncidence()
{
Incidence *incidence = currentSelection();
if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
if ( incidence ) {
@@ -2533,37 +2535,37 @@ void CalendarView::cancelIncidence(Incidence * inc )
{
inc->setCancelled( ! inc->cancelled() );
changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
updateView();
}
void CalendarView::cloneIncidence(Incidence * orgInc )
{
Incidence * newInc = orgInc->clone();
newInc->recreate();
if ( newInc->type() == "Todo" ) {
Todo* t = (Todo*) newInc;
- mTodoEditor->editTodo( t );
showTodoEditor();
+ mTodoEditor->editTodo( t );
if ( mTodoEditor->exec() ) {
mCalendar->addTodo( t );
updateView();
} else {
delete t;
}
}
else {
Event* e = (Event*) newInc;
- mEventEditor->editEvent( e );
showEventEditor();
+ mEventEditor->editEvent( e );
if ( mEventEditor->exec() ) {
mCalendar->addEvent( e );
updateView();
} else {
delete e;
}
}
}
void CalendarView::newEvent()
{
// TODO: Replace this code by a common eventDurationHint of KOBaseView.
@@ -2597,34 +2599,34 @@ void CalendarView::newEvent(QDateTime fh)
QDateTime(fh.addSecs(3600*KOPrefs::instance()->mDefaultDuration)));
}
void CalendarView::newEvent(QDate dt)
{
newEvent(QDateTime(dt, QTime(0,0,0)),
QDateTime(dt, QTime(0,0,0)), true);
}
void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
{
+ showEventEditor();
mEventEditor->newEvent(fromHint,toHint,allDay);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mEventEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mEventEditor->setSecrecy( filter->getSecrecy() );
}
- showEventEditor();
}
void CalendarView::todoAdded(Todo * t)
{
changeTodoDisplay ( t ,KOGlobals::EVENTADDED);
updateTodoViews();
}
void CalendarView::todoChanged(Todo * t)
{
emit todoModified( t, 4 );
// updateTodoViews();
}
@@ -2635,87 +2637,87 @@ void CalendarView::todoToBeDeleted(Todo *)
}
void CalendarView::todoDeleted()
{
//qDebug(" todoDeleted()");
updateTodoViews();
}
void CalendarView::newTodo()
{
+ showTodoEditor();
mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mTodoEditor->setCategories(filter->categoryList().join(",") );
}
if ( filter )
mTodoEditor->setSecrecy( filter->getSecrecy() );
}
- showTodoEditor();
}
void CalendarView::newSubTodo()
{
Todo *todo = selectedTodo();
if ( todo ) newSubTodo( todo );
}
void CalendarView::newSubTodo(Todo *parentEvent)
{
- mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
showTodoEditor();
+ mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),parentEvent,true);
}
void CalendarView::newFloatingEvent()
{
DateList tmpList = mNavigator->selectedDates();
QDate date = tmpList.first();
newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
QDateTime( date, QTime( 12, 0, 0 ) ), true );
}
void CalendarView::editEvent( Event *event )
{
if ( !event ) return;
if ( event->isReadOnly() ) {
showEvent( event );
return;
}
- mEventEditor->editEvent( event , mFlagEditDescription);
showEventEditor();
+ mEventEditor->editEvent( event , mFlagEditDescription);
}
void CalendarView::editJournal( Journal *jour )
{
if ( !jour ) return;
mDialogManager->hideSearchDialog();
mViewManager->showJournalView();
mNavigator->slotDaySelect( jour->dtStart().date() );
}
void CalendarView::editTodo( Todo *todo )
{
if ( !todo ) return;
if ( todo->isReadOnly() ) {
showTodo( todo );
return;
}
- mTodoEditor->editTodo( todo ,mFlagEditDescription);
showTodoEditor();
+ mTodoEditor->editTodo( todo ,mFlagEditDescription);
}
KOEventViewerDialog* CalendarView::getEventViewerDialog()
{
if ( !mEventViewerDialog ) {
mEventViewerDialog = new KOEventViewerDialog(this);
connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
diff --git a/qtcompat/qinputdialog.cpp b/qtcompat/qinputdialog.cpp
index 770b281..64c581e 100644
--- a/qtcompat/qinputdialog.cpp
+++ b/qtcompat/qinputdialog.cpp
@@ -26,24 +26,26 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements.
** See http://www.trolltech.com/qpl/ for QPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
**********************************************************************/
+//Edited Lutz Rogowski 2004-12-13
+
#include "qinputdialog.h"
#include <qlayout.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qcombobox.h>
#include <qwidgetstack.h>
#include <qvalidator.h>
#include <qapplication.h>
@@ -444,24 +446,29 @@ QString QInputDialog::getItem( const QString &caption, const QString &label, con
QInputDialog *dlg = new QInputDialog( label, parent, name, TRUE, editable ? EditableComboBox : ComboBox );
dlg->setCaption( caption );
if ( editable ) {
dlg->editableComboBox()->insertStringList( list );
dlg->editableComboBox()->setCurrentItem( current );
} else {
dlg->comboBox()->insertStringList( list );
dlg->comboBox()->setCurrentItem( current );
}
bool ok_ = FALSE;
QString result;
+ int fixWid = 320;
+ if ( QApplication::desktop()->width() <= 240 ) {
+ fixWid = 230;
+ }
+ dlg->setFixedWidth( fixWid);
ok_ = dlg->exec() == QDialog::Accepted;
if ( ok )
*ok = ok_;
if ( editable )
result = dlg->editableComboBox()->currentText();
else
result = dlg->comboBox()->currentText();
delete dlg;
return result;
}