Merge lp:~attente/chromium-browser/chromium-browser into lp:~cmiller/chromium-browser/ppa-chromium-browser.raring.stable

Proposed by William Hua
Status: Rejected
Rejected by: Chad Miller
Proposed branch: lp:~attente/chromium-browser/chromium-browser
Merge into: lp:~cmiller/chromium-browser/ppa-chromium-browser.raring.stable
Diff against target: 41 lines (+29/-0)
2 files modified
debian/patches/menu-bar-visible.patch (+28/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~attente/chromium-browser/chromium-browser
Reviewer Review Type Date Requested Status
Chad Miller Pending
Review via email: mp+147395@code.launchpad.net

Description of the change

The global menu bar in Chromium is already a hack for Unity. It implements its Unity menu bar by creating an invisible GtkMenuBar and adding it to the widget hierarchy. But we should prefer to show the menu bar instead, with a size of 0x0.

While this is still a hack on top of another hack, it's still preferable until the appropriate fix is made. The appropriate fix is to export a GMenuModel and not create the GtkMenuBar at all.

(Also, see commit message)

To post a comment you must log in.

Unmerged revisions

823. By William Hua

Make the menu bar visible, but taking zero space.

Before, an invisible menu bar was added to the widget hierarchy, but
never shown, for the sake of Unity. Instead we make it visible, but give
it zero space in the browser window UI layout.

The proper fix for the menu bar altogether is to export GMenuModels
directly and not add any GtkMenuBar at all.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file 'debian/patches/menu-bar-visible.patch'
--- debian/patches/menu-bar-visible.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/menu-bar-visible.patch 2013-02-08 15:30:36 +0000
@@ -0,0 +1,28 @@
1Index: chromium-browser-24.0.1312.56/src/chrome/browser/ui/gtk/browser_window_gtk.cc
2===================================================================
3--- chromium-browser-24.0.1312.56.orig/src/chrome/browser/ui/gtk/browser_window_gtk.cc 2013-02-07 10:29:16.529640362 -0500
4+++ chromium-browser-24.0.1312.56/src/chrome/browser/ui/gtk/browser_window_gtk.cc 2013-02-07 14:28:14.394185599 -0500
5@@ -1659,7 +1659,9 @@
6 // GtkMenuBar it sees into the global menu bar. (It doesn't seem to check the
7 // visibility of the GtkMenuBar, so we can just permanently hide it.)
8 global_menu_bar_.reset(new GlobalMenuBar(browser_.get()));
9- gtk_container_add(GTK_CONTAINER(window_vbox_), global_menu_bar_->widget());
10+ gtk_box_pack_start(GTK_BOX(window_vbox_), global_menu_bar_->widget(), FALSE,
11+ FALSE, 0);
12+ gtk_widget_show(global_menu_bar_->widget());
13
14 // The window container draws the custom browser frame.
15 window_container_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
16Index: chromium-browser-24.0.1312.56/src/chrome/browser/ui/gtk/global_menu_bar.cc
17===================================================================
18--- chromium-browser-24.0.1312.56.orig/src/chrome/browser/ui/gtk/global_menu_bar.cc 2013-02-07 10:29:16.529640362 -0500
19+++ chromium-browser-24.0.1312.56/src/chrome/browser/ui/gtk/global_menu_bar.cc 2013-02-07 10:31:17.885644977 -0500
20@@ -161,7 +161,7 @@
21 // The global menu bar should never actually be shown in the app; it should
22 // instead remain in our widget hierarchy simply to be noticed by third party
23 // components.
24- gtk_widget_set_no_show_all(menu_bar_.get(), TRUE);
25+ gtk_widget_set_size_request(menu_bar_.get(), 0, 0);
26
27 // Set a nice name so it shows up in gtkparasite and others.
28 gtk_widget_set_name(menu_bar_.get(), "chrome-hidden-global-menubar");
029
=== modified file 'debian/patches/series'
--- debian/patches/series 2013-01-25 15:54:50 +0000
+++ debian/patches/series 2013-02-08 15:30:36 +0000
@@ -18,3 +18,4 @@
187-npapi-permission-not-defaults-to-unauthorized.patch187-npapi-permission-not-defaults-to-unauthorized.patch
19fix-1034541.patch19fix-1034541.patch
20###: end lp:unity-chromium-extension20###: end lp:unity-chromium-extension
21menu-bar-visible.patch

Subscribers

People subscribed via source and target branches

to all changes: