diff options
author | Vladimir Glazunov <vg@openoffice.org> | 2010-10-01 16:02:03 +0200 |
---|---|---|
committer | Vladimir Glazunov <vg@openoffice.org> | 2010-10-01 16:02:03 +0200 |
commit | 8791a391246e7483c12dc4d1bfc870573d94fc66 (patch) | |
tree | a7e6b25d810e777ab74361e6850a74af7c090ae6 /desktop/source/deployment/gui/dp_gui_dialog2.cxx | |
parent | 737b9524f777df9ce04b5822dda5a34f5db218f7 (diff) | |
parent | b79d5592f7928cf4c4f9f6b187910eac2174eb8d (diff) |
#i10000#ooo/DEV300_m89
Diffstat (limited to 'desktop/source/deployment/gui/dp_gui_dialog2.cxx')
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 9f5d400e68..5f1b35932b 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -363,26 +363,28 @@ bool ExtBoxWithBtns_Impl::HandleTabKey( bool bReverse ) // ----------------------------------------------------------------------- MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long nPos ) { - if ( nPos >= (long) getItemCount() ) - return CMD_NONE; + if ( ( nPos >= 0 ) && ( nPos < (long) getItemCount() ) ) + { + if ( ! GetEntryData( nPos )->m_bLocked ) + { + PopupMenu aPopup; - PopupMenu aPopup; + aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) ); - aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) ); + if ( GetEntryData( nPos )->m_bUser ) + { + if ( GetEntryData( nPos )->m_eState == REGISTERED ) + aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) ); + else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE ) + aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) ); + } - if ( ! GetEntryData( nPos )->m_bLocked ) - { - if ( GetEntryData( nPos )->m_bUser ) - { - if ( GetEntryData( nPos )->m_eState == REGISTERED ) - aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) ); - else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE ) - aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) ); + aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) ); + + return (MENU_COMMAND) aPopup.Execute( this, rPos ); } - aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) ); } - - return (MENU_COMMAND) aPopup.Execute( this, rPos ); + return CMD_NONE; } //------------------------------------------------------------------------------ |