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

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

Issue 211056: GTK: Dismiss the bookmark folder menu(s) when a context menu item is executed... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
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 #include "chrome/browser/gtk/bookmark_manager_gtk.h" 5 #include "chrome/browser/gtk/bookmark_manager_gtk.h"
6 6
7 #include <gdk/gdkkeysyms.h> 7 #include <gdk/gdkkeysyms.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "app/gtk_dnd_util.h" 10 #include "app/gtk_dnd_util.h"
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 else if (parent) 600 else if (parent)
601 nodes.push_back(parent); 601 nodes.push_back(parent);
602 602
603 // We DeleteSoon on the old one to give any reference holders (e.g. 603 // We DeleteSoon on the old one to give any reference holders (e.g.
604 // the event that caused this reset) a chance to release their refs. 604 // the event that caused this reset) a chance to release their refs.
605 BookmarkContextMenu* old_menu = organize_menu_.release(); 605 BookmarkContextMenu* old_menu = organize_menu_.release();
606 if (old_menu) 606 if (old_menu)
607 MessageLoop::current()->DeleteSoon(FROM_HERE, old_menu); 607 MessageLoop::current()->DeleteSoon(FROM_HERE, old_menu);
608 608
609 organize_menu_.reset(new BookmarkContextMenu(window_, profile_, NULL, NULL, 609 organize_menu_.reset(new BookmarkContextMenu(window_, profile_, NULL, NULL,
610 parent, nodes, BookmarkContextMenu::BOOKMARK_MANAGER_ORGANIZE_MENU)); 610 parent, nodes, BookmarkContextMenu::BOOKMARK_MANAGER_ORGANIZE_MENU,
611 NULL));
611 #if defined(TOOLKIT_GTK) 612 #if defined(TOOLKIT_GTK)
612 gtk_menu_item_set_submenu(GTK_MENU_ITEM(organize_), organize_menu_->menu()); 613 gtk_menu_item_set_submenu(GTK_MENU_ITEM(organize_), organize_menu_->menu());
613 #else 614 #else
614 // GTK+Views should implement this somehow. 615 // GTK+Views should implement this somehow.
615 NOTIMPLEMENTED(); 616 NOTIMPLEMENTED();
616 #endif 617 #endif
617 } 618 }
618 619
619 void BookmarkManagerGtk::BuildLeftStore() { 620 void BookmarkManagerGtk::BuildLeftStore() {
620 GtkTreeIter select_iter; 621 GtkTreeIter select_iter;
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 modifier & gtk_accelerator_get_default_mod_mask()); 1440 modifier & gtk_accelerator_get_default_mod_mask());
1440 // The only accelerator we have registered is ctrl+w, so any other value is a 1441 // The only accelerator we have registered is ctrl+w, so any other value is a
1441 // non-fatal error. 1442 // non-fatal error.
1442 DCHECK_EQ(keyval, static_cast<guint>(GDK_w)); 1443 DCHECK_EQ(keyval, static_cast<guint>(GDK_w));
1443 DCHECK_EQ(modifier, GDK_CONTROL_MASK); 1444 DCHECK_EQ(modifier, GDK_CONTROL_MASK);
1444 1445
1445 gtk_widget_destroy(bookmark_manager->window_); 1446 gtk_widget_destroy(bookmark_manager->window_);
1446 1447
1447 return TRUE; 1448 return TRUE;
1448 } 1449 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/bookmark_context_menu.cc ('k') | chrome/browser/gtk/bookmark_menu_controller_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698