Chromium Code Reviews| 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 "remoting/host/continue_window.h" | 5 #include "remoting/host/continue_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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 | 67 |
| 68 g_signal_connect(continue_window_, "response", | 68 g_signal_connect(continue_window_, "response", |
| 69 G_CALLBACK(OnResponseThunk), this); | 69 G_CALLBACK(OnResponseThunk), this); |
| 70 | 70 |
| 71 GtkWidget* content_area = | 71 GtkWidget* content_area = |
| 72 gtk_dialog_get_content_area(GTK_DIALOG(continue_window_)); | 72 gtk_dialog_get_content_area(GTK_DIALOG(continue_window_)); |
| 73 | 73 |
| 74 GtkWidget* text_label = | 74 GtkWidget* text_label = |
| 75 gtk_label_new(UTF16ToUTF8(ui_strings.continue_prompt).c_str()); | 75 gtk_label_new(UTF16ToUTF8(ui_strings.continue_prompt).c_str()); |
| 76 gtk_label_set_line_wrap(GTK_LABEL(text_label), TRUE); | 76 gtk_label_set_line_wrap(GTK_LABEL(text_label), TRUE); |
| 77 // TODO(lambroslambrou): Fix magic numbers, as in disconnect_window_linux.cc. | 77 // TODO(lambroslambrou): Fix magic numbers, as in disconnect_window_gtk.cc. |
|
tfarina
2012/07/06 22:18:46
what is this todo about?
alexeypa (please no reviews)
2012/07/10 18:11:11
Probably, the idea is to rationalize the somewhat
| |
| 78 gtk_misc_set_padding(GTK_MISC(text_label), 12, 12); | 78 gtk_misc_set_padding(GTK_MISC(text_label), 12, 12); |
| 79 gtk_container_add(GTK_CONTAINER(content_area), text_label); | 79 gtk_container_add(GTK_CONTAINER(content_area), text_label); |
| 80 | 80 |
| 81 gtk_widget_show_all(content_area); | 81 gtk_widget_show_all(content_area); |
| 82 } | 82 } |
| 83 | 83 |
| 84 void ContinueWindowGtk::Show(remoting::ChromotingHost* host, | 84 void ContinueWindowGtk::Show(remoting::ChromotingHost* host, |
| 85 const ContinueSessionCallback& callback) { | 85 const ContinueSessionCallback& callback) { |
| 86 host_ = host; | 86 host_ = host; |
| 87 callback_ = callback; | 87 callback_ = callback; |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 100 void ContinueWindowGtk::OnResponse(GtkWidget* dialog, int response_id) { | 100 void ContinueWindowGtk::OnResponse(GtkWidget* dialog, int response_id) { |
| 101 callback_.Run(response_id == GTK_RESPONSE_OK); | 101 callback_.Run(response_id == GTK_RESPONSE_OK); |
| 102 Hide(); | 102 Hide(); |
| 103 } | 103 } |
| 104 | 104 |
| 105 scoped_ptr<ContinueWindow> ContinueWindow::Create() { | 105 scoped_ptr<ContinueWindow> ContinueWindow::Create() { |
| 106 return scoped_ptr<ContinueWindow>(new ContinueWindowGtk()); | 106 return scoped_ptr<ContinueWindow>(new ContinueWindowGtk()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace remoting | 109 } // namespace remoting |
| OLD | NEW |