diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 16:57:08 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-04 16:57:08 +0000 |
commit | e648ffc9153bb422ebf8f6dede41b18380a62352 (patch) | |
tree | ab1e313581b6847f035205771aebc69b04b847ba /chrome | |
parent | 8c89e8ffea727bfa78c39894c95a7e0aba3e35cc (diff) | |
download | chromium_src-e648ffc9153bb422ebf8f6dede41b18380a62352.zip chromium_src-e648ffc9153bb422ebf8f6dede41b18380a62352.tar.gz chromium_src-e648ffc9153bb422ebf8f6dede41b18380a62352.tar.bz2 |
gtk: Make use of gtk signal macro in StatusIconGtk.
BUG=37375
TEST=out/Debug/chrome --long-lived-extensions, everything should works as before.
Patch from Thiago Farina <thiago.farina@gmail.com>
Review URL: http://codereview.chromium.org/1839001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46357 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/gtk/status_icons/status_icon_gtk.cc | 6 | ||||
-rw-r--r-- | chrome/browser/gtk/status_icons/status_icon_gtk.h | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/gtk/status_icons/status_icon_gtk.cc b/chrome/browser/gtk/status_icons/status_icon_gtk.cc index 27159d8..3dacfbc 100644 --- a/chrome/browser/gtk/status_icons/status_icon_gtk.cc +++ b/chrome/browser/gtk/status_icons/status_icon_gtk.cc @@ -15,7 +15,7 @@ StatusIconGtk::StatusIconGtk() { gtk_status_icon_set_visible(icon_, TRUE); g_signal_connect(icon_, "activate", - G_CALLBACK(OnClick), this); + G_CALLBACK(OnClickThunk), this); } StatusIconGtk::~StatusIconGtk() { @@ -40,6 +40,6 @@ void StatusIconGtk::SetToolTip(const string16& tool_tip) { gtk_status_icon_set_tooltip(icon_, UTF16ToUTF8(tool_tip).c_str()); } -void StatusIconGtk::OnClick(GtkWidget* widget, StatusIconGtk* status_icon) { - status_icon->DispatchClickEvent(); +void StatusIconGtk::OnClick(GtkWidget* widget) { + DispatchClickEvent(); } diff --git a/chrome/browser/gtk/status_icons/status_icon_gtk.h b/chrome/browser/gtk/status_icons/status_icon_gtk.h index 7ce1df2..65a07ab 100644 --- a/chrome/browser/gtk/status_icons/status_icon_gtk.h +++ b/chrome/browser/gtk/status_icons/status_icon_gtk.h @@ -7,6 +7,7 @@ #include <gtk/gtk.h> +#include "app/gtk_signal.h" #include "chrome/browser/status_icons/status_icon.h" class SkBitmap; @@ -22,7 +23,7 @@ class StatusIconGtk : public StatusIcon { virtual void SetToolTip(const string16& tool_tip); // Exposed for testing. - static void OnClick(GtkWidget* widget, StatusIconGtk* status_icon); + CHROMEGTK_CALLBACK_0(StatusIconGtk, void, OnClick); private: // The currently-displayed icon for the window. |