diff options
author | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-26 00:08:54 +0000 |
---|---|---|
committer | zelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-26 00:08:54 +0000 |
commit | 1f52637b5d454cfe53fdc1bfee79d58141f51a40 (patch) | |
tree | 30c797733e1e93b3135ba8a564dca28cdb1fd117 | |
parent | b1a6110f8087d82db29471ed578425700558615a (diff) | |
download | chromium_src-1f52637b5d454cfe53fdc1bfee79d58141f51a40.zip chromium_src-1f52637b5d454cfe53fdc1bfee79d58141f51a40.tar.gz chromium_src-1f52637b5d454cfe53fdc1bfee79d58141f51a40.tar.bz2 |
Added new chromeos-specific values for bug type dropdown in user feedback dialog. Removed system info checkbox, fixed alignment of the link.
BUG=chromium-os:3564
TEST=open the feedback/bug report dialog, check the new values in the dropdown
Review URL: http://codereview.chromium.org/2220001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48229 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/app/generated_resources.grd | 34 | ||||
-rw-r--r-- | chrome/app/resources/locale_settings.grd | 2 | ||||
-rw-r--r-- | chrome/browser/bug_report_util.h | 18 | ||||
-rw-r--r-- | chrome/browser/views/bug_report_view.cc | 48 | ||||
-rw-r--r-- | chrome/browser/views/bug_report_view.h | 6 |
5 files changed, 88 insertions, 20 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index c053e53..814e228 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -4122,7 +4122,7 @@ Keep your key file in a safe place. You will need it to create new versions of y about:blank </message> <message name="IDS_BUGREPORT_SYSTEM_INFORMATION_URL_TEXT" desc="Text for system information url on the bug report dialog box"> - System Information + Included system information... </message> </if> <message name="IDS_BUGREPORT_INCLUDE_PAGE_SOURCE_CHKBOX" desc="Checkbox for including page source"> @@ -4134,6 +4134,38 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_BUGREPORT_BUG_TYPE" desc="Label for bug type"> Bug type: </message> + <if expr="pp_ifdef('chromeos')"> + <message name="IDS_BUGREPORT_PAGE_FORMATTING" desc="Report a bug/problem type: Page formatting or layout"> + Page formatting or layout + </message> + <message name="IDS_BUGREPORT_PLUGIN_ISSUE" desc="Report a bug/problem type: Plug-ins (e.g. Adobe Flash Player, Quicktime, etc)"> + Plug-ins (e.g. Adobe Flash Player, Quicktime, etc) + </message> + <message name="IDS_BUGREPORT_TABS_WINDOW_OVERVIEW_ISSUE" desc="Report a bug/problem type: Tabs, windows or overview mode"> + Tabs, windows or overview mode + </message> + <message name="IDS_BUGREPORT_CONNECTION_ISSUE" desc="Report a bug/problem type: Network connection"> + Network connection + </message> + <message name="IDS_BUGREPORT_SYNC_ISSUE" desc="Report a bug/problem type: Network connection"> + Synced preferences + </message> + <message name="IDS_BUGREPORT_CRASH_ISSUE" desc="Report a bug/problem type: Crash"> + Crash + </message> + <message name="IDS_BUGREPORT_EXTENSION_ISSUE" desc="Report a bug/problem type: Extensions or apps"> + Extensions or apps + </message> + <message name="IDS_BUGREPORT_APP_LAUNCHER_ISSUE" desc="Report a bug/problem type: App launcher"> + App launcher + </message> + <message name="IDS_BUGREPORT_PANEL_ISSUE" desc="Report a bug/problem type: Panels"> + Panels + </message> + <message name="IDS_BUGREPORT_POWER_ISSUE" desc="Report a bug/problem type: Power (battery, standby, etc)"> + Power (battery, standby, etc) + </message> + </if> <if expr="not pp_ifdef('use_titlecase')"> <message name="IDS_BUGREPORT_SEND_REPORT" desc="Text for OK button on dialog"> Send report diff --git a/chrome/app/resources/locale_settings.grd b/chrome/app/resources/locale_settings.grd index 3747dd4..c6da853 100644 --- a/chrome/app/resources/locale_settings.grd +++ b/chrome/app/resources/locale_settings.grd @@ -321,7 +321,7 @@ </message> <if expr="pp_ifdef('chromeos')"> <message name="IDS_CHROMEOS_BUGREPORT_DIALOG_HEIGHT_LINES" use_name_for_id="true"> - 25 + 24 </message> </if> diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h index a37f8e8..4d8ecbd 100644 --- a/chrome/browser/bug_report_util.h +++ b/chrome/browser/bug_report_util.h @@ -29,6 +29,23 @@ class TabContents; class BugReportUtil { public: +#if defined(OS_CHROMEOS) + enum BugType { + PAGE_FORMATTING = 0, + PAGE_WONT_LOAD, + PHISHING_PAGE, + PLUGIN_ISSUE, + TABS_WINDOW_OVERVIEW_ISSUE, + CONNECTION_ISSUE, + SYNC_ISSUE, + CRASH_ISSUE, + EXTENSION_ISSUE, + APP_LAUNCHER_ISSUE, + PANEL_ISSUE, + POWER_ISSUE, + OTHER_PROBLEM + }; +#else enum BugType { PAGE_WONT_LOAD = 0, PAGE_LOOKS_ODD, @@ -39,6 +56,7 @@ class BugReportUtil { BROWSER_CRASH, OTHER_PROBLEM }; +#endif // SetOSVersion copies the maj.minor.build + servicePack_string // into a string. We currently have: diff --git a/chrome/browser/views/bug_report_view.cc b/chrome/browser/views/bug_report_view.cc index faa7193..bef3c21 100644 --- a/chrome/browser/views/bug_report_view.cc +++ b/chrome/browser/views/bug_report_view.cc @@ -76,6 +76,39 @@ class BugReportComboBoxModel : public ComboboxModel { } static std::wstring GetItemAtIndex(int index) { +#if defined(OS_CHROMEOS) + switch (index) { + case BugReportUtil::PAGE_FORMATTING: + return l10n_util::GetString(IDS_BUGREPORT_PAGE_FORMATTING); + case BugReportUtil::PAGE_WONT_LOAD: + return l10n_util::GetString(IDS_BUGREPORT_PAGE_WONT_LOAD); + case BugReportUtil::PHISHING_PAGE: + return l10n_util::GetString(IDS_BUGREPORT_PHISHING_PAGE); + case BugReportUtil::PLUGIN_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_PLUGIN_ISSUE); + case BugReportUtil::TABS_WINDOW_OVERVIEW_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_TABS_WINDOW_OVERVIEW_ISSUE); + case BugReportUtil::CONNECTION_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_CONNECTION_ISSUE); + case BugReportUtil::SYNC_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_SYNC_ISSUE); + case BugReportUtil::CRASH_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_CRASH_ISSUE); + case BugReportUtil::EXTENSION_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_EXTENSION_ISSUE); + case BugReportUtil::APP_LAUNCHER_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_APP_LAUNCHER_ISSUE); + case BugReportUtil::PANEL_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_PANEL_ISSUE); + case BugReportUtil::POWER_ISSUE: + return l10n_util::GetString(IDS_BUGREPORT_POWER_ISSUE); + case BugReportUtil::OTHER_PROBLEM: + return l10n_util::GetString(IDS_BUGREPORT_OTHER_PROBLEM); + default: + NOTREACHED(); + return std::wstring(); + } +#else switch (index) { case BugReportUtil::PAGE_WONT_LOAD: return l10n_util::GetString(IDS_BUGREPORT_PAGE_WONT_LOAD); @@ -97,6 +130,7 @@ class BugReportComboBoxModel : public ComboboxModel { NOTREACHED(); return std::wstring(); } +#endif } private: @@ -216,7 +250,6 @@ void ShowBugReportView(views::Window* parent, view)->Show(); if (!have_last_image) view->DisableLastImageRadio(); - view->DisableSystemInformationCheckbox(); #endif } @@ -336,14 +369,11 @@ void BugReportView::SetupControl() { l10n_util::GetString(IDS_BUGREPORT_INCLUDE_NO_SCREEN_IMAGE), kScreenImageRadioGroup); - include_system_information_checkbox_ = new views::Checkbox( - l10n_util::GetString(IDS_BUGREPORT_INCLUDE_SYSTEM_INFORMATION_CHKBOX)); system_information_url_control_ = new views::Link( l10n_util::GetString(IDS_BUGREPORT_SYSTEM_INFORMATION_URL_TEXT)); system_information_url_control_->SetController(this); include_new_screen_image_radio_->SetChecked(true); - include_system_information_checkbox_->SetChecked(true); #endif include_page_image_checkbox_ = new views::Checkbox( l10n_util::GetString(IDS_BUGREPORT_INCLUDE_PAGE_IMAGE_CHKBOX)); @@ -419,15 +449,10 @@ void BugReportView::SetupControl() { layout->AddView(include_no_screen_image_radio_); layout->AddPaddingRow(0, kUnrelatedControlVerticalSpacing); - // Checkbox for system information - layout->StartRow(0, column_set_id); - layout->SkipColumns(1); - layout->AddView(include_system_information_checkbox_); - layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); - layout->StartRow(0, column_set_id); layout->SkipColumns(1); - layout->AddView(system_information_url_control_); + layout->AddView(system_information_url_control_, 1, 1, GridLayout::LEADING, + GridLayout::CENTER); #else if (include_page_image_checkbox_) { layout->StartRow(0, column_set_id); @@ -462,7 +487,6 @@ void BugReportView::UpdateReportingControls(bool is_phishing_report) { if (!last_image_->empty()) include_last_screen_image_radio_->SetEnabled(!is_phishing_report); include_no_screen_image_radio_->SetEnabled(!is_phishing_report); - include_system_information_checkbox_->SetChecked(!is_phishing_report); #else if (include_page_image_checkbox_) { include_page_image_checkbox_->SetEnabled(!is_phishing_report); diff --git a/chrome/browser/views/bug_report_view.h b/chrome/browser/views/bug_report_view.h index 8fd7bca..6debc55 100644 --- a/chrome/browser/views/bug_report_view.h +++ b/chrome/browser/views/bug_report_view.h @@ -90,11 +90,6 @@ class BugReportView : public views::View, include_last_screen_image_radio_->SetEnabled(false); } - // Disable the include system information checkbox - void DisableSystemInformationCheckbox() { - include_system_information_checkbox_->SetEnabled(false); - } - // NOTE: set_last_image takes ownership of the vector void set_last_image(std::vector<unsigned char>* png_data) { last_image_.reset(png_data); @@ -145,7 +140,6 @@ class BugReportView : public views::View, views::RadioButton* include_new_screen_image_radio_; views::RadioButton* include_last_screen_image_radio_; views::RadioButton* include_no_screen_image_radio_; - views::Checkbox* include_system_information_checkbox_; views::Link* system_information_url_control_; std::string system_information_url_; |