summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 00:53:58 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-25 00:53:58 +0000
commit511ebb94c4cdb6c8ef345945ae12d232d51cb901 (patch)
treec1186ac64b5409159f6b905621e1354fa6cf37cb /chrome/browser/gtk
parent0ee508a026ccca02c64da906773a0ebc88048f6c (diff)
downloadchromium_src-511ebb94c4cdb6c8ef345945ae12d232d51cb901.zip
chromium_src-511ebb94c4cdb6c8ef345945ae12d232d51cb901.tar.gz
chromium_src-511ebb94c4cdb6c8ef345945ae12d232d51cb901.tar.bz2
Make some default file dialog titles for linux.
Seems Windows only lets you set some text inside the dialog above the tree view, and not in the titlebar. BUG=16890 TEST=should be obvious Review URL: http://codereview.chromium.org/159326 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21600 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/dialogs_gtk.cc15
-rw-r--r--chrome/browser/gtk/options/advanced_contents_gtk.cc6
2 files changed, 14 insertions, 7 deletions
diff --git a/chrome/browser/gtk/dialogs_gtk.cc b/chrome/browser/gtk/dialogs_gtk.cc
index 1283d4d..c3f8bf7 100644
--- a/chrome/browser/gtk/dialogs_gtk.cc
+++ b/chrome/browser/gtk/dialogs_gtk.cc
@@ -303,9 +303,12 @@ void SelectFileDialogImpl::FileNotSelected(GtkWidget* dialog) {
GtkWidget* SelectFileDialogImpl::CreateFileOpenDialog(const std::string& title,
gfx::NativeWindow parent) {
+ std::string title_string = !title.empty() ? title :
+ l10n_util::GetStringUTF8(IDS_OPEN_FILE_DIALOG_TITLE);
+
// TODO(estade): do we want to set the open directory to some sort of default?
GtkWidget* dialog =
- gtk_file_chooser_dialog_new(title.c_str(), parent,
+ gtk_file_chooser_dialog_new(title_string.c_str(), parent,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
@@ -324,9 +327,12 @@ GtkWidget* SelectFileDialogImpl::CreateFileOpenDialog(const std::string& title,
GtkWidget* SelectFileDialogImpl::CreateMultiFileOpenDialog(
const std::string& title, gfx::NativeWindow parent) {
+ std::string title_string = !title.empty() ? title :
+ l10n_util::GetStringUTF8(IDS_OPEN_FILES_DIALOG_TITLE);
+
// TODO(estade): do we want to set the open directory to some sort of default?
GtkWidget* dialog =
- gtk_file_chooser_dialog_new(title.c_str(), parent,
+ gtk_file_chooser_dialog_new(title_string.c_str(), parent,
GTK_FILE_CHOOSER_ACTION_OPEN,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
@@ -345,8 +351,11 @@ GtkWidget* SelectFileDialogImpl::CreateMultiFileOpenDialog(
GtkWidget* SelectFileDialogImpl::CreateSaveAsDialog(const std::string& title,
const FilePath& default_path, gfx::NativeWindow parent) {
+ std::string title_string = !title.empty() ? title :
+ l10n_util::GetStringUTF8(IDS_SAVE_AS_DIALOG_TITLE);
+
GtkWidget* dialog =
- gtk_file_chooser_dialog_new(title.c_str(), parent,
+ gtk_file_chooser_dialog_new(title_string.c_str(), parent,
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc
index fdae7b7..23be335 100644
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc
@@ -112,10 +112,8 @@ DownloadSection::DownloadSection(Profile* profile)
// Download location options.
download_location_button_ = gtk_file_chooser_button_new(
- // TODO(mattm): There doesn't seem to be a reasonable localized string for
- // the chooser title? (Though no other file choosers have a title either,
- // bug 16890.)
- "",
+ l10n_util::GetStringUTF8(
+ IDS_OPTIONS_DOWNLOADLOCATION_BROWSE_WINDOW_TITLE).c_str(),
GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
g_signal_connect(download_location_button_, "selection-changed",
G_CALLBACK(OnDownloadLocationChanged), this);