diff -u fast-user-switch-applet-2.24.0/debian/changelog fast-user-switch-applet-2.24.0/debian/changelog
--- fast-user-switch-applet-2.24.0/debian/changelog
+++ fast-user-switch-applet-2.24.0/debian/changelog
@@ -1,3 +1,12 @@
+fast-user-switch-applet (2.24.0-0ubuntu5) intrepid; urgency=low
+
+  * 82_gdm_guest_session.patch: Update by ion to make it so that the
+    Guest session menu item hides if there is already a guest logged
+    into the system.  Fixes LP: #281971
+  * 91_ltsp_new_features.patch: Update for changes to 82 above.
+
+ -- Ted Gould <ted@ubuntu.com>  Tue, 21 Oct 2008 10:40:12 -0500
+
 fast-user-switch-applet (2.24.0-0ubuntu4) intrepid; urgency=low
 
   * 84_session_management.patch: Update to watch for, and respond to
diff -u fast-user-switch-applet-2.24.0/debian/patches/91_ltsp_new_features.patch fast-user-switch-applet-2.24.0/debian/patches/91_ltsp_new_features.patch
--- fast-user-switch-applet-2.24.0/debian/patches/91_ltsp_new_features.patch
+++ fast-user-switch-applet-2.24.0/debian/patches/91_ltsp_new_features.patch
@@ -1,25 +1,7 @@
 === modified file 'src/applet.c'
---- src/applet.c	2008-10-16 19:33:44 +0000
-+++ src/applet.c	2008-10-16 19:35:02 +0000
-@@ -831,7 +831,7 @@
-   /* if we are not a system user (like the guest user itself), and we have
-    * gdm-guest-session installed, offer it */
-   if (show_guest && access ("/usr/share/gdm/guest-session/guest-session-launch", X_OK) == 0
--      && geteuid() >= 500)
-+      && geteuid() >= 500 && !g_getenv("LTSP_CLIENT"))
-     {
-       gtk_widget_show (adata->guest_session_item);
-     }
-@@ -1865,7 +1865,7 @@
-     {
-       gboolean show_guest = gconf_client_get_bool (adata->client, SHOW_GUEST_KEY, NULL);
- 	  if (show_guest && access ("/usr/share/gdm/guest-session/guest-session-launch", X_OK) == 0
--		  && geteuid() >= 500) {
-+		  && geteuid() >= 500 && !g_getenv("LTSP_CLIENT")) {
-           gtk_widget_show (adata->guest_session_item);
- 	  } else {
-           gtk_widget_hide (adata->guest_session_item);
-@@ -2378,7 +2378,6 @@
+--- src/applet.c	2008-10-21 15:25:06 +0000
++++ src/applet.c	2008-10-21 15:25:22 +0000
+@@ -2392,7 +2392,6 @@
      } else {
        g_warning("GDM Command failed: ERROR");
      }
@@ -27,7 +9,17 @@
    }
  
    GnomeClient * client;
-@@ -3009,7 +3008,8 @@
+@@ -2415,7 +2414,8 @@
+    * gdm-guest-session installed, offer it */
+   if (show_guest && !adata->guest_active &&
+       access ("/usr/share/gdm/guest-session/guest-session-launch", X_OK) == 0 &&
+-      geteuid() >= 500)
++      geteuid() >= 500 &&
++	  !g_getenv("LTSP_CLIENT"))
+     gtk_widget_show (adata->guest_session_item);
+   else
+     gtk_widget_hide (adata->guest_session_item);
+@@ -3037,7 +3037,8 @@
  	if (adata->hibernate_available) {
  		gtk_widget_show(adata->hibernate_item);
  	}
diff -u fast-user-switch-applet-2.24.0/debian/patches/82_gdm_guest_session.patch fast-user-switch-applet-2.24.0/debian/patches/82_gdm_guest_session.patch
--- fast-user-switch-applet-2.24.0/debian/patches/82_gdm_guest_session.patch
+++ fast-user-switch-applet-2.24.0/debian/patches/82_gdm_guest_session.patch
@@ -22,7 +22,7 @@
 
 === modified file 'src/applet.c'
 --- src/applet.c	2008-08-30 04:53:45 +0000
