summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/window/gtksalmenu.cxx
diff options
context:
space:
mode:
authorAntonio Fernandez <antonio.fernandez@aentos.es>2012-09-03 10:20:57 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-11-14 13:52:46 +0100
commit9b6a1ca9559cca4d0a151d7e100215aeac8f796c (patch)
tree50b5c9ea4c709077d00613a11273748d6df22c8d /vcl/unx/gtk/window/gtksalmenu.cxx
parent0099aaae0f4848b2a000f385fc0a533d327194af (diff)
Cleaned up some code.
Change-Id: Ibab1dbac24c46dc44c0481a042171939cf8ffd9f
Diffstat (limited to 'vcl/unx/gtk/window/gtksalmenu.cxx')
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx19
1 files changed, 2 insertions, 17 deletions
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index 7312699b0884..af4df229459f 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -87,9 +87,9 @@ static void UpdateNativeMenu( GtkSalMenu* pMenu )
// Force updating of native menu labels.
pMenu->NativeSetItemText( nSection, nItemPos, aText );
- pMenu->SetAccelerator( nItem, pSalMenuItem, nAccelKey, nAccelKey.GetName( pMenu->GetFrame()->GetWindow() ) );
+ pMenu->NativeSetAccelerator( nSection, nItemPos, nAccelKey, nAccelKey.GetName( pMenu->GetFrame()->GetWindow() ) );
- if ( g_strcmp0( aNativeCommand, "" ) != 0 && pSalMenuItem->mpVCLMenu->GetPopupMenu( nId ) == NULL )
+ if ( g_strcmp0( aNativeCommand, "" ) != 0 && pSalMenuItem->mpSubMenu == NULL )
{
pMenu->NativeSetItemCommand( nSection, nItemPos, pSalMenuItem, aNativeCommand );
pMenu->NativeSetEnableItem( aNativeCommand, bEnabled );
@@ -459,21 +459,6 @@ void GtkSalMenu::SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const I
void GtkSalMenu::SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const rtl::OUString& rKeyName )
{
-// if ( rKeyName.isEmpty() )
-// return;
-
-// rtl::OString aAccelerator = rtl::OUStringToOString( GetGtkKeyName( rKeyName ), RTL_TEXTENCODING_UTF8 );
-
-// unsigned nSection, nItemPos;
-// GetItemSectionAndPosition( nPos, &nSection, &nItemPos );
-
-// gchar* aCurrentAccel = g_lo_menu_get_accelerator_from_item_in_section( G_LO_MENU( mpMenuModel ), nSection, nItemPos );
-
-// if ( aCurrentAccel == NULL && g_strcmp0( aCurrentAccel, aAccelerator.getStr() ) != 0 )
-// g_lo_menu_set_accelerator_to_item_in_section ( G_LO_MENU( mpMenuModel ), nSection, nItemPos, aAccelerator.getStr() );
-
-// if ( aCurrentAccel )
-// g_free( aCurrentAccel );
}
void GtkSalMenu::NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const KeyCode& rKeyCode, const rtl::OUString& rKeyName )