Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] (PR#10625) [PATCH] Make the password labels insensitive
Home

[Freeciv-Dev] (PR#10625) [PATCH] Make the password labels insensitive

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10625) [PATCH] Make the password labels insensitive
From: "Vasco Alexandre da Silva Costa" <vasc@xxxxxxxxxxxxxx>
Date: Tue, 19 Oct 2004 11:28:47 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10625 >

This transaction appears to have no content
Index: client/gui-gtk-2.0/pages.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/pages.c,v
retrieving revision 1.1
diff -u -r1.1 pages.c
--- client/gui-gtk-2.0/pages.c  18 Oct 2004 23:52:54 -0000      1.1
+++ client/gui-gtk-2.0/pages.c  19 Oct 2004 18:21:39 -0000
@@ -230,11 +230,11 @@
 /**************************************************************************
                                  NETWORK PAGE
 **************************************************************************/
-static GtkWidget *network_login;
-static GtkWidget *network_host;
-static GtkWidget *network_port;
-static GtkWidget *network_password;
-static GtkWidget *network_confirm_password;
+static GtkWidget *network_login_label, *network_login;
+static GtkWidget *network_host_label, *network_host;
+static GtkWidget *network_port_label, *network_port;
+static GtkWidget *network_password_label, *network_password;
+static GtkWidget *network_confirm_password_label, *network_confirm_password;
 
 static GtkWidget *network_statusbar;
 
@@ -360,7 +360,9 @@
     gtk_widget_set_sensitive(network_host, TRUE);
     gtk_widget_set_sensitive(network_port, TRUE);
     gtk_widget_set_sensitive(network_login, TRUE);
+    gtk_widget_set_sensitive(network_password_label, FALSE);
     gtk_widget_set_sensitive(network_password, FALSE);
+    gtk_widget_set_sensitive(network_confirm_password_label, FALSE);
     gtk_widget_set_sensitive(network_confirm_password, FALSE);
     break;
   case NEW_PASSWORD_TYPE:
@@ -370,7 +372,9 @@
     gtk_widget_set_sensitive(network_host, FALSE);
     gtk_widget_set_sensitive(network_port, FALSE);
     gtk_widget_set_sensitive(network_login, FALSE);
+    gtk_widget_set_sensitive(network_password_label, TRUE);
     gtk_widget_set_sensitive(network_password, TRUE);
+    gtk_widget_set_sensitive(network_confirm_password_label, TRUE);
     gtk_widget_set_sensitive(network_confirm_password, TRUE);
 
     gtk_widget_grab_focus(network_password);
@@ -382,7 +386,9 @@
     gtk_widget_set_sensitive(network_host, FALSE);
     gtk_widget_set_sensitive(network_port, FALSE);
     gtk_widget_set_sensitive(network_login, FALSE);
+    gtk_widget_set_sensitive(network_password_label, TRUE);
     gtk_widget_set_sensitive(network_password, TRUE);
+    gtk_widget_set_sensitive(network_confirm_password_label, FALSE);
     gtk_widget_set_sensitive(network_confirm_password, FALSE);
 
     gtk_widget_grab_focus(network_password);
@@ -393,7 +399,9 @@
     }
 
     gtk_widget_set_sensitive(network_login, FALSE);
+    gtk_widget_set_sensitive(network_password_label, FALSE);
     gtk_widget_set_sensitive(network_password, FALSE);
+    gtk_widget_set_sensitive(network_confirm_password_label, FALSE);
     gtk_widget_set_sensitive(network_confirm_password, FALSE);
     break;
   }
@@ -529,12 +537,12 @@
 {
   char buf[256];
 
-  set_connection_state(LOGIN_TYPE);
-
   gtk_entry_set_text(GTK_ENTRY(network_login), user_name);
   gtk_entry_set_text(GTK_ENTRY(network_host), server_host);
   my_snprintf(buf, sizeof(buf), "%d", server_port);
   gtk_entry_set_text(GTK_ENTRY(network_port), buf);
+
+  set_connection_state(LOGIN_TYPE);
 }
 
 /**************************************************************************
@@ -662,6 +670,7 @@
                       "xalign", 0.0,
                       "yalign", 0.5,
                       NULL);
+  network_host_label = label;
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
                   GTK_FILL, GTK_FILL, 0, 0);
 
@@ -678,6 +687,7 @@
                       "xalign", 0.0,
                       "yalign", 0.5,
                       NULL);
+  network_port_label = label;
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
                   GTK_FILL, GTK_FILL, 0, 0);
 
@@ -694,6 +704,7 @@
                       "xalign", 0.0,
                       "yalign", 0.5,
                       NULL);
+  network_login_label = label;
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 3, 4,
                   GTK_FILL, GTK_FILL, 0, 0);
 
@@ -711,6 +722,7 @@
                       "xalign", 0.0,
                       "yalign", 0.5,
                       NULL);
+  network_password_label = label;
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 4, 5,
                   GTK_FILL, GTK_FILL, 0, 0);
 
@@ -728,6 +740,7 @@
                       "xalign", 0.0,
                       "yalign", 0.5,
                       NULL);
+  network_confirm_password_label = label;
   gtk_table_attach(GTK_TABLE(table), label, 0, 1, 5, 6,
                   GTK_FILL, GTK_FILL, 0, 0);
 
@@ -1524,6 +1537,7 @@
   case PAGE_NETWORK:
     update_network_lists();
     gtk_widget_grab_focus(network_login);
+    gtk_editable_set_position(GTK_EDITABLE(network_login), 0);
     break;
   }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10625) [PATCH] Make the password labels insensitive, Vasco Alexandre da Silva Costa <=