[SCM] LibreOffice packaging repository branch, ubuntu-raring-4.0, updated. libreoffice_4.0.2_rc2-1-256-g193cbdb
The following commit has been merged in the ubuntu-raring-4.0 branch:
commit 193cbdb33935f59f4ab88a17304eef72cbfa4f2d
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date: Fri Apr 19 12:02:38 2013 +0200
lp#1085169: overactivate menus
diff --git a/changelog b/changelog
index 4d967c8..2a19386 100644
--- a/changelog
+++ b/changelog
@@ -1,9 +1,9 @@
-libreoffice (1:4.0.2-0ubuntu2~raring1~ppa2) raring; urgency=low
+libreoffice (1:4.0.2-0ubuntu2~raring1~ppa3) raring; urgency=low
- * hotfix: activate menu before selecting (LP: #1085169)
* Junittest sfx2/complex is still flaky on the buildds it seems, disabling
+ * fix: activate menus more proactively (LP: #1085169)
- -- Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Thu, 18 Apr 2013 13:37:39 +0200
+ -- Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Fri, 19 Apr 2013 11:58:59 +0200
libreoffice (1:4.0.2-0ubuntu1) raring; urgency=low
diff --git a/patches/lp-1085169-unity-print-preview.diff b/patches/lp-1085169-unity-print-preview.diff
deleted file mode 100644
index 187ab92..0000000
--- a/patches/lp-1085169-unity-print-preview.diff
+++ /dev/null
@@ -1,17 +0,0 @@
-Description: lp#1085169 -- hotfix to get menus to work e.g. in print preview
-Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1085169
-Forwarded: no
-Last-Update: 2013-04-16
-
----
---- libreoffice-4.0.2.orig/vcl/source/window/menu.cxx
-+++ libreoffice-4.0.2/vcl/source/window/menu.cxx
-@@ -1120,6 +1120,7 @@ void Menu::ImplSelect()
-
- void Menu::Select()
- {
-+ aActivateHdl.Call( this );
- ImplMenuDelData aDelData( this );
-
- ImplCallEventListeners( VCLEVENT_MENU_SELECT, GetItemPos( GetCurItemId() ) );
diff --git a/patches/lp-1085169-we-overactivate-here-as-it-does-not-seem-.diff b/patches/lp-1085169-we-overactivate-here-as-it-does-not-seem-.diff
new file mode 100644
index 0000000..998f0a1
--- /dev/null
+++ b/patches/lp-1085169-we-overactivate-here-as-it-does-not-seem-.diff
@@ -0,0 +1,133 @@
+From 18b2ba2e6d1396c8b5c6ef5d87507d4da2eade13 Mon Sep 17 00:00:00 2001
+From: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
+Date: Fri, 19 Apr 2013 11:13:05 +0200
+Subject: [PATCH] lp#1085169: we overactivate here, as it does not seem to hurt
+
+Conflicts:
+ vcl/unx/gtk/window/gloactiongroup.cxx
+
+Change-Id: I4f6e76347c5c9b5c67a09b8c3dcd1b1708e8e703
+---
+ vcl/inc/unx/gtk/gtksalmenu.hxx | 3 ++-
+ vcl/unx/gtk/window/gloactiongroup.cxx | 7 ++++---
+ vcl/unx/gtk/window/gtksalmenu.cxx | 32 +++++++++++++++++---------------
+ 3 files changed, 23 insertions(+), 19 deletions(-)
+
+diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
+index fc0632f..1a55cca 100644
+--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
++++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
+@@ -52,6 +52,7 @@ private:
+
+ GtkSalMenu* GetMenuForItemCommand( gchar* aCommand, gboolean bGetSubmenu );
+ void ImplUpdate( gboolean bRecurse );
++ void ActivateAllSubmenus(MenuBar* pMenuBar);
+
+ public:
+ GtkSalMenu( sal_Bool bMenuBar );
+@@ -97,7 +98,7 @@ public:
+ void NativeSetAccelerator( unsigned nSection, unsigned nItemPos, const KeyCode& rKeyCode, const rtl::OUString& rKeyName );
+
+ void DispatchCommand( gint itemId, const gchar* aCommand );
+- void Activate( const gchar* aMenuCommand );
++ void Activate();
+ void Deactivate( const gchar* aMenuCommand );
+ void Display( sal_Bool bVisible );
+ bool PrepUpdate();
+diff --git a/vcl/unx/gtk/window/gloactiongroup.cxx b/vcl/unx/gtk/window/gloactiongroup.cxx
+index f8132a0..f20687c 100644
+--- a/vcl/unx/gtk/window/gloactiongroup.cxx
++++ b/vcl/unx/gtk/window/gloactiongroup.cxx
+@@ -170,20 +170,21 @@ g_lo_action_group_perform_submenu_action (GLOActionGroup *group,
+ const gchar *action_name,
+ GVariant *state)
+ {
+- GTK_YIELD_GRAB();
+-
+ GtkSalFrame* pFrame = group->priv->frame;
++ SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for frame " << pFrame);
+
+ if (pFrame == NULL)
+ return;
+
+ GtkSalMenu* pSalMenu = static_cast<GtkSalMenu*> (pFrame->GetMenu());
++ SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " for menu " << pSalMenu);
+
+ if (pSalMenu != NULL) {
+ gboolean bState = g_variant_get_boolean (state);
++ SAL_INFO("vcl.unity", "g_lo_action_group_perform_submenu_action on " << group << " to " << bState);
+
+ if (bState)
+- pSalMenu->Activate (action_name);
++ pSalMenu->Activate();
+ else
+ pSalMenu->Deactivate (action_name);
+ }
+diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
+index 605db0d..1db0163 100644
+--- a/vcl/unx/gtk/window/gtksalmenu.cxx
++++ b/vcl/unx/gtk/window/gtksalmenu.cxx
+@@ -351,10 +351,6 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse )
+ {
+ pSubmenu->SetMenuModel( G_MENU_MODEL( pSubMenuModel ) );
+ pSubmenu->SetActionGroup( G_ACTION_GROUP( pActionGroup ) );
+-
+- pSubmenu->GetMenu()->Activate();
+- pSubmenu->GetMenu()->Deactivate();
+-
+ pSubmenu->ImplUpdate( bRecurse );
+ }
+ }
+@@ -657,7 +653,6 @@ GtkSalMenu* GtkSalMenu::GetMenuForItemCommand( gchar* aCommand, gboolean bGetSub
+ {
+ SolarMutexGuard aGuard;
+ GtkSalMenu* pMenu = NULL;
+-
+ for ( sal_uInt16 nPos = 0; nPos < maItems.size(); nPos++ )
+ {
+ GtkSalMenuItem *pSalItem = maItems[ nPos ];
+@@ -694,24 +689,31 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand )
+ Menu* pSubMenu = ( pSalSubMenu != NULL ) ? pSalSubMenu->GetMenu() : NULL;
+
+ MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu );
+-
+ pMenuBar->HandleMenuCommandEvent( pSubMenu, itemId );
+ }
+
+-void GtkSalMenu::Activate( const gchar* aMenuCommand )
++void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar)
++{
++ pMenuBar->HandleMenuActivateEvent(mpVCLMenu);
++ for ( sal_uInt16 nPos = 0; nPos < maItems.size(); nPos++ )
++ {
++ GtkSalMenuItem *pSalItem = maItems[ nPos ];
++ if ( pSalItem->mpSubMenu != NULL )
++ {
++ pSalItem->mpSubMenu->ActivateAllSubmenus(pMenuBar);
++ pSalItem->mpSubMenu->Update();
++ }
++ }
++}
++
++void GtkSalMenu::Activate()
+ {
+ if ( mbMenuBar != TRUE )
+ return;
+-
+- GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( (gchar*) aMenuCommand, TRUE );
+-
+- if ( pSalSubMenu != NULL ) {
+- MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu );
+- pMenuBar->HandleMenuActivateEvent( pSalSubMenu->mpVCLMenu );
+- pSalSubMenu->Update();
+- }
++ ActivateAllSubmenus(static_cast<MenuBar*>(mpVCLMenu));
+ }
+
++
+ void GtkSalMenu::Deactivate( const gchar* aMenuCommand )
+ {
+ if ( mbMenuBar == sal_False )
+--
+1.8.1.2
+
diff --git a/patches/series b/patches/series
index d0d7fdd..9a1b2c4 100644
--- a/patches/series
+++ b/patches/series
@@ -32,3 +32,4 @@ fix-internal-hsqldb-build.diff
lp-753627-readd-updated-Ubuntu-brand-palette-colors.diff
lp-780399-sessioninstaller-for-remaining-java-wizards.diff
fdo-35663.diff
+lp-1085169-we-overactivate-here-as-it-does-not-seem-.diff
--
LibreOffice packaging repository
Reply to: