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

Unified Diff: chrome/browser/ui/gtk/find_bar_gtk.cc

Issue 8607003: gtk: Convert OnFocusIn and OnFocusOut to CHROMEGTK macro in FindBarGtk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/find_bar_gtk.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/find_bar_gtk.cc
diff --git a/chrome/browser/ui/gtk/find_bar_gtk.cc b/chrome/browser/ui/gtk/find_bar_gtk.cc
index 2a4337b78403d16c37fbea47147c98cf3c54b864..28fa758726c84a3f00da1b4f64ea83119720ad0f 100644
--- a/chrome/browser/ui/gtk/find_bar_gtk.cc
+++ b/chrome/browser/ui/gtk/find_bar_gtk.cc
@@ -206,9 +206,9 @@ FindBarGtk::FindBarGtk(BrowserWindowGtk* window)
g_signal_connect(text_entry_, "direction-changed",
G_CALLBACK(OnWidgetDirectionChanged), this);
g_signal_connect(text_entry_, "focus-in-event",
- G_CALLBACK(OnFocusIn), this);
+ G_CALLBACK(OnFocusInThunk), this);
g_signal_connect(text_entry_, "focus-out-event",
- G_CALLBACK(OnFocusOut), this);
+ G_CALLBACK(OnFocusOutThunk), this);
g_signal_connect(container_, "expose-event",
G_CALLBACK(OnExpose), this);
}
@@ -732,10 +732,9 @@ void FindBarGtk::OnParentSet(GtkWidget* widget, GtkObject* old_parent,
}
// static
-void FindBarGtk::OnSetFloatingPosition(
- GtkFloatingContainer* floating_container,
- GtkAllocation* allocation,
- FindBarGtk* find_bar) {
+void FindBarGtk::OnSetFloatingPosition(GtkFloatingContainer* floating_container,
+ GtkAllocation* allocation,
+ FindBarGtk* find_bar) {
GtkWidget* findbar = find_bar->widget();
int xposition = find_bar->GetDialogPosition(find_bar->selection_rect_).x();
@@ -963,25 +962,20 @@ void FindBarGtk::OnActivate(GtkWidget* entry) {
FindEntryTextInContents(true);
}
-// static
-gboolean FindBarGtk::OnFocusIn(GtkWidget* entry, GdkEventFocus* event,
- FindBarGtk* find_bar) {
- g_signal_connect(
- gdk_keymap_get_for_display(gtk_widget_get_display(entry)),
- "direction-changed",
- G_CALLBACK(&OnKeymapDirectionChanged), find_bar);
+gboolean FindBarGtk::OnFocusIn(GtkWidget* entry, GdkEventFocus* event) {
+ g_signal_connect(gdk_keymap_get_for_display(gtk_widget_get_display(entry)),
+ "direction-changed",
+ G_CALLBACK(&OnKeymapDirectionChanged), this);
- find_bar->AdjustTextAlignment();
+ AdjustTextAlignment();
return FALSE; // Continue propagation.
}
-// static
-gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event,
- FindBarGtk* find_bar) {
+gboolean FindBarGtk::OnFocusOut(GtkWidget* entry, GdkEventFocus* event) {
g_signal_handlers_disconnect_by_func(
gdk_keymap_get_for_display(gtk_widget_get_display(entry)),
- reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), find_bar);
+ reinterpret_cast<gpointer>(&OnKeymapDirectionChanged), this);
return FALSE; // Continue propagation.
}
« no previous file with comments | « chrome/browser/ui/gtk/find_bar_gtk.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698