summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
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
parent0099aaae0f4848b2a000f385fc0a533d327194af (diff)
Cleaned up some code.
Change-Id: Ibab1dbac24c46dc44c0481a042171939cf8ffd9f
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/window/gloactiongroup.cxx20
-rw-r--r--vcl/unx/gtk/window/gtksalmenu.cxx19
2 files changed, 2 insertions, 37 deletions
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index 1a0e88fbd107..d7eafbfc2c53 100644
--- a/vcl/unx/gtk/window/gloactiongroup.cxx
+++ b/vcl/unx/gtk/window/gloactiongroup.cxx
@@ -418,24 +418,4 @@ g_lo_action_group_clear (GLOActionGroup *group)
}
}
-void
-g_lo_action_group_merge (GLOActionGroup *input_group,
- GLOActionGroup *output_group)
-{
- g_return_if_fail (G_IS_LO_ACTION_GROUP (input_group));
- g_return_if_fail (G_IS_LO_ACTION_GROUP (output_group));
- g_return_if_fail (input_group != NULL);
- g_return_if_fail (output_group != NULL);
-
- GHashTableIter iter;
- gpointer key, value;
-
- g_hash_table_iter_init (&iter, input_group->priv->table);
-
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- g_lo_action_group_insert(output_group, (gchar*) key, value);
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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 )