Kaydet (Commit) 4e112800 authored tarafından Antonio Fernandez's avatar Antonio Fernandez Kaydeden (comit) Bjoern Michaelsen

Menus now work properly when opening an application from LO's main screen.

Change-Id: Ib4947f5b48f508d66beab6952098c8d27e03ad21
üst b5615905
......@@ -474,9 +474,12 @@ void GtkSalMenu::SetFrame( const SalFrame* pFrame )
mpFrame = static_cast< const GtkSalFrame* >( pFrame );
// Clean menu model and action group if needed.
GObject* pWindow = G_OBJECT( pFrameNonConst->getWindow() );
GLOMenu* pMenuModel = G_LO_MENU( g_object_get_data( pWindow, "g-lo-menubar" ) );
GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( g_object_get_data( pWindow, "g-lo-action-group" ) );
// GObject* pWindow = G_OBJECT( pFrameNonConst->getWindow() );
GtkWidget* pWidget = pFrameNonConst->getWindow();
GdkWindow* gdkWindow = gtk_widget_get_window( pWidget );
GLOMenu* pMenuModel = G_LO_MENU( g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-menubar" ) );
GLOActionGroup* pActionGroup = G_LO_ACTION_GROUP( g_object_get_data( G_OBJECT( gdkWindow ), "g-lo-action-group" ) );
if ( pMenuModel && g_menu_model_get_n_items( G_MENU_MODEL( pMenuModel ) ) > 0 )
g_lo_menu_remove( pMenuModel, 0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment