| 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 // Currently this file is only used for the uninstall prompt. The install prompt | 5 // Currently this file is only used for the uninstall prompt. The install prompt |
| 6 // code is in extension_install_prompt2_gtk.cc. | 6 // code is in extension_install_prompt2_gtk.cc. |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // Build the dialog. | 61 // Build the dialog. |
| 62 dialog_ = gtk_dialog_new_with_buttons( | 62 dialog_ = gtk_dialog_new_with_buttons( |
| 63 l10n_util::GetStringUTF8(IDS_EXTENSION_UNINSTALL_PROMPT_TITLE).c_str(), | 63 l10n_util::GetStringUTF8(IDS_EXTENSION_UNINSTALL_PROMPT_TITLE).c_str(), |
| 64 browser_window->GetNativeHandle(), | 64 browser_window->GetNativeHandle(), |
| 65 GTK_DIALOG_MODAL, | 65 GTK_DIALOG_MODAL, |
| 66 GTK_STOCK_CANCEL, | 66 GTK_STOCK_CANCEL, |
| 67 GTK_RESPONSE_CLOSE, | 67 GTK_RESPONSE_CLOSE, |
| 68 l10n_util::GetStringUTF8(IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON).c_str(), | 68 l10n_util::GetStringUTF8(IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON).c_str(), |
| 69 GTK_RESPONSE_ACCEPT, | 69 GTK_RESPONSE_ACCEPT, |
| 70 NULL); | 70 NULL); |
| 71 #if !GTK_CHECK_VERSION(2, 22, 0) |
| 71 gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE); | 72 gtk_dialog_set_has_separator(GTK_DIALOG(dialog_), FALSE); |
| 73 #endif |
| 72 | 74 |
| 73 // Create a two column layout. | 75 // Create a two column layout. |
| 74 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); | 76 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); |
| 75 gtk_box_set_spacing(GTK_BOX(content_area), ui::kContentAreaSpacing); | 77 gtk_box_set_spacing(GTK_BOX(content_area), ui::kContentAreaSpacing); |
| 76 | 78 |
| 77 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, ui::kContentAreaSpacing); | 79 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, ui::kContentAreaSpacing); |
| 78 gtk_box_pack_start(GTK_BOX(content_area), icon_hbox, TRUE, TRUE, 0); | 80 gtk_box_pack_start(GTK_BOX(content_area), icon_hbox, TRUE, TRUE, 0); |
| 79 | 81 |
| 80 // Put Icon in the left column. | 82 // Put Icon in the left column. |
| 81 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon_); | 83 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon_); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 } | 124 } |
| 123 | 125 |
| 124 } // namespace | 126 } // namespace |
| 125 | 127 |
| 126 // static | 128 // static |
| 127 // Platform specific implementation of the uninstall dialog show method. | 129 // Platform specific implementation of the uninstall dialog show method. |
| 128 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( | 130 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( |
| 129 Profile* profile, Delegate* delegate) { | 131 Profile* profile, Delegate* delegate) { |
| 130 return new ExtensionUninstallDialogGtk(profile, delegate); | 132 return new ExtensionUninstallDialogGtk(profile, delegate); |
| 131 } | 133 } |
| OLD | NEW |