summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-08-23 20:09:28 (UTC)
committer zautrix <zautrix>2005-08-23 20:09:28 (UTC)
commit6f5464760f5fb1e4c13027464cfe4943b85d29a0 (patch) (unidiff)
tree3c074b7e313d965516b60b9ba97fe27a7ee774a1
parent13a736b71dec27ef7ffef06b91f34d220d89cce6 (diff)
downloadkdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.zip
kdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.tar.gz
kdepimpi-6f5464760f5fb1e4c13027464cfe4943b85d29a0.tar.bz2
fixx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--kaddressbook/kaddressbookmain.cpp2
-rw-r--r--kmicromail/accountview.cpp2
-rw-r--r--microkde/kdeui/kmainwindow.cpp11
-rw-r--r--microkde/kdeui/kmainwindow.h2
5 files changed, 12 insertions, 11 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 77321aa..af12f2b 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -395,51 +395,51 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, const
395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) ); 395 connect( mMessageTimer, SIGNAL( timeout() ), this, SLOT( setCaptionBack() ) );
396 mEditorDialog = 0; 396 mEditorDialog = 0;
397 createAddresseeEditorDialog( this ); 397 createAddresseeEditorDialog( this );
398 setModified( false ); 398 setModified( false );
399 mBRdisabled = false; 399 mBRdisabled = false;
400#ifndef DESKTOP_VERSION 400#ifndef DESKTOP_VERSION
401 infrared = 0; 401 infrared = 0;
402#endif 402#endif
403 //toggleBeamReceive( ); 403 //toggleBeamReceive( );
404 mMainWindow->toolBar()->show(); 404 mMainWindow->toolBar()->show();
405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi 405 // we have a toolbar repainting error on the Zaurus when starting KA/Pi
406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 406 //QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() )); 407 QTimer::singleShot( 100, this, SLOT ( loadDataAfterStart() ));
408} 408}
409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data ) 409void KABCore::receiveStart( const QCString& cmsg, const QByteArray& data )
410{ 410{
411 qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 411 //qDebug("KO: QCOP start message received: %s ", cmsg.data() );
412 mCStringMess = cmsg; 412 mCStringMess = cmsg;
413 mByteData = data; 413 mByteData = data;
414} 414}
415 415
416void KABCore::loadDataAfterStart() 416void KABCore::loadDataAfterStart()
417{ 417{
418 qDebug("KABCore::loadDataAfterStart() "); 418 //qDebug("KABCore::loadDataAfterStart() ");
419 ((StdAddressBook*)mAddressBook)->init( true ); 419 ((StdAddressBook*)mAddressBook)->init( true );
420 mViewManager->refreshView(); 420 mViewManager->refreshView();
421 421
422#ifndef DESKTOP_VERSION 422#ifndef DESKTOP_VERSION
423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 423 disconnect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT (receiveStart ( const QCString &, const QByteArray & )));
424 424
425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); 425 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
426 if ( !mCStringMess.isEmpty() ) 426 if ( !mCStringMess.isEmpty() )
427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData ); 427 ExternalAppHandler::instance()->appMessage( mCStringMess, mByteData );
428#endif 428#endif
429 QTimer::singleShot( 10, this , SLOT ( updateToolBar())); 429 // QTimer::singleShot( 10, this , SLOT ( updateToolBar()));
430 setCaptionBack(); 430 setCaptionBack();
431} 431}
432void KABCore::updateToolBar() 432void KABCore::updateToolBar()
433{ 433{
434 static int iii = 0; 434 static int iii = 0;
435 ++iii; 435 ++iii;
436 mMainWindow->toolBar()->repaintMe(); 436 mMainWindow->toolBar()->repaintMe();
437 if ( iii < 4 ) 437 if ( iii < 4 )
438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar())); 438 QTimer::singleShot( 100*iii, this , SLOT ( updateToolBar()));
439} 439}
440KABCore::~KABCore() 440KABCore::~KABCore()
441{ 441{
442 // save(); 442 // save();
443 //saveSettings(); 443 //saveSettings();
444 //KABPrefs::instance()->writeConfig(); 444 //KABPrefs::instance()->writeConfig();
445 delete AddresseeConfig::instance(); 445 delete AddresseeConfig::instance();
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index 8fe3ee0..c417226 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -27,33 +27,33 @@
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtoolbar.h> 28#include <qtoolbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30#else //KAB_EMBEDDED 30#else //KAB_EMBEDDED
31#include <kedittoolbar.h> 31#include <kedittoolbar.h>
32#include <kkeydialog.h> 32#include <kkeydialog.h>
33#include <kmessagebox.h> 33#include <kmessagebox.h>
34#include <kstatusbar.h> 34#include <kstatusbar.h>
35#endif //KAB_EMBEDDED 35#endif //KAB_EMBEDDED
36#include <klocale.h> 36#include <klocale.h>
37 37
38#include "kabcore.h" 38#include "kabcore.h"
39#include "kaddressbookmain.h" 39#include "kaddressbookmain.h"
40#include "kactioncollection.h" 40#include "kactioncollection.h"
41 41
42#ifdef KAB_EMBEDDED 42#ifdef KAB_EMBEDDED
43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "adrressbook" ) 43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" )
44#else //KAB_EMBEDDED 44#else //KAB_EMBEDDED
45//MOC_SKIP_BEGIN 45//MOC_SKIP_BEGIN
46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) 46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
47//MOC_SKIP_END 47//MOC_SKIP_END
48#endif //KAB_EMBEDDED 48#endif //KAB_EMBEDDED
49{ 49{
50 setIcon(SmallIcon( "ka24" ) ); 50 setIcon(SmallIcon( "ka24" ) );
51#if 0 51#if 0
52 //US for embedded systems, create the toolbar before we initiate KABCore. 52 //US for embedded systems, create the toolbar before we initiate KABCore.
53 // KABCore will fill the toolbar with menues and icons 53 // KABCore will fill the toolbar with menues and icons
54 QMainWindow::ToolBarDock tbd; 54 QMainWindow::ToolBarDock tbd;
55 tbd = Top; 55 tbd = Top;
56 iconToolBar = new QToolBar( this ); 56 iconToolBar = new QToolBar( this );
57 addToolBar (iconToolBar , tbd ); 57 addToolBar (iconToolBar , tbd );
58 iconToolBar->setHorizontalStretchable(true); 58 iconToolBar->setHorizontalStretchable(true);
59//US iconToolBar->setWidth(300); 59//US iconToolBar->setWidth(300);
diff --git a/kmicromail/accountview.cpp b/kmicromail/accountview.cpp
index 4879d57..d1d4f7e 100644
--- a/kmicromail/accountview.cpp
+++ b/kmicromail/accountview.cpp
@@ -85,33 +85,33 @@ void AccountView::populate( QList<Account> list )
85 (void) new POP3viewItem( pop3, this ); 85 (void) new POP3viewItem( pop3, this );
86 } 86 }
87 else if ( it->getType() == MAILLIB::A_NNTP ) 87 else if ( it->getType() == MAILLIB::A_NNTP )
88 { 88 {
89 NNTPaccount *nntp = static_cast<NNTPaccount *>(it); 89 NNTPaccount *nntp = static_cast<NNTPaccount *>(it);
90 /* must not be hold 'cause it isn't required */ 90 /* must not be hold 'cause it isn't required */
91 (void) new NNTPviewItem( nntp, this ); 91 (void) new NNTPviewItem( nntp, this );
92 } 92 }
93 } 93 }
94} 94}
95 95
96void AccountView::refresh(QListViewItem *item) 96void AccountView::refresh(QListViewItem *item)
97{ 97{
98 if ( item ) 98 if ( item )
99 { 99 {
100 bool ask = true; 100 bool ask = true;
101 qDebug("text -%s- ",item->text( 0 ).latin1() ); 101 //qDebug("text -%s- ",item->text( 0 ).latin1() );
102 if ( item->text( 0 ) == i18n (" Local Mailfolders") ) 102 if ( item->text( 0 ) == i18n (" Local Mailfolders") )
103 ask = false; 103 ask = false;
104 else { 104 else {
105 if ( item->parent() ) 105 if ( item->parent() )
106 if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") ) 106 if ( item->parent()->text( 0 ) == i18n (" Local Mailfolders") )
107 ask = false; 107 ask = false;
108 } 108 }
109 if ( ask ) { 109 if ( ask ) {
110 int result = KMessageBox::warningContinueCancel(this, 110 int result = KMessageBox::warningContinueCancel(this,
111 i18n("Refresh\n%1\n?").arg( item->text(0) ), 111 i18n("Refresh\n%1\n?").arg( item->text(0) ),
112 i18n("Refresh"),i18n("Refresh"),i18n("Cancel"), 112 i18n("Refresh"),i18n("Refresh"),i18n("Cancel"),
113 true); 113 true);
114 if (result != KMessageBox::Continue) return; 114 if (result != KMessageBox::Continue) return;
115 } 115 }
116 m_currentItem = item; 116 m_currentItem = item;
117 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ; 117 topLevelWidget()->setCaption( i18n ( "Refreshing %1 ... please wait" ). arg ( m_currentItem->text( 0 ) ) ) ;
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index 3ae4c87..fa678f2 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -40,33 +40,33 @@ public:
40 40
41 bool autoSaveSettings:1; 41 bool autoSaveSettings:1;
42 bool settingsDirty:1; 42 bool settingsDirty:1;
43 bool autoSaveWindowSize:1; 43 bool autoSaveWindowSize:1;
44 bool care_about_geometry:1; 44 bool care_about_geometry:1;
45 QString autoSaveGroup; 45 QString autoSaveGroup;
46//US KAccel * kaccel; 46//US KAccel * kaccel;
47//US KMainWindowInterface *m_interface; 47//US KMainWindowInterface *m_interface;
48 KDEPrivate::ToolBarHandler *toolBarHandler; 48 KDEPrivate::ToolBarHandler *toolBarHandler;
49 QTimer* settingsTimer; 49 QTimer* settingsTimer;
50 KToggleAction *showStatusBarAction; 50 KToggleAction *showStatusBarAction;
51 QRect defaultWindowSize; 51 QRect defaultWindowSize;
52}; 52};
53 53
54static bool no_query_exit = false; 54static bool no_query_exit = false;
55 55
56KMainWindow::KMainWindow( QWidget* parent, const char *name, WFlags f ) 56KMainWindow::KMainWindow( QWidget* parent, const char *name )
57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/ 57 : QMainWindow( parent, name ) /*LR, f ) with the default widget flag we cannot have fastload */ /*US, KXMLGUIBuilder( this ), helpMenu2( 0 ), factory_( 0 )*/
58{ 58{
59 mQToolBar = 0; 59 mQToolBar = 0;
60 initKMainWindow(name); 60 initKMainWindow(name);
61} 61}
62 62
63void KMainWindow::parseGeometry(bool parsewidth) 63void KMainWindow::parseGeometry(bool parsewidth)
64{ 64{
65//US the following code is not getting used in the embedded version !! So disable it for now 65//US the following code is not getting used in the embedded version !! So disable it for now
66/*US 66/*US
67 67
68 assert ( !kapp->geometryArgument().isNull() ); 68 assert ( !kapp->geometryArgument().isNull() );
69 assert ( d->care_about_geometry ); 69 assert ( d->care_about_geometry );
70 70
71#ifndef Q_WS_QWS 71#ifndef Q_WS_QWS
72 // FIXME: (E) Implement something similar for Qt Embedded (or decide we don't need it) 72 // FIXME: (E) Implement something similar for Qt Embedded (or decide we don't need it)
@@ -834,36 +834,37 @@ void KMainWindow::setSettingsDirty()
834 connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) ); 834 connect( d->settingsTimer, SIGNAL( timeout() ), SLOT( saveAutoSaveSettings() ) );
835 } 835 }
836 d->settingsTimer->start( 500, true ); 836 d->settingsTimer->start( 500, true );
837 } 837 }
838} 838}
839 839
840bool KMainWindow::settingsDirty() const 840bool KMainWindow::settingsDirty() const
841{ 841{
842 return d->settingsDirty; 842 return d->settingsDirty;
843} 843}
844 844
845QString KMainWindow::settingsGroup() const 845QString KMainWindow::settingsGroup() const
846{ 846{
847 return d->autoSaveGroup; 847 return d->autoSaveGroup;
848} 848}
849 849
850void KMainWindow::resizeEvent( QResizeEvent * ) 850void KMainWindow::resizeEvent( QResizeEvent * e)
851{ 851{
852 if ( d->autoSaveWindowSize ) 852 if ( d->autoSaveWindowSize )
853 setSettingsDirty(); 853 setSettingsDirty();
854 QMainWindow::resizeEvent( e );
854} 855}
855 856
856bool KMainWindow::hasMenuBar() 857bool KMainWindow::hasMenuBar()
857{ 858{
858 return (internalMenuBar()); 859 return (internalMenuBar());
859} 860}
860 861
861//US KMenuBar *KMainWindow::menuBar() 862//US KMenuBar *KMainWindow::menuBar()
862QMenuBar *KMainWindow::menuBar() 863QMenuBar *KMainWindow::menuBar()
863{ 864{
864//US KMenuBar * mb = internalMenuBar(); 865//US KMenuBar * mb = internalMenuBar();
865 QMenuBar * mb = internalMenuBar(); 866 QMenuBar * mb = internalMenuBar();
866 if ( !mb ) { 867 if ( !mb ) {
867//US mb = new KMenuBar( this ); 868//US mb = new KMenuBar( this );
868 mb = new QMenuBar( this ); 869 mb = new QMenuBar( this );
869 // trigger a re-layout and trigger a call to the private 870 // trigger a re-layout and trigger a call to the private
@@ -927,35 +928,35 @@ QStatusBar *KMainWindow::internalStatusBar()
927 if ( !l || !l->first() ) { 928 if ( !l || !l->first() ) {
928 delete l; 929 delete l;
929 return 0; 930 return 0;
930 } 931 }
931 932
932//US KStatusBar *s = (KStatusBar*)l->first(); 933//US KStatusBar *s = (KStatusBar*)l->first();
933 QStatusBar *s = (QStatusBar*)l->first(); 934 QStatusBar *s = (QStatusBar*)l->first();
934 delete l; 935 delete l;
935 return s; 936 return s;
936} 937}
937 938
938void KMainWindow::childEvent( QChildEvent* e) 939void KMainWindow::childEvent( QChildEvent* e)
939{ 940{
940 QMainWindow::childEvent( e ); 941 QMainWindow::childEvent( e );
941} 942}
942 943
943void KMainWindow::paintEvent( QPaintEvent * ) 944void KMainWindow::paintEvent( QPaintEvent * e)
944{ 945{
945 // do nothing 946 QMainWindow::paintEvent( e );
946} 947}
947 948
948QSize KMainWindow::sizeForCentralWidgetSize(QSize size) 949QSize KMainWindow::sizeForCentralWidgetSize(QSize size)
949{ 950{
950 KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" ); 951 KToolBar *tb = (KToolBar*)child( "mainToolBar", "KToolBar" );
951 if (tb && !tb->isHidden()) { 952 if (tb && !tb->isHidden()) {
952 switch( tb->barPos() ) 953 switch( tb->barPos() )
953 { 954 {
954 case KToolBar::Top: 955 case KToolBar::Top:
955 case KToolBar::Bottom: 956 case KToolBar::Bottom:
956 size += QSize(0, tb->sizeHint().height()); 957 size += QSize(0, tb->sizeHint().height());
957 break; 958 break;
958 959
959 case KToolBar::Left: 960 case KToolBar::Left:
960 case KToolBar::Right: 961 case KToolBar::Right:
961 size += QSize(toolBar()->sizeHint().width(), 0); 962 size += QSize(toolBar()->sizeHint().width(), 0);
diff --git a/microkde/kdeui/kmainwindow.h b/microkde/kdeui/kmainwindow.h
index 2aafb9d..2dc8033 100644
--- a/microkde/kdeui/kmainwindow.h
+++ b/microkde/kdeui/kmainwindow.h
@@ -81,33 +81,33 @@ public:
81 * the names unique. For example, for a mail client which has one main window showing 81 * the names unique. For example, for a mail client which has one main window showing
82 * the mails and folders, and which can also have one or more windows for composing 82 * the mails and folders, and which can also have one or more windows for composing
83 * mails, the name for the folders window should be e.g. "mainwindow" and 83 * mails, the name for the folders window should be e.g. "mainwindow" and
84 * for the composer windows "composer#". 84 * for the composer windows "composer#".
85 * 85 *
86 * @param f Specify the widget flags. The default is 86 * @param f Specify the widget flags. The default is
87 * WType_TopLevel and WDestructiveClose. TopLevel indicates that a 87 * WType_TopLevel and WDestructiveClose. TopLevel indicates that a
88 * main window is a toplevel window, regardless of whether it has a 88 * main window is a toplevel window, regardless of whether it has a
89 * parent or not. DestructiveClose indicates that a main window is 89 * parent or not. DestructiveClose indicates that a main window is
90 * automatically destroyed when its window is closed. Pass 0 if 90 * automatically destroyed when its window is closed. Pass 0 if
91 * you do not want this behavior. 91 * you do not want this behavior.
92 * 92 *
93 * KMainWindows must be created on the heap with 'new', like: 93 * KMainWindows must be created on the heap with 'new', like:
94 * <pre> KMainWindow *kmw = new KMainWindow (...</pre> 94 * <pre> KMainWindow *kmw = new KMainWindow (...</pre>
95 **/ 95 **/
96 //LR remove WDestructiveClose 96 //LR remove WDestructiveClose
97 KMainWindow( QWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ); 97 KMainWindow( QWidget* parent = 0, const char *name = 0 ); //, WFlags f = WType_TopLevel /*| WDestructiveClose*/ ;
98 98
99 99
100 /** 100 /**
101 * Destructor. 101 * Destructor.
102 * 102 *
103 * Will also destroy the toolbars, and menubar if 103 * Will also destroy the toolbars, and menubar if
104 * needed. 104 * needed.
105 */ 105 */
106 virtual ~KMainWindow(); 106 virtual ~KMainWindow();
107 107
108 /** 108 /**
109 * Retrieve the standard help menu. 109 * Retrieve the standard help menu.
110 * 110 *
111 * It contains entires for the 111 * It contains entires for the
112 * help system (activated by F1), an optional "What's This?" entry 112 * help system (activated by F1), an optional "What's This?" entry
113 * (activated by Shift F1), an application specific dialog box, 113 * (activated by Shift F1), an application specific dialog box,