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

Side by Side Diff: chrome/browser/ui/gtk/crypto_module_password_dialog.cc

Issue 7227027: GTK: More 2.18 goodness. Move from macros to real accessor functions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove views/ Created 9 years, 5 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
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/custom_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/crypto_module_password_dialog.h" 5 #include "chrome/browser/ui/crypto_module_password_dialog.h"
6 6
7 #include <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 GTK_DIALOG_NO_SEPARATOR, 115 GTK_DIALOG_NO_SEPARATOR,
116 NULL); // Populate the buttons later, for control over the OK button. 116 NULL); // Populate the buttons later, for control over the OK button.
117 gtk_dialog_add_button(GTK_DIALOG(dialog_), 117 gtk_dialog_add_button(GTK_DIALOG(dialog_),
118 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT); 118 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT);
119 GtkWidget* ok_button = gtk_util::AddButtonToDialog( 119 GtkWidget* ok_button = gtk_util::AddButtonToDialog(
120 dialog_, 120 dialog_,
121 l10n_util::GetStringUTF8( 121 l10n_util::GetStringUTF8(
122 IDS_CRYPTO_MODULE_AUTH_DIALOG_OK_BUTTON_LABEL).c_str(), 122 IDS_CRYPTO_MODULE_AUTH_DIALOG_OK_BUTTON_LABEL).c_str(),
123 GTK_STOCK_OK, 123 GTK_STOCK_OK,
124 GTK_RESPONSE_ACCEPT); 124 GTK_RESPONSE_ACCEPT);
125 GTK_WIDGET_SET_FLAGS(ok_button, GTK_CAN_DEFAULT); 125 gtk_widget_set_can_default(ok_button, TRUE);
126 gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_ACCEPT); 126 gtk_dialog_set_default_response(GTK_DIALOG(dialog_), GTK_RESPONSE_ACCEPT);
127 127
128 // Select an appropriate text for the reason. 128 // Select an appropriate text for the reason.
129 std::string text; 129 std::string text;
130 const string16& server16 = UTF8ToUTF16(server); 130 const string16& server16 = UTF8ToUTF16(server);
131 const string16& slot16 = UTF8ToUTF16(slot_name); 131 const string16& slot16 = UTF8ToUTF16(slot_name);
132 switch (reason) { 132 switch (reason) {
133 case browser::kCryptoModulePasswordKeygen: 133 case browser::kCryptoModulePasswordKeygen:
134 text = l10n_util::GetStringFUTF8( 134 text = l10n_util::GetStringFUTF8(
135 IDS_CRYPTO_MODULE_AUTH_DIALOG_TEXT_KEYGEN, slot16, server16); 135 IDS_CRYPTO_MODULE_AUTH_DIALOG_TEXT_KEYGEN, slot16, server16);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 223 }
224 224
225 crypto::CryptoModuleBlockingPasswordDelegate* 225 crypto::CryptoModuleBlockingPasswordDelegate*
226 NewCryptoModuleBlockingDialogDelegate( 226 NewCryptoModuleBlockingDialogDelegate(
227 CryptoModulePasswordReason reason, 227 CryptoModulePasswordReason reason,
228 const std::string& server) { 228 const std::string& server) {
229 return new CryptoModuleBlockingDialogDelegate(reason, server); 229 return new CryptoModuleBlockingDialogDelegate(reason, server);
230 } 230 }
231 231
232 } // namespace browser 232 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698