-+++ src/applet.c	2008-09-10 20:26:27 +0000
++++ src/applet.c	2008-10-21 15:19:03 +0000
 @@ -73,6 +73,7 @@
  #define GLOBAL_DIR	"/apps/fast-user-switch-applet"
  #define SHOW_WINDOW_KEY	"/apps/fast-user-switch-applet/show_window_item"
@@ -39,7 +39,16 @@
    GSList *items;
  
    guint client_notify_applet_id;
-@@ -222,6 +224,8 @@
+@@ -106,6 +108,8 @@
+   GQuark user_menu_item_quark;
+   gint8 pixel_size;
+   GtkIconSize icon_size;
++
++  gboolean guest_active;
+ }
+ FusaAppletData;
+ 
+@@ -222,11 +226,14 @@
  					       gpointer         data);
  static void     login_window_activate_cb      (GtkMenuItem     *item,
  					       gpointer         data);
@@ -48,16 +57,54 @@
  static void     user_notify_display_name_cb   (GObject         *object,
  					       GParamSpec      *pspec,
  					       gpointer         data);
-@@ -296,7 +300,7 @@
-   GtkWidget *menuitem, *hbox;
-   GSList *users;
-   gchar *tmp, *key, *value;
--  gboolean use_xnest, active_only;
-+  gboolean use_xnest, active_only, show_guest;
-   BonoboUIComponent *popup_component;
  
-   if (strcmp (iid, "OAFIID:GNOME_FastUserSwitchApplet") != 0)
-@@ -581,9 +585,28 @@
+ /* Utility Functions */
++static void      show_hide_guest              (FusaAppletData *adata);
+ static void      reset_login_screen_item      (GtkWidget      *widget,
+ 					       gboolean        use_xnest_value,
+ 					       const gchar    *pref_value);
+@@ -505,9 +512,23 @@
+    * one to be initialised needs to be filled in from the start rather than
+    * depending on getting data from the callback like the first one.
+    */
++  adata->guest_active = FALSE;
+   users = fusa_manager_list_users (adata->manager);
+   while (users)
+     {
++      GSList *displays;
++      gboolean is_active = FALSE;
++
++      displays = fusa_user_get_displays (users->data);
++      if (displays)
++	{
++	  is_active = TRUE;
++	  g_slist_free (displays);
++	}
++
++      if (strcmp (fusa_user_get_user_name(users->data), "guest") == 0)
++	adata->guest_active = is_active;
++
+       menuitem = fusa_user_menu_item_new (users->data);
+       g_object_set_qdata (users->data, adata->user_menu_item_quark, menuitem);
+       g_signal_connect (menuitem, "style-set",
+@@ -521,14 +542,8 @@
+ 
+       if (active_only)
+ 	{
+-	  GSList *displays;
+-
+-	  displays = fusa_user_get_displays (users->data);
+-	  if (displays)
+-	    {
+-	      g_slist_free (displays);
+-	      gtk_widget_show (menuitem);
+-	    }
++	  if (is_active)
++	    gtk_widget_show (menuitem);
+ 	}
+       else
+ 	gtk_widget_show (menuitem);
+@@ -581,9 +596,21 @@
    reset_login_window_item (adata->login_window_item, use_xnest, value);
    g_free (value);
  
@@ -70,47 +117,119 @@
 +					G_CALLBACK (guest_session_activate_cb), adata);
 +  adata->items = g_slist_prepend (adata->items, adata->guest_session_item);
 +
-+  show_guest = gconf_client_get_bool (adata->client, SHOW_GUEST_KEY, NULL);
-+  /* if we are not a system user (like the guest user itself), and we have
-+   * gdm-guest-session installed, offer it */
-+  if (show_guest && access ("/usr/share/gdm/guest-session/guest-session-launch", X_OK) == 0
-+      && geteuid() >= 500)
-+    {
-+      gtk_widget_show (adata->guest_session_item);
-+    }
++  show_hide_guest (adata);
 +
    if (g_getenv ("LTSP_CLIENT") && (
        GTK_WIDGET_VISIBLE (adata->login_screen_item) ||
 -	  GTK_WIDGET_VISIBLE (adata->login_window_item)))
 +      GTK_WIDGET_VISIBLE (adata->login_window_item) ||
-+	  GTK_WIDGET_VISIBLE (adata->guest_session_item)))
++      GTK_WIDGET_VISIBLE (adata->guest_session_item)))
      gtk_widget_show (adata->separator_item);
    else
      gtk_widget_hide (adata->separator_item);
-@@ -1517,10 +1540,21 @@
+@@ -1215,7 +1242,8 @@
+ {
+   FusaAppletData *adata;
+   GtkWidget *menuitem;
+-  gboolean active_only;
++  gboolean active_only, is_active = FALSE;
++  GSList *displays;
+ 
+   adata = data;
+ 
+@@ -1230,17 +1258,24 @@
+   gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu), menuitem);
+   adata->items = g_slist_prepend (adata->items, menuitem);
+ 
++  displays = fusa_user_get_displays (user);
++  if (displays)
++    {
++      is_active = TRUE;
++      g_slist_free (displays);
++    }
++
++  if (strcmp (fusa_user_get_user_name(user), "guest") == 0)
++    {
++      adata->guest_active = is_active;
++      show_hide_guest (adata);
++    }
++
+   active_only = gconf_client_get_bool (adata->client, ACTIVE_ONLY_KEY, NULL);
+   if (active_only)
+     {
+-      GSList *displays;
+-
+-      displays = fusa_user_get_displays (user);
+-      if (displays)
+-	{
+-	  g_slist_free (displays);
+-	  gtk_widget_show (menuitem);
+-	}
++      if (is_active)
++	gtk_widget_show (menuitem);
+     }
+   else
+     gtk_widget_show (menuitem);
+@@ -1285,24 +1320,32 @@
+ {
+   FusaAppletData *adata;
+   GtkWidget *menuitem;
+-  gboolean active_only;
++  gboolean active_only, is_active = FALSE;
++  GSList *displays;
+ 
+   adata = data;
+   menuitem = g_object_get_qdata (G_OBJECT (user), adata->user_menu_item_quark);
+   if (!menuitem)
+     return;
+ 
++  displays = fusa_user_get_displays (user);
++  if (displays)
++    {
++      is_active = TRUE;
++      g_slist_free (displays);
++    }
++
++  if (strcmp (fusa_user_get_user_name(user), "guest") == 0)
++    {
++      adata->guest_active = is_active;
++      show_hide_guest (adata);
++    }
++
+   active_only = gconf_client_get_bool (adata->client, ACTIVE_ONLY_KEY, NULL);
+   if (active_only)
+     {
+-      GSList *displays;
+-
+-      displays = fusa_user_get_displays (user);
+-      if (displays)
+-	{
+-	  g_slist_free (displays);
+-	  gtk_widget_show (menuitem);
+-	}
++      if (is_active)
++	gtk_widget_show (menuitem);
+       else
+ 	gtk_widget_hide (menuitem);
+     }
+@@ -1517,10 +1560,15 @@
  	  items = items->next;
  	}
      }
 +  else if (strcmp (key, SHOW_GUEST_KEY) == 0)
 +    {
-+      gboolean show_guest = gconf_client_get_bool (adata->client, SHOW_GUEST_KEY, NULL);
-+	  if (show_guest && access ("/usr/share/gdm/guest-session/guest-session-launch", X_OK) == 0
-+		  && geteuid() >= 500) {
-+          gtk_widget_show (adata->guest_session_item);
-+	  } else {
-+          gtk_widget_hide (adata->guest_session_item);
-+	  }
++      show_hide_guest (adata);
 +    }
  
    if (g_getenv ("LTSP_CLIENT") && (
        GTK_WIDGET_VISIBLE (adata->login_screen_item) ||
 -	  GTK_WIDGET_VISIBLE (adata->login_window_item)))
 +      GTK_WIDGET_VISIBLE (adata->login_window_item) ||
-+	  GTK_WIDGET_VISIBLE (adata->guest_session_item)))
++      GTK_WIDGET_VISIBLE (adata->guest_session_item)))
      gtk_widget_show (adata->separator_item);
    else
      gtk_widget_hide (adata->separator_item);
-@@ -1887,6 +1921,14 @@
+@@ -1887,6 +1935,14 @@
  }
  
  static void
