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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 FALSE, FALSE, 4); | 206 FALSE, FALSE, 4); |
207 gtk_box_pack_start(GTK_BOX(bottom), close_button, | 207 gtk_box_pack_start(GTK_BOX(bottom), close_button, |
208 FALSE, FALSE, 0); | 208 FALSE, FALSE, 0); |
209 | 209 |
210 gtk_box_pack_start(GTK_BOX(content), top, TRUE, TRUE, 0); | 210 gtk_box_pack_start(GTK_BOX(content), top, TRUE, TRUE, 0); |
211 gtk_box_pack_start(GTK_BOX(content), table, TRUE, TRUE, 0); | 211 gtk_box_pack_start(GTK_BOX(content), table, TRUE, TRUE, 0); |
212 gtk_box_pack_start(GTK_BOX(content), bottom, TRUE, TRUE, 0); | 212 gtk_box_pack_start(GTK_BOX(content), bottom, TRUE, TRUE, 0); |
213 // We want the focus to start on the entry, not on the remove button. | 213 // We want the focus to start on the entry, not on the remove button. |
214 gtk_container_set_focus_child(GTK_CONTAINER(content), table); | 214 gtk_container_set_focus_child(GTK_CONTAINER(content), table); |
215 | 215 |
| 216 InfoBubbleGtk::ArrowLocationGtk arrow_location = |
| 217 (l10n_util::GetTextDirection() == l10n_util::LEFT_TO_RIGHT) ? |
| 218 InfoBubbleGtk::ARROW_LOCATION_TOP_LEFT : |
| 219 InfoBubbleGtk::ARROW_LOCATION_TOP_RIGHT; |
216 bubble_ = InfoBubbleGtk::Show(toplevel_window_, | 220 bubble_ = InfoBubbleGtk::Show(toplevel_window_, |
217 rect, | 221 rect, |
218 content, | 222 content, |
| 223 arrow_location, |
219 theme_provider_, | 224 theme_provider_, |
220 this); // delegate | 225 this); // delegate |
221 if (!bubble_) { | 226 if (!bubble_) { |
222 NOTREACHED(); | 227 NOTREACHED(); |
223 return; | 228 return; |
224 } | 229 } |
225 | 230 |
226 g_signal_connect(content, "destroy", | 231 g_signal_connect(content, "destroy", |
227 G_CALLBACK(&HandleDestroyThunk), this); | 232 G_CALLBACK(&HandleDestroyThunk), this); |
228 g_signal_connect(name_entry_, "activate", | 233 g_signal_connect(name_entry_, "activate", |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 372 |
368 // Close the bubble, deleting the C++ objects, etc. | 373 // Close the bubble, deleting the C++ objects, etc. |
369 bubble_->Close(); | 374 bubble_->Close(); |
370 | 375 |
371 if (node) { | 376 if (node) { |
372 BookmarkEditor::Show(toplevel, profile, NULL, | 377 BookmarkEditor::Show(toplevel, profile, NULL, |
373 BookmarkEditor::EditDetails(node), | 378 BookmarkEditor::EditDetails(node), |
374 BookmarkEditor::SHOW_TREE, NULL); | 379 BookmarkEditor::SHOW_TREE, NULL); |
375 } | 380 } |
376 } | 381 } |
OLD | NEW |