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

Unified Diff: chrome/browser/gtk/hover_controller_gtk.cc

Issue 1708013: GTK: make more use of gtk_signal convenience macros/signal registrar. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/gtk/hover_controller_gtk.h ('k') | chrome/browser/gtk/tab_contents_drag_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/gtk/hover_controller_gtk.cc
diff --git a/chrome/browser/gtk/hover_controller_gtk.cc b/chrome/browser/gtk/hover_controller_gtk.cc
index 50a8f1ae1fb65befd441b89069b1e2ff4606d8c7..0737a97bb9c0b442522ef8f8d1a3b5b51b971b4e 100644
--- a/chrome/browser/gtk/hover_controller_gtk.cc
+++ b/chrome/browser/gtk/hover_controller_gtk.cc
@@ -16,12 +16,12 @@ HoverControllerGtk::HoverControllerGtk(GtkWidget* button)
g_object_ref(button_);
gtk_chrome_button_set_hover_state(GTK_CHROME_BUTTON(button_), 0);
- g_signal_connect(button_, "enter-notify-event",
+ signals_.Connect(button_, "enter-notify-event",
G_CALLBACK(OnEnterThunk), this);
- g_signal_connect(button_, "leave-notify-event",
+ signals_.Connect(button_, "leave-notify-event",
G_CALLBACK(OnLeaveThunk), this);
- g_signal_connect(button_, "destroy",
- G_CALLBACK(OnButtonDestroyThunk), this);
+ signals_.Connect(button_, "destroy",
+ G_CALLBACK(OnDestroyThunk), this);
#ifndef NDEBUG
if (g_object_get_data(G_OBJECT(button_), kHoverControllerGtkKey))
@@ -54,10 +54,7 @@ HoverControllerGtk* HoverControllerGtk::GetHoverControllerGtk(
void HoverControllerGtk::Destroy() {
gtk_chrome_button_set_hover_state(GTK_CHROME_BUTTON(button_), -1.0);
- g_signal_handlers_disconnect_by_func(
- button_,
- reinterpret_cast<gpointer>(OnButtonDestroyThunk),
- this);
Elliot Glaysher 2010/04/28 16:39:13 I'm not so sure that these are equivalent. Previou
Evan Stade 2010/04/28 19:00:51 it's not equivalent, but I believe the new code to
+
g_object_set_data(G_OBJECT(button_), kHoverControllerGtkKey, NULL);
g_object_unref(button_);
button_ = NULL;
@@ -111,6 +108,6 @@ gboolean HoverControllerGtk::OnLeave(GtkWidget* widget,
return FALSE;
}
-void HoverControllerGtk::OnButtonDestroy(GtkWidget* widget) {
+void HoverControllerGtk::OnDestroy(GtkWidget* widget) {
Destroy();
}
« no previous file with comments | « chrome/browser/gtk/hover_controller_gtk.h ('k') | chrome/browser/gtk/tab_contents_drag_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698