@@ -127,2 +246,23 @@
  {
+@@ -1937,6 +1993,20 @@
+  * ******************* */
+ 
+ static void
++show_hide_guest (FusaAppletData *adata)
++{
++  gboolean show_guest = gconf_client_get_bool (adata->client, SHOW_GUEST_KEY, NULL);
++  /* if we are not a system user (like the guest user itself), and we have
++   * gdm-guest-session installed, offer it */
++  if (show_guest && !adata->guest_active &&
++      access ("/usr/share/gdm/guest-session/guest-session-launch", X_OK) == 0 &&
++      geteuid() >= 500)
++    gtk_widget_show (adata->guest_session_item);
++  else
++    gtk_widget_hide (adata->guest_session_item);
++}
++
++static void
+ reset_login_screen_item (GtkWidget   *widget,
+ 			 gboolean     use_xnest_value,
+ 			 const gchar *pref_value)
 
diff -u fast-user-switch-applet-2.24.0/debian/patches/84_session_management.patch fast-user-switch-applet-2.24.0/debian/patches/84_session_management.patch
--- fast-user-switch-applet-2.24.0/debian/patches/84_session_management.patch
+++ fast-user-switch-applet-2.24.0/debian/patches/84_session_management.patch
@@ -23,8 +23,8 @@
        <owner>fast-user-switch-applet</owner>
 
 === modified file 'src/applet.c'
---- src/applet.c	2008-09-10 20:26:27 +0000
-+++ src/applet.c	2008-10-16 19:32:35 +0000
+--- src/applet.c	2008-10-21 15:19:03 +0000
++++ src/applet.c	2008-10-21 15:24:14 +0000
 @@ -53,13 +53,17 @@
  
  #include <libgnome/gnome-init.h>
@@ -70,10 +70,10 @@
    GtkWidget *guest_session_item;
    GSList *items;
  
-@@ -108,6 +122,14 @@
-   GQuark user_menu_item_quark;
-   gint8 pixel_size;
+@@ -110,6 +124,14 @@
    GtkIconSize icon_size;
+ 
+   gboolean guest_active;
 +
 +  gboolean hibernate_available;
 +  gboolean suspend_available;
@@ -85,7 +85,7 @@
  }
  FusaAppletData;
  
-@@ -229,6 +251,15 @@
+@@ -231,6 +253,15 @@
  static void     user_notify_display_name_cb   (GObject         *object,
  					       GParamSpec      *pspec,
  					       gpointer         data);
@@ -100,8 +100,8 @@
 +                           gpointer data);
  
  /* Utility Functions */
- static void      reset_login_screen_item      (GtkWidget      *widget,
-@@ -256,6 +287,13 @@
+ static void      show_hide_guest              (FusaAppletData *adata);
+@@ -259,6 +290,13 @@
  static void      make_label_larger            (GtkLabel       *label);
  static void      make_label_small_italic      (GtkLabel       *label);
  static void      fusa_applet_data_free        (FusaAppletData *adata);
@@ -115,7 +115,7 @@
  
  
  /* ****************** *
-@@ -265,7 +303,6 @@
+@@ -268,7 +306,6 @@
  static GtkTooltips *tooltips = NULL;
  static GnomeProgram *program = NULL;
  
@@ -123,7 +123,7 @@
  /* *************************** *
   *  Applet main() Declaration  *
   * *************************** */
-@@ -319,6 +356,8 @@
+@@ -322,6 +359,8 @@
  				    GNOME_PROGRAM_STANDARD_PROPERTIES,
  				    NULL);
  
@@ -132,7 +132,7 @@
        /* Do this here so it's only done once. */
        gtk_rc_parse_string ("style \"fast-user-switch-menubar-style\"\n"
  			   "{\n"
-@@ -342,6 +381,28 @@
+@@ -345,6 +384,28 @@
    adata->client = gconf_client_get_default ();
    adata->manager = fusa_manager_ref_default ();
  
@@ -161,7 +161,7 @@
    tmp = g_strdup_printf ("applet-user-menu-item-%p", adata);
    adata->user_menu_item_quark = g_quark_from_string (tmp);
    g_free (tmp);
-@@ -355,7 +416,7 @@
+@@ -358,7 +419,7 @@
    else
      g_object_ref (tooltips);
  
@@ -170,7 +170,7 @@
    gtk_container_set_border_width (GTK_CONTAINER (applet), 0);
    gtk_widget_set_name (GTK_WIDGET (applet), "fast-user-switch-applet");
    panel_applet_set_flags (applet, PANEL_APPLET_EXPAND_MINOR);
-@@ -546,10 +607,12 @@
+@@ -557,10 +618,12 @@
    g_signal_connect (adata->manager, "user-added",
  		    G_CALLBACK (manager_user_added_cb), adata);
  
@@ -183,7 +183,7 @@
    adata->login_screen_item = gtk_image_menu_item_new_with_label (_("Other"));
    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_screen_item),
  				 gtk_image_new ());
