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

Side by Side Diff: chrome/browser/gtk/first_run_dialog.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/first_run_dialog.h" 5 #include "chrome/browser/gtk/first_run_dialog.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/gtk/gtk_chrome_link_button.h" 10 #include "chrome/browser/gtk/gtk_chrome_link_button.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 GTK_STOCK_QUIT, 56 GTK_STOCK_QUIT,
57 GTK_RESPONSE_REJECT, 57 GTK_RESPONSE_REJECT,
58 NULL); 58 NULL);
59 gtk_util::AddButtonToDialog(dialog_, 59 gtk_util::AddButtonToDialog(dialog_,
60 l10n_util::GetStringUTF8(IDS_FIRSTRUN_DLG_OK).c_str(), 60 l10n_util::GetStringUTF8(IDS_FIRSTRUN_DLG_OK).c_str(),
61 GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT); 61 GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT);
62 62
63 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); 63 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE);
64 64
65 gtk_widget_realize(dialog_); 65 gtk_widget_realize(dialog_);
66 int width, height; 66 gtk_util::SetWindowSizeFromResources(GTK_WINDOW(dialog_),
67 gtk_util::GetWidgetSizeFromResources(dialog_,
68 IDS_FIRSTRUN_DIALOG_WIDTH_CHARS, 67 IDS_FIRSTRUN_DIALOG_WIDTH_CHARS,
69 IDS_FIRSTRUN_DIALOG_HEIGHT_LINES, 68 IDS_FIRSTRUN_DIALOG_HEIGHT_LINES,
70 &width, &height); 69 true);
71 gtk_window_set_default_size(GTK_WINDOW(dialog_), width, height); 70
72 g_signal_connect(G_OBJECT(dialog_), "delete-event", 71 g_signal_connect(G_OBJECT(dialog_), "delete-event",
73 G_CALLBACK(gtk_widget_hide_on_delete), NULL); 72 G_CALLBACK(gtk_widget_hide_on_delete), NULL);
74 73
75 GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox; 74 GtkWidget* content_area = GTK_DIALOG(dialog_)->vbox;
76 gtk_box_set_spacing(GTK_BOX(content_area), 18); 75 gtk_box_set_spacing(GTK_BOX(content_area), 18);
77 76
78 GtkWidget* vbox = gtk_vbox_new(FALSE, 12); 77 GtkWidget* vbox = gtk_vbox_new(FALSE, 12);
79 78
80 #if defined(GOOGLE_CHROME_BUILD) 79 #if defined(GOOGLE_CHROME_BUILD)
81 GtkWidget* check_label = gtk_label_new( 80 GtkWidget* check_label = gtk_label_new(
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 185
187 void FirstRunDialog::FirstRunDone() { 186 void FirstRunDialog::FirstRunDone() {
188 // Set preference to show first run bubble and welcome page. 187 // Set preference to show first run bubble and welcome page.
189 FirstRun::SetShowFirstRunBubblePref(); 188 FirstRun::SetShowFirstRunBubblePref();
190 FirstRun::SetShowWelcomePagePref(); 189 FirstRun::SetShowWelcomePagePref();
191 190
192 gtk_widget_destroy(dialog_); 191 gtk_widget_destroy(dialog_);
193 MessageLoop::current()->Quit(); 192 MessageLoop::current()->Quit();
194 delete this; 193 delete this;
195 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/create_application_shortcuts_dialog_gtk.cc ('k') | chrome/browser/gtk/import_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698