OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |