From aea4a628b4500f8551255d715c9f8696c6ad3280 Mon Sep 17 00:00:00 2001 From: tille Date: Sun, 08 Dec 2002 16:47:12 +0000 Subject: do not close ab while in cardview, rather switch back to listview as the old version did --- (limited to 'core/pim/addressbook') diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 055124c..60db2b4 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -747,7 +747,11 @@ void AddressbookWindow::flush() void AddressbookWindow::closeEvent( QCloseEvent *e ) { - + if(active_view == AbView::CardView){ + slotViewSwitched( AbView::TableView ); + e->ignore(); + return; + } if(syncing) { /* shouldn't we save, I hear you say? well its already been set so that an edit can not occur during a sync, and we flushed @@ -894,7 +898,7 @@ void AddressbookWindow::slotViewSwitched( int view ) // Tell the view about the selected view m_abView -> setShowToView ( (AbView::Views) view ); - + active_view = view; } diff --git a/core/pim/addressbook/addressbook.h b/core/pim/addressbook/addressbook.h index 4c1e2f2..2bedc0b 100644 --- a/core/pim/addressbook/addressbook.h +++ b/core/pim/addressbook/addressbook.h @@ -132,6 +132,8 @@ private: QAction* m_tableViewButton; QAction* m_cardViewButton; + + int active_view; }; #endif -- cgit v0.9.0.2