[gnome-initial-setup] account: Remove "Act as administrator" checkbox



commit a63ed702d3b8bec0d08254401f33a11c2769c370
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Nov 14 19:04:00 2012 -0500

    account: Remove "Act as administrator" checkbox
    
    There's no need for this to ever come into play; in a large
    deployment scenario, this should never be checked, and in a
    local installation scenario, this should never be unchecked.
    
    Right now, force an administrator account, but we need to
    make this changeable by sysadmins in the near future.

 TODO                                               |    1 -
 .../pages/account/gis-account-page.c               |   29 ++-----------------
 .../pages/account/gis-account-page.ui              |   28 -------------------
 3 files changed, 3 insertions(+), 55 deletions(-)
---
diff --git a/TODO b/TODO
index d3088c4..eecf669 100644
--- a/TODO
+++ b/TODO
@@ -8,7 +8,6 @@
 **  need to check the connecting progress
 * Account
 **  just use the local account page by default, with a button for "use enterprise login instead" (design is required here)
-**  act as administrator checkbox won't be useful
 **  various alignment issues - text entry boxes need be longer
 **  password entry - inline error icon isn't good here; we need a better approach to password hints
 **  aday - i wouldn't include avatar selection
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c b/gnome-initial-setup/pages/account/gis-account-page.c
index 1933028..4ac0f66 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -111,7 +111,6 @@ clear_account_page (GisAccountPage *page)
   GtkWidget *fullname_entry;
   GtkWidget *username_combo;
   GtkWidget *password_check;
-  GtkWidget *admin_check;
   GtkWidget *password_entry;
   GtkWidget *confirm_entry;
   gboolean need_password;
@@ -119,7 +118,6 @@ clear_account_page (GisAccountPage *page)
   fullname_entry = WID("account-fullname-entry");
   username_combo = WID("account-username-combo");
   password_check = WID("account-password-check");
-  admin_check = WID("account-admin-check");
   password_entry = WID("account-password-entry");
   confirm_entry = WID("account-confirm-entry");
 
@@ -127,7 +125,10 @@ clear_account_page (GisAccountPage *page)
   priv->valid_username = FALSE;
   priv->valid_password = TRUE;
   priv->password_mode = ACT_USER_PASSWORD_MODE_NONE;
+
+  /* FIXME: change this for a large deployment scenario; maybe through a GSetting? */
   priv->account_type = ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR;
+
   priv->user_data_unsaved = FALSE;
 
   need_password = priv->password_mode != ACT_USER_PASSWORD_MODE_NONE;
@@ -135,8 +136,6 @@ clear_account_page (GisAccountPage *page)
   gtk_widget_set_sensitive (password_entry, need_password);
   gtk_widget_set_sensitive (confirm_entry, need_password);
 
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (admin_check), priv->account_type == ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR);
-
   gtk_entry_set_text (GTK_ENTRY (fullname_entry), "");
   gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (username_combo))));
   gtk_entry_set_text (GTK_ENTRY (password_entry), "");
@@ -322,24 +321,6 @@ password_check_changed (GtkWidget      *w,
   update_account_page_status (page);
 }
 
-static void
-admin_check_changed (GtkWidget      *w,
-                     GParamSpec     *pspec,
-                     GisAccountPage *page)
-{
-  GisAccountPagePrivate *priv = page->priv;
-
-  if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))) {
-    priv->account_type = ACT_USER_ACCOUNT_TYPE_ADMINISTRATOR;
-  }
-  else {
-    priv->account_type = ACT_USER_ACCOUNT_TYPE_STANDARD;
-  }
-
-  priv->user_data_unsaved = TRUE;
-  update_account_page_status (page);
-}
-
 #define MIN_PASSWORD_LEN 6
 
 static void
@@ -993,7 +974,6 @@ gis_account_page_constructed (GObject *object)
   GtkWidget *fullname_entry;
   GtkWidget *username_combo;
   GtkWidget *password_check;
-  GtkWidget *admin_check;
   GtkWidget *password_entry;
   GtkWidget *confirm_entry;
   GtkWidget *local_account_avatar_button;
@@ -1010,7 +990,6 @@ gis_account_page_constructed (GObject *object)
   fullname_entry = WID("account-fullname-entry");
   username_combo = WID("account-username-combo");
   password_check = WID("account-password-check");
-  admin_check = WID("account-admin-check");
   password_entry = WID("account-password-entry");
   confirm_entry = WID("account-confirm-entry");
   local_account_avatar_button = WID("local-account-avatar-button");
@@ -1024,8 +1003,6 @@ gis_account_page_constructed (GObject *object)
                     G_CALLBACK (username_changed), page);
   g_signal_connect (password_check, "notify::active",
                     G_CALLBACK (password_check_changed), page);
-  g_signal_connect (admin_check, "notify::active",
-                    G_CALLBACK (admin_check_changed), page);
   g_signal_connect (password_entry, "notify::text",
                     G_CALLBACK (password_changed), page);
   g_signal_connect (confirm_entry, "notify::text",
diff --git a/gnome-initial-setup/pages/account/gis-account-page.ui b/gnome-initial-setup/pages/account/gis-account-page.ui
index 4f931e8..409d0d0 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.ui
+++ b/gnome-initial-setup/pages/account/gis-account-page.ui
@@ -269,34 +269,6 @@
                 <property name="height">1</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkCheckButton" id="account-admin-check">
-                <property name="label" translatable="yes">_Act as administrator of this computer</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">False</property>
-                <property name="use_underline">True</property>
-                <property name="xalign">0.5</property>
-              </object>
-              <packing>
-                <property name="left_attach">0</property>
-                <property name="top_attach">5</property>
-                <property name="width">2</property>
-                <property name="height">1</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
           </object>
           <packing>
             <property name="expand">False</property>



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