diff options
author | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 15:30:19 +0000 |
---|---|---|
committer | deanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 15:30:19 +0000 |
commit | 3027d415c39af2bff7b003262f8141bfaae963a7 (patch) | |
tree | e9d4e04d92bce9b817be0060119f948d1b42da06 /chrome/browser/autocomplete | |
parent | 7351ada6d9543544b0bbed579c9eabd98d6e98ec (diff) | |
download | chromium_src-3027d415c39af2bff7b003262f8141bfaae963a7.zip chromium_src-3027d415c39af2bff7b003262f8141bfaae963a7.tar.gz chromium_src-3027d415c39af2bff7b003262f8141bfaae963a7.tar.bz2 |
The "size-request" event is run-first, clean up the Omnibox handler.
This wasn't actually a bug in that everything worked fine. It just meant we
were calling the default handler twice, and returning from what should have
been a void function.
Review URL: http://codereview.chromium.org/99218
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc | 7 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.h | 10 |
2 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc index 20609db..566c8d2 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc @@ -458,11 +458,10 @@ void AutocompleteEditViewGtk::HandleViewMoveCursor( g_signal_stop_emission_by_name(text_view_, "move-cursor"); } -gboolean AutocompleteEditViewGtk::HandleViewSizeRequest(GtkRequisition* req) { - // Don't force a minimum width, but use the font-relative height. - GTK_WIDGET_GET_CLASS(text_view_)->size_request(text_view_, req); +void AutocompleteEditViewGtk::HandleViewSizeRequest(GtkRequisition* req) { + // Don't force a minimum width, but use the font-relative height. This is a + // run-first handler, so the default handler was already called. req->width = 1; - return TRUE; // We already called the default handler. } AutocompleteEditViewGtk::CharRange AutocompleteEditViewGtk::GetSelection() { diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h index 33af52d..637cd87 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.h @@ -160,13 +160,13 @@ class AutocompleteEditViewGtk : public AutocompleteEditView { gint count, gboolean extendion_selection); - static gboolean HandleViewSizeRequestThunk(GtkWidget* view, - GtkRequisition* req, - gpointer self) { - return reinterpret_cast<AutocompleteEditViewGtk*>(self)-> + static void HandleViewSizeRequestThunk(GtkWidget* view, + GtkRequisition* req, + gpointer self) { + reinterpret_cast<AutocompleteEditViewGtk*>(self)-> HandleViewSizeRequest(req); } - gboolean HandleViewSizeRequest(GtkRequisition* req); + void HandleViewSizeRequest(GtkRequisition* req); // Get the character indices of the current selection. This honors // direction, cp_max is the insertion point, and cp_min is the bound. |