]> git.pld-linux.org Git - packages/gdm2.20.git/blob - gdm-fixmessages.patch
- some patches from helixcode
[packages/gdm2.20.git] / gdm-fixmessages.patch
1 --- gdm-2.0beta4/gui/gdmlogin.c.fixmessages     Tue Oct  3 14:28:29 2000
2 +++ gdm-2.0beta4/gui/gdmlogin.c Tue Oct  3 14:29:03 2000
3 @@ -64,6 +64,7 @@
4  static GtkWidget *label;
5  static GtkWidget *entry;
6  static GtkWidget *msg;
7 +static gboolean first_message = TRUE;
8  static GtkWidget *win;
9  static GtkWidget *sessmenu;
10  static GtkWidget *langmenu;
11 @@ -812,6 +813,15 @@
12      case GDM_PROMPT:
13         g_io_channel_read (source, buf, PIPE_SIZE-1, &len);
14         buf[len-1] = '\0';
15 +
16 +       /* Turn off the message whenever the prompt changes,
17 +          this is sort of a hack. Also, don't turn it off
18 +          the first time. Yeah I know.  */
19 +       if (first_message)
20 +         first_message = FALSE;
21 +       else
22 +         gtk_label_set (GTK_LABEL(msg), "");
23 +
24         gtk_label_set (GTK_LABEL (label), buf);
25         gtk_widget_show (GTK_WIDGET (label));
26         gtk_entry_set_text (GTK_ENTRY (entry), "");
27 @@ -824,6 +834,15 @@
28      case GDM_NOECHO:
29         g_io_channel_read (source, buf, PIPE_SIZE-1, &len);
30         buf[len-1] = '\0';
31 +
32 +       /* Turn off the message whenever the prompt changes,
33 +          this is sort of a hack. Also, don't turn it off
34 +          the first time. Yeah I know.  */
35 +       if (first_message)
36 +         first_message = FALSE;
37 +       else
38 +         gtk_label_set (GTK_LABEL(msg), "");
39 +
40         gtk_label_set (GTK_LABEL(label), buf);
41         gtk_widget_show (GTK_WIDGET (label));
42         gtk_entry_set_text (GTK_ENTRY (entry), "");
43 @@ -1254,6 +1273,7 @@
44                       (GtkAttachOptions) (GTK_FILL), 0, 10);
45          
46      msg = gtk_label_new (_("Please enter your login"));
47 +    first_message = TRUE;
48      gtk_widget_set_name(msg, "Message");
49      gtk_widget_ref (msg);
50      gtk_object_set_data_full (GTK_OBJECT (login), "msg", msg,
This page took 0.034492 seconds and 4 git commands to generate.