summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorsatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-14 21:48:22 +0000
committersatish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-14 21:48:22 +0000
commitf6d8a64e873c9eeba50ca9418ead99700fd6a002 (patch)
tree03bf1c9f9d62ad923e4df0073923ae91f6a721a4 /chrome/browser/gtk
parent81d0e12189c2a6b7d27d85b1e33a14eb5b3afe19 (diff)
downloadchromium_src-f6d8a64e873c9eeba50ca9418ead99700fd6a002.zip
chromium_src-f6d8a64e873c9eeba50ca9418ead99700fd6a002.tar.gz
chromium_src-f6d8a64e873c9eeba50ca9418ead99700fd6a002.tar.bz2
Extend speech input bubble in GTK to display error messages with try-again and cancel buttons.
The SpeechInputBubbleGtk object now lives longer than the actual info bubble window, and allows the caller to create a bubble on screen or update with an error message when needed. When recording speech, the layout of controls are (vertical): - Label ('Speak now') - Icon (Mic or wait) - Button Bar (Horizontal, 1 button, 'Cancel') When showing a message, the layout of controls are (vertical): - Label (message text) - Button Bar (Horizontal, 2 buttons, 'Try Again' and 'Cancel') While implementing this I noticed that the info bubble in GTK did not redraw itself properly if the content increased in width or height after creation, which seemed to be because the new mask region was 'combined' with the previous region. So I've added a line to clear the previous mask region before setting a new one. BUG=53598 TEST=manual, unplug mic and start recognition to check error message, and similarly give no speech to check. Review URL: http://codereview.chromium.org/3307025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59433 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/info_bubble_gtk.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/gtk/info_bubble_gtk.cc b/chrome/browser/gtk/info_bubble_gtk.cc
index 37be670..87c2164 100644
--- a/chrome/browser/gtk/info_bubble_gtk.cc
+++ b/chrome/browser/gtk/info_bubble_gtk.cc
@@ -291,6 +291,7 @@ void InfoBubbleGtk::UpdateWindowShape() {
mask_region_ = gdk_region_polygon(&points[0],
points.size(),
GDK_EVEN_ODD_RULE);
+ gdk_window_shape_combine_region(window_->window, NULL, 0, 0);
gdk_window_shape_combine_region(window_->window, mask_region_, 0, 0);
}