Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: remoting/host/continue_window_linux.cc

Issue 2741943004: Gtk3: Silence deprecation warnings in //remoting (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | remoting/host/disconnect_window_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 g_signal_connect(continue_window_, "response", 95 g_signal_connect(continue_window_, "response",
96 G_CALLBACK(OnResponseThunk), this); 96 G_CALLBACK(OnResponseThunk), this);
97 97
98 GtkWidget* content_area = 98 GtkWidget* content_area =
99 gtk_dialog_get_content_area(GTK_DIALOG(continue_window_)); 99 gtk_dialog_get_content_area(GTK_DIALOG(continue_window_));
100 100
101 GtkWidget* text_label = 101 GtkWidget* text_label =
102 gtk_label_new(l10n_util::GetStringUTF8(IDS_CONTINUE_PROMPT).c_str()); 102 gtk_label_new(l10n_util::GetStringUTF8(IDS_CONTINUE_PROMPT).c_str());
103 gtk_label_set_line_wrap(GTK_LABEL(text_label), TRUE); 103 gtk_label_set_line_wrap(GTK_LABEL(text_label), TRUE);
104 // TODO(lambroslambrou): Fix magic numbers, as in disconnect_window_gtk.cc. 104 // TODO(lambroslambrou): Fix magic numbers, as in disconnect_window_gtk.cc.
105 G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
105 gtk_misc_set_padding(GTK_MISC(text_label), 12, 12); 106 gtk_misc_set_padding(GTK_MISC(text_label), 12, 12);
107 G_GNUC_END_IGNORE_DEPRECATIONS;
106 gtk_container_add(GTK_CONTAINER(content_area), text_label); 108 gtk_container_add(GTK_CONTAINER(content_area), text_label);
107 109
108 gtk_widget_show_all(content_area); 110 gtk_widget_show_all(content_area);
109 } 111 }
110 112
111 void ContinueWindowGtk::OnResponse(GtkDialog* dialog, int response_id) { 113 void ContinueWindowGtk::OnResponse(GtkDialog* dialog, int response_id) {
112 DCHECK(CalledOnValidThread()); 114 DCHECK(CalledOnValidThread());
113 115
114 if (response_id == GTK_RESPONSE_OK) { 116 if (response_id == GTK_RESPONSE_OK) {
115 ContinueSession(); 117 ContinueSession();
116 } else { 118 } else {
117 DisconnectSession(); 119 DisconnectSession();
118 } 120 }
119 121
120 HideUi(); 122 HideUi();
121 } 123 }
122 124
123 // static 125 // static
124 std::unique_ptr<HostWindow> HostWindow::CreateContinueWindow() { 126 std::unique_ptr<HostWindow> HostWindow::CreateContinueWindow() {
125 return base::MakeUnique<ContinueWindowGtk>(); 127 return base::MakeUnique<ContinueWindowGtk>();
126 } 128 }
127 129
128 } // namespace remoting 130 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/disconnect_window_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698