summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 02:38:08 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-21 02:38:08 +0000
commitbbfd376bef9656e244750fe75ef5a56b089a28aa (patch)
treeaf00d3e7e476dd9f564ddb210825f176dd6e79e8
parent863fdfdbe52f9b6a5f78594cf1e070e982fea642 (diff)
downloadchromium_src-bbfd376bef9656e244750fe75ef5a56b089a28aa.zip
chromium_src-bbfd376bef9656e244750fe75ef5a56b089a28aa.tar.gz
chromium_src-bbfd376bef9656e244750fe75ef5a56b089a28aa.tar.bz2
Add link button for certificate management, linking to wiki page LinuxCertManagement
BUG=11507 Review URL: http://codereview.chromium.org/159115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21152 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/resources/locale_settings.grd5
-rw-r--r--chrome/browser/gtk/options/advanced_contents_gtk.cc34
2 files changed, 38 insertions, 1 deletions
diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd
index 857bfde..e3330a8 100644
--- a/chrome/app/resources/locale_settings.grd
+++ b/chrome/app/resources/locale_settings.grd
@@ -543,6 +543,11 @@
<message name="IDS_CHROMIUM_PROJECT_URL" translateable="false">
http://code.google.com/chromium/?hl=[GRITLANGCODE]
</message>
+
+ <!-- The URL for Linux ssl certificate configuration help. -->
+ <message name="IDS_LINUX_CERTIFICATES_CONFIG_URL" translateable="false">
+ http://code.google.com/p/chromium/wiki/LinuxCertManagement
+ </message>
</messages>
</release>
</grit>
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index 89c4d18..8f7a6d5 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -623,6 +623,10 @@ class SecuritySection : public OptionsPageBase {
}
private:
+ // The callback functions for the options widgets.
+ static void OnManageCertificatesClicked(GtkButton* button,
+ SecuritySection* section);
+
// The widget containing the options for this section.
GtkWidget* page_;
@@ -632,8 +636,36 @@ class SecuritySection : public OptionsPageBase {
SecuritySection::SecuritySection(Profile* profile)
: OptionsPageBase(profile) {
page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
- gtk_box_pack_start(GTK_BOX(page_), gtk_label_new("TODO security options"),
+
+ GtkWidget* manage_certificates_label = CreateWrappedLabel(
+ IDS_OPTIONS_CERTIFICATES_LABEL);
+ gtk_misc_set_alignment(GTK_MISC(manage_certificates_label), 0, 0);
+ gtk_box_pack_start(GTK_BOX(page_), manage_certificates_label,
+ FALSE, FALSE, 0);
+
+ // TODO(mattm): change this to a button to launch the system certificate
+ // manager, when one exists.
+ GtkWidget* manage_certificates_link = gtk_chrome_link_button_new(
+ l10n_util::GetStringUTF8(IDS_OPTIONS_CERTIFICATES_MANAGE_BUTTON).c_str());
+ // Stick it in an hbox so it doesn't expand to the whole width.
+ GtkWidget* manage_certificates_hbox = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(manage_certificates_hbox),
+ manage_certificates_link, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(page_), OptionsLayoutBuilderGtk::IndentWidget(
+ manage_certificates_hbox),
FALSE, FALSE, 0);
+ g_signal_connect(manage_certificates_link, "clicked",
+ G_CALLBACK(OnManageCertificatesClicked), this);
+
+ // TODO(mattm): add SSLConfigService options when that is ported to Linux
+}
+
+// static
+void SecuritySection::OnManageCertificatesClicked(GtkButton* button,
+ SecuritySection* section) {
+ BrowserList::GetLastActive()->
+ OpenURL(GURL(l10n_util::GetStringUTF8(IDS_LINUX_CERTIFICATES_CONFIG_URL)),
+ GURL(), NEW_WINDOW, PageTransition::LINK);
}
///////////////////////////////////////////////////////////////////////////////