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/common/gtk_util.h" | 5 #include "chrome/common/gtk_util.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/linux_util.h" | 9 #include "base/linux_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 " GtkDialog::action-area-border = 12\n" | 115 " GtkDialog::action-area-border = 12\n" |
116 " GtkDialog::button-spacing = 6\n" | 116 " GtkDialog::button-spacing = 6\n" |
117 " GtkDialog::content-area-spacing = 18\n" | 117 " GtkDialog::content-area-spacing = 18\n" |
118 " GtkDialog::content-area-border = 0\n" | 118 " GtkDialog::content-area-border = 0\n" |
119 "}\n" | 119 "}\n" |
120 "widget \"about-dialog\" style : application \"about-dialog\"\n"; | 120 "widget \"about-dialog\" style : application \"about-dialog\"\n"; |
121 | 121 |
122 gtk_rc_parse_string(kRCText); | 122 gtk_rc_parse_string(kRCText); |
123 } | 123 } |
124 | 124 |
125 GtkWindow* ParentWindow(GtkWidget* widget) { | |
126 while (widget) { | |
127 if (GTK_IS_WINDOW(widget)) | |
128 return GTK_WINDOW(widget); | |
129 widget = gtk_widget_get_parent(widget); | |
130 } | |
131 return NULL; | |
132 } | |
133 | |
134 } // namespace gtk_util | 125 } // namespace gtk_util |
OLD | NEW |