summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/menu_gtk.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move RTL related functions from app/l10n_util to base/i18n/rtlben@chromium.org2010-03-201-1/+2
| | | | | | | | | | TBR=darin BUG=none TEST=none Review URL: http://codereview.chromium.org/1073005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42182 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix menu display logic for people with top/down xinerama setups, part 2.thestig@chromium.org2010-03-191-11/+27
| | | | | | | | BUG=14184 TEST=see bug Review URL: http://codereview.chromium.org/1105006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42162 0039d316-1c4b-4281-b951-d872f2087c98
* Gtk: fix context menu positioning, take 2.estade@chromium.org2010-03-171-3/+7
| | | | | | | | | Find correct screen (based on current position of mouse pointer) and monitor. BUG=27800 Review URL: http://codereview.chromium.org/399101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41894 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix menu display logic for people with top/down xinerama setups.thestig@chromium.org2010-03-171-7/+9
| | | | | | | | BUG=14184 TEST=see bug Review URL: http://codereview.chromium.org/1026006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41855 0039d316-1c4b-4281-b951-d872f2087c98
* Move some more files to toplevel gfx dir.ben@chromium.org2010-03-171-1/+1
| | | | | | | | | TBR=darin BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41812 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: tweak where widget-anchored menus appear.estade@chromium.org2010-03-091-2/+3
| | | | | | | | | BUG=15443 TEST=see bug. Page/app menus + download item menus + bookmark bar menus should be fixed. Review URL: http://codereview.chromium.org/672024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40978 0039d316-1c4b-4281-b951-d872f2087c98
* chrome 4: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-081-2/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/671019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40960 0039d316-1c4b-4281-b951-d872f2087c98
* Next part of bad dependency removal (chrome/common -> chrome/browser)phajdan.jr@chromium.org2010-03-021-1/+1
| | | | | | | | | | | This change introduces one more dependency on chrome/browser, but it seems simpler to move gtk_util first and then fix it. TEST=none BUG=none Review URL: http://codereview.chromium.org/661271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40369 0039d316-1c4b-4281-b951-d872f2087c98
* Remove redundant casts in g_signal_connect() throughout all gtk code we have.erg@chromium.org2010-02-101-2/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/600033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38629 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: support dynamic labels in GtkMenusestade@chromium.org2010-02-081-6/+29
| | | | | | | | | BUG=32115 TEST=show app menu, then toggle bookmark sync (on->off or off->on), show app menu again and confirm that the sync label has changed Review URL: http://codereview.chromium.org/573037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38380 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: uninstall signal handlers when MenuGtk goes down so that they don't get ↵estade@chromium.org2010-01-281-0/+2
| | | | | | | | | | | called after destruction. BUG=33335 TEST=none Review URL: http://codereview.chromium.org/549185 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37371 0039d316-1c4b-4281-b951-d872f2087c98
* [Linux] Implement input methods context menu.suzhe@chromium.org2010-01-241-24/+41
| | | | | | | | | BUG=31008 TEST=Right click in the content area, there will be an "Input Method" submenu. Review URL: http://codereview.chromium.org/549100 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36977 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: respect menu model's radio button groupings.estade@chromium.org2010-01-201-8/+11
| | | | | | | | | | | (don't just group by proximity) BUG=32222 TEST=see bug Review URL: http://codereview.chromium.org/548074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36579 0039d316-1c4b-4281-b951-d872f2087c98
* Gtk: fix reference counting/destruction of GtkMenu* in MenuGtk. estade@chromium.org2010-01-191-0/+6
| | | | | | | | | | | | | regression caused by r35404 credit to Bryan Yeung for finding the bug BUG=31977, 31765, 32514, 31988 TEST=see bugs Review URL: http://codereview.chromium.org/552044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36559 0039d316-1c4b-4281-b951-d872f2087c98
* Escape the '&' character in the back/forward menu entries.estade@chromium.org2010-01-191-3/+3
| | | | | | | | | | | | BUG=17660 TEST=See 17660 for reproduction steps. patch by Aaron Kemp <kemp [at] chromium> original review: http://codereview.chromium.org/541053/show Review URL: http://codereview.chromium.org/542113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36530 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Use page and app menu models.estade@chromium.org2010-01-071-35/+78
| | | | | | | | | | | | | | | - implement more MenuModel support for MenuGtk - copy some accelerators around TODO: centralize accelerator list (currently they are all listed twice) TODO: get rid of standard_menus.cc (it is still used by the popup favicon menu) BUG=NONE TEST=page and app menus still work, still display accelerators, accelerators still work Review URL: http://codereview.chromium.org/523105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35671 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: make tab context menu use tab_menu_modelestade@chromium.org2010-01-051-15/+45
| | | | | | | | | | | flesh out some more menu model implementation for MenuGtk BUG=28977 TEST=menu still works as before Review URL: http://codereview.chromium.org/523049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35569 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: fix regression where MenuGtk::Delegate GetLabel() method was ↵estade@chromium.org2010-01-051-0/+3
| | | | | | | | | | | | | erroneously removed. got overzealous deleting code in r35389 BUG=31391 TEST=see bug git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35502 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Remove OwnedWidgetGtk wrapper for the GtkMenu* in MenuGtk.estade@chromium.org2009-12-311-21/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "execute the command later" workaround, which was in place to avoid OwnedWidget-DCHECKing when selecting menu items that might cause cascading object-destruction effects, caused problems with the Browser::SetBlockCommandExecution() workaround, the reasoning for which can be found in BrowserWindowGtk and is reproduced here: // This piece of code is based on the fact that calling // gtk_window_activate_key() method against |window_| may only trigger a // browser command execution, by matching either a global accelerator // defined in above |kAcceleratorMap| or the accelerator key of a menu // item defined in chrome/browser/gtk/standard_menus.cc. // // Here we need to retrieve the command id (if any) associated to the // keyboard event. Instead of looking up the command id in above // |kAcceleratorMap| table by ourselves, we block the command execution of // the |browser_| object then send the keyboard event to the |window_| by // calling gtk_window_activate_key() method, as if we are activating an // accelerator key. Then we can retrieve the command id from the // |browser_| object. // // Pros of this approach: // 1. We can handle accelerators defined not only in above // |kAcceleratorMap| table, but also those in standard_menus.cc. // 2. We don't need to care about keyboard layout problem, as // gtk_window_activate_key() method handles it for us. // // Cons: // 1. The logic is a little complicated. // 2. We should be careful not to introduce any accelerators that trigger // customized code instead of browser commands. The easiest and cleanest thing is just to remove the OwnedWidgetGtk. BUG=none TEST=interactive ui tests pass again Review URL: http://codereview.chromium.org/522028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35404 0039d316-1c4b-4281-b951-d872f2087c98
* Implement browser action context menu on linux.estade@chromium.org2009-12-311-6/+24
| | | | | | | | | BUG=30656 TEST=manual (right click on browser actions and test the actions) Review URL: http://codereview.chromium.org/521016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35400 0039d316-1c4b-4281-b951-d872f2087c98
* Make back forward menu model a MenuModel.estade@chromium.org2009-12-301-14/+21
| | | | | | | | | | | On Linux, implement just enough MenuModel support in GtkMenu. On Linux + windows, remove wrapper classes. On Mac, just change a few function calls around. BUG=none TEST=unit test + manually clicking around on it in debug mode Review URL: http://codereview.chromium.org/501168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35389 0039d316-1c4b-4281-b951-d872f2087c98
* Fix radio items in MenuGtk.satorux@chromium.org2009-12-161-0/+7
| | | | | | | | | | | | | | Suppose there are three radio items A, B, C, and A is now being checked. If you click C, commands associated with A and C are both executed. This is because A also receives the "activate" signal, before C receives it. BUG=30450 TEST=try; manually with gdb with the steps described in crbug.com/30450. Review URL: http://codereview.chromium.org/506010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34647 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Fix popup menu positioning.estade@chromium.org2009-11-191-0/+8
| | | | | | | | | | Don't go off end of screen. push_in doesn't actually work as well as one might hope. BUG=27800 Review URL: http://codereview.chromium.org/408017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32449 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Fix context menu positioning.estade@chromium.org2009-11-061-6/+24
| | | | | | | | | | There are still some issues with context menus. The context menu doesn't respect links, for example. That is, if you tab to a link and hit the menu button, it will act as if you right clicked on the upper left pixel of the web page (both in content and position of the menu). This seems to be a webkit bug/missing feature as safari 4 on windows does the same. However, some cases do work as expected, for example if you select text and hit the menu button. Anyway, I'll do the webkit side of this fix as some later patch. BUG=26811 Review URL: http://codereview.chromium.org/371033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31301 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Fix a couple minor popup window icon menu bugs.estade@chromium.org2009-11-041-3/+3
| | | | | | | | BUG=26265,26268 Review URL: http://codereview.chromium.org/360023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31009 0039d316-1c4b-4281-b951-d872f2087c98
* Move classes depending on Skia out of base/gfx and into app/gfx. Renamebrettw@chromium.org2009-10-071-1/+1
| | | | | | | | | | native_theme to native_theme_win since its Windows-specific. BUG=none TEST=none Review URL: http://codereview.chromium.org/259047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28300 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Fix memory leak from r27666.estade@chromium.org2009-09-301-0/+2
| | | | | | | | | | | Make MenuGtk take ownership of submenus. BUG=none TEST=valgrind doesn't complain Review URL: http://codereview.chromium.org/251053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27689 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Set the back/forward and bookmark bar menus to always show their images.estade@chromium.org2009-09-111-0/+2
| | | | | | | | | | This only works for GTK 2.16+. BUG=21495 Review URL: http://codereview.chromium.org/199099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26043 0039d316-1c4b-4281-b951-d872f2087c98
* Ellipsize long entries in bookmark menus and the back/forward menus.estade@chromium.org2009-08-271-1/+5
| | | | | | | | | | | | | | | Also ellipsize long tooltips. Also make the bookmark bar tooltips more like window (Title on one line, then url on the next line). I've made the title bold, although that isn't the case on windows. Menus: Prefer popping downwards rather than upwards when there is more space down than up. BUG=18617 BUG=20120 Review URL: http://codereview.chromium.org/175004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24685 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: implement bookmark manager copy/paste.estade@chromium.org2009-08-041-4/+13
| | | | | | | | | | | | - Refactor bookmark util clipboard code to be cross platform. - Add a CBF_DATA format for writing arbitrary data to the clipboard. - Change MenuGtk so that showing a menu only makes the menu items update asynchronously. This way we can show the menu immediately and we won't get in trouble if the delegate's IsCommandEnabled() runs a nested message loop. I did not do any mac-side implementation of the new clipboard stuff. The implementation should be easy when they get around to writing the bookmark manager. Review URL: http://codereview.chromium.org/159815 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22419 0039d316-1c4b-4281-b951-d872f2087c98
* linux: fix regression where opening the page menu would cause a reloadevan@chromium.org2009-08-031-29/+30
| | | | | | | | | | I tried to be clever before, but I turned out needing brute force. BUG=17647 Review URL: http://codereview.chromium.org/159822 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22336 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Show shortcuts in title bar context menu and tab context menu.estade@chromium.org2009-07-311-2/+2
| | | | | | | | BUG=17936 Review URL: http://codereview.chromium.org/159721 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22169 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: convert classes GtkUtil/GtkTreeUtil back to namespaces ↵mdm@chromium.org2009-07-311-7/+9
| | | | | | | | | | | gtk_util/gtk_tree_util. BUG=none TEST=none Review URL: http://codereview.chromium.org/160417 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22130 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: convert namespace gtk_util to class GtkUtil to meet style guidelines.mdm@chromium.org2009-07-301-9/+7
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/160371 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22036 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: More hotkeys.estade@chromium.org2009-07-281-0/+5
| | | | | | | | | | | | - ctrl+e = ctrl+k - alt + e and alt + f to open the page and wrench menus respectively (emulating menu bar _File and _Edit) BUG=none TEST=use the new hotkeys Review URL: http://codereview.chromium.org/160292 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21905 0039d316-1c4b-4281-b951-d872f2087c98
* Assorted fixes for 64-bit.deanm@chromium.org2009-07-281-4/+4
| | | | | | | Review URL: http://codereview.chromium.org/160288 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21891 0039d316-1c4b-4281-b951-d872f2087c98
* linux: implement encodings menuevan@chromium.org2009-07-211-42/+37
| | | | | | | | BUG=11599 Review URL: http://codereview.chromium.org/155830 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21140 0039d316-1c4b-4281-b951-d872f2087c98
* Work on RTL / BiDi Omnibox.deanm@chromium.org2009-07-161-1/+1
| | | | | | | | | Based on work from Evan Stade. Review URL: http://codereview.chromium.org/155567 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20862 0039d316-1c4b-4281-b951-d872f2087c98
* More BIDI support:estade@chromium.org2009-06-261-4/+6
| | | | | | | | | | | | | - mirror nine boxes - mirror menu positioning - mirror download item show/hide logic http://crbug.com/15406 is relevant, although I'm not sure this 100% fixes it. TEST=use download shelf in Hebrew chrome. Things should be mirrored. Use it in English and nothing should be borked. Review URL: http://codereview.chromium.org/147176 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19333 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in chrome/browser/phajdan.jr@chromium.org2009-06-161-0/+1
| | | | | | | | In my scan of headers I got up to browser/gtk/ Review URL: http://codereview.chromium.org/126131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18500 0039d316-1c4b-4281-b951-d872f2087c98
* GTK bookmark manager: organize menu and aesthetic improvements.estade@chromium.org2009-06-081-4/+7
| | | | | | Review URL: http://codereview.chromium.org/118388 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17868 0039d316-1c4b-4281-b951-d872f2087c98
* Move ConvertAcceleratorsFromWindowsStyle into chrome/common/gtk_util.mattm@chromium.org2009-06-051-21/+3
| | | | | | | | | | Use it on the custom startup url buttons. BUG=11507 Review URL: http://codereview.chromium.org/118327 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17796 0039d316-1c4b-4281-b951-d872f2087c98
* Merge app/gfx/gtk_util into base/gfx/gtk_util.thestig@google.com2009-06-031-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/118174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17535 0039d316-1c4b-4281-b951-d872f2087c98
* Properly display mnemonics in some gtk menus where they were not being ↵estade@chromium.org2009-05-291-3/+9
| | | | | | | | | | | escaped and showed up as &. Get rid of manual escaping in bookmark context menu gtk. BUG=12868 Review URL: http://codereview.chromium.org/118024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17228 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Fix crash when right clicking on a tab in the tabstrip.erg@google.com2009-05-211-1/+6
| | | | | | | | http://crbug.com/12439 Review URL: http://codereview.chromium.org/115661 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16663 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Clean up the bookmark bar context menuerg@google.com2009-05-211-2/+8
| | | | | | | | | - Make items that should be checkboxes into checkboxes - Clean up accelerator spam. Review URL: http://codereview.chromium.org/113721 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16653 0039d316-1c4b-4281-b951-d872f2087c98
* Activate download shelf button while the menu is showing.estade@chromium.org2009-05-211-2/+16
| | | | | | | | TEST=download something. Press the down arrow button on the right of the item. A menu should popup and the button should appear to depress. The button should pop back when you close the menu (either by clicking away from it or by choosing an item in it). Review URL: http://codereview.chromium.org/113684 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16623 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent setting the checkbox value in menus from activating the menu item.erg@google.com2009-05-201-0/+21
| | | | | | | | http://crbug.com/11942 Review URL: http://codereview.chromium.org/115589 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16539 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 16124.beng@google.com2009-05-141-1/+1
| | | | | | Review URL: http://codereview.chromium.org/115387 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16125 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 16122.beng@google.com2009-05-141-1/+1
| | | | | | Review URL: http://codereview.chromium.org/113427 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16124 0039d316-1c4b-4281-b951-d872f2087c98