summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kmainwindow.cpp
Unidiff
Diffstat (limited to 'microkde/kdeui/kmainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kmainwindow.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/microkde/kdeui/kmainwindow.cpp b/microkde/kdeui/kmainwindow.cpp
index bd5a2cc..3ae4c87 100644
--- a/microkde/kdeui/kmainwindow.cpp
+++ b/microkde/kdeui/kmainwindow.cpp
@@ -255,96 +255,97 @@ application config.
255 255
256 if ( readPropertiesInternal( config, number ) ){ 256 if ( readPropertiesInternal( config, number ) ){
257 if ( show ) 257 if ( show )
258 KMainWindow::show(); 258 KMainWindow::show();
259 return FALSE; 259 return FALSE;
260 } 260 }
261 return FALSE; 261 return FALSE;
262 262
263} 263}
264 264
265void KMainWindow::setCaption( const QString &caption ) 265void KMainWindow::setCaption( const QString &caption )
266{ 266{
267//US setPlainCaption( kapp->makeStdCaption(caption) ); 267//US setPlainCaption( kapp->makeStdCaption(caption) );
268 setPlainCaption( caption ); 268 setPlainCaption( caption );
269} 269}
270 270
271void KMainWindow::setCaption( const QString &caption, bool modified ) 271void KMainWindow::setCaption( const QString &caption, bool modified )
272{ 272{
273//US setPlainCaption( kapp->makeStdCaption(caption, true, modified) ); 273//US setPlainCaption( kapp->makeStdCaption(caption, true, modified) );
274 setPlainCaption( caption + "modified:" ); 274 setPlainCaption( caption + "modified:" );
275} 275}
276 276
277void KMainWindow::setPlainCaption( const QString &caption ) 277void KMainWindow::setPlainCaption( const QString &caption )
278{ 278{
279 QMainWindow::setCaption( caption ); 279 QMainWindow::setCaption( caption );
280#ifndef Q_WS_QWS 280#ifndef Q_WS_QWS
281//US the following is disabled for the embedded version 281//US the following is disabled for the embedded version
282//US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 ); 282//US NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
283//US info.setName( caption.utf8().data() ); 283//US info.setName( caption.utf8().data() );
284#endif 284#endif
285} 285}
286 286
287void KMainWindow::slotStateChanged(const QString &newstate) 287void KMainWindow::slotStateChanged(const QString &newstate)
288{ 288{
289 stateChanged(newstate, KXMLGUIClient::StateNoReverse); 289 stateChanged(newstate, KXMLGUIClient::StateNoReverse);
290} 290}
291 291
292/* 292/*
293 * Get rid of this for KDE 4.0 293 * Get rid of this for KDE 4.0
294 */ 294 */
295void KMainWindow::slotStateChanged(const QString &newstate, 295void KMainWindow::slotStateChanged(const QString &newstate,
296 KXMLGUIClient::ReverseStateChange reverse) 296 KXMLGUIClient::ReverseStateChange reverse)
297{ 297{
298 stateChanged(newstate, reverse); 298 stateChanged(newstate, reverse);
299} 299}
300 300
301void KMainWindow::closeEvent ( QCloseEvent *e ) 301void KMainWindow::closeEvent ( QCloseEvent *e )
302{ 302{
303 //qDebug("MainWindow::closeEvent ");
303 // Save settings if auto-save is enabled, and settings have changed 304 // Save settings if auto-save is enabled, and settings have changed
304 if (d->settingsDirty && d->autoSaveSettings) 305 if (d->settingsDirty && d->autoSaveSettings)
305 saveAutoSaveSettings(); 306 saveAutoSaveSettings();
306 307
307 if (queryClose()) { 308 if (queryClose()) {
308 e->accept(); 309 e->accept();
309 310
310 int not_withdrawn = 0; 311 int not_withdrawn = 0;
311/*US 312/*US
312 QPtrListIterator<KMainWindow> it(*KMainWindow::memberList); 313 QPtrListIterator<KMainWindow> it(*KMainWindow::memberList);
313 for (it.toFirst(); it.current(); ++it){ 314 for (it.toFirst(); it.current(); ++it){
314 if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this ) 315 if ( !it.current()->isHidden() && it.current()->isTopLevel() && it.current() != this )
315 not_withdrawn++; 316 not_withdrawn++;
316 } 317 }
317*/ 318*/
318 if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted? 319 if ( !no_query_exit && not_withdrawn <= 0 ) { // last window close accepted?
319/*US 320/*US
320 if ( queryExit() && !kapp->sessionSaving()) { // Yes, Quit app? 321 if ( queryExit() && !kapp->sessionSaving()) { // Yes, Quit app?
321 // don't call queryExit() twice 322 // don't call queryExit() twice
322 disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown())); 323 disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
323 kapp->deref(); // ...and quit aplication. 324 kapp->deref(); // ...and quit aplication.
324 } else { 325 } else {
325 // cancel closing, it's stupid to end up with no windows at all.... 326 // cancel closing, it's stupid to end up with no windows at all....
326 e->ignore(); 327 e->ignore();
327 } 328 }
328*/ 329*/
329//US we have no sessionmanagement. Simply close app. 330//US we have no sessionmanagement. Simply close app.
330 if ( queryExit() ) { // Yes, Quit app? 331 if ( queryExit() ) { // Yes, Quit app?
331 qDebug("KMainWindow::closeEvent: Exit application ???"); 332 qDebug("KMainWindow::closeEvent: Exit application ???");
332 // don't call queryExit() twice 333 // don't call queryExit() twice
333//US disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown())); 334//US disconnect(kapp, SIGNAL(shutDown()), this, SLOT(shuttingDown()));
334 } 335 }
335 336
336 } 337 }
337 } 338 }
338} 339}
339 340
340bool KMainWindow::queryExit() 341bool KMainWindow::queryExit()
341{ 342{
342 return TRUE; 343 return TRUE;
343} 344}
344 345
345bool KMainWindow::queryClose() 346bool KMainWindow::queryClose()
346{ 347{
347 return TRUE; 348 return TRUE;
348} 349}
349 350
350void KMainWindow::saveGlobalProperties( KConfig* ) 351void KMainWindow::saveGlobalProperties( KConfig* )