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

Side by Side Diff: chrome/browser/gtk/bookmark_manager_gtk.h

Issue 165220: Add ctrl+w accelerator to close bookmark manager for linux (Closed)
Patch Set: fix ident Created 11 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_manager_gtk.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.TIT 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.TIT
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ 5 #ifndef CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_
6 #define CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ 6 #define CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_
7 7
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 private: 72 private:
73 explicit BookmarkManagerGtk(Profile* profile); 73 explicit BookmarkManagerGtk(Profile* profile);
74 74
75 void InitWidgets(); 75 void InitWidgets();
76 GtkWidget* MakeLeftPane(); 76 GtkWidget* MakeLeftPane();
77 GtkWidget* MakeRightPane(); 77 GtkWidget* MakeRightPane();
78 78
79 // Set |window_|'s initial size, using its previous size if that was saved. 79 // Set |window_|'s initial size, using its previous size if that was saved.
80 void SetInitialWindowSize(); 80 void SetInitialWindowSize();
81 81
82 // Connects the ctrl-w accelerator to the window.
83 void ConnectAccelerators();
84
82 // If |left|, then make the organize menu refer to that which is selected in 85 // If |left|, then make the organize menu refer to that which is selected in
83 // the left pane, otherwise use the right pane selection. 86 // the left pane, otherwise use the right pane selection.
84 void ResetOrganizeMenu(bool left); 87 void ResetOrganizeMenu(bool left);
85 88
86 // Pack the data from the bookmark model into the stores. This does not 89 // Pack the data from the bookmark model into the stores. This does not
87 // create the stores, which is done in Make{Left,Right}Pane(). 90 // create the stores, which is done in Make{Left,Right}Pane().
88 // This one should only be called once (when the bookmark model is loaded). 91 // This one should only be called once (when the bookmark model is loaded).
89 void BuildLeftStore(); 92 void BuildLeftStore();
90 // This one clears the old right pane and refills it with the contents of 93 // This one clears the old right pane and refills it with the contents of
91 // whatever folder is selected on the left. It can be called multiple times. 94 // whatever folder is selected on the left. It can be called multiple times.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 gboolean OnWindowStateChanged(GtkWidget* window, GdkEventWindowState* event); 271 gboolean OnWindowStateChanged(GtkWidget* window, GdkEventWindowState* event);
269 272
270 static gboolean OnWindowConfiguredThunk(GtkWidget* window, 273 static gboolean OnWindowConfiguredThunk(GtkWidget* window,
271 GdkEventConfigure* event, 274 GdkEventConfigure* event,
272 gpointer self) { 275 gpointer self) {
273 return reinterpret_cast<BookmarkManagerGtk*>(self)-> 276 return reinterpret_cast<BookmarkManagerGtk*>(self)->
274 OnWindowConfigured(window, event); 277 OnWindowConfigured(window, event);
275 } 278 }
276 gboolean OnWindowConfigured(GtkWidget* window, GdkEventConfigure* event); 279 gboolean OnWindowConfigured(GtkWidget* window, GdkEventConfigure* event);
277 280
281 // Handles an accelerator being pressed.
282 static gboolean OnGtkAccelerator(GtkAccelGroup* accel_group,
283 GObject* acceleratable,
284 guint keyval,
285 GdkModifierType modifier,
286 BookmarkManagerGtk* bookmark_manager);
287
278 GtkWidget* window_; 288 GtkWidget* window_;
279 GtkWidget* search_entry_; 289 GtkWidget* search_entry_;
280 Profile* profile_; 290 Profile* profile_;
281 BookmarkModel* model_; 291 BookmarkModel* model_;
282 GtkWidget* paned_; 292 GtkWidget* paned_;
283 GtkWidget* left_tree_view_; 293 GtkWidget* left_tree_view_;
284 GtkWidget* right_tree_view_; 294 GtkWidget* right_tree_view_;
285 295
286 enum { 296 enum {
287 RIGHT_PANE_PIXBUF, 297 RIGHT_PANE_PIXBUF,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // This is true while we are propagating a delayed mousedown. It is used to 333 // This is true while we are propagating a delayed mousedown. It is used to
324 // tell the button press handler to ignore the event. 334 // tell the button press handler to ignore the event.
325 bool sending_delayed_mousedown_; 335 bool sending_delayed_mousedown_;
326 336
327 // This is used to avoid recursively calling our right click handler. It is 337 // This is used to avoid recursively calling our right click handler. It is
328 // only true when a right click is already being handled. 338 // only true when a right click is already being handled.
329 bool ignore_rightclicks_; 339 bool ignore_rightclicks_;
330 }; 340 };
331 341
332 #endif // CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_ 342 #endif // CHROME_BROWSER_GTK_BOOKMARK_MANAGER_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gtk/bookmark_manager_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698