Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: chrome/browser/ui/gtk/extensions/extension_uninstall_dialog_gtk.cc

Issue 7569012: gtk: Use gtk_dialog_get_content_area() throughout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 parent, 46 parent,
47 GTK_DIALOG_MODAL, 47 GTK_DIALOG_MODAL,
48 GTK_STOCK_CANCEL, 48 GTK_STOCK_CANCEL,
49 GTK_RESPONSE_CLOSE, 49 GTK_RESPONSE_CLOSE,
50 l10n_util::GetStringUTF8(IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON).c_str(), 50 l10n_util::GetStringUTF8(IDS_EXTENSION_PROMPT_UNINSTALL_BUTTON).c_str(),
51 GTK_RESPONSE_ACCEPT, 51 GTK_RESPONSE_ACCEPT,
52 NULL); 52 NULL);
53 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); 53 gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE);
54 54
55 // Create a two column layout. 55 // Create a two column layout.
56 GtkWidget* content_area = GTK_DIALOG(dialog)->vbox; 56 GtkWidget* content_area = gtk_dialog_get_content_area(GTK_DIALOG(dialog));
57 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); 57 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
58 58
59 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, gtk_util::kContentAreaSpacing); 59 GtkWidget* icon_hbox = gtk_hbox_new(FALSE, gtk_util::kContentAreaSpacing);
60 gtk_box_pack_start(GTK_BOX(content_area), icon_hbox, TRUE, TRUE, 0); 60 gtk_box_pack_start(GTK_BOX(content_area), icon_hbox, TRUE, TRUE, 0);
61 61
62 // Put Icon in the left column. 62 // Put Icon in the left column.
63 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(skia_icon); 63 GdkPixbuf* pixbuf = gfx::GdkPixbufFromSkBitmap(skia_icon);
64 GtkWidget* icon = gtk_image_new_from_pixbuf(pixbuf); 64 GtkWidget* icon = gtk_image_new_from_pixbuf(pixbuf);
65 g_object_unref(pixbuf); 65 g_object_unref(pixbuf);
66 gtk_box_pack_start(GTK_BOX(icon_hbox), icon, TRUE, TRUE, 0); 66 gtk_box_pack_start(GTK_BOX(icon_hbox), icon, TRUE, TRUE, 0);
(...skipping 29 matching lines...) Expand all
96 96
97 BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>( 97 BrowserWindowGtk* browser_window = static_cast<BrowserWindowGtk*>(
98 browser->window()); 98 browser->window());
99 if (!browser_window) { 99 if (!browser_window) {
100 delegate->ExtensionDialogCanceled(); 100 delegate->ExtensionDialogCanceled();
101 return; 101 return;
102 } 102 }
103 103
104 ShowUninstallDialogGtk(browser_window->window(), icon, extension, delegate); 104 ShowUninstallDialogGtk(browser_window->window(), icon, extension, delegate);
105 } 105 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc ('k') | chrome/browser/ui/gtk/first_run_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698