summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/bookmark_bubble_gtk.cc
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 20:47:40 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-10 20:47:40 +0000
commit107a46c110cb49a04c7e7daa0e04ea9941a71fc8 (patch)
tree08b7144276faf9643b78d2b01f7d42d55210a7f3 /chrome/browser/gtk/bookmark_bubble_gtk.cc
parent5a0b12cd1c5bb121f5f5caa922e0f9a15e488037 (diff)
downloadchromium_src-107a46c110cb49a04c7e7daa0e04ea9941a71fc8.zip
chromium_src-107a46c110cb49a04c7e7daa0e04ea9941a71fc8.tar.gz
chromium_src-107a46c110cb49a04c7e7daa0e04ea9941a71fc8.tar.bz2
GTK: Use new macros to hide thunk declaration and cleanup callback declaration.
We have two conventions for declaring GTK+ callbacks in our code: We either declare a bunch of static thunks in the header that redirect to the correct object (and bloat up the header) OR we declare the callback methods static and pass the object as the final parameter (and litter the implementation with "context->"). The two styles are now about half/half...including mixing these two styles in the same files. This madness must end! BUG=none TEST=none Review URL: http://codereview.chromium.org/661010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/bookmark_bubble_gtk.cc')
-rw-r--r--chrome/browser/gtk/bookmark_bubble_gtk.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/chrome/browser/gtk/bookmark_bubble_gtk.cc b/chrome/browser/gtk/bookmark_bubble_gtk.cc
index 355d314..7b16fb8 100644
--- a/chrome/browser/gtk/bookmark_bubble_gtk.cc
+++ b/chrome/browser/gtk/bookmark_bubble_gtk.cc
@@ -237,19 +237,19 @@ BookmarkBubbleGtk::BookmarkBubbleGtk(GtkWindow* toplevel_window,
}
g_signal_connect(content, "destroy",
- G_CALLBACK(&HandleDestroyThunk), this);
+ G_CALLBACK(&OnDestroyThunk), this);
g_signal_connect(name_entry_, "activate",
- G_CALLBACK(&HandleNameActivateThunk), this);
+ G_CALLBACK(&OnNameActivateThunk), this);
g_signal_connect(folder_combo_, "changed",
- G_CALLBACK(&HandleFolderChangedThunk), this);
+ G_CALLBACK(&OnFolderChangedThunk), this);
g_signal_connect(folder_combo_, "notify::popup-shown",
- G_CALLBACK(&HandleFolderPopupShownThunk), this);
+ G_CALLBACK(&OnFolderPopupShownThunk), this);
g_signal_connect(edit_button, "clicked",
- G_CALLBACK(&HandleEditButtonThunk), this);
+ G_CALLBACK(&OnEditClickedThunk), this);
g_signal_connect(close_button, "clicked",
- G_CALLBACK(&HandleCloseButtonThunk), this);
+ G_CALLBACK(&OnCloseClickedThunk), this);
g_signal_connect(remove_button_, "clicked",
- G_CALLBACK(&HandleRemoveButtonThunk), this);
+ G_CALLBACK(&OnRemoveClickedThunk), this);
registrar_.Add(this, NotificationType::BROWSER_THEME_CHANGED,
NotificationService::AllSources());
@@ -272,18 +272,18 @@ BookmarkBubbleGtk::~BookmarkBubbleGtk() {
}
}
-void BookmarkBubbleGtk::HandleDestroy() {
+void BookmarkBubbleGtk::OnDestroy(GtkWidget* widget) {
// We are self deleting, we have a destroy signal setup to catch when we
// destroyed (via the InfoBubble being destroyed), and delete ourself.
content_ = NULL; // We are being destroyed.
delete this;
}
-void BookmarkBubbleGtk::HandleNameActivate() {
+void BookmarkBubbleGtk::OnNameActivate(GtkWidget* widget) {
bubble_->Close();
}
-void BookmarkBubbleGtk::HandleFolderChanged() {
+void BookmarkBubbleGtk::OnFolderChanged(GtkWidget* widget) {
size_t cur_folder = gtk_combo_box_get_active(GTK_COMBO_BOX(folder_combo_));
if (cur_folder == folder_nodes_.size()) {
UserMetrics::RecordAction("BookmarkBubble_EditFromCombobox", profile_);
@@ -296,7 +296,7 @@ void BookmarkBubbleGtk::HandleFolderChanged() {
}
}
-void BookmarkBubbleGtk::HandleFolderPopupShown() {
+void BookmarkBubbleGtk::OnFolderPopupShown(GtkWidget* widget) {
// GtkComboBox grabs the keyboard and pointer when it displays its popup,
// which steals the grabs that InfoBubbleGtk had installed. When the popup is
// hidden, we notify InfoBubbleGtk so it can try to reacquire the grabs
@@ -307,16 +307,16 @@ void BookmarkBubbleGtk::HandleFolderPopupShown() {
bubble_->HandlePointerAndKeyboardUngrabbedByContent();
}
-void BookmarkBubbleGtk::HandleEditButton() {
+void BookmarkBubbleGtk::OnEditClicked(GtkWidget* widget) {
UserMetrics::RecordAction("BookmarkBubble_Edit", profile_);
ShowEditor();
}
-void BookmarkBubbleGtk::HandleCloseButton() {
+void BookmarkBubbleGtk::OnCloseClicked(GtkWidget* widget) {
bubble_->Close();
}
-void BookmarkBubbleGtk::HandleRemoveButton() {
+void BookmarkBubbleGtk::OnRemoveClicked(GtkWidget* widget) {
UserMetrics::RecordAction("BookmarkBubble_Unstar", profile_);
apply_edits_ = false;