OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_UTILS_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_UTILS_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_UTILS_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_UTILS_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 30 matching lines...) Expand all Loading... |
41 GtkThemeService* provider); | 41 GtkThemeService* provider); |
42 | 42 |
43 // Helper function that sets visual properties of GtkButton |button| to the | 43 // Helper function that sets visual properties of GtkButton |button| to the |
44 // contents of |node|. | 44 // contents of |node|. |
45 void ConfigureButtonForNode(const BookmarkNode* node, BookmarkModel* model, | 45 void ConfigureButtonForNode(const BookmarkNode* node, BookmarkModel* model, |
46 GtkWidget* button, GtkThemeService* provider); | 46 GtkWidget* button, GtkThemeService* provider); |
47 | 47 |
48 // Returns the tooltip. | 48 // Returns the tooltip. |
49 std::string BuildTooltipFor(const BookmarkNode* node); | 49 std::string BuildTooltipFor(const BookmarkNode* node); |
50 | 50 |
| 51 // Returns the label that should be in pull down menus. |
| 52 std::string BuildMenuLabelFor(const BookmarkNode* node); |
| 53 |
51 // Returns the "bookmark-node" property of |widget| casted to the correct type. | 54 // Returns the "bookmark-node" property of |widget| casted to the correct type. |
52 const BookmarkNode* BookmarkNodeForWidget(GtkWidget* widget); | 55 const BookmarkNode* BookmarkNodeForWidget(GtkWidget* widget); |
53 | 56 |
54 // Set the colors on |label| as per the theme. | 57 // Set the colors on |label| as per the theme. |
55 void SetButtonTextColors(GtkWidget* label, GtkThemeService* provider); | 58 void SetButtonTextColors(GtkWidget* label, GtkThemeService* provider); |
56 | 59 |
57 // Drag and drop. -------------------------------------------------------------- | 60 // Drag and drop. -------------------------------------------------------------- |
58 | 61 |
59 // Get the DnD target mask for a bookmark drag. This will vary based on whether | 62 // Get the DnD target mask for a bookmark drag. This will vary based on whether |
60 // the node in question is a folder. | 63 // the node in question is a folder. |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 // Add the "url\ntitle" combination into the model at the given position. | 104 // Add the "url\ntitle" combination into the model at the given position. |
102 bool CreateNewBookmarkFromNetscapeURL( | 105 bool CreateNewBookmarkFromNetscapeURL( |
103 GtkSelectionData* selection_data, | 106 GtkSelectionData* selection_data, |
104 BookmarkModel* model, | 107 BookmarkModel* model, |
105 const BookmarkNode* parent, | 108 const BookmarkNode* parent, |
106 int idx); | 109 int idx); |
107 | 110 |
108 } // namespace bookmark_utils | 111 } // namespace bookmark_utils |
109 | 112 |
110 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_UTILS_GTK_H_ | 113 #endif // CHROME_BROWSER_UI_GTK_BOOKMARKS_BOOKMARK_UTILS_GTK_H_ |
OLD | NEW |