-@@ -563,6 +626,7 @@
+@@ -574,6 +637,7 @@
  		    G_CALLBACK (login_screen_activate_cb), adata);
    adata->items = g_slist_prepend (adata->items, adata->login_screen_item);
  
@@ -191,7 +191,7 @@
    adata->login_window_item = gtk_image_menu_item_new_with_label (_("Login Window"));
    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_window_item),
  				 gtk_image_new ());
-@@ -576,6 +640,79 @@
+@@ -587,6 +651,79 @@
  		    G_CALLBACK (login_window_activate_cb), adata);
    adata->items = g_slist_prepend (adata->items, adata->login_window_item);
  
@@ -271,7 +271,7 @@
    use_xnest = panel_applet_gconf_get_bool (applet, USE_XNEST_KEY, NULL);
    value = gconf_client_get_string (adata->client, SHOW_SCREEN_KEY, NULL);
    reset_login_screen_item (adata->login_screen_item, use_xnest, value);
-@@ -631,7 +768,7 @@
+@@ -635,7 +772,7 @@
  			     client_notify_global_func, adata, NULL, NULL);
  
    adata->client_notify_lockdown_id =
@@ -280,7 +280,7 @@
                               client_notify_lockdown_func, adata, NULL, NULL);
  
    adata->items = g_slist_sort_with_data (adata->items,
-@@ -1193,6 +1330,7 @@
+@@ -1197,6 +1334,7 @@
  }
  
  
@@ -288,7 +288,7 @@
  /* *********************** *
   *  FusaManager Callbacks  *
   * *********************** */
-@@ -1300,6 +1438,11 @@
+@@ -1312,6 +1450,11 @@
            gtk_widget_show ( GTK_WIDGET (adata->applet));
          }
      }
@@ -300,7 +300,7 @@
  }            
  
  static void
-@@ -1335,7 +1478,6 @@
+@@ -1355,7 +1498,6 @@
    sort_menu (adata);
  }
  
@@ -308,9 +308,9 @@
  /* *********************** *
   *  GConfClient Callbacks  *
   * *********************** */
