OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <math.h> | 6 #include <math.h> |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 // Handle mouse events to allow the user to drag the window around. | 196 // Handle mouse events to allow the user to drag the window around. |
197 gtk_widget_set_events(disconnect_window_, GDK_BUTTON_PRESS_MASK); | 197 gtk_widget_set_events(disconnect_window_, GDK_BUTTON_PRESS_MASK); |
198 g_signal_connect(disconnect_window_, "button-press-event", | 198 g_signal_connect(disconnect_window_, "button-press-event", |
199 G_CALLBACK(OnButtonPressThunk), this); | 199 G_CALLBACK(OnButtonPressThunk), this); |
200 | 200 |
201 // All magic numbers taken from screen shots provided by UX. | 201 // All magic numbers taken from screen shots provided by UX. |
202 // The alignment sets narrow margins at the top and bottom, compared with | 202 // The alignment sets narrow margins at the top and bottom, compared with |
203 // left and right. The left margin is made larger to accommodate the | 203 // left and right. The left margin is made larger to accommodate the |
204 // window movement gripper. | 204 // window movement gripper. |
| 205 G_GNUC_BEGIN_IGNORE_DEPRECATIONS; |
205 GtkWidget* align = gtk_alignment_new(0, 0, 1, 1); | 206 GtkWidget* align = gtk_alignment_new(0, 0, 1, 1); |
206 gtk_alignment_set_padding(GTK_ALIGNMENT(align), 8, 8, 24, 12); | 207 gtk_alignment_set_padding(GTK_ALIGNMENT(align), 8, 8, 24, 12); |
| 208 G_GNUC_END_IGNORE_DEPRECATIONS; |
207 gtk_container_add(GTK_CONTAINER(window), align); | 209 gtk_container_add(GTK_CONTAINER(window), align); |
208 | 210 |
209 #if GTK_MAJOR_VERSION == 2 | 211 #if GTK_MAJOR_VERSION == 2 |
210 GtkWidget* button_row = gtk_hbox_new(FALSE, 12); | 212 GtkWidget* button_row = gtk_hbox_new(FALSE, 12); |
211 #else | 213 #else |
212 GtkWidget* button_row = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12); | 214 GtkWidget* button_row = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 12); |
213 gtk_box_set_homogeneous(GTK_BOX(button_row), FALSE); | 215 gtk_box_set_homogeneous(GTK_BOX(button_row), FALSE); |
214 #endif | 216 #endif |
215 gtk_container_add(GTK_CONTAINER(align), button_row); | 217 gtk_container_add(GTK_CONTAINER(align), button_row); |
216 | 218 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 } | 346 } |
345 | 347 |
346 } // namespace | 348 } // namespace |
347 | 349 |
348 // static | 350 // static |
349 std::unique_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { | 351 std::unique_ptr<HostWindow> HostWindow::CreateDisconnectWindow() { |
350 return base::MakeUnique<DisconnectWindowGtk>(); | 352 return base::MakeUnique<DisconnectWindowGtk>(); |
351 } | 353 } |
352 | 354 |
353 } // namespace remoting | 355 } // namespace remoting |
OLD | NEW |