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

Side by Side Diff: chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc

Issue 551034: Simplify the gtk AutoFill dialog and bring it more in line with the mocks.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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) 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/create_application_shortcuts_dialog_gtk.h" 5 #include "chrome/browser/gtk/create_application_shortcuts_dialog_gtk.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/shell_integration.h" 8 #include "chrome/browser/shell_integration.h"
9 #include "chrome/common/gtk_util.h" 9 #include "chrome/common/gtk_util.h"
10 #include "grit/generated_resources.h" 10 #include "grit/generated_resources.h"
(...skipping 17 matching lines...) Expand all
28 favicon_(favicon) { 28 favicon_(favicon) {
29 // Build the dialog. 29 // Build the dialog.
30 GtkWidget* dialog = gtk_dialog_new_with_buttons( 30 GtkWidget* dialog = gtk_dialog_new_with_buttons(
31 l10n_util::GetStringUTF8(IDS_CREATE_SHORTCUTS_TITLE).c_str(), 31 l10n_util::GetStringUTF8(IDS_CREATE_SHORTCUTS_TITLE).c_str(),
32 parent, 32 parent,
33 (GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), 33 (GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
34 GTK_STOCK_CANCEL, 34 GTK_STOCK_CANCEL,
35 GTK_RESPONSE_REJECT, 35 GTK_RESPONSE_REJECT,
36 NULL); 36 NULL);
37 gtk_widget_realize(dialog); 37 gtk_widget_realize(dialog);
38 gtk_util::SetWindowWidthFromResources(GTK_WINDOW(dialog), 38 gtk_util::SetWindowSizeFromResources(GTK_WINDOW(dialog),
39 IDS_CREATE_SHORTCUTS_DIALOG_WIDTH_CHARS, 39 IDS_CREATE_SHORTCUTS_DIALOG_WIDTH_CHARS,
40 /* resizable */ false); 40 -1, // height
41 false); // resizable
41 gtk_util::AddButtonToDialog(dialog, 42 gtk_util::AddButtonToDialog(dialog,
42 l10n_util::GetStringUTF8(IDS_CREATE_SHORTCUTS_COMMIT).c_str(), 43 l10n_util::GetStringUTF8(IDS_CREATE_SHORTCUTS_COMMIT).c_str(),
43 GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT); 44 GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT);
44 45
45 GtkWidget* content_area = GTK_DIALOG(dialog)->vbox; 46 GtkWidget* content_area = GTK_DIALOG(dialog)->vbox;
46 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing); 47 gtk_box_set_spacing(GTK_BOX(content_area), gtk_util::kContentAreaSpacing);
47 48
48 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); 49 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
49 gtk_container_add(GTK_CONTAINER(content_area), vbox); 50 gtk_container_add(GTK_CONTAINER(content_area), vbox);
50 51
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(desktop_checkbox_)); 83 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(desktop_checkbox_));
83 shortcut_info.create_in_applications_menu = 84 shortcut_info.create_in_applications_menu =
84 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(menu_checkbox_)); 85 gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(menu_checkbox_));
85 ShellIntegration::CreateDesktopShortcut(shortcut_info); 86 ShellIntegration::CreateDesktopShortcut(shortcut_info);
86 } 87 }
87 88
88 delete this; 89 delete this;
89 gtk_widget_destroy(GTK_WIDGET(widget)); 90 gtk_widget_destroy(GTK_WIDGET(widget));
90 } 91 }
91 92
OLDNEW
« no previous file with comments | « chrome/browser/gtk/clear_browsing_data_dialog_gtk.cc ('k') | chrome/browser/gtk/first_run_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698