| Index: chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc
|
| diff --git a/chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc b/chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc
|
| index bc33058e558d0a8d180bc6e2342f2802fdb9417d..07ffb5a24f62b072b0951d845e6a3bc80b5afbdf 100644
|
| --- a/chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc
|
| +++ b/chrome/browser/ui/gtk/infobars/translate_infobar_base_gtk.cc
|
| @@ -63,7 +63,8 @@ void TranslateInfoBarBase::Init() {
|
|
|
| // The options button sits outside the translate_box so that it can be end
|
| // packed in hbox_.
|
| - GtkWidget* options_menu_button = BuildOptionsMenuButton();
|
| + GtkWidget* options_menu_button = CreateMenuButton(
|
| + l10n_util::GetStringUTF8(IDS_TRANSLATE_INFOBAR_OPTIONS));
|
| Signals()->Connect(options_menu_button, "clicked",
|
| G_CALLBACK(&OnOptionsClickedThunk), this);
|
| gtk_widget_show_all(options_menu_button);
|
| @@ -188,27 +189,6 @@ TranslateInfoBarDelegate* TranslateInfoBarBase::GetDelegate() {
|
| return static_cast<TranslateInfoBarDelegate*>(delegate());
|
| }
|
|
|
| -// static
|
| -GtkWidget* TranslateInfoBarBase::BuildOptionsMenuButton() {
|
| - GtkWidget* button = gtk_button_new();
|
| - GtkWidget* former_child = gtk_bin_get_child(GTK_BIN(button));
|
| - if (former_child)
|
| - gtk_container_remove(GTK_CONTAINER(button), former_child);
|
| -
|
| - GtkWidget* hbox = gtk_hbox_new(FALSE, 0);
|
| -
|
| - GtkWidget* label = gtk_label_new(
|
| - l10n_util::GetStringUTF8(IDS_TRANSLATE_INFOBAR_OPTIONS).c_str());
|
| - gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
|
| -
|
| - GtkWidget* arrow = gtk_arrow_new(GTK_ARROW_DOWN, GTK_SHADOW_NONE);
|
| - gtk_box_pack_start(GTK_BOX(hbox), arrow, FALSE, FALSE, 0);
|
| -
|
| - gtk_container_add(GTK_CONTAINER(button), hbox);
|
| -
|
| - return button;
|
| -}
|
| -
|
| void TranslateInfoBarBase::OnOptionsClicked(GtkWidget* sender) {
|
| ShowMenuWithModel(sender, NULL, new OptionsMenuModel(GetDelegate()));
|
| }
|
|
|