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

Proposed by William Hua on 2013-02-08
Status: Rejected
Rejected by: Chad Miller on 2013-04-09
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 2013-02-08 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 on 2013-02-08

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

Subscribers

People subscribed via source and target branches

to all changes: