OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 #endif | 73 #endif |
74 | 74 |
75 // Create a two column layout. | 75 // Create a two column layout. |
76 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); | 76 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog_)); |
77 gtk_box_set_spacing(GTK_BOX(content_area), ui::kContentAreaSpacing); | 77 gtk_box_set_spacing(GTK_BOX(content_area), ui::kContentAreaSpacing); |
78 | 78 |
79 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, ui::kContentAreaSpacing); | 79 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, ui::kContentAreaSpacing); |
80 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); |
81 | 81 |
82 // Put Icon in the left column. | 82 // Put Icon in the left column. |
83 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(&icon_); | 83 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(icon_); |
84 GtkWidget* icon = gtk_image_new_from_pixbuf(pixbuf); | 84 GtkWidget* icon = gtk_image_new_from_pixbuf(pixbuf); |
85 g_object_unref(pixbuf); | 85 g_object_unref(pixbuf); |
86 gtk_box_pack_start(GTK_BOX(icon_hbox), icon, TRUE, TRUE, 0); | 86 gtk_box_pack_start(GTK_BOX(icon_hbox), icon, TRUE, TRUE, 0); |
87 | 87 |
88 // Create a new vbox for the right column. | 88 // Create a new vbox for the right column. |
89 GtkWidget* right_column_area = gtk_vbox_new(FALSE, 0); | 89 GtkWidget* right_column_area = gtk_vbox_new(FALSE, 0); |
90 gtk_box_pack_start(GTK_BOX(icon_hbox), right_column_area, TRUE, TRUE, 0); | 90 gtk_box_pack_start(GTK_BOX(icon_hbox), right_column_area, TRUE, TRUE, 0); |
91 | 91 |
92 std::string heading_text = l10n_util::GetStringFUTF8( | 92 std::string heading_text = l10n_util::GetStringFUTF8( |
93 IDS_EXTENSION_UNINSTALL_PROMPT_HEADING, UTF8ToUTF16(extension_->name())); | 93 IDS_EXTENSION_UNINSTALL_PROMPT_HEADING, UTF8ToUTF16(extension_->name())); |
(...skipping 30 matching lines...) Expand all Loading... |
124 } | 124 } |
125 | 125 |
126 } // namespace | 126 } // namespace |
127 | 127 |
128 // static | 128 // static |
129 // Platform specific implementation of the uninstall dialog show method. | 129 // Platform specific implementation of the uninstall dialog show method. |
130 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( | 130 ExtensionUninstallDialog* ExtensionUninstallDialog::Create( |
131 Profile* profile, Delegate* delegate) { | 131 Profile* profile, Delegate* delegate) { |
132 return new ExtensionUninstallDialogGtk(profile, delegate); | 132 return new ExtensionUninstallDialogGtk(profile, delegate); |
133 } | 133 } |
OLD | NEW |