| Index: chrome/browser/gtk/browser_toolbar_gtk.cc
|
| ===================================================================
|
| --- chrome/browser/gtk/browser_toolbar_gtk.cc (revision 37936)
|
| +++ chrome/browser/gtk/browser_toolbar_gtk.cc (working copy)
|
| @@ -226,20 +226,6 @@
|
|
|
| gtk_box_pack_start(GTK_BOX(toolbar_), menus_hbox_, FALSE, FALSE, 0);
|
|
|
| - // Page and app menu accelerators.
|
| - GtkAccelGroup* accel_group = gtk_accel_group_new();
|
| - gtk_window_add_accel_group(top_level_window, accel_group);
|
| - // Drop the initial ref on |accel_group| so |window_| will own it.
|
| - g_object_unref(accel_group);
|
| - // I would use "popup-menu" here, but GTK complains. I would use "activate",
|
| - // but the docs say never to connect to that signal.
|
| - gtk_widget_add_accelerator(page_menu, "clicked", accel_group,
|
| - GDK_e, GDK_MOD1_MASK,
|
| - static_cast<GtkAccelFlags>(0));
|
| - gtk_widget_add_accelerator(chrome_menu, "clicked", accel_group,
|
| - GDK_f, GDK_MOD1_MASK,
|
| - static_cast<GtkAccelFlags>(0));
|
| -
|
| if (ShouldOnlyShowLocation()) {
|
| gtk_widget_show(event_box_);
|
| gtk_widget_show(alignment_);
|
| @@ -300,6 +286,14 @@
|
| kLeftRightPadding, kLeftRightPadding);
|
| }
|
|
|
| +void BrowserToolbarGtk::ShowPageMenu() {
|
| + PopupForButton(page_menu_button_.get());
|
| +}
|
| +
|
| +void BrowserToolbarGtk::ShowAppMenu() {
|
| + PopupForButton(app_menu_button_.get());
|
| +}
|
| +
|
| // CommandUpdater::CommandObserver ---------------------------------------------
|
|
|
| void BrowserToolbarGtk::EnabledStateChangedForCommand(int id, bool enabled) {
|
| @@ -512,8 +506,6 @@
|
| gtk_widget_set_tooltip_text(button, localized_tooltip.c_str());
|
| g_signal_connect(button, "button-press-event",
|
| G_CALLBACK(OnMenuButtonPressEvent), this);
|
| - g_signal_connect(button, "clicked",
|
| - G_CALLBACK(OnMenuClicked), this);
|
| GTK_WIDGET_UNSET_FLAGS(button, GTK_CAN_FOCUS);
|
|
|
| return button;
|
| @@ -662,14 +654,6 @@
|
| }
|
|
|
| // static
|
| -gboolean BrowserToolbarGtk::OnMenuClicked(GtkWidget* button,
|
| - BrowserToolbarGtk* toolbar) {
|
| - toolbar->PopupForButton(button);
|
| -
|
| - return TRUE;
|
| -}
|
| -
|
| -// static
|
| void BrowserToolbarGtk::OnDragDataReceived(GtkWidget* widget,
|
| GdkDragContext* drag_context, gint x, gint y,
|
| GtkSelectionData* data, guint info, guint time,
|
|
|