-@@ -1550,6 +1692,10 @@
-           gtk_widget_hide (adata->guest_session_item);
- 	  }
+@@ -1564,6 +1706,10 @@
+     {
+       show_hide_guest (adata);
      }
 +  else if (strcmp (key, SHOW_SESSION_COMMANDS) == 0)
 +    {
@@ -319,7 +319,7 @@
  
    if (g_getenv ("LTSP_CLIENT") && (
        GTK_WIDGET_VISIBLE (adata->login_screen_item) ||
-@@ -1973,6 +2119,100 @@
+@@ -1987,6 +2133,100 @@
    gtk_label_set_text (data, fusa_user_get_display_name (FUSA_USER (object)));
  }
  
@@ -420,7 +420,7 @@
  
  /* ******************* *
   *  Utility Functions  *
-@@ -2536,3 +2776,114 @@
+@@ -2564,3 +2804,114 @@
  
    g_free (adata);
  }
diff -u fast-user-switch-applet-2.24.0/debian/patches/86_fusa_menu_item_changes.patch fast-user-switch-applet-2.24.0/debian/patches/86_fusa_menu_item_changes.patch
--- fast-user-switch-applet-2.24.0/debian/patches/86_fusa_menu_item_changes.patch
+++ fast-user-switch-applet-2.24.0/debian/patches/86_fusa_menu_item_changes.patch
@@ -1,7 +1,7 @@
 === modified file 'src/applet.c'
---- src/applet.c	2008-10-16 19:32:35 +0000
-+++ src/applet.c	2008-10-16 19:33:21 +0000
-@@ -597,6 +597,11 @@
+--- src/applet.c	2008-10-21 15:24:14 +0000
++++ src/applet.c	2008-10-21 15:24:40 +0000
+@@ -608,6 +608,11 @@
  	}
        else
  	gtk_widget_show (menuitem);
@@ -13,7 +13,7 @@
        g_signal_connect (users->data, "displays-changed",
  			G_CALLBACK (user_displays_changed_cb), adata);
  
-@@ -613,9 +618,7 @@
+@@ -624,9 +629,7 @@
    adata->items = g_slist_prepend (adata->items, adata->separator_item);
  
    /* Add the 'other user' entry */
@@ -24,7 +24,7 @@
    gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
  			  adata->login_screen_item);
    g_signal_connect (adata->login_screen_item, "style-set",
-@@ -730,6 +733,10 @@
+@@ -741,6 +744,10 @@
    g_signal_connect (adata->guest_session_item, "activate",
  					G_CALLBACK (guest_session_activate_cb), adata);
    adata->items = g_slist_prepend (adata->items, adata->guest_session_item);
@@ -33,9 +33,9 @@
 +  gtk_misc_get_padding(GTK_MISC(guest_label), &xpad, &ypad);
 +  gtk_misc_set_padding(GTK_MISC(guest_label), xpad + FUSA_USER_MENU_ITEM_PAD, ypad);
  
-   show_guest = gconf_client_get_bool (adata->client, SHOW_GUEST_KEY, NULL);
-   /* if we are not a system user (like the guest user itself), and we have
-@@ -1405,6 +1412,11 @@
+   show_hide_guest (adata);
+ 
+@@ -1417,6 +1424,11 @@
      }
    else
      gtk_widget_show (menuitem);
@@ -47,7 +47,7 @@
    g_signal_connect (user, "displays-changed",
  		    G_CALLBACK (user_displays_changed_cb), adata);
    sort_menu (adata);
-@@ -1475,6 +1487,10 @@
+@@ -1495,6 +1507,10 @@
    else
      gtk_widget_show (menuitem);
  
@@ -58,7 +58,7 @@
    sort_menu (adata);
  }
  
-@@ -2535,10 +2551,22 @@
+@@ -2563,10 +2579,22 @@
    column = 0;
    count = 0;
    items = adata->items;
@@ -81,7 +81,7 @@
  	  gtk_menu_attach (GTK_MENU (adata->menu), items->data,
  			   column, column + 1, row, row + 1);
  	  row++;
-@@ -2556,6 +2584,7 @@
+@@ -2584,6 +2612,7 @@
                items->data, count++);
  	}
  
diff -u fast-user-switch-applet-2.24.0/debian/patches/88_status_icons.patch fast-user-switch-applet-2.24.0/debian/patches/88_status_icons.patch
--- fast-user-switch-applet-2.24.0/debian/patches/88_status_icons.patch
+++ fast-user-switch-applet-2.24.0/debian/patches/88_status_icons.patch
@@ -1337,8 +1337,8 @@
 +</svg>
 
 === modified file 'src/applet.c'
---- src/applet.c	2008-10-16 19:33:21 +0000
-+++ src/applet.c	2008-10-16 19:33:31 +0000
+--- src/applet.c	2008-10-21 15:24:40 +0000
++++ src/applet.c	2008-10-21 15:24:52 +0000
 @@ -85,6 +85,8 @@
  #define LOCKDOWN_KEY    LOCKDOWN_DIR "/disable_user_switching"
  #define LOCK_SCREEN_KEY  LOCKDOWN_DIR "/disable_lock_screen"
@@ -1348,7 +1348,7 @@
  /* ******************** *
   *  Private Structures  *
   * ******************** */
-@@ -358,6 +360,10 @@
+@@ -361,6 +363,10 @@
  
        g_type_init();
  
diff -u fast-user-switch-applet-2.24.0/debian/patches/90_status_management.patch fast-user-switch-applet-2.24.0/debian/patches/90_status_management.patch
--- fast-user-switch-applet-2.24.0/debian/patches/90_status_management.patch
+++ fast-user-switch-applet-2.24.0/debian/patches/90_status_management.patch
@@ -112,8 +112,8 @@
  #  Testing Application  #
 
 === modified file 'src/applet.c'
---- src/applet.c	2008-10-16 19:33:31 +0000
-+++ src/applet.c	2008-10-16 19:33:44 +0000
+--- src/applet.c	2008-10-21 15:24:52 +0000
++++ src/applet.c	2008-10-21 15:25:06 +0000
 @@ -61,6 +61,7 @@
  #include <dbus/dbus-glib.h>
  
@@ -160,7 +160,7 @@
    GSList *items;
  
    guint client_notify_applet_id;
-@@ -186,6 +194,28 @@
+@@ -188,6 +196,28 @@
  			 gpointer           data,
  			 const gchar       *cname);
  
@@ -189,7 +189,7 @@
  /* FusaManager Callbacks */
  static void manager_user_added_cb       (FusaManager  *manager,
  					 FusaUser     *user,
-@@ -205,6 +235,13 @@
+@@ -207,6 +237,13 @@
  static void user_displays_changed_cb    (FusaUser *user,
  					 gpointer  data);
  
@@ -203,7 +203,7 @@
  /* GConfClient Callbacks */
  static void client_notify_applet_func (GConfClient *client,
  				       guint        cnxn_id,
-@@ -359,6 +396,7 @@
+@@ -362,6 +399,7 @@
  				    NULL);
  
        g_type_init();
@@ -211,7 +211,7 @@
  
        /* Add App specific icons to the search path */
        gtk_icon_theme_append_search_path(gtk_icon_theme_get_default(),
-@@ -369,11 +407,15 @@
+@@ -372,11 +410,15 @@
  			   "{\n"
  			     "GtkMenuBar::shadow-type = none\n"
  			     "GtkMenuBar::internal-padding = 0\n"
@@ -227,7 +227,7 @@
  			   "}\n"
  			   "widget \"*.fast-user-switch-menubar\" style \"fast-user-switch-menubar-style\"\n"
  			   "widget \"*.fast-user-switch-applet\" style \"fast-user-switch-applet-style\"\n");
-@@ -386,6 +428,7 @@
+@@ -389,6 +431,7 @@
  
    adata->client = gconf_client_get_default ();
    adata->manager = fusa_manager_ref_default ();
@@ -235,7 +235,7 @@
  
    discover_pm_abilities(adata);
  
-@@ -510,14 +553,17 @@
+@@ -513,14 +556,17 @@
    g_signal_connect_after (adata->menubar, "expose-event",
  			  G_CALLBACK (menubar_expose_event_cb), adata);
    gtk_container_add (GTK_CONTAINER (applet), adata->menubar);
@@ -253,7 +253,7 @@
    gtk_widget_show (hbox);
    
    value = panel_applet_gconf_get_string (applet, DISPLAY_KEY, NULL);
-@@ -558,6 +604,16 @@
+@@ -561,6 +607,16 @@
      }
    g_free (value);
  
@@ -270,7 +270,7 @@
    adata->menu = gtk_menu_new ();
    gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), adata->menu);
    g_signal_connect (adata->menu, "style-set",
-@@ -566,6 +622,63 @@
+@@ -569,6 +625,63 @@
  		    G_CALLBACK (menu_expose_cb), adata);
    gtk_widget_show (adata->menu);
  
