| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "remoting/host/disconnect_window.h" | 5 #include "remoting/host/disconnect_window.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // Try to keep the window always visible. | 57 // Try to keep the window always visible. |
| 58 gtk_window_stick(window); | 58 gtk_window_stick(window); |
| 59 gtk_window_set_keep_above(window, TRUE); | 59 gtk_window_set_keep_above(window, TRUE); |
| 60 // Utility windows have no minimize button or taskbar presence. | 60 // Utility windows have no minimize button or taskbar presence. |
| 61 gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_UTILITY); | 61 gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_UTILITY); |
| 62 gtk_window_set_deletable(window, FALSE); | 62 gtk_window_set_deletable(window, FALSE); |
| 63 | 63 |
| 64 g_signal_connect(disconnect_window_, "response", | 64 g_signal_connect(disconnect_window_, "response", |
| 65 G_CALLBACK(OnResponseThunk), this); | 65 G_CALLBACK(OnResponseThunk), this); |
| 66 | 66 |
| 67 GtkWidget* content_area = GTK_DIALOG(disconnect_window_)->vbox; | 67 GtkWidget* content_area = |
| 68 gtk_dialog_get_content_area(GTK_DIALOG(disconnect_window_)); |
| 68 | 69 |
| 69 GtkWidget* username_row = gtk_hbox_new(FALSE, 0); | 70 GtkWidget* username_row = gtk_hbox_new(FALSE, 0); |
| 70 // TODO(lambroslambrou): Replace the magic number with an appropriate | 71 // TODO(lambroslambrou): Replace the magic number with an appropriate |
| 71 // constant from a header file (such as chrome/browser/ui/gtk/gtk_util.h | 72 // constant from a header file (such as chrome/browser/ui/gtk/gtk_util.h |
| 72 // but check_deps disallows its #inclusion here). | 73 // but check_deps disallows its #inclusion here). |
| 73 gtk_container_set_border_width(GTK_CONTAINER(username_row), 12); | 74 gtk_container_set_border_width(GTK_CONTAINER(username_row), 12); |
| 74 gtk_container_add(GTK_CONTAINER(content_area), username_row); | 75 gtk_container_add(GTK_CONTAINER(content_area), username_row); |
| 75 | 76 |
| 76 GtkWidget* share_label = gtk_label_new(kSharingWith); | 77 GtkWidget* share_label = gtk_label_new(kSharingWith); |
| 77 gtk_container_add(GTK_CONTAINER(username_row), share_label); | 78 gtk_container_add(GTK_CONTAINER(username_row), share_label); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 105 | 106 |
| 106 host_->Shutdown(NULL); | 107 host_->Shutdown(NULL); |
| 107 Hide(); | 108 Hide(); |
| 108 } | 109 } |
| 109 | 110 |
| 110 DisconnectWindow* DisconnectWindow::Create() { | 111 DisconnectWindow* DisconnectWindow::Create() { |
| 111 return new DisconnectWindowLinux; | 112 return new DisconnectWindowLinux; |
| 112 } | 113 } |
| 113 | 114 |
| 114 } // namespace remoting | 115 } // namespace remoting |
| OLD | NEW |