summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/first_run_dialog.cc
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-02 20:51:45 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-02 20:51:45 +0000
commitd681e6fb8a8167ddb139a07b786169b460db2cc5 (patch)
tree37a03d247f98df206666674162fa6072d526d2a4 /chrome/browser/gtk/first_run_dialog.cc
parentad573f16ef06760e855f3e13ad0902d19449cbd6 (diff)
downloadchromium_src-d681e6fb8a8167ddb139a07b786169b460db2cc5.zip
chromium_src-d681e6fb8a8167ddb139a07b786169b460db2cc5.tar.gz
chromium_src-d681e6fb8a8167ddb139a07b786169b460db2cc5.tar.bz2
Gtk first run: Remove obsolete warning for unimplemented privacy features.
Add learn more link after crash reporting checkbox. BUG=none TEST=build google release build, launch with empty user-data-dir, click learn more link - should open in default browser. Review URL: http://codereview.chromium.org/178025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25237 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/first_run_dialog.cc')
-rw-r--r--chrome/browser/gtk/first_run_dialog.cc45
1 files changed, 26 insertions, 19 deletions
diff --git a/chrome/browser/gtk/first_run_dialog.cc b/chrome/browser/gtk/first_run_dialog.cc
index 9bdc692..bac0ca2 100644
--- a/chrome/browser/gtk/first_run_dialog.cc
+++ b/chrome/browser/gtk/first_run_dialog.cc
@@ -8,8 +8,10 @@
#include "app/resource_bundle.h"
#include "base/message_loop.h"
#include "chrome/app/breakpad_linux.h"
+#include "chrome/browser/gtk/gtk_chrome_link_button.h"
#include "chrome/browser/shell_integration.h"
#include "chrome/common/gtk_util.h"
+#include "chrome/common/platform_util.h"
#include "chrome/installer/util/google_update_settings.h"
#include "grit/generated_resources.h"
#include "grit/google_chrome_strings.h"
@@ -53,29 +55,27 @@ FirstRunDialog::FirstRunDialog(Profile* profile, int& response)
GtkWidget* vbox = gtk_vbox_new(FALSE, 12);
#if defined(GOOGLE_CHROME_BUILD)
- // TODO(port): remove this warning before beta release when we have all the
- // privacy features working.
- GtkWidget* privacy_label = gtk_label_new(
- "This version of Google Chrome for Linux is not appropriate for "
- "general consumer use. Certain privacy features are unavailable "
- "at this time as described in our privacy policy at");
- gtk_misc_set_alignment(GTK_MISC(privacy_label), 0, 0);
- gtk_label_set_line_wrap(GTK_LABEL(privacy_label), TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), privacy_label, FALSE, FALSE, 0);
-
- GtkWidget* url_label = gtk_label_new(NULL);
- gtk_label_set_markup(GTK_LABEL(url_label),
- "<tt>http://www.google.com/chrome/intl/en/privacy_linux.html</tt>");
- // Set selectable to allow copy and paste.
- gtk_label_set_selectable(GTK_LABEL(url_label), TRUE);
- gtk_box_pack_start(GTK_BOX(vbox), url_label, FALSE, FALSE, 0);
-
- report_crashes_ = gtk_check_button_new();
GtkWidget* check_label = gtk_label_new(
l10n_util::GetStringUTF8(IDS_OPTIONS_ENABLE_LOGGING).c_str());
gtk_label_set_line_wrap(GTK_LABEL(check_label), TRUE);
+
+ GtkWidget* learn_more_link = gtk_chrome_link_button_new(
+ l10n_util::GetStringUTF8(IDS_LEARN_MORE).c_str());
+ // Stick it in an hbox so it doesn't expand to the whole width.
+ GtkWidget* learn_more_hbox = gtk_hbox_new(FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(learn_more_hbox),
+ gtk_util::IndentWidget(learn_more_link),
+ FALSE, FALSE, 0);
+ g_signal_connect(learn_more_link, "clicked",
+ G_CALLBACK(OnLearnMoreLinkClicked), this);
+
+ report_crashes_ = gtk_check_button_new();
gtk_container_add(GTK_CONTAINER(report_crashes_), check_label);
- gtk_box_pack_start(GTK_BOX(vbox), report_crashes_, FALSE, FALSE, 0);
+
+ GtkWidget* report_vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing);
+ gtk_box_pack_start(GTK_BOX(report_vbox), report_crashes_, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(report_vbox), learn_more_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox), report_vbox, FALSE, FALSE, 0);
#endif
make_default_ = gtk_check_button_new_with_label(
@@ -162,6 +162,13 @@ void FirstRunDialog::OnDialogResponse(GtkWidget* widget, int response) {
FirstRunDone();
}
+// static
+void FirstRunDialog::OnLearnMoreLinkClicked(GtkButton *button,
+ FirstRunDialog* first_run) {
+ platform_util::OpenExternal(GURL(
+ l10n_util::GetStringUTF8(IDS_LEARN_MORE_REPORTING_URL)));
+}
+
void FirstRunDialog::FirstRunDone() {
// Set preference to show first run bubble and welcome page.
FirstRun::SetShowFirstRunBubblePref();