OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/content_settings_window_gtk.h" | 5 #include "chrome/browser/gtk/options/content_settings_window_gtk.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 std::string dialog_name = l10n_util::GetStringUTF8( | 69 std::string dialog_name = l10n_util::GetStringUTF8( |
70 IDS_CONTENT_SETTINGS_TITLE); | 70 IDS_CONTENT_SETTINGS_TITLE); |
71 dialog_ = gtk_dialog_new_with_buttons( | 71 dialog_ = gtk_dialog_new_with_buttons( |
72 dialog_name.c_str(), | 72 dialog_name.c_str(), |
73 parent, | 73 parent, |
74 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), | 74 static_cast<GtkDialogFlags>(GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR), |
75 GTK_STOCK_CLOSE, | 75 GTK_STOCK_CLOSE, |
76 GTK_RESPONSE_CLOSE, | 76 GTK_RESPONSE_CLOSE, |
77 NULL); | 77 NULL); |
| 78 gtk_window_set_policy(GTK_WINDOW(dialog_), FALSE, FALSE, TRUE); |
78 | 79 |
79 accessible_widget_helper_.reset(new AccessibleWidgetHelper( | 80 accessible_widget_helper_.reset(new AccessibleWidgetHelper( |
80 dialog_, profile_)); | 81 dialog_, profile_)); |
81 accessible_widget_helper_->SendOpenWindowNotification(dialog_name); | 82 accessible_widget_helper_->SendOpenWindowNotification(dialog_name); |
82 | 83 |
83 gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1); | 84 gtk_window_set_default_size(GTK_WINDOW(dialog_), 500, -1); |
84 // Allow browser windows to go in front of the options dialog in metacity. | 85 // Allow browser windows to go in front of the options dialog in metacity. |
85 gtk_window_set_type_hint(GTK_WINDOW(dialog_), GDK_WINDOW_TYPE_HINT_NORMAL); | 86 gtk_window_set_type_hint(GTK_WINDOW(dialog_), GDK_WINDOW_TYPE_HINT_NORMAL); |
86 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), | 87 gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), |
87 gtk_util::kContentAreaSpacing); | 88 gtk_util::kContentAreaSpacing); |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 int index = page_num; | 176 int index = page_num; |
176 DCHECK(index > CONTENT_SETTINGS_TYPE_DEFAULT && | 177 DCHECK(index > CONTENT_SETTINGS_TYPE_DEFAULT && |
177 index < CONTENT_SETTINGS_NUM_TYPES); | 178 index < CONTENT_SETTINGS_NUM_TYPES); |
178 last_selected_page_.SetValue(index); | 179 last_selected_page_.SetValue(index); |
179 } | 180 } |
180 | 181 |
181 void ContentSettingsWindowGtk::OnWindowDestroy(GtkWidget* widget) { | 182 void ContentSettingsWindowGtk::OnWindowDestroy(GtkWidget* widget) { |
182 settings_window = NULL; | 183 settings_window = NULL; |
183 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 184 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
184 } | 185 } |
OLD | NEW |