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_bubble_gtk.h" | 5 #include "chrome/browser/gtk/bookmark_bubble_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "app/gfx/gtk_util.h" | 9 #include "app/gfx/gtk_util.h" |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 remove_bookmark_(false) { | 157 remove_bookmark_(false) { |
158 GtkWidget* label = gtk_label_new(l10n_util::GetStringUTF8( | 158 GtkWidget* label = gtk_label_new(l10n_util::GetStringUTF8( |
159 newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED : | 159 newly_bookmarked_ ? IDS_BOOMARK_BUBBLE_PAGE_BOOKMARKED : |
160 IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK).c_str()); | 160 IDS_BOOMARK_BUBBLE_PAGE_BOOKMARK).c_str()); |
161 labels_.push_back(label); | 161 labels_.push_back(label); |
162 remove_button_ = gtk_chrome_link_button_new( | 162 remove_button_ = gtk_chrome_link_button_new( |
163 l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_REMOVE_BOOKMARK).c_str()); | 163 l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_REMOVE_BOOKMARK).c_str()); |
164 GtkWidget* edit_button = gtk_button_new_with_label( | 164 GtkWidget* edit_button = gtk_button_new_with_label( |
165 l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_OPTIONS).c_str()); | 165 l10n_util::GetStringUTF8(IDS_BOOMARK_BUBBLE_OPTIONS).c_str()); |
166 GtkWidget* close_button = gtk_button_new_with_label( | 166 GtkWidget* close_button = gtk_button_new_with_label( |
167 l10n_util::GetStringUTF8(IDS_CLOSE).c_str()); | 167 l10n_util::GetStringUTF8(IDS_DONE).c_str()); |
168 | 168 |
169 // Our content is arranged in 3 rows. |top| contains a left justified | 169 // Our content is arranged in 3 rows. |top| contains a left justified |
170 // message, and a right justified remove link button. |table| is the middle | 170 // message, and a right justified remove link button. |table| is the middle |
171 // portion with the name entry and the folder combo. |bottom| is the final | 171 // portion with the name entry and the folder combo. |bottom| is the final |
172 // row with a spacer, and the edit... and close buttons on the right. | 172 // row with a spacer, and the edit... and close buttons on the right. |
173 GtkWidget* content = gtk_vbox_new(FALSE, 5); | 173 GtkWidget* content = gtk_vbox_new(FALSE, 5); |
174 GtkWidget* top = gtk_hbox_new(FALSE, 0); | 174 GtkWidget* top = gtk_hbox_new(FALSE, 0); |
175 | 175 |
176 gtk_misc_set_alignment(GTK_MISC(label), 0, 1); | 176 gtk_misc_set_alignment(GTK_MISC(label), 0, 1); |
177 gtk_box_pack_start(GTK_BOX(top), label, | 177 gtk_box_pack_start(GTK_BOX(top), label, |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 376 |
377 // Close the bubble, deleting the C++ objects, etc. | 377 // Close the bubble, deleting the C++ objects, etc. |
378 bubble_->Close(); | 378 bubble_->Close(); |
379 | 379 |
380 if (node) { | 380 if (node) { |
381 BookmarkEditor::Show(toplevel, profile, NULL, | 381 BookmarkEditor::Show(toplevel, profile, NULL, |
382 BookmarkEditor::EditDetails(node), | 382 BookmarkEditor::EditDetails(node), |
383 BookmarkEditor::SHOW_TREE, NULL); | 383 BookmarkEditor::SHOW_TREE, NULL); |
384 } | 384 } |
385 } | 385 } |
OLD | NEW |