| OLD | NEW |
| 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/options/advanced_contents_gtk.h" | 5 #include "chrome/browser/gtk/options/advanced_contents_gtk.h" |
| 6 | 6 |
| 7 #include <sys/types.h> | 7 #include <sys/types.h> |
| 8 #include <sys/wait.h> | 8 #include <sys/wait.h> |
| 9 | 9 |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(DownloadSection); | 106 DISALLOW_COPY_AND_ASSIGN(DownloadSection); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 DownloadSection::DownloadSection(Profile* profile) | 109 DownloadSection::DownloadSection(Profile* profile) |
| 110 : OptionsPageBase(profile), initializing_(true) { | 110 : OptionsPageBase(profile), initializing_(true) { |
| 111 page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 111 page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
| 112 | 112 |
| 113 // Download location options. | 113 // Download location options. |
| 114 download_location_button_ = gtk_file_chooser_button_new( | 114 download_location_button_ = gtk_file_chooser_button_new( |
| 115 // TODO(mattm): There doesn't seem to be a reasonable localized string for | 115 l10n_util::GetStringUTF8( |
| 116 // the chooser title? (Though no other file choosers have a title either, | 116 IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_TITLE2).c_str(), |
| 117 // bug 16890.) | |
| 118 "", | |
| 119 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); | 117 GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); |
| 120 g_signal_connect(download_location_button_, "selection-changed", | 118 g_signal_connect(download_location_button_, "selection-changed", |
| 121 G_CALLBACK(OnDownloadLocationChanged), this); | 119 G_CALLBACK(OnDownloadLocationChanged), this); |
| 122 // Add the default download path to the list of shortcuts in the selector. | 120 // Add the default download path to the list of shortcuts in the selector. |
| 123 FilePath default_download_path; | 121 FilePath default_download_path; |
| 124 if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, | 122 if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, |
| 125 &default_download_path)) { | 123 &default_download_path)) { |
| 126 NOTREACHED(); | 124 NOTREACHED(); |
| 127 } else { | 125 } else { |
| 128 if (!gtk_file_chooser_add_shortcut_folder( | 126 if (!gtk_file_chooser_add_shortcut_folder( |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT), | 847 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT), |
| 850 web_content_section_->get_page_widget(), false); | 848 web_content_section_->get_page_widget(), false); |
| 851 | 849 |
| 852 security_section_.reset(new SecuritySection(profile_)); | 850 security_section_.reset(new SecuritySection(profile_)); |
| 853 options_builder.AddOptionGroup( | 851 options_builder.AddOptionGroup( |
| 854 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), | 852 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), |
| 855 security_section_->get_page_widget(), false); | 853 security_section_->get_page_widget(), false); |
| 856 | 854 |
| 857 page_ = options_builder.get_page_widget(); | 855 page_ = options_builder.get_page_widget(); |
| 858 } | 856 } |
| OLD | NEW |