summaryrefslogtreecommitdiff
path: root/core/pim/addressbook
authortille <tille>2002-12-08 16:47:12 (UTC)
committer tille <tille>2002-12-08 16:47:12 (UTC)
commitaea4a628b4500f8551255d715c9f8696c6ad3280 (patch) (side-by-side diff)
tree96fbc930732b4574490fe7e59fa19a35fb5b8596 /core/pim/addressbook
parenta2840f80792c7e40ee3b44be0ec48302d8816cc0 (diff)
downloadopie-aea4a628b4500f8551255d715c9f8696c6ad3280.zip
opie-aea4a628b4500f8551255d715c9f8696c6ad3280.tar.gz
opie-aea4a628b4500f8551255d715c9f8696c6ad3280.tar.bz2
do not close ab while in cardview, rather switch back to listview
as the old version did
Diffstat (limited to 'core/pim/addressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/addressbook/addressbook.cpp8
-rw-r--r--core/pim/addressbook/addressbook.h2
2 files changed, 8 insertions, 2 deletions
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
@@ -744,13 +744,17 @@ void AddressbookWindow::flush()
m_abView->save();
}
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
at the start of the sync, so there is no need to save
Saving however itself would cause problems. */
e->accept();
@@ -891,13 +895,13 @@ void AddressbookWindow::slotViewSwitched( int view )
if ( catMenu )
catMenu->setItemChecked( i, menu == (int)i );
}
// Tell the view about the selected view
m_abView -> setShowToView ( (AbView::Views) view );
-
+ active_view = view;
}
void AddressbookWindow::slotListView()
{
slotViewSwitched( AbView::TableView );
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
@@ -129,9 +129,11 @@ private:
bool isLoading;
AbConfig m_config;
QAction* m_tableViewButton;
QAction* m_cardViewButton;
+
+ int active_view;
};
#endif