diff options
author | Ocke Janssen <oj@openoffice.org> | 2000-11-23 08:03:58 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2000-11-23 08:03:58 +0000 |
commit | 428e9a50248650d5fedf4759aae1b523645fd355 (patch) | |
tree | 56de4ed2dab46e35b26ad3f8f9571221afd90bea | |
parent | 2e079a397e2622951ec5a85d712d8727bdc232a9 (diff) |
#80558# don't show delete when no datasource exist
-rw-r--r-- | dbaccess/source/ui/dlg/dbadmin.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 13f8ad2e72a6..f4f4ae3f29a6 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dbadmin.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: oj $ $Date: 2000-11-21 15:00:54 $ + * last change: $Author: oj $ $Date: 2000-11-23 09:03:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -2117,8 +2117,9 @@ long ODatasourceSelector::Notify(NotifyEvent& _rNEvt) // (the dialog), and this instance en- or disables our "new datasource" button aMenu.EnableItem(MID_NEW_DATASOURCE, m_aNewDatasource.IsEnabled()); - DatasourceState eState = getEntryState(m_aDatasourceList.GetSelectEntryPos()); - aMenu.EnableItem(MID_DELETE_DATASOURCE, DELETED != eState); + USHORT nSelectionPos = m_aDatasourceList.GetSelectEntryPos(); + DatasourceState eState = getEntryState(nSelectionPos); + aMenu.EnableItem(MID_DELETE_DATASOURCE, (DELETED != eState && nSelectionPos != LISTBOX_ENTRY_NOTFOUND)); aMenu.EnableItem(MID_RESTORE_DATASOURCE, DELETED == eState); switch (aMenu.Execute(_rNEvt.GetWindow(), aWhere)) @@ -2191,6 +2192,9 @@ IMPL_LINK(ODatasourceSelector, OnButtonPressed, Button*, EMPTYARG) /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.19 2000/11/21 15:00:54 oj + * #80549# wrong dsn for text + * * Revision 1.18 2000/11/10 17:36:53 fs * small bug fixes * |