[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/unx
Caolán McNamara
caolanm at redhat.com
Fri Jun 19 03:19:29 PDT 2015
vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
New commits:
commit 14ef3efab2046efbc23305b656a5bfa49990e858
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 19 11:17:59 2015 +0100
gtk3: use a more straightforward ownership for menu
Change-Id: Ibf2184f565225423f57597fe96164565b5a3194a
(cherry picked from commit 859c2874ca24343d5cffca410bbc46483411824a)
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 7afcb56..7c3a1d5 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -2009,23 +2009,23 @@ GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow )
getStyleContext(&mpCheckButtonStyle, gtk_check_button_new());
+ /* Menu bar */
+ gMenuBarWidget = gtk_menu_bar_new();
+ gMenuItemMenuBarWidget = gtk_menu_item_new_with_label( "b" );
+ gtk_menu_shell_append(GTK_MENU_SHELL(gMenuBarWidget), gMenuItemMenuBarWidget);
+ getStyleContext(&mpMenuBarStyle, gMenuBarWidget);
+ mpMenuBarItemStyle = gtk_widget_get_style_context(gMenuItemMenuBarWidget);
+
/* Menu */
GtkWidget *menu = gtk_menu_new();
mpMenuStyle = gtk_widget_get_style_context(menu);
- g_object_ref_sink(menu);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(gMenuItemMenuBarWidget), menu);
/* Menu Items */
gCheckMenuItemWidget = gtk_check_menu_item_new_with_label("M");
gtk_menu_shell_append(GTK_MENU_SHELL(menu), gCheckMenuItemWidget);
mpCheckMenuItemStyle = gtk_widget_get_style_context(gCheckMenuItemWidget);
- /* Menu bar */
- gMenuBarWidget = gtk_menu_bar_new();
- gMenuItemMenuBarWidget = gtk_menu_item_new_with_label( "b" );
- gtk_menu_shell_append(GTK_MENU_SHELL(gMenuBarWidget), gMenuItemMenuBarWidget);
- getStyleContext(&mpMenuBarStyle, gMenuBarWidget);
- mpMenuBarItemStyle = gtk_widget_get_style_context(gMenuItemMenuBarWidget);
-
/* Spinbutton */
gSpinBox = gtk_spin_button_new(NULL, 0, 0);
getStyleContext(&mpSpinStyle, gSpinBox);
More information about the Libreoffice-commits
mailing list