Debian Codegraph @

src/vnc-preferences-window.vala

raw
1 /* vnc-preferences-window.vala
2 *
3 * Copyright (C) Red Hat, Inc
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * Author: Felipe Borges <[email protected]>
19 *
20 */
21
22 namespace Connections {
23 [GtkTemplate (ui = "/org/gnome/Connections/ui/vnc-preferences.ui")]
24 private class VncPreferencesWindow : Connections.PreferencesWindow {
25 [GtkChild]
26 private unowned Gtk.Entry connection_name_entry;
27 [GtkChild]
28 private unowned Gtk.Label host_address_label;
29 [GtkChild]
30 private unowned BooleanProperty view_only;
31 [GtkChild]
32 private unowned BooleanProperty show_local_pointer;
33 [GtkChild]
34 private unowned BooleanProperty enable_audio;
35 [GtkChild]
36 private unowned Gtk.ComboBoxText bandwidth_combo;
37 [GtkChild]
38 private unowned Gtk.ComboBoxText scale_mode_combo;
39
40 public VncPreferencesWindow (Connection connection) {
41 this.connection = connection;
42
43 bind_widget_property (connection_name_entry, "text", "display_name");
44 bind_widget_property (host_address_label, "label", "uri");
45 bind_widget_property (scale_mode_combo, "active_id", "scale-mode");
46 bind_widget_property (view_only, "active", "view-only");
47 bind_widget_property (enable_audio, "active", "enable_audio");
48 bind_widget_property (show_local_pointer, "active", "show-local-pointer");
49 bind_widget_property (bandwidth_combo, "active_id", "bandwidth");
50 }
51 }
52 }