summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Voelzke <dv@openoffice.org>2010-08-19 16:07:49 +0200
committerDirk Voelzke <dv@openoffice.org>2010-08-19 16:07:49 +0200
commit8d564520bfc5a8d228c8f3e85a5c5c4d6293b19e (patch)
tree78d7fcff61c738eb254dad15368fd3e41d3310be
parent859a5495b88f0aebea8d40840d793bd2dc6574d2 (diff)
dv21:#i113524# No update menu entry for bundled extensions
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_dialog2.cxx32
1 files changed, 18 insertions, 14 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index ed5db4cb11..5f1b35932b 100755
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -363,24 +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_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 ) );
- }
+ aPopup.InsertItem( CMD_REMOVE, DialogHelper::getResourceString( RID_CTX_ITEM_REMOVE ) );
- return (MENU_COMMAND) aPopup.Execute( this, rPos );
+ return (MENU_COMMAND) aPopup.Execute( this, rPos );
+ }
+ }
+ return CMD_NONE;
}
//------------------------------------------------------------------------------