[gnome-initial-setup/shell/4765: 14/362] account: add a switch to enable automatic login



commit e6b64059bad1d623e797f0485b243b55a77692e5
Author: Cosimo Cecchi <cosimo endlessm com>
Date:   Fri Apr 18 12:17:11 2014 -0700

    account: add a switch to enable automatic login

 .../pages/account/gis-account-page.c               |    3 +
 .../pages/account/gis-account-page.ui              |   46 ++++++++++++++++++++
 po/es.po                                           |    4 ++
 po/pt_BR.po                                        |    4 ++
 4 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c 
b/gnome-initial-setup/pages/account/gis-account-page.c
index 39cc760..4192eb5 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -448,11 +448,13 @@ local_create_user (GisAccountPage *page)
   const gchar *password;
   const gchar *fullname;
   const gchar *language;
+  gboolean autologin_active;
   GError *error = NULL;
 
   username = gtk_combo_box_text_get_active_text (OBJ(GtkComboBoxText*, "account-username-combo"));
   fullname = gtk_entry_get_text (OBJ (GtkEntry*, "account-fullname-entry"));
   password = gtk_entry_get_text (OBJ (GtkEntry*, "account-password-entry"));
+  autologin_active = gtk_switch_get_active (OBJ(GtkSwitch*, "account-autologin-switch"));
 
   priv->act_user = act_user_manager_create_user (priv->act_client, username, fullname, priv->account_type, 
&error);
   if (error != NULL) {
@@ -472,6 +474,7 @@ local_create_user (GisAccountPage *page)
   if (language)
     act_user_set_language (priv->act_user, language);
 
+  act_user_set_automatic_login (priv->act_user, autologin_active);
   gis_driver_set_user_permissions (GIS_PAGE (page)->driver,
                                    priv->act_user,
                                    password);
diff --git a/gnome-initial-setup/pages/account/gis-account-page.ui 
b/gnome-initial-setup/pages/account/gis-account-page.ui
index 68a0bc6..493d5f0 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page.ui
@@ -261,6 +261,52 @@
               </packing>
             </child>
             <child>
+              <object class="GtkLabel" id="account-autologin-label">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="halign">end</property>
+                <property name="xalign">1</property>
+                <property name="label" translatable="yes">A_utomatic Login</property>
+                <property name="use_underline">True</property>
+                <property name="mnemonic_widget">account-autologin-switch</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">7</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box3">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <child>
+                  <object class="GtkSwitch" id="account-autologin-switch">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">7</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
               <placeholder/>
             </child>
             <child>
diff --git a/po/es.po b/po/es.po
index fae6cd2..516aaf4 100644
--- a/po/es.po
+++ b/po/es.po
@@ -112,6 +112,10 @@ msgstr ""
 "minúsculas y uno o dos números"
 
 #: ../gnome-initial-setup/pages/account/gis-account-page.ui.h:8
+msgid "A_utomatic Login"
+msgstr "_Inicio de sesión automático"
+
+#: ../gnome-initial-setup/pages/account/gis-account-page.ui.h:9
 msgid "page 1"
 msgstr "página 1"
 
diff --git a/po/pt_BR.po b/po/pt_BR.po
index e5b5184..9573aa2 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -117,6 +117,10 @@ msgstr ""
 "minúsculas e use um ou dois números."
 
 #: ../gnome-initial-setup/pages/account/gis-account-page.ui.h:8
+msgid "A_utomatic Login"
+msgstr "Início a_utomático de sessão"
+
+#: ../gnome-initial-setup/pages/account/gis-account-page.ui.h:9
 msgid "page 1"
 msgstr "página 1"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]