| Index: chrome/browser/gtk/bookmark_manager_gtk.h
|
| diff --git a/chrome/browser/gtk/bookmark_manager_gtk.h b/chrome/browser/gtk/bookmark_manager_gtk.h
|
| index 8ade7f5a05a72665910fec92ce35e281432f2a1c..0349ceb353eae7fc40f4b7b4dec42f9fc71d89b8 100644
|
| --- a/chrome/browser/gtk/bookmark_manager_gtk.h
|
| +++ b/chrome/browser/gtk/bookmark_manager_gtk.h
|
| @@ -8,6 +8,7 @@
|
| #include <gtk/gtk.h>
|
| #include <vector>
|
|
|
| +#include "app/gtk_signal.h"
|
| #include "base/basictypes.h"
|
| #include "base/ref_counted.h"
|
| #include "base/task.h"
|
| @@ -166,12 +167,7 @@ class BookmarkManagerGtk : public BookmarkModelObserver,
|
| // Search helpers.
|
| void PerformSearch();
|
|
|
| - void OnSearchTextChanged();
|
| -
|
| - static void OnSearchTextChangedThunk(GtkWidget* search_entry,
|
| - BookmarkManagerGtk* bookmark_manager) {
|
| - bookmark_manager->OnSearchTextChanged();
|
| - }
|
| + CHROMEGTK_CALLBACK_0(BookmarkManagerGtk, void, OnSearchTextChanged);
|
|
|
| // TreeView signal handlers.
|
| static void OnLeftSelectionChanged(GtkTreeSelection* selection,
|
| @@ -180,86 +176,42 @@ class BookmarkManagerGtk : public BookmarkModelObserver,
|
| static void OnRightSelectionChanged(GtkTreeSelection* selection,
|
| BookmarkManagerGtk* bm);
|
|
|
| - static void OnLeftTreeViewDragReceived(GtkWidget* tree_view,
|
| - GdkDragContext* context,
|
| - gint x,
|
| - gint y,
|
| - GtkSelectionData* selection_data,
|
| - guint target_type,
|
| - guint time,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnLeftTreeViewDragMotion(GtkWidget* tree_view,
|
| - GdkDragContext* context,
|
| - gint x,
|
| - gint y,
|
| - guint time,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnLeftTreeViewRowCollapsed(GtkTreeView* tree_view,
|
| - GtkTreeIter* iter,
|
| - GtkTreePath* path,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnRightTreeViewDragGet(GtkWidget* tree_view,
|
| - GdkDragContext* context,
|
| - GtkSelectionData* selection_data,
|
| - guint target_type,
|
| - guint time,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnRightTreeViewDragReceived(GtkWidget* tree_view,
|
| - GdkDragContext* context,
|
| - gint x,
|
| - gint y,
|
| - GtkSelectionData* selection_data,
|
| - guint target_type,
|
| - guint time,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnRightTreeViewDragBegin(GtkWidget* tree_view,
|
| - GdkDragContext* drag_context,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnRightTreeViewDragMotion(GtkWidget* tree_view,
|
| - GdkDragContext* context,
|
| - gint x,
|
| - gint y,
|
| - guint time,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnRightTreeViewRowActivated(GtkTreeView* tree_view,
|
| - GtkTreePath* path,
|
| - GtkTreeViewColumn* column,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnRightTreeViewFocusIn(GtkTreeView* tree_view,
|
| - GdkEventFocus* event,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static void OnLeftTreeViewFocusIn(GtkTreeView* tree_view,
|
| - GdkEventFocus* event,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnRightTreeViewButtonPress(GtkWidget* tree_view,
|
| - GdkEventButton* event,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnRightTreeViewMotion(GtkWidget* tree_view,
|
| - GdkEventMotion* event,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnTreeViewButtonPress(GtkWidget* tree_view,
|
| - GdkEventButton* button,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnTreeViewButtonRelease(GtkWidget* tree_view,
|
| - GdkEventButton* button,
|
| - BookmarkManagerGtk* bm);
|
| -
|
| - static gboolean OnTreeViewKeyPress(GtkWidget* tree_view,
|
| - GdkEventKey* key,
|
| - BookmarkManagerGtk* bm);
|
| + CHROMEGTK_CALLBACK_6(BookmarkManagerGtk, void, OnLeftTreeViewDragReceived,
|
| + GdkDragContext*, gint, gint, GtkSelectionData*,
|
| + guint, guint);
|
| + CHROMEGTK_CALLBACK_4(BookmarkManagerGtk, gboolean, OnLeftTreeViewDragMotion,
|
| + GdkDragContext*, gint, gint, guint);
|
| +
|
| + CHROMEGTK_CALLBACK_2(BookmarkManagerGtk, void, OnLeftTreeViewRowCollapsed,
|
| + GtkTreeIter*, GtkTreePath*);
|
| + CHROMEGTK_CALLBACK_4(BookmarkManagerGtk, void, OnRightTreeViewDragGet,
|
| + GdkDragContext*, GtkSelectionData*, guint, guint);
|
| +
|
| + CHROMEGTK_CALLBACK_6(BookmarkManagerGtk, void, OnRightTreeViewDragReceived,
|
| + GdkDragContext*, gint, gint, GtkSelectionData*,
|
| + guint, guint);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, void, OnRightTreeViewDragBegin,
|
| + GdkDragContext*);
|
| + CHROMEGTK_CALLBACK_4(BookmarkManagerGtk, gboolean, OnRightTreeViewDragMotion,
|
| + GdkDragContext*, gint, gint, guint);
|
| +
|
| + CHROMEGTK_CALLBACK_2(BookmarkManagerGtk, void, OnRightTreeViewRowActivated,
|
| + GtkTreePath*, GtkTreeViewColumn*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, void, OnRightTreeViewFocusIn,
|
| + GdkEventFocus*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, void, OnLeftTreeViewFocusIn,
|
| + GdkEventFocus*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnRightTreeViewButtonPress,
|
| + GdkEventButton*);
|
| +
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnRightTreeViewMotion,
|
| + GdkEventMotion*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnTreeViewButtonPress,
|
| + GdkEventButton*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnTreeViewButtonRelease,
|
| + GdkEventButton*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnTreeViewKeyPress,
|
| + GdkEventKey*);
|
|
|
| // Callback from inline edits to folder names. This changes the name in the
|
| // model.
|
| @@ -269,37 +221,18 @@ class BookmarkManagerGtk : public BookmarkModelObserver,
|
| BookmarkManagerGtk* bm);
|
|
|
| // Tools menu item callbacks.
|
| - static void OnImportItemActivated(GtkMenuItem* menuitem,
|
| - BookmarkManagerGtk* bm);
|
| - static void OnExportItemActivated(GtkMenuItem* menuitem,
|
| - BookmarkManagerGtk* bm);
|
| + CHROMEGTK_CALLBACK_0(BookmarkManagerGtk, void, OnImportItemActivated);
|
| + CHROMEGTK_CALLBACK_0(BookmarkManagerGtk, void, OnExportItemActivated);
|
|
|
| // Sync status menu item callback.
|
| - static void OnSyncStatusMenuActivated(GtkMenuItem* menu_item,
|
| - BookmarkManagerGtk* bm);
|
| + CHROMEGTK_CALLBACK_0(BookmarkManagerGtk, void, OnSyncStatusMenuActivated);
|
|
|
| // Window callbacks.
|
| - static gboolean OnWindowDestroyedThunk(GtkWidget* window, gpointer self) {
|
| - return reinterpret_cast<BookmarkManagerGtk*>(self)->
|
| - OnWindowDestroyed(window);
|
| - }
|
| - gboolean OnWindowDestroyed(GtkWidget* window);
|
| -
|
| - static gboolean OnWindowStateChangedThunk(GtkWidget* window,
|
| - GdkEventWindowState* event,
|
| - gpointer self) {
|
| - return reinterpret_cast<BookmarkManagerGtk*>(self)->
|
| - OnWindowStateChanged(window, event);
|
| - }
|
| - gboolean OnWindowStateChanged(GtkWidget* window, GdkEventWindowState* event);
|
| -
|
| - static gboolean OnWindowConfiguredThunk(GtkWidget* window,
|
| - GdkEventConfigure* event,
|
| - gpointer self) {
|
| - return reinterpret_cast<BookmarkManagerGtk*>(self)->
|
| - OnWindowConfigured(window, event);
|
| - }
|
| - gboolean OnWindowConfigured(GtkWidget* window, GdkEventConfigure* event);
|
| + CHROMEGTK_CALLBACK_0(BookmarkManagerGtk, gboolean, OnWindowDestroyed);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnWindowStateChanged,
|
| + GdkEventWindowState*);
|
| + CHROMEGTK_CALLBACK_1(BookmarkManagerGtk, gboolean, OnWindowConfigured,
|
| + GdkEventConfigure*);
|
|
|
| // Handles an accelerator being pressed.
|
| static gboolean OnGtkAccelerator(GtkAccelGroup* accel_group,
|
|
|