summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-08-10 21:05:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-08-11 18:18:15 +0200
commita18b0b4aa56c47cadd0b6d6d1ad5842cf16e9835 (patch)
treed9638d6aa0dc633972524b990e909870a0d215f6 /vcl/inc
parentf07b271a21f157550f31b4081ba296688305cb3e (diff)
speed up menu construction at app startup
we spend a lot of time constructing menus, mostly because we trigger events for every tiny change to a menu item Change-Id: I8f81e406b577c27c9f4bcfe23bf644d751bb5d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171723 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/unx/gtk/glomenu.h6
-rw-r--r--vcl/inc/unx/gtk/gtksalmenu.hxx2
2 files changed, 5 insertions, 3 deletions
diff --git a/vcl/inc/unx/gtk/glomenu.h b/vcl/inc/unx/gtk/glomenu.h
index da41e9e4b8b1..427a0a8ba79c 100644
--- a/vcl/inc/unx/gtk/glomenu.h
+++ b/vcl/inc/unx/gtk/glomenu.h
@@ -76,7 +76,8 @@ void g_lo_menu_set_icon (GLOMenu
void g_lo_menu_set_label_to_item_in_section (GLOMenu *menu,
gint section,
gint position,
- const gchar *label);
+ const gchar *label,
+ bool fire_event = true);
void g_lo_menu_set_icon_to_item_in_section (GLOMenu *menu,
gint section,
@@ -101,7 +102,8 @@ void g_lo_menu_set_action_and_target_value_to_item_in_section (GLOMenu
void g_lo_menu_set_command_to_item_in_section (GLOMenu *menu,
gint section,
gint position,
- const gchar *command);
+ const gchar *command,
+ bool fire_event = true);
gchar * g_lo_menu_get_command_from_item_in_section (GLOMenu *menu,
gint section,
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index 4157df9d3bf6..1a152a7142e1 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -94,7 +94,7 @@ public:
void SetActionGroup( GActionGroup* pActionGroup ) { mpActionGroup = pActionGroup; }
bool IsItemVisible( unsigned nPos );
- void NativeSetItemText( unsigned nSection, unsigned nItemPos, const OUString& rText );
+ void NativeSetItemText( unsigned nSection, unsigned nItemPos, const OUString& rText, bool bFireEvent = true );
void NativeSetItemIcon( unsigned nSection, unsigned nItemPos, const Image& rImage );
bool NativeSetItemCommand( unsigned nSection,
unsigned nItemPos,