| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
| 6 | 6 |
| 7 #include "chrome/browser/options_window.h" | 7 #include "chrome/browser/options_window.h" |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // Prefs window is shared between all browser windows. | 92 // Prefs window is shared between all browser windows. |
| 93 NULL, | 93 NULL, |
| 94 // Non-modal. | 94 // Non-modal. |
| 95 GTK_DIALOG_NO_SEPARATOR, | 95 GTK_DIALOG_NO_SEPARATOR, |
| 96 GTK_STOCK_CLOSE, | 96 GTK_STOCK_CLOSE, |
| 97 GTK_RESPONSE_CLOSE, | 97 GTK_RESPONSE_CLOSE, |
| 98 NULL); | 98 NULL); |
| 99 gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1); | 99 gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1); |
| 100 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), | 100 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), |
| 101 gtk_util::kContentAreaSpacing); | 101 gtk_util::kContentAreaSpacing); |
| 102 gtk_util::SetWindowIcon(GTK_WINDOW(dialog_)); |
| 102 | 103 |
| 103 notebook_ = gtk_notebook_new(); | 104 notebook_ = gtk_notebook_new(); |
| 104 | 105 |
| 105 gtk_notebook_append_page( | 106 gtk_notebook_append_page( |
| 106 GTK_NOTEBOOK(notebook_), | 107 GTK_NOTEBOOK(notebook_), |
| 107 general_page_.get_page_widget(), | 108 general_page_.get_page_widget(), |
| 108 gtk_label_new( | 109 gtk_label_new( |
| 109 l10n_util::GetStringUTF8(IDS_OPTIONS_GENERAL_TAB_LABEL).c_str())); | 110 l10n_util::GetStringUTF8(IDS_OPTIONS_GENERAL_TAB_LABEL).c_str())); |
| 110 | 111 |
| 111 gtk_notebook_append_page( | 112 gtk_notebook_append_page( |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 OptionsGroup highlight_group, | 203 OptionsGroup highlight_group, |
| 203 Profile* profile) { | 204 Profile* profile) { |
| 204 DCHECK(profile); | 205 DCHECK(profile); |
| 205 // If there's already an existing options window, activate it and switch to | 206 // If there's already an existing options window, activate it and switch to |
| 206 // the specified page. | 207 // the specified page. |
| 207 if (!instance_) { | 208 if (!instance_) { |
| 208 instance_ = new OptionsWindowGtk(profile); | 209 instance_ = new OptionsWindowGtk(profile); |
| 209 } | 210 } |
| 210 instance_->ShowOptionsPage(page, highlight_group); | 211 instance_->ShowOptionsPage(page, highlight_group); |
| 211 } | 212 } |
| OLD | NEW |