summaryrefslogtreecommitdiffstats
path: root/chrome/common/gtk_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Escape ampersands in web view text selection for right click context menu so ↵estade@chromium.org2009-09-161-2/+5
| | | | | | | | | | | | that they don't show up as mnemonics. Also escape underscores in gtk menus so they don't show up as mnemonics (we use ampersands to match windows). BUG=14587 Review URL: http://codereview.chromium.org/203078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26401 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Cache our GdkCursor objects, since building them hits the disk.erg@google.com2009-09-121-0/+40
| | | | | | | | | TEST=strace chrome. Moving the mouse over the webpage shouldn't spew open() calls. BUG=21623 Review URL: http://codereview.chromium.org/195071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26061 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/+21
| | | | | | | | | | 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
* Undo change that crept into my last cl.estade@chromium.org2009-09-111-15/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26017 0039d316-1c4b-4281-b951-d872f2087c98
* Linux focus ring color: Go through WebKit::WebColor api rather than through ↵estade@chromium.org2009-09-111-3/+18
| | | | | | | | | | | | the webview. Also use SkColor isntead of a triplet of colors in RenderPreferences. BUG=21521 Review URL: http://codereview.chromium.org/195059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26013 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Use gtk-cursor-blink from GtkSettings"evan@chromium.org2009-09-091-17/+0
| | | | | | This reverts commit r25797 due to Valgrind errors. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25812 0039d316-1c4b-4281-b951-d872f2087c98
* Use gtk-cursor-blink from GtkSettings to set theevan@chromium.org2009-09-091-0/+17
| | | | | | | | | | | | | | | | caret blink interval on Linux This can be set with the "Cursor Blinking" slider and checkbox in gnome-keyboard-properties. The changed setting will appear in a new renderer, so opening a new tab will see the change. WebKit side is at https://bugs.webkit.org/show_bug.cgi?id=28931 Patch by Joel Stanley <joel@jms.id.au> BUG=20772 Review URL: http://codereview.chromium.org/186009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25797 0039d316-1c4b-4281-b951-d872f2087c98
* Set the focus ring color to match the Gtk theme focus color.estade@chromium.org2009-09-031-0/+9
| | | | | | | | BUG=8540 Review URL: http://codereview.chromium.org/173642 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25278 0039d316-1c4b-4281-b951-d872f2087c98
* Set the initial sizes of several dialogs based on font information.mdm@chromium.org2009-09-021-13/+16
| | | | | | | | | BUG=19622 TEST=none Review URL: http://codereview.chromium.org/180031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25214 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Implement and use x11_util::GetXWindowStack, which is a less flaky and ↵jhawkins@chromium.org2009-09-011-14/+6
| | | | | | | | | | faster version of gdk_screen_get_window_stack. The latter was not consistently returning our browser windows in the window stack. BUG=none TEST=Extensive tab dragging. Review URL: http://codereview.chromium.org/179056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25112 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Set the default icon list so we don't have to set it on every window ↵estade@chromium.org2009-08-271-4/+16
| | | | | | | | all the time. Review URL: http://codereview.chromium.org/174586 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24576 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Fix the find bar so the match count is inside the entry.erg@google.com2009-08-261-0/+41
| | | | | | | | | | In addition, only draw the dirty rectangle area when manually drawing a gtk entry. http://crbug.com/17962 Review URL: http://codereview.chromium.org/174577 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24558 0039d316-1c4b-4281-b951-d872f2087c98
* More interactive test porting for Linux.estade@chromium.org2009-08-211-24/+8
| | | | | | | | | | | Also fix a bug in the Windows implementation of SendMouseMoveNotifyWhenDone where the task would never be run if the cursor was already in the destination position before the call. BUG=19076 BUG=19881 Review URL: http://codereview.chromium.org/174201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24027 0039d316-1c4b-4281-b951-d872f2087c98
* So it turns out that gdk already has a function that does exactly what we want.estade@chromium.org2009-08-121-73/+0
| | | | | | | | http://www.google.com/codesearch/p?hl=en&sa=N&cd=2&ct=rc#eSCqYNcHl48/gtk%2B-2.4.10/gdk/gdkevents.c&q=gdk_event_get_time Review URL: http://codereview.chromium.org/164429 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23234 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Popup notification should have transparent rounded corners.erg@google.com2009-08-121-0/+5
| | | | | | | | Also uses the new consistent border color in GTK theme mode. Review URL: http://codereview.chromium.org/165356 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23189 0039d316-1c4b-4281-b951-d872f2087c98
* Refactors drag support from TabContentsViewGtk intosky@chromium.org2009-08-121-0/+13
| | | | | | | | | | | TabContentsDragHandler so that it can be used by both Gtk and Views. BUG=none TEST=none Review URL: http://codereview.chromium.org/165302 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23168 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Pass font settings through to interstitial renderers.derat@chromium.org2009-08-061-0/+56
| | | | | | | | | BUG=18483 TESTED=restarted and visited a page with a broken SSL cert a few times while changing font settings via gnome-appearance-properties Review URL: http://codereview.chromium.org/164094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22679 0039d316-1c4b-4281-b951-d872f2087c98
* linux: rearrange widget layout in importer dialogevan@chromium.org2009-08-051-0/+8
| | | | | | | | | I'm not especially happy with how it looks now, though I think it's better than before. Review URL: http://codereview.chromium.org/160661 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22512 0039d316-1c4b-4281-b951-d872f2087c98
* GTK Themes: Theme labels in LocationBarViewGtk.erg@google.com2009-08-031-0/+7
| | | | | | | | | | | Labels in LocationBarViewGtk should be black even when a dark GTK theme is used when we're not in GTK theme mode. Likewise, when we're using a GTK theme, we should have the background and border color of the "Search X for:" box use colors from the theme instead of having hard coded ones. Review URL: http://codereview.chromium.org/159798 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22293 0039d316-1c4b-4281-b951-d872f2087c98
* GTK: Add stock icons to some dialog buttons.estade@chromium.org2009-08-031-0/+11
| | | | | | | | | | | | | | | | | To be clear, this only adds button images from stock images, and doesn't change the text of the buttons. I chose APPLY for dialogs that involve checkboxes. I chose OK for dialogs without checkboxes. also - switched the position of the OK/Cancel buttons on the import lock dialog. - changed the first run dialog CANCEL button to QUIT, because CANCEL is really confusing in that situation (this is a problem on windows as well). I couldn't find any other dialogs that are missing button images, but if you see some call em out. BUG=none TEST=look at all the pretty images. Review URL: http://codereview.chromium.org/160493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22288 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: convert classes GtkUtil/GtkTreeUtil back to namespaces ↵mdm@chromium.org2009-07-311-27/+26
| | | | | | | | | | | 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-26/+27
| | | | | | | | | 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 Themes: Theme the bookmark bubble. (And first run bubble).erg@google.com2009-07-241-4/+4
| | | | | | | | http://crbug.com/16783 Review URL: http://codereview.chromium.org/160025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21535 0039d316-1c4b-4281-b951-d872f2087c98
* Set window icon on options dialog, bookmark manager.estade@chromium.org2009-07-171-0/+11
| | | | | | | | | BUG=16951 TEST=launch bookmark manager on gnome/metacity, observe that window has icon Review URL: http://codereview.chromium.org/155672 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20928 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Fix a typo introduced in r20778. The logic condition is reversed.jhawkins@chromium.org2009-07-151-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/149704 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20792 0039d316-1c4b-4281-b951-d872f2087c98
* gtk: Handle RTL layout when positioning the tab strip drop arrow.jhawkins@chromium.org2009-07-151-0/+7
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/149695 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20778 0039d316-1c4b-4281-b951-d872f2087c98
* First run bubble polish:estade@chromium.org2009-07-151-1/+5
| | | | | | | | | | | | | | | - improve spacing and and sizing, both internally and externally (using windows as the guide) - make legible for dark themes - make show delay longer because it was too short on my machine (at least when using a Debug build). Also explicitly set bookmark bubble labels black. BUG=16782 TEST=none Review URL: http://codereview.chromium.org/149664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20762 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Add first run search bubble.kuchhal@chromium.org2009-07-141-0/+21
| | | | | | Review URL: http://codereview.chromium.org/149501 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20625 0039d316-1c4b-4281-b951-d872f2087c98
* linux: port Jankometerevan@chromium.org2009-07-081-0/+73
| | | | | | | | | | | | | Originally I had split it into multiple files, but I think it's cleaner to just use one. (I want to use this for measuring plugin jank.) BUG=8077 Review URL: http://codereview.chromium.org/155194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20130 0039d316-1c4b-4281-b951-d872f2087c98
* Two tab dragging fixes for various window managers:jhawkins@chromium.org2009-06-251-3/+7
| | | | | | | | | | | * Reverse the order of enumeration when enumerating all top-level windows. XQueryTree returns the list of windows in bottom-to-top order, while DockInfo expects the windows in top-to-bottom order (ratpoison WM, Awesome WM). * Extend the enumeration one level deeper for window managers that parent top-level windows into an unnamed real top-level window (ion WM). BUG=14004 TEST=Extensive tab dragging in the following WMs: Metacity, Compiz, kwm, ion3, xmonad, ratpoison, awesome. Review URL: http://codereview.chromium.org/149028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19303 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r19162,19179 as they caused the toolbar and bookmark bar to regress ↵estade@chromium.org2009-06-251-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | and display LTR for RTL locales. r19162 | jhawkins@chromium.org | 2009-06-24 13:15:04 -0700 (Wed, 24 Jun 2009) | 5 lines Add support for RTL languages in the gtk toolbar layout. BUG=none TEST=Open a browser window in a RTL language (--lang=he). The toolbar layout should correctly be in RTL layout. Review URL: http://codereview.chromium.org/147102 r19179 | jhawkins@chromium.org | 2009-06-24 14:38:25 -0700 (Wed, 24 Jun 2009) | 5 lines Add support for RTL languages in the gtk bookmark bar. BUG=none TEST=Open a browser window in a RTL language (--lang=he). The bookmark bar layout should correctly be in RTL layout. Review URL: http://codereview.chromium.org/146105 See http://i139.photobucket.com/albums/q315/failfast/revertrtl.png Review URL: http://codereview.chromium.org/147130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19221 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for RTL languages in the gtk bookmark bar.jhawkins@chromium.org2009-06-241-0/+9
| | | | | | | | BUG=none TEST=Open a browser window in a RTL language (--lang=he). The bookmark bar layout should correctly be in RTL layout. Review URL: http://codereview.chromium.org/146105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19179 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the screen bounds calculation of windowless widgets. Only windowed ↵jhawkins@chromium.org2009-06-241-3/+14
| | | | | | | | | | parent widgets' allocation should be taken into account when calculating the widget screen bounds. BUG=none TEST=Open a browser and set the frame to custom. Drag tabs around. They should not be offset vertically. Review URL: http://codereview.chromium.org/147065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19139 0039d316-1c4b-4281-b951-d872f2087c98
* show back/forward menu on right clickestade@chromium.org2009-06-241-0/+18
| | | | | | | | | http://crbug.com/15100 TEST=do it Review URL: http://codereview.chromium.org/146062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19101 0039d316-1c4b-4281-b951-d872f2087c98
* Don't enumerate unmapped top-level windows. This occurs most often in the ↵jhawkins@chromium.org2009-06-231-0/+3
| | | | | | | | | | Compiz window manager when the browser window is moved partially off-screen. BUG=15023 TEST=Extensive tab dragging in Compiz window manager, including a browser window that is partially off-screen. Review URL: http://codereview.chromium.org/146059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19083 0039d316-1c4b-4281-b951-d872f2087c98
* Handle RTL layout in the gtk tabstrip.jhawkins@chromium.org2009-06-231-0/+8
| | | | | | | | BUG=none TEST=Open the browser with --lang=he and make sure the tabs are ordered starting from the right. Also, the UI elements in the tabs should be reversed as well. Review URL: http://codereview.chromium.org/147020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19051 0039d316-1c4b-4281-b951-d872f2087c98
* Revert to enumerating all X windows if the Window Manager doesn't support ↵jhawkins@chromium.org2009-06-221-2/+7
| | | | | | | | | | _NET_CLIENT_LIST_STACKING. BUG=14004 TEST=Drag tabs in and out of tabstrip in xmonad window manager. Review URL: http://codereview.chromium.org/141061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18949 0039d316-1c4b-4281-b951-d872f2087c98
* Implement window open disposition for (some) navigation buttons.estade@chromium.org2009-06-191-0/+34
| | | | | | | | | | still need to do similar for link buttons and such. BUG=14518 Review URL: http://codereview.chromium.org/131071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18786 0039d316-1c4b-4281-b951-d872f2087c98
* Add helper for creating table of labeled controls.mattm@chromium.org2009-06-111-0/+26
| | | | | | | | BUG=none Review URL: http://codereview.chromium.org/118489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18120 0039d316-1c4b-4281-b951-d872f2087c98
* Use the convenience function gdk_screen_get_window_stack to enumerate ↵jhawkins@chromium.org2009-06-101-0/+17
| | | | | | | | | | top-level gdk windows instead of querying Xlib directly, which doesn't work across many window managers. BUG=none TEST=Exhaustive tab dragging in multiple window managers (Compiz, Metacity, KWM). Review URL: http://codereview.chromium.org/119345 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18098 0039d316-1c4b-4281-b951-d872f2087c98
* Implement URL Drag & Drop for the linux tabstrip.jhawkins@chromium.org2009-06-091-0/+13
| | | | | | | | BUG=none TEST=Drag a link from Firefox into the Chromium tab strip. A new tab should open either before, after, or in the same tab depending on where the drop occurred. Review URL: http://codereview.chromium.org/118411 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17915 0039d316-1c4b-4281-b951-d872f2087c98
* Move ConvertAcceleratorsFromWindowsStyle into chrome/common/gtk_util.mattm@chromium.org2009-06-051-0/+19
| | | | | | | | | | 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
* Paint a focus indication on LinkButtonGtk buttons.estade@chromium.org2009-05-281-0/+10
| | | | | | | | | | | | | Also, rearrange helper code for centering things in hboxes so they don't expand to take up the full vertical space. Also, don't allow focus on gtk_chrome_button buttons. This is to prevent the "Other bookmarks" button from getting focus (which matches windows) and is in line with disallowing focus on all custom chrome buttons (see CustomDrawButton). BUG=12829 TEST=everything should look the same. Also if you tab to focus on a link button (e.g. download shelf's "show all downloads"), it should have a dotted line around the exterior. Review URL: http://codereview.chromium.org/113970 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17132 0039d316-1c4b-4281-b951-d872f2087c98
* Converts a bunch things from NativeWindow to NativeView to make itsky@chromium.org2009-05-271-9/+0
| | | | | | | | | | | | | | easier for callers. Also gets bookmark menu button to compile. I'm also removing a function I just added to gtk_util as it's not needed. GTK offers gtk_widget_get_toplevel which does what I need. BUG=none TEST=none Review URL: http://codereview.chromium.org/115831 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17029 0039d316-1c4b-4281-b951-d872f2087c98
* Adds gtk_util::ParentWindow to find the parent window of a GtkWidget.sky@chromium.org2009-05-271-0/+9
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/113919 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17019 0039d316-1c4b-4281-b951-d872f2087c98
* Use gdk_window_get_origin to determine the origin of the top-level window. ↵jhawkins@chromium.org2009-05-221-1/+2
| | | | | | | | | | gtk_window_get_position returns different values (includes frame or not) depending on the window manager. BUG=none TEST=Using a non-composited window manager, drag the tab within the tab strip. The tab should be rendered within the bounds of the tabstrip and not in the frame. Review URL: http://codereview.chromium.org/115680 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16706 0039d316-1c4b-4281-b951-d872f2087c98
* linux: more dialog touchups. I had missed one before.evan@chromium.org2009-05-191-4/+5
| | | | | | | | BUG=11017,12056 Review URL: http://codereview.chromium.org/113587 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16394 0039d316-1c4b-4281-b951-d872f2087c98
* Force the font size in the omnibox, tabs, find bar, and download shelftc@google.com2009-05-181-0/+11
| | | | | | | | | | | | | so we don't get layout overflow issues. Ideally, we would have vector graphics for buttons and stuff so this wouldn't be an issue, but for now, this will have to do. BUG=11128 Review URL: http://codereview.chromium.org/113546 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16327 0039d316-1c4b-4281-b951-d872f2087c98
* linux: unify all the dialog layout code for visual consistency.evan@chromium.org2009-05-181-0/+28
| | | | | | | | | | | We follow the GNOME HIG where possible, which mostly means the pixel spacing of the borders and buttons in dialogs. BUG=12056 Review URL: http://codereview.chromium.org/113539 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16320 0039d316-1c4b-4281-b951-d872f2087c98
* Implement DraggedTabGtk, the object that handles rendering either a dragged ↵jhawkins@chromium.org2009-05-181-0/+27
| | | | | | | | tab or tab contents during a tab drag. Review URL: http://codereview.chromium.org/113532 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16310 0039d316-1c4b-4281-b951-d872f2087c98