Re: [patch] No echo password entry



Hello all,

Sorry, I forgot to attach the actual patch.  Here it is.

-- 
 - Nathanael Law <njlaw blue-shift ca>
   CTO, BlueShift Innovations Inc.

diff -r -C 3 ./config/gdm.conf.in ../gdm-2.4.2.96p1/config/gdm.conf.in
*** ./config/gdm.conf.in	Wed Jun 25 14:42:37 2003
--- ../gdm-2.4.2.96p1/config/gdm.conf.in	Wed Jul  2 01:56:29 2003
***************
*** 276,281 ****
--- 276,283 ----
  Use24Clock=false
  # Use circles in the password field.  Looks kind of cool actually
  UseCirclesInEntry=false
+ # Set no echo for password fields.  If true, it takes precedence over circles
+ UseSecureEntry=false
  # These two keys are for the new greeter.  Circles is the standard
  # shipped theme
  GraphicalTheme=circles
diff -r -C 3 ./daemon/gdm.h ../gdm-2.4.2.96p1/daemon/gdm.h
*** ./daemon/gdm.h	Wed Jun 25 14:42:37 2003
--- ../gdm-2.4.2.96p1/daemon/gdm.h	Wed Jul  2 01:56:56 2003
***************
*** 247,252 ****
--- 247,253 ----
  #define GDM_KEY_POSITIONY "greeter/PositionY=0"
  #define GDM_KEY_USE_24_CLOCK "greeter/Use24Clock=false"
  #define GDM_KEY_ENTRY_CIRCLES "greeter/UseCirclesInEntry=false"
+ #define GDM_KEY_ENTRY_SECURE "greeter/UseSecureEntry=false"
  #define GDM_KEY_GRAPHICAL_THEME "greeter/GraphicalTheme=circles"
  #define GDM_KEY_GRAPHICAL_THEME_DIR "greeter/GraphicalThemeDir=" EXPANDED_DATADIR "/gdm/themes/"
  
diff -r -C 3 ./gui/gdmlogin.c ../gdm-2.4.2.96p1/gui/gdmlogin.c
*** ./gui/gdmlogin.c	Thu Jun 26 09:48:04 2003
--- ../gdm-2.4.2.96p1/gui/gdmlogin.c	Wed Jul  2 01:58:21 2003
***************
*** 134,139 ****
--- 134,140 ----
  static gboolean GdmShowLastSession;
  
  static gboolean GdmUseCirclesInEntry;
+ static gboolean GdmSecureEntry;
  
  static GtkWidget *login;
  static GtkWidget *logo_frame = NULL;
***************
*** 900,905 ****
--- 901,907 ----
      GdmIconMaxHeight = ve_config_get_int (config, GDM_KEY_ICONHEIGHT);
      GdmXineramaScreen = ve_config_get_int (config, GDM_KEY_XINERAMASCREEN);
      GdmUseCirclesInEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_CIRCLES);
+     GdmSecureEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_SECURE);
      GdmLockPosition = ve_config_get_bool (config, GDM_KEY_LOCK_POSITION);
      GdmSetPosition = ve_config_get_bool (config, GDM_KEY_SET_POSITION);
      GdmPositionX = ve_config_get_int (config, GDM_KEY_POSITIONX);
***************
*** 3359,3364 ****
--- 3361,3368 ----
  		      G_CALLBACK (key_press_event), NULL);
      if (GdmUseCirclesInEntry)
  	    gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x25cf);
+     if (GdmSecureEntry)
+             gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x0000);
      gtk_entry_set_max_length (GTK_ENTRY (entry), 32);
      gtk_widget_set_size_request (entry, 250, -1);
      gtk_widget_ref (entry);
diff -r -C 3 ./gui/gdmsetup-strings.c ../gdm-2.4.2.96p1/gui/gdmsetup-strings.c
*** ./gui/gdmsetup-strings.c	Thu Jun 12 17:24:56 2003
--- ../gdm-2.4.2.96p1/gui/gdmsetup-strings.c	Wed Jul  2 01:58:53 2003
***************
*** 13,18 ****
--- 13,19 ----
  gchar *s = N_("Re_mote welcome string: ");
  gchar *s = N_("Standard greeter");
  gchar *s = N_("Graphical greeter");
+ gchar *s = N_("Enable no echo for _password entry");
  gchar *s = N_("Standard greeter");
  gchar *s = N_("Graphical greeter");
  gchar *s = N_("String to be shown in the greeter as welcome.  You can insert %n in here and it will be replaced by the name of your computer.");
diff -r -C 3 ./gui/gdmsetup.c ../gdm-2.4.2.96p1/gui/gdmsetup.c
*** ./gui/gdmsetup.c	Fri Jun  6 17:34:07 2003
--- ../gdm-2.4.2.96p1/gui/gdmsetup.c	Wed Jul  2 01:59:29 2003
***************
*** 1992,1997 ****
--- 1992,2000 ----
  			     GDM_KEY_TIMED_LOGIN_ENABLE,
  			     NULL /* notify_key */);
  