@@ -334,7 +334,7 @@
    active_only = gconf_client_get_bool (adata->client, ACTIVE_ONLY_KEY, NULL);
  
    /* This next part populates the list with all the users we currently know
-@@ -618,23 +731,6 @@
+@@ -629,23 +742,6 @@
    g_signal_connect (adata->manager, "user-added",
  		    G_CALLBACK (manager_user_added_cb), adata);
  
@@ -358,7 +358,7 @@
    /* Add an entry for a login window */
    adata->login_window_item = gtk_image_menu_item_new_with_label (_("Login Window"));
    gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (adata->login_window_item),
-@@ -647,26 +743,13 @@
+@@ -658,26 +754,13 @@
  		    G_CALLBACK (menuitem_destroy_cb), adata);
    g_signal_connect (adata->login_window_item, "activate",
  		    G_CALLBACK (login_window_activate_cb), adata);
@@ -386,7 +386,7 @@
    gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
  			  adata->close_session_item);
    g_signal_connect (adata->close_session_item, "style-set",
-@@ -710,7 +793,7 @@
+@@ -721,7 +804,7 @@
  		    G_CALLBACK (session_activate_cb), (gpointer)(GDM_CMD_SET_SAFE_LOGOUT_ACTION " " GDM_CMD_LOGOUT_ACTION_REBOOT));
  
    /* Add entry for shutdown */
