summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Wood <thos@gnome.org>2014-02-15 19:29:22 +0000
committerRui Matos <tiagomatos@gmail.com>2014-02-18 12:08:42 +0100
commitab4a5230be9bb4298a1d9d2c6d7aac1299ea41c8 (patch)
treeaf7acb7c81695a0b316a4db0a6b689f8e1de8296
parentea58777b822b98a764757f948d2b7de19affe592 (diff)
downloadgnome-control-center-ab4a5230be9bb4298a1d9d2c6d7aac1299ea41c8.tar.gz
sharing: address ambiguity in the screen sharing dialog
https://bugzilla.gnome.org/show_bug.cgi?id=723280
-rw-r--r--panels/sharing/cc-sharing-panel.c12
-rw-r--r--panels/sharing/sharing.ui127
2 files changed, 63 insertions, 76 deletions
diff --git a/panels/sharing/cc-sharing-panel.c b/panels/sharing/cc-sharing-panel.c
index 77703150e..6654a7564 100644
--- a/panels/sharing/cc-sharing-panel.c
+++ b/panels/sharing/cc-sharing-panel.c
@@ -914,17 +914,17 @@ screen_sharing_show_cb (GtkWidget *widget, CcSharingPanel *self)
static void
screen_sharing_hide_cb (GtkWidget *widget, CcSharingPanel *self)
{
- GtkSwitch *pw_switch;
+ GtkToggleButton *ac_radio;
GtkEntry *pw_entry;
const gchar *password;
CcSharingPanelPrivate *priv = self->priv;
- pw_switch = GTK_SWITCH (WID ("remote-control-require-password-switch"));
+ ac_radio = GTK_TOGGLE_BUTTON (WID ("approve-connections-radiobutton"));
pw_entry = GTK_ENTRY (WID ("remote-control-password-entry"));
password = gtk_entry_get_text (pw_entry);
if (password == NULL || *password == '\0')
- gtk_switch_set_active (pw_switch, FALSE);
+ gtk_toggle_button_set_active (ac_radio, TRUE);
}
#define MAX_PASSWORD_SIZE 8
@@ -972,7 +972,7 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
WID ("remote-control-box"),
NULL);
- cc_sharing_panel_bind_switch_to_widgets (WID ("remote-control-require-password-switch"),
+ cc_sharing_panel_bind_switch_to_widgets (WID ("require-password-radiobutton"),
WID ("password-grid"),
NULL);
@@ -987,10 +987,10 @@ cc_sharing_panel_setup_screen_sharing_dialog (CcSharingPanel *self)
"active",
G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_INVERT_BOOLEAN);
g_settings_bind (settings, "prompt-enabled",
- WID ("approve-all-connections-switch"), "active",
+ WID ("approve-connections-radiobutton"), "active",
G_SETTINGS_BIND_DEFAULT);
g_settings_bind_with_mapping (settings, "authentication-methods",
- WID ("remote-control-require-password-switch"),
+ WID ("require-password-radiobutton"),
"active",
G_SETTINGS_BIND_DEFAULT,
vino_get_authtype, vino_set_authtype, NULL, NULL);
diff --git a/panels/sharing/sharing.ui b/panels/sharing/sharing.ui
index a29b035ca..c040b46ba 100644
--- a/panels/sharing/sharing.ui
+++ b/panels/sharing/sharing.ui
@@ -1012,10 +1012,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">Remote View</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
+ <property name="label" translatable="yes">Screen Sharing</property>
<property name="mnemonic_widget">remote-view-switch</property>
</object>
<packing>
@@ -1041,11 +1038,8 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
- <property name="label" translatable="yes">Remote Control</property>
+ <property name="label" translatable="yes">Allow Remote Control</property>
<property name="mnemonic_widget">remote-control-switch</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -1076,65 +1070,7 @@
<object class="GtkGrid" id="remote-control-grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="row_spacing">12</property>
- <child>
- <object class="GtkLabel" id="remote-control-require-password-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="label" translatable="yes">Require Password</property>
- <property name="mnemonic_widget">remote-control-require-password-switch</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="approve-all-connections-label">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Approve All Connections</property>
- <property name="use_markup">True</property>
- <property name="mnemonic_widget">approve-all-connections-switch</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="remote-control-require-password-switch">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">end</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkSwitch" id="approve-all-connections-switch">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="halign">end</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
+ <property name="row_spacing">6</property>
<child>
<object class="GtkGrid" id="password-grid">
<property name="visible">True</property>
@@ -1146,8 +1082,8 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="label" translatable="yes">Password</property>
+ <property name="margin_left">12</property>
+ <property name="label" translatable="yes">Password:</property>
<property name="mnemonic_widget">remote-control-password-entry</property>
</object>
<packing>
@@ -1161,6 +1097,7 @@
<object class="GtkEntry" id="remote-control-password-entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="visibility">False</property>
<property name="invisible_char">●</property>
<property name="shadow_type">none</property>
@@ -1195,8 +1132,58 @@
</object>
<packing>
<property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Access Options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="approve-connections-radiobutton">
+ <property name="label" translatable="yes">New connections must ask for access</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">require-password-radiobutton</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="require-password-radiobutton">
+ <property name="label" translatable="yes">Require a password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
<property name="top_attach">2</property>
- <property name="width">2</property>
+ <property name="width">1</property>
<property name="height">1</property>
</packing>
</child>