Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Side by Side Diff: chrome/browser/gtk/find_bar_gtk.cc

Issue 115935: Put findbar close button back where it belongs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/find_bar_gtk.h" 5 #include "chrome/browser/gtk/find_bar_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/gfx/gtk_util.h" 10 #include "base/gfx/gtk_util.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 fixed_.Own(gtk_fixed_new()); 123 fixed_.Own(gtk_fixed_new());
124 border_ = gtk_event_box_new(); 124 border_ = gtk_event_box_new();
125 gtk_widget_set_size_request(border_, 1, 1); 125 gtk_widget_set_size_request(border_, 1, 1);
126 gtk_widget_modify_bg(border_, GTK_STATE_NORMAL, &kFrameBorderColor); 126 gtk_widget_modify_bg(border_, GTK_STATE_NORMAL, &kFrameBorderColor);
127 127
128 gtk_fixed_put(GTK_FIXED(widget()), border_, 0, 0); 128 gtk_fixed_put(GTK_FIXED(widget()), border_, 0, 0);
129 gtk_fixed_put(GTK_FIXED(widget()), slide_widget(), 0, 0); 129 gtk_fixed_put(GTK_FIXED(widget()), slide_widget(), 0, 0);
130 gtk_widget_set_size_request(widget(), -1, 0); 130 gtk_widget_set_size_request(widget(), -1, 0);
131 131
132 close_button_.reset(CustomDrawButton::CloseButton()); 132 close_button_.reset(CustomDrawButton::CloseButton());
133 gtk_util::CenterWidgetInHBox(hbox, close_button_->widget(), false, 133 gtk_util::CenterWidgetInHBox(hbox, close_button_->widget(), true,
134 kCloseButtonPaddingLeft); 134 kCloseButtonPaddingLeft);
135 g_signal_connect(G_OBJECT(close_button_->widget()), "clicked", 135 g_signal_connect(G_OBJECT(close_button_->widget()), "clicked",
136 G_CALLBACK(OnClicked), this); 136 G_CALLBACK(OnClicked), this);
137 gtk_widget_set_tooltip_text(close_button_->widget(), 137 gtk_widget_set_tooltip_text(close_button_->widget(),
138 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP).c_str()); 138 l10n_util::GetStringUTF8(IDS_FIND_IN_PAGE_CLOSE_TOOLTIP).c_str());
139 139
140 find_next_button_.reset(new CustomDrawButton(IDR_FINDINPAGE_NEXT, 140 find_next_button_.reset(new CustomDrawButton(IDR_FINDINPAGE_NEXT,
141 IDR_FINDINPAGE_NEXT_H, IDR_FINDINPAGE_NEXT_H, IDR_FINDINPAGE_NEXT_P)); 141 IDR_FINDINPAGE_NEXT_H, IDR_FINDINPAGE_NEXT_H, IDR_FINDINPAGE_NEXT_P));
142 g_signal_connect(G_OBJECT(find_next_button_->widget()), "clicked", 142 g_signal_connect(G_OBJECT(find_next_button_->widget()), "clicked",
143 G_CALLBACK(OnClicked), this); 143 G_CALLBACK(OnClicked), this);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 } 415 }
416 416
417 // static 417 // static
418 gboolean FindBarGtk::OnButtonPress(GtkWidget* text_entry, GdkEventButton* e, 418 gboolean FindBarGtk::OnButtonPress(GtkWidget* text_entry, GdkEventButton* e,
419 FindBarGtk* find_bar) { 419 FindBarGtk* find_bar) {
420 find_bar->StoreOutsideFocus(); 420 find_bar->StoreOutsideFocus();
421 421
422 // Continue propagating the event. 422 // Continue propagating the event.
423 return FALSE; 423 return FALSE;
424 } 424 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698