@@ -395,14 +395,14 @@
    gtk_menu_shell_append (GTK_MENU_SHELL (adata->menu),
  			  adata->shutdown_item);
    g_signal_connect (adata->shutdown_item, "style-set",
-@@ -753,14 +836,6 @@
-       gtk_widget_show (adata->guest_session_item);
-     }
+@@ -757,14 +840,6 @@
+ 
+   show_hide_guest (adata);
  
 -  if (g_getenv ("LTSP_CLIENT") && (
 -      GTK_WIDGET_VISIBLE (adata->login_screen_item) ||
 -      GTK_WIDGET_VISIBLE (adata->login_window_item) ||
--	  GTK_WIDGET_VISIBLE (adata->guest_session_item)))
+-      GTK_WIDGET_VISIBLE (adata->guest_session_item)))
 -    gtk_widget_show (adata->separator_item);
 -  else
 -    gtk_widget_hide (adata->separator_item);
@@ -410,7 +410,7 @@
    key = panel_applet_gconf_get_full_key (applet, DISPLAY_KEY);
    if (key)
      {
-@@ -1342,6 +1417,50 @@
+@@ -1346,6 +1421,50 @@
    g_free (license_i18n);
  }
  
@@ -461,7 +461,7 @@
  
  
  /* *********************** *
-@@ -1500,6 +1619,50 @@
+@@ -1520,6 +1639,50 @@
    sort_menu (adata);
  }
  
@@ -512,7 +512,7 @@
  /* *********************** *
   *  GConfClient Callbacks  *
   * *********************** */
-@@ -1637,12 +1800,6 @@
+@@ -1657,12 +1820,6 @@
        reset_login_window_item (adata->login_window_item,
  			       gconf_value_get_bool (value), str);
        g_free (str);
@@ -525,7 +525,7 @@
      }
  
    g_free (key);
-@@ -1718,14 +1875,10 @@
+@@ -1732,14 +1889,10 @@
      {
  	  update_session_ui(adata);
      }
@@ -533,7 +533,7 @@
 -  if (g_getenv ("LTSP_CLIENT") && (
 -      GTK_WIDGET_VISIBLE (adata->login_screen_item) ||
 -      GTK_WIDGET_VISIBLE (adata->login_window_item) ||
--	  GTK_WIDGET_VISIBLE (adata->guest_session_item)))
+-      GTK_WIDGET_VISIBLE (adata->guest_session_item)))
 -    gtk_widget_show (adata->separator_item);
 -  else
 -    gtk_widget_hide (adata->separator_item);
@@ -544,7 +544,7 @@
  
    sort_menu (adata);
  }
-@@ -2491,7 +2644,6 @@
+@@ -2519,7 +2672,6 @@
  			   gconstpointer b,
  			   gpointer      data)
  {
@@ -552,7 +552,7 @@
    gboolean a_is_user, b_is_user;
  
    a_is_user = FUSA_IS_USER_MENU_ITEM (a);
-@@ -2507,19 +2659,6 @@
+@@ -2535,19 +2687,6 @@
      return fusa_user_collate (fusa_user_menu_item_get_user ((FusaUserMenuItem *) a),
  			      fusa_user_menu_item_get_user ((FusaUserMenuItem *) b));
  
@@ -572,7 +572,7 @@
    return 0;
  }
  
-@@ -2538,6 +2677,18 @@
+@@ -2566,6 +2705,18 @@
  
    screen_height = gdk_screen_get_height (gtk_widget_get_screen (adata->menu));
  
@@ -591,7 +591,7 @@
    n_items = 0;
    items = adata->items;
    while (items)
-@@ -2573,8 +2724,10 @@
+@@ -2601,8 +2752,10 @@
  	    fusa_user_menu_item_set_conflict(items->data, FALSE);
  	  }
  
@@ -603,7 +603,7 @@
  	  row++;
  	  if (row > n_rows)
  	    {
-@@ -2587,7 +2740,8 @@
+@@ -2615,7 +2768,8 @@
             * have to set that explicitly.
             */
            gtk_menu_reorder_child (GTK_MENU (adata->menu),