+ 	setup_notify_toggle ("secureentry",
+ 			     GDM_KEY_ENTRY_SECURE,
+ 			     GDM_KEY_ENTRY_SECURE /* notify_key */);
  	setup_notify_toggle ("allowroot",
  			     GDM_KEY_ALLOWROOT,
  			     GDM_KEY_ALLOWROOT /* notify_key */);
diff -r -C 3 ./gui/gdmsetup.glade ../gdm-2.4.2.96p1/gui/gdmsetup.glade
*** ./gui/gdmsetup.glade	Thu Jun 12 17:24:56 2003
--- ../gdm-2.4.2.96p1/gui/gdmsetup.glade	Wed Jul  2 02:02:10 2003
***************
*** 1844,1849 ****
--- 1844,1867 ----
  			  <property name="homogeneous">False</property>
  			  <property name="spacing">6</property>
  
+                           <child>
+                             <widget class="GtkCheckButton" id="secureentry">
+                               <property name="visible">True</property>
+                               <property name="can_focus">True</property>
+                               <property name="label" translatable="yes">Enable no echo for _password entry</property>
+                               <property name="use_underline">True</property>
+                               <property name="relief">GTK_RELIEF_NORMAL</property>
+                               <property name="active">False</property>
+                               <property name="inconsistent">False</property>
+                               <property name="draw_indicator">True</property>
+                             </widget>
+                             <packing>
+                               <property name="padding">0</property>
+                               <property name="expand">False</property>
+                               <property name="fill">False</property>
+                             </packing>
+                           </child>
+ 			  
  			  <child>
  			    <widget class="GtkCheckButton" id="allowroot">
  			      <property name="visible">True</property>
diff -r -C 3 ./gui/greeter/greeter.c ../gdm-2.4.2.96p1/gui/greeter/greeter.c
*** ./gui/greeter/greeter.c	Mon Jun  9 16:28:57 2003
--- ../gdm-2.4.2.96p1/gui/greeter/greeter.c	Wed Jul  2 02:03:32 2003
***************
*** 72,77 ****
--- 72,78 ----
  gchar *GdmWelcome;
  
  gboolean GdmUseCirclesInEntry = FALSE;
+ gboolean GdmSecureEntry = FALSE;
  
  static gboolean used_defaults = FALSE;
  gint greeter_current_delay = 0;
***************
*** 120,125 ****
--- 121,127 ----
        }
      GdmXineramaScreen = ve_config_get_int (config, GDM_KEY_XINERAMASCREEN);
      GdmUseCirclesInEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_CIRCLES);
+     GdmSecureEntry = ve_config_get_bool (config, GDM_KEY_ENTRY_SECURE);
  
      GdmShowXtermFailsafeSession = ve_config_get_bool (config, GDM_KEY_SHOW_XTERM_FAILSAFE);
      GdmShowGnomeFailsafeSession = ve_config_get_bool (config, GDM_KEY_SHOW_GNOME_FAILSAFE);
***************
*** 910,915 ****
--- 912,920 ----
  			  GdmUseCirclesInEntry,
  			  GDM_KEY_ENTRY_CIRCLES) ||
  	     ! bool_same (config,
+ 		          GdmSecureEntry,
+ 			  GDM_KEY_ENTRY_SECURE) ||
+ 	     ! bool_same (config,
  			  GdmShowXtermFailsafeSession,
  			  GDM_KEY_SHOW_XTERM_FAILSAFE) ||
  	     ! bool_same (config,
diff -r -C 3 ./gui/greeter/greeter_canvas_item.c ../gdm-2.4.2.96p1/gui/greeter/greeter_canvas_item.c
*** ./gui/greeter/greeter_canvas_item.c	Thu Jun 26 09:47:00 2003
--- ../gdm-2.4.2.96p1/gui/greeter/greeter_canvas_item.c	Wed Jul  2 02:04:32 2003
***************
*** 299,304 ****
--- 299,306 ----
      gtk_entry_set_has_frame (GTK_ENTRY (entry), FALSE);
      if (GdmUseCirclesInEntry)
        gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x25cf);
+     if (GdmSecureEntry)
+       gtk_entry_set_invisible_char (GTK_ENTRY (entry), 0x0000);
      
      if (item->id != NULL && strcmp (item->id, "user-pw-entry") == 0) {
  	    /* HACK! Add a menubar, this is kind of evil isn't it,
diff -r -C 3 ./gui/greeter/greeter_configuration.h ../gdm-2.4.2.96p1/gui/greeter/greeter_configuration.h
*** ./gui/greeter/greeter_configuration.h	Mon Jun  9 16:28:44 2003
--- ../gdm-2.4.2.96p1/gui/greeter/greeter_configuration.h	Wed Jul  2 02:04:59 2003
***************
*** 2,7 ****
--- 2,8 ----
  #define GREETER_CONFIGURATION_H
  
  extern gboolean GdmUseCirclesInEntry;
+ extern gboolean GdmSecureEntry;
  #if 0
  /* FIXME: maybe just whack this */
  extern gboolean GdmShowGnomeChooserSession;


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