[Libreoffice-commits] .: Branch 'feature/unitymenus' - vcl/inc vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 4 08:32:56 PDT 2012
vcl/inc/unx/gtk/gloactiongroup.h | 3 ---
vcl/unx/gtk/window/gloactiongroup.cxx | 20 --------------------
vcl/unx/gtk/window/gtksalmenu.cxx | 19 ++-----------------
3 files changed, 2 insertions(+), 40 deletions(-)
New commits:
commit 38086189fea8585d367e4b68dd4cd6f2e6088bd8
Author: Antonio Fernandez <antonio.fernandez at aentos.es>
Date: Mon Sep 3 10:20:57 2012 +0100
Cleaned up some code.
Change-Id: Ibab1dbac24c46dc44c0481a042171939cf8ffd9f
diff --git a/vcl/inc/unx/gtk/gloactiongroup.h b/vcl/inc/unx/gtk/gloactiongroup.h
index f01aa4a..bc4d59d 100644
--- a/vcl/inc/unx/gtk/gloactiongroup.h
+++ b/vcl/inc/unx/gtk/gloactiongroup.h
@@ -89,9 +89,6 @@ void g_lo_action_group_remove (GLOActionGroup
void g_lo_action_group_clear (GLOActionGroup *group);
-void g_lo_action_group_merge (GLOActionGroup *input_group,
- GLOActionGroup *output_group);
-
G_END_DECLS
#endif // GLOACTIONGROUP_H
diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
index 1a0e88f..d7eafbf 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 7312699..af4df22 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 )
More information about the Libreoffice-commits